2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2009, 2010 Daniel Borkmann.
4 * Copyright 2009, 2010 Emmanuel Roullit.
5 * Subject to the GPL, version 2.
14 #include <sys/socket.h>
16 #include <linux/ethtool.h>
18 #include <linux/wireless.h>
23 #include <sys/resource.h>
28 extern int af_socket(int af
);
29 extern int pf_socket(void);
30 extern int wireless_sigqual(const char *ifname
, struct iw_statistics
*stats
);
31 extern int wireless_rangemax_sigqual(const char *ifname
);
32 extern u32
wireless_bitrate(const char *ifname
);
33 extern u32
ethtool_bitrate(const char *ifname
);
34 extern int ethtool_drvinf(const char *ifname
, struct ethtool_drvinfo
*drvinf
);
35 extern int ethtool_link(const char *ifname
);
36 extern void set_nonblocking(int fd
);
37 extern int set_nonblocking_sloppy(int fd
);
38 extern int set_reuseaddr(int fd
);
39 extern void set_sock_prio(int fd
, int prio
);
40 extern void set_tcp_nodelay(int fd
);
41 extern void set_socket_keepalive(int fd
);
42 extern int set_ipv6_only(int fd
);
43 extern void set_mtu_disc_dont(int fd
);
44 extern int get_system_socket_mem(int which
);
45 extern void set_system_socket_mem(int which
, int val
);
46 extern void register_signal(int signal
, void (*handler
)(int));
47 extern void register_signal_f(int signal
, void (*handler
)(int), int flags
);
48 extern void set_epoll_descriptor(int fd_epoll
, int action
, int fd_toadd
, int events
);
49 extern int set_epoll_descriptor2(int fd_epoll
, int action
, int fd_toadd
, int events
);
50 extern void set_system_socket_memory(int *vals
, size_t len
);
51 extern void reset_system_socket_memory(int *vals
, size_t len
);
52 extern void set_itimer_interval_value(struct itimerval
*itimer
, unsigned long sec
,