summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-12-10 16:58:24 +0100
committerTobias Klauser <tklauser@distanz.ch>2016-12-10 17:01:33 +0100
commit0a9adf482d5bb2cf27ede0f970228b9f69145f4d (patch)
tree2f89d301fbb7dc90dcd9e263cb5bb88138bbfccc
parentc16b914a728f2786aaa4e1c44c092c3faaf1df48 (diff)
sock: change type of verbose parameter to set_sock_qdisc_bypass()
Verbose mode is a boolean option and is already defined as type bool in trafgen, so make the corresponding parameter to set_sock_qdisc_bypass() of type bool too. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--sock.c4
-rw-r--r--sock.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/sock.c b/sock.c
index a84796c..634771b 100644
--- a/sock.c
+++ b/sock.c
@@ -55,10 +55,10 @@ int pf_socket_type(uint32_t type)
}
}
-/* Avail in kernel >= 3.14
+/* Available in kernel >= 3.14
* in commit d346a3fae3 (packet: introduce PACKET_QDISC_BYPASS socket option)
*/
-void set_sock_qdisc_bypass(int fd, int verbose)
+void set_sock_qdisc_bypass(int fd, bool verbose)
{
int ret, val = 1;
diff --git a/sock.h b/sock.h
index 8f68d42..155e64e 100644
--- a/sock.h
+++ b/sock.h
@@ -1,13 +1,16 @@
#ifndef SOCK_H
#define SOCK_H
+#include <stdbool.h>
+#include <stdint.h>
+
extern int af_socket(int af);
extern int pf_socket(void);
extern int pf_socket_type(uint32_t type);
extern void set_nonblocking(int fd);
extern int set_nonblocking_sloppy(int fd);
extern int set_reuseaddr(int fd);
-extern void set_sock_qdisc_bypass(int fd, int verbose);
+extern void set_sock_qdisc_bypass(int fd, bool verbose);
extern void set_sock_prio(int fd, int prio);
extern void set_tcp_nodelay(int fd);
extern void set_socket_keepalive(int fd);