|
18 | 18 | documentation and/or other materials provided with the distribution.
|
19 | 19 | 3. All advertising materials mentioning features or use of this software
|
20 | 20 | must display the following acknowledgement:
|
21 |
| - |
| 21 | +
|
22 | 22 | This product includes software developed by Eric Rescorla for
|
23 | 23 | RTFM, Inc.
|
24 | 24 |
|
|
35 | 35 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
36 | 36 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
37 | 37 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
38 |
| - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH DAMAGE. |
| 38 | + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH |
| 39 | + DAMAGE. |
39 | 40 |
|
40 | 41 | $Id: network.h,v 1.3 2001/09/14 22:29:14 ekr Exp $
|
41 | 42 |
|
42 | 43 |
|
43 | 44 | [email protected] Tue Dec 29 09:53:50 1998
|
44 | 45 | */
|
45 | 46 |
|
46 |
| - |
47 | 47 | #ifndef _network_h
|
48 | 48 | #define _network_h
|
49 | 49 |
|
@@ -74,56 +74,58 @@ typedef struct proto_mod_ proto_mod;
|
74 | 74 | typedef struct proto_handler_ proto_handler;
|
75 | 75 | typedef struct packet_ packet;
|
76 | 76 |
|
77 |
| -int network_handler_create PROTO_LIST((proto_mod *mod, |
78 |
| - n_handler **handlerp)); |
79 |
| -int network_handler_destroy PROTO_LIST((proto_mod *mod,n_handler **handlerp)); |
80 |
| -int network_process_packet PROTO_LIST((n_handler *handler, |
81 |
| - struct timeval *timestamp,UCHAR *data,int length,int af)); |
82 |
| -int packet_copy PROTO_LIST((packet *in,packet **out)); |
83 |
| -int packet_destroy PROTO_LIST((packet *p)); |
84 |
| -int timestamp_diff PROTO_LIST(( struct timeval *t1,struct timeval *t0, |
85 |
| - struct timeval *diff)); |
86 |
| -int lookuphostname PROTO_LIST((struct sockaddr_storage *addr,char **name)); |
87 |
| -int addrtotext PROTO_LIST((struct sockaddr_storage *addr,char **name)); |
| 77 | +int network_handler_create PROTO_LIST((proto_mod * mod, n_handler **handlerp)); |
| 78 | +int network_handler_destroy PROTO_LIST((proto_mod * mod, n_handler **handlerp)); |
| 79 | +int network_process_packet PROTO_LIST((n_handler * handler, |
| 80 | + struct timeval *timestamp, |
| 81 | + UCHAR *data, |
| 82 | + int length, |
| 83 | + int af)); |
| 84 | +int packet_copy PROTO_LIST((packet * in, packet **out)); |
| 85 | +int packet_destroy PROTO_LIST((packet * p)); |
| 86 | +int timestamp_diff PROTO_LIST((struct timeval * t1, |
| 87 | + struct timeval *t0, |
| 88 | + struct timeval *diff)); |
| 89 | +int lookuphostname PROTO_LIST((struct sockaddr_storage * addr, char **name)); |
| 90 | +int addrtotext PROTO_LIST((struct sockaddr_storage * addr, char **name)); |
88 | 91 |
|
89 | 92 | struct packet_ {
|
90 |
| - struct timeval ts; |
91 |
| - UCHAR *base; /*The base of the packet*/ |
92 |
| - int _len; |
93 |
| - UCHAR *data; /*The data ptr appropriate to this layer*/ |
94 |
| - int len; /*The length of the data segment*/ |
95 |
| - |
96 |
| - /*These just save us the effort of doing casts to the data |
97 |
| - segments*/ |
98 |
| - struct ip *ip; /*The IP header*/ |
99 |
| - int af; |
100 |
| - union { |
101 |
| - struct ip *ip; /*The IP header*/ |
102 |
| - struct ip6_hdr *ip6; /*The IP header*/ |
103 |
| - } l3_hdr; |
104 |
| - struct tcphdr *tcp; /*The TCP header*/ |
105 |
| - union { |
106 |
| - struct sockaddr_storage so_st; |
107 |
| - struct sockaddr_in so_in; |
108 |
| - struct sockaddr_in6 so_in6; |
109 |
| - } i_addr; |
110 |
| - union { |
111 |
| - struct sockaddr_storage so_st; |
112 |
| - struct sockaddr_in so_in; |
113 |
| - struct sockaddr_in6 so_in6; |
114 |
| - } r_addr; |
| 93 | + struct timeval ts; |
| 94 | + UCHAR *base; /*The base of the packet*/ |
| 95 | + int _len; |
| 96 | + UCHAR *data; /*The data ptr appropriate to this layer*/ |
| 97 | + int len; /*The length of the data segment*/ |
| 98 | + |
| 99 | + /*These just save us the effort of doing casts to the data |
| 100 | + segments*/ |
| 101 | + struct ip *ip; /*The IP header*/ |
| 102 | + int af; |
| 103 | + union { |
| 104 | + struct ip *ip; /*The IP header*/ |
| 105 | + struct ip6_hdr *ip6; /*The IP header*/ |
| 106 | + } l3_hdr; |
| 107 | + struct tcphdr *tcp; /*The TCP header*/ |
| 108 | + union { |
| 109 | + struct sockaddr_storage so_st; |
| 110 | + struct sockaddr_in so_in; |
| 111 | + struct sockaddr_in6 so_in6; |
| 112 | + } i_addr; |
| 113 | + union { |
| 114 | + struct sockaddr_storage so_st; |
| 115 | + struct sockaddr_in so_in; |
| 116 | + struct sockaddr_in6 so_in6; |
| 117 | + } r_addr; |
115 | 118 | };
|
116 | 119 |
|
117 | 120 | #include "tcpconn.h"
|
118 | 121 | #include "proto_mod.h"
|
119 | 122 |
|
120 | 123 | extern UINT4 NET_print_flags;
|
121 | 124 |
|
122 |
| -#define NET_PRINT_TCP_HDR 1 |
123 |
| -#define NET_PRINT_TYPESET 2 |
124 |
| -#define NET_PRINT_ACKS 4 |
125 |
| -#define NET_PRINT_NO_RESOLVE 8 |
126 |
| -#define NET_PRINT_JSON 16 |
127 |
| -#define NET_PRINT_TS 32 |
| 125 | +#define NET_PRINT_TCP_HDR 1 |
| 126 | +#define NET_PRINT_TYPESET 2 |
| 127 | +#define NET_PRINT_ACKS 4 |
| 128 | +#define NET_PRINT_NO_RESOLVE 8 |
| 129 | +#define NET_PRINT_JSON 16 |
| 130 | +#define NET_PRINT_TS 32 |
128 | 131 | #endif
|
129 |
| - |
|
0 commit comments