Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / contrib / ipfilter / ipsend / ipsend.h
1 /*
2  * ipsend.h (C) 1997-1998 Darren Reed
3  *
4  * This was written to test what size TCP fragments would get through
5  * various TCP/IP packet filters, as used in IP firewalls.  In certain
6  * conditions, enough of the TCP header is missing for unpredictable
7  * results unless the filter is aware that this can happen.
8  *
9  * See the IPFILTER.LICENCE file for details on licencing.
10  *
11  */
12 #ifndef __P
13 # ifdef __STDC__
14 #  define       __P(x)  x
15 # else
16 #  define       __P(x)  ()
17 # endif
18 #endif
19
20 #include "ip_compat.h"
21 #ifdef  linux
22 #include <linux/sockios.h>
23 #endif
24 #include "tcpip.h"
25 #include "ipt.h"
26 #include "ipf.h"
27
28 extern  int     resolve __P((char *, char *));
29 extern  int     arp __P((char *, char *));
30 extern  u_short chksum __P((u_short *, int));
31 extern  int     send_ether __P((int, char *, int, struct in_addr));
32 extern  int     send_ip __P((int, int, ip_t *, struct in_addr, int));
33 extern  int     send_tcp __P((int, int, ip_t *, struct in_addr));
34 extern  int     send_udp __P((int, int, ip_t *, struct in_addr));
35 extern  int     send_icmp __P((int, int, ip_t *, struct in_addr));
36 extern  int     send_packet __P((int, int, ip_t *, struct in_addr));
37 extern  int     send_packets __P((char *, int, ip_t *, struct in_addr));
38 extern  u_short seclevel __P((char *));
39 extern  u_32_t  buildopts __P((char *, char *, int));
40 extern  int     addipopt __P((char *, struct ipopt_names *, int, char *));
41 extern  int     initdevice __P((char *, int, int));
42 extern  int     sendip __P((int, char *, int));
43 #ifdef  linux
44 extern  struct  sock    *find_tcp __P((int, struct tcpiphdr *));
45 #else
46 extern  struct  tcpcb   *find_tcp __P((int, struct tcpiphdr *));
47 #endif
48 extern  int     ip_resend __P((char *, int, struct ipread *, struct in_addr, char *));
49
50 extern  void    ip_test1 __P((char *, int, ip_t *, struct in_addr, int));
51 extern  void    ip_test2 __P((char *, int, ip_t *, struct in_addr, int));
52 extern  void    ip_test3 __P((char *, int, ip_t *, struct in_addr, int));
53 extern  void    ip_test4 __P((char *, int, ip_t *, struct in_addr, int));
54 extern  void    ip_test5 __P((char *, int, ip_t *, struct in_addr, int));
55 extern  void    ip_test6 __P((char *, int, ip_t *, struct in_addr, int));
56 extern  void    ip_test7 __P((char *, int, ip_t *, struct in_addr, int));
57 extern  int     do_socket __P((char *, int, struct tcpiphdr *, struct in_addr));
58 extern  int     openkmem __P((void));
59 extern  int     kmemcpy __P((char *, void *, int));
60
61 #define KMCPY(a,b,c)    kmemcpy((char *)(a), (void *)(b), (int)(c))
62
63 #ifndef OPT_RAW
64 #define OPT_RAW 0x80000
65 #endif
66
67 #ifndef __STDC__
68 # ifndef const
69 #  define const
70 # endif
71 #endif