Watt-32 tcp/ip  2.2 dev-rel.10
split.h
Go to the documentation of this file.
1 
3 #ifndef _w32_SPLIT_H
4 #define _w32_SPLIT_H
5 
6 #if defined(USE_STATISTICS) || defined(USE_DEBUG) || defined(USE_IPV6)
7 #define NEED_PKT_SPLIT
8 #endif
9 
10 enum Components {
11  TYPE_TOKEN_HEAD = 1,
12  TYPE_FDDI_HEAD,
13  TYPE_ETHER_HEAD,
14  TYPE_ARCNET_HEAD,
15  TYPE_ARP,
16  TYPE_RARP,
17  TYPE_PPPOE_DISC,
18  TYPE_PPPOE_SESS,
19  TYPE_PPP_LCP,
20  TYPE_PPP_IPCP,
21  TYPE_LLC_HEAD,
22  TYPE_IP4,
23  TYPE_IP4_OPTIONS,
24  TYPE_IP4_FRAG,
25  TYPE_ICMP,
26  TYPE_IGMP,
27  TYPE_UDP_HEAD,
28  TYPE_UDP_DATA,
29  TYPE_TCP_HEAD,
30  TYPE_TCP_OPTIONS,
31  TYPE_TCP_DATA,
32  TYPE_IP6,
33  TYPE_IP6_HOP,
34  TYPE_IP6_IPV6,
35  TYPE_IP6_ROUTING,
36  TYPE_IP6_FRAGMENT,
37  TYPE_IP6_ESP,
38  TYPE_IP6_AUTH,
39  TYPE_IP6_ICMP,
40  TYPE_IP6_DEST,
41  TYPE_IP6_NONE,
42  TYPE_IP6_UNSUPP,
43  TYPE_MAX
44  };
45 
46 struct pkt_split {
47  enum Components type;
48  const void *data;
49  unsigned len;
50  };
51 
52 extern const struct pkt_split *pkt_split_mac_in (const void *link_pkt);
53 extern const struct pkt_split *pkt_split_mac_out (const void *link_pkt);
54 extern const struct pkt_split *pkt_get_split_in (void);
55 extern const struct pkt_split *pkt_get_split_out (void);
56 extern const struct pkt_split *pkt_get_type_in (enum Components type);
57 extern const struct pkt_split *pkt_get_type_out (enum Components type);
58 
59 extern void pkt_print_split_in (void);
60 extern void pkt_print_split_out (void);
61 
62 #endif