Flowgrind
Advanced TCP traffic generator
fg_socket.h
Go to the documentation of this file.
1 
6 /*
7  * Copyright (C) 2010-2013 Christian Samsel <christian.samsel@rwth-aachen.de>
8  * Copyright (C) 2009 Tim Kosse <tim.kosse@gmx.de>
9  * Copyright (C) 2007-2008 Daniel Schaffrath <daniel.schaffrath@mac.com>
10  *
11  * This file is part of Flowgrind.
12  *
13  * Flowgrind is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation, either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * Flowgrind is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with Flowgrind. If not, see <http://www.gnu.org/licenses/>.
25  *
26  */
27 
28 #ifndef _FG_SOCKET_H_
29 #define _FG_SOCKET_H_
30 
31 #ifdef HAVE_CONFIG_H
32 #include "config.h"
33 #endif /* HAVE_CONFIG_H */
34 
35 #include <netinet/tcp.h>
36 #include <sys/socket.h>
37 
38 int set_congestion_control(int fd, const char *cc_alg);
39 int set_so_debug(int fd);
40 int set_keepalive(int fd, int how);
41 int set_nodelay(int fd);
42 int set_non_blocking (int fd);
43 int set_route_record(int fd);
44 int set_so_dscp(int fd, uint8_t);
45 int set_so_elcn(int fd, int val);
46 int set_so_lcd(int fd);
47 int set_tcp_mtcp(int fd);
48 int set_tcp_nodelay(int fd);
49 int set_dscp(int fd, int dscp);
50 int set_tcp_cork(int fd);
51 int toggle_tcp_cork(int fd);
52 int set_window_size(int, int);
53 int set_window_size_directed(int, int, int);
54 
55 int set_ip_mtu_discover(int fd);
56 int get_pmtu(int fd);
57 int get_imtu(int fd);
58 
59 const char *fg_nameinfo(const struct sockaddr *sa, socklen_t salen);
60 char sockaddr_compare(const struct sockaddr *a, const struct sockaddr *b);
61 
62 int get_port(int fd);
63 
64 #endif /* _FG_SOCKET_H_ */
set_route_record
int set_route_record(int fd)
Definition: fg_socket.c:149
toggle_tcp_cork
int toggle_tcp_cork(int fd)
Definition: fg_socket.c:331
fg_nameinfo
const char * fg_nameinfo(const struct sockaddr *sa, socklen_t salen)
Definition: fg_socket.c:374
get_pmtu
int get_pmtu(int fd)
Definition: fg_socket.c:193
set_tcp_cork
int set_tcp_cork(int fd)
Definition: fg_socket.c:317
set_ip_mtu_discover
int set_ip_mtu_discover(int fd)
Definition: fg_socket.c:300
get_port
int get_port(int fd)
Definition: fg_socket.c:441
set_so_debug
int set_so_debug(int fd)
Definition: fg_socket.c:366
get_imtu
int get_imtu(int fd)
Definition: fg_socket.c:214
set_so_elcn
int set_so_elcn(int fd, int val)
Definition: fg_socket.c:278
set_keepalive
int set_keepalive(int fd, int how)
Definition: fg_socket.c:258
set_window_size
int set_window_size(int, int)
Definition: fg_socket.c:117
set_congestion_control
int set_congestion_control(int fd, const char *cc_alg)
Definition: fg_socket.c:265
set_non_blocking
int set_non_blocking(int fd)
Definition: fg_socket.c:172
set_window_size_directed
int set_window_size_directed(int, int, int)
Definition: fg_socket.c:78
sockaddr_compare
char sockaddr_compare(const struct sockaddr *a, const struct sockaddr *b)
Definition: fg_socket.c:389
set_tcp_mtcp
int set_tcp_mtcp(int fd)
Definition: fg_socket.c:347
set_tcp_nodelay
int set_tcp_nodelay(int fd)
Definition: fg_socket.c:358
set_so_dscp
int set_so_dscp(int fd, uint8_t)
set_so_lcd
int set_so_lcd(int fd)
Definition: fg_socket.c:288
config.h
set_nodelay
int set_nodelay(int fd)
Definition: fg_socket.c:184
set_dscp
int set_dscp(int fd, int dscp)
Definition: fg_socket.c:132