Azinix

pkt.h

Go to the documentation of this file.
00001 /** \file pkt.h
00002 
00003   \brief Packet data structures
00004 
00005 */
00006 
00007 #ifndef _PKT
00008 #define _PKT
00009 
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013 
00014 #include "nm.h"
00015 
00016 /**
00017   * \brief Types of layer 3 protocols in host order
00018   *
00019   * \sa /usr/include/linux/if_eth.h
00020   */
00021 
00022 typedef enum
00023 {
00024   Pkt_L3ProtIp_c = 0x0008,
00025   Pkt_L3ProtComp_c = 0x0009,    // created our own protocol for compressed packets
00026   Pkt_L3ProtArp_c = 0x0608,
00027   Pkt_L3ProtRarp_c = 0x3580,
00028   Pkt_L3ProtUndef_c = 0x0000
00029 } Pkt_L3ProtType_t;
00030 
00031 
00032 /**
00033   * \brief Types of layer 4 protocols
00034   *
00035   * \sa /usr/include/linux/in.h
00036   */
00037 
00038 typedef enum
00039 {
00040   Pkt_L4ProtTcp_c = 6,
00041   Pkt_L4ProtUdp_c = 17,
00042   Pkt_L4ProtIcmp_c = 1,
00043   Pkt_L4ProtIgmp_c = 2,
00044   Pkt_L4ProtRsvp_c = 46,
00045   Pkt_L4ProtIPv6_c = 41,
00046   Pkt_L4ProtPIM_c = 103,
00047   Pkt_L4ProtRaw_c = 255,
00048   Pkt_L4ProtUndef_c = 0
00049 } Pkt_L4ProtType_t;
00050 
00051 
00052 /**
00053   * \brief  Ethernet Packet Header.
00054   * 
00055   * From Spurgeon page 24, 
00056   * and /usr/include/net/ethernet.h  sizeof( Pkt_EthernetHdr_t ) report 20 bytes.
00057   */
00058 
00059 struct Pkt_EthernetHdr_t
00060 {
00061 
00062   u_int8_t dhost[6];        /* destination eth addr */
00063   u_int8_t shost[6];        /* source ether addr    */
00064 
00065 
00066   /* According to Spurgeon, one 16-bit block is the packet type or length field */
00067   /* if it's less than 1518 (decimal) it's length, more than 1536, it's type */
00068   /*                               */
00069   /* unsigned char  typeOrLength;  */
00070   /*                               */
00071   /* However, I'm going to use a type field here, we get the length automatically from the read */
00072 
00073   u_int16_t type;       // IP = 0x0800  in network order
00074 
00075   // not sure where the crc check goes 
00076   // unsigned int crc; 
00077 };
00078 
00079 typedef struct Pkt_EthernetHdr_t Pkt_EthernetHdr_t;
00080 
00081 
00082 /**
00083   * \brief use for wlan detection
00084   */
00085 
00086 struct Pkt_WifiHdr_t
00087 {
00088   u_int16_t frame_control;
00089   u_int16_t duration_id;
00090   u_int8_t addr1[6];
00091   u_int8_t addr2[6];
00092   u_int8_t addr3[6];
00093   u_int16_t seq_control;
00094   u_int8_t addr4[6];
00095 };
00096 
00097 typedef struct Pkt_WifiHdr_t Pkt_WifiHdr_t;
00098 
00099 
00100 /**
00101   * \brief  IP Packet header.
00102   * 
00103   * Taken from p 252 of Peterson and and Davie, 2nd edition.
00104   * 
00105   * I've not used bit fields to avoid alignment and big/little endian issues,
00106   * and have set options to be a single int.  Note this is just the header field.
00107   */
00108 
00109 struct Pkt_IpHdr_t
00110 {
00111 
00112   /* we are assuming a little endian machine */
00113   /* see /usr/include/linux/ip.h for details */
00114 
00115   u_int8_t ihl:4,       // header measured in 32 bit words, works out to 
00116     // 5 when there are no options
00117     version:4;          // 
00118 
00119   u_int8_t TOS;         /* Type of Service */
00120 
00121   u_int16_t length;     /* length measure in bytes, INCLUDES the header bytes */
00122 
00123   u_int16_t id;         /* used for frag/reassembly */
00124 
00125   /* the next field is for fragmentation and reassembly */
00126   /* 4 bits for Flags, 12 bits for Offset */
00127 
00128   /* The 3 flag bits are the MSBs - they are reserved, must be 0 (MSB) */
00129   /* don't frag (next) and more fragments (third).  */
00130   /* the M bit in flags signifies if more fragments are to follow */
00131 
00132   /* Offset counts 8-byte units of data */
00133   /* Peterson and Davie 2nd edition page 257 gives code for reassembly */
00134 
00135   /* from http://www.protocols.com/pbook/tcpip2.htm : */
00136   /* Indicates where this fragment belongs in the datagram. The */
00137   /* fragment offset is measured in units of 8 bytes (64 bits). */
00138   /* The first fragment has offset zero. */
00139 
00140   u_int16_t RB:1, DF:1, MF:1, offset:13;
00141 
00142   u_int8_t TTL;         /* time to live, current default is 64 */
00143 
00144   u_int8_t protocol;        // ICMP is 1, TCP is 6, UDP is 17
00145   // see /usr/include/linux/in.h for details
00146 
00147   /* add up header as 16 bit words, using 1-s complement */
00148   /* take 1-s complement of result */
00149 
00150   u_int16_t checksum;
00151 
00152   u_int32_t sourceIp;
00153   u_int32_t destIp;
00154 
00155   /* the number of options fields is variable */
00156 
00157   /*
00158 
00159      From http://www.iana.org/assignments/ip-parameters
00160 
00161      IP OPTION NUMBERS
00162 
00163      (last updated 2001-06-29)
00164 
00165      The Internet Protocol (IP) has provision for optional header fields
00166      identified by an option type field.  Options 0 and 1 are exactly one
00167      octet which is their type field.  All other options have their one
00168      octet type field, followed by a one octet length field, followed by
00169      length-2 octets of option data.  The option type field is sub-divided
00170      into a one bit copied flag, a two bit class field, and a five bit
00171      option number.  These taken together form an eight bit value for the
00172      option type field.  IP options are commonly refered to by this value.
00173 
00174 
00175      Copy Class Number Value Name                               Reference
00176      ---- ----- ------ ----- ------------------------------- ---------
00177      0     0      0     0 EOOL   - End of Options List    [RFC791,JBP]
00178      0     0      1     1 NOP    - No Operation           [RFC791,JBP]
00179      1     0      2   130 SEC    - Security                  [RFC1108]
00180      1     0      3   131 LSR    - Loose Source Route     [RFC791,JBP]
00181      0     2      4    68 TS     - Time Stamp             [RFC791,JBP]
00182      1     0      5   133 E-SEC  - Extended Security         [RFC1108]
00183      1     0      6   134 CIPSO  - Commercial Security           [???]
00184      0     0      7     7 RR     - Record Route           [RFC791,JBP]
00185      1     0      8   136 SID    - Stream ID              [RFC791,JBP]
00186      1     0      9   137 SSR    - Strict Source Route    [RFC791,JBP]
00187      0     0     10    10 ZSU    - Experimental Measurement      [ZSu]
00188      0     0     11    11 MTUP   - MTU Probe                 [RFC1191]*
00189      0     0     12    12 MTUR   - MTU Reply                 [RFC1191]*
00190      1     2     13   205 FINN   - Experimental Flow Control    [Finn]
00191      1     0     14   142 VISA   - Expermental Access Control [Estrin]
00192      0     0     15    15 ENCODE - ???                      [VerSteeg]
00193      1     0     16   144 IMITD  - IMI Traffic Descriptor        [Lee]
00194      1     0     17   145 EIP    - Extended Internet Protocol[RFC1385]
00195      0     2     18    82 TR     - Traceroute              [RFC1393]
00196      1     0     19   147 ADDEXT - Address Extension    [Ullmann IPv7]  
00197      1     0     20   148 RTRALT - Router Alert              [RFC2113]
00198      1     0     21   149 SDB    - Selective Directed Broadcast[Graff]
00199      1     0     22   150 NSAPA  - NSAP Addresses          [Carpenter]
00200      1   0     23   151 DPS    - Dynamic Packet State        [Malis]
00201      1   0     24   152 UMP    - Upstream Multicast Pkt. [Farinacci]
00202 
00203      [Note, an asterisk (*) denotes an obsoleted IP Option Number.]
00204 
00205    */
00206 };
00207 
00208 typedef struct Pkt_IpHdr_t Pkt_IpHdr_t;
00209 
00210 
00211 /**
00212   * \brief  Types of flows
00213   *
00214   * Missing a number of cases - e.g., udp, icmp.
00215   */
00216 
00217 typedef enum
00218 {
00219   Pkt_SrcIpFlow_c,
00220   Pkt_DestIpFlow_c,
00221   Pkt_SrcDestIpFlow_c,
00222   Pkt_SrcDestTcpIpFlow_c,
00223   Pkt_DestTcpIpFlow_c
00224 } Pkt_FlowType_t;
00225 
00226 
00227 /**
00228   * \brief  Types of byte-orders.
00229   * 
00230   * Only two possibilities: host or network.
00231   */
00232 
00233 typedef enum
00234 {
00235   Pkt_HostByteOrder_c,
00236   Pkt_NetworkByteOrder_c
00237 } Pkt_ByteOrder_t;
00238 
00239 
00240 /**
00241   * \brief  Types of TCP flags.
00242   * 
00243   * Their numbering is in the order they appear in the header.
00244   */
00245 
00246 typedef enum
00247 {
00248   Pkt_TcpFin_c,
00249   Pkt_TcpSyn_c,
00250   Pkt_TcpRst_c,
00251   Pkt_TcpPsh_c,
00252   Pkt_TcpAck_c,
00253   Pkt_TcpUrg_c,
00254   Pkt_TcpEce_c,
00255   Pkt_TcpCwr_c
00256 } Pkt_TcpFlags_t;
00257 
00258 
00259 /**
00260   * \brief  TCP Packet header.
00261   * 
00262   * Taken from p 377 of Peterson and and Davie, 2nd edition.
00263   * 
00264   * I've not used bit fields to avoid alignment and big/little endian issues,
00265   * and have set options to be a single int.  Note this is just the header field.
00266   */
00267 
00268 struct Pkt_TcpHdr_t
00269 {
00270 
00271   u_int16_t srcPort;
00272   u_int16_t destPort;
00273 
00274   /* seqNum, ack and advWindow are all related to the sliding window */
00275   /* each bye has a sequence number, and and seqNum holds the seq number for */
00276   /* the first byte of data carried in the segment */
00277 
00278   u_int32_t seqNum;
00279   u_int32_t ackNum;
00280 
00281   // using little endian format - see /usr/include/linux/tcp.h for details
00282   u_int16_t res1:4, doff:4, // offset, indicates number of 4 byte words in header
00283     // there are 5 * 4 bytes in the header without options
00284     /* one bit for each of fin, syn, rst, psh, ack, urg, ece, cwr */
00285     /*   o syn, fin are for establishing and tearing down TCP conections */
00286     /*   o ack set when acknowledgement field is valid, implying receiver need to look at it */
00287     /*   o urg set when segment contains urgent data, urgPtr is where the NONurgent data begins */
00288     /*   o push set when sender performs push operation */
00289     /*   o reset set when receiver is confused, wants to abort */
00290     fin:1, syn:1, rst:1, psh:1, ack:1, urg:1, ece:1, cwr:1;
00291 
00292   u_int16_t advWindow;
00293 
00294   u_int16_t checkSum;
00295   u_int16_t urgPtr;
00296 
00297   // options will begin here and continue for  ( doff - 5 ) * 4 bytes
00298   // padding may be needed to make the header a multiple of 4 bytes
00299   // in length
00300 };
00301 
00302 typedef struct Pkt_TcpHdr_t Pkt_TcpHdr_t;
00303 
00304 
00305 /**
00306   * \brief  UDP Packet header.
00307   * 
00308   * Taken from p 370 of Peterson and and Davie, 2nd edition.
00309   * Fields are self evident.
00310   */
00311 
00312 struct Pkt_UdpHdr_t
00313 {
00314 
00315   u_int16_t srcPort;
00316   u_int16_t destPort;
00317 
00318   u_int16_t checkSum;
00319   u_int16_t length;     // in bytes, includes the header
00320 
00321 };
00322 
00323 typedef struct Pkt_UdpHdr_t Pkt_UdpHdr_t;
00324 
00325 
00326 /**
00327   * \brief  ICMP packet header
00328   * 
00329   * Taken directly from 
00330   * /usr/include/linux/icmp.h
00331   */
00332 
00333 struct Pkt_IcmpHdr_t
00334 {
00335   u_int8_t type;
00336   u_int8_t code;
00337   u_int16_t checksum;
00338   union
00339   {
00340     struct
00341     {
00342       u_int16_t id;
00343       u_int16_t sequence;
00344     } echo;
00345     u_int16_t gateway;
00346     struct
00347     {
00348       u_int16_t unused;
00349       u_int16_t mtu;
00350     } frag;
00351   } un;
00352 };
00353 
00354 typedef struct Pkt_IcmpHdr_t Pkt_IcmpHdr_t;
00355 
00356 
00357 /**
00358   * \brief  Packed bit-fields for ip frag flags, offset.
00359   * 
00360   */
00361 
00362 typedef struct Pkt_IpFlags_t
00363 {
00364   unsigned int RB:4;
00365   unsigned int DF:4;
00366   unsigned int MF:1;
00367   unsigned int offset:13;
00368 } Pkt_IpFlags_t;
00369 
00370 
00371 /**
00372   * \brief  Packed bit-fields for tcp flags, offset, etc.
00373   */
00374 
00375 typedef struct Pkt_TcpResDoffFlags_t
00376 {
00377   unsigned int res1:4;
00378   unsigned int doff:4;
00379   unsigned int fin:1;
00380   unsigned int syn:1;
00381   unsigned int rst:1;
00382   unsigned int psh:1;
00383   unsigned int ack:1;
00384   unsigned int urg:1;
00385   unsigned int ece:1;
00386   unsigned int cwr:1;
00387 } Pkt_TcpResDoffFlags_t;
00388 
00389 
00390 /**
00391   * \brief  Layer 4 flow captured by 4 fields - source/dest IP, source/dest TCP ports
00392   */
00393 
00394 struct Pkt_L4Flow_t
00395 {
00396 
00397   unsigned int srcIp;
00398   unsigned int destIp;
00399 
00400   unsigned short int srcPort;
00401   unsigned short int destPort;
00402 
00403 };
00404 
00405 typedef struct Pkt_L4Flow_t Pkt_L4Flow_t;
00406 
00407 
00408 /**
00409   * \brief  An encapsulation of the libnet_t structure.
00410   */
00411 
00412 struct Pkt_LibNet_t
00413 {
00414   char *interfaceName;
00415   char *errbuf;
00416   libnet_t *l;
00417 };
00418 
00419 typedef struct Pkt_LibNet_t Pkt_LibNet_t;
00420 
00421 
00422 /**
00423   * \brief  An encapsulation of the libpcap_t structure.
00424   */
00425 
00426 struct Pkt_LibPcap_t
00427 {
00428   pcap_t *p;
00429   char *interfaceName;
00430   struct pcap_stat ps;
00431   struct pcap_pkthdr hdr;
00432   u_int32_t localNet;
00433   u_int32_t netmask;
00434   struct bpf_program filterCode;
00435 };
00436 
00437 typedef struct Pkt_LibPcap_t Pkt_LibPcap_t;
00438 
00439 
00440 /**
00441   * \brief Useful for passing sets of packets around.
00442   */
00443 
00444 struct Pkt_VectorBuff_t
00445 {
00446   int count;
00447   void **pktArray;
00448   int *pktArrayLength;
00449 };
00450 
00451 typedef struct Pkt_VectorBuff_t Pkt_VectorBuff_t;
00452 
00453 
00454 /** \brief  Packet and rules that are to be applied 
00455 
00456   The currentRule field keeps track of the rule that is next to be applied.
00457 */
00458 
00459 struct Pkt_ProcessPkt_t
00460 {
00461   Pkt_EthernetHdr_t *pkt;
00462   int length;           // derived from capture code
00463   int currentRule;
00464   Pkt_LibPcap_t *inIf;      // marks the interface the packet came in
00465   Pkt_LibNet_t *outIf;      // marks the interface the packet is to go out on
00466   util_timing_t inTime;
00467   util_timing_t outTime;
00468 
00469   array_t *applicableRules;
00470 };
00471 
00472 typedef struct Pkt_ProcessPkt_t Pkt_ProcessPkt_t;
00473 
00474 
00475 /**
00476   * \brief Structure encapsulating settings for Pkt_CreateRandEthPktArray
00477   */
00478 
00479 struct Pkt_TfcMode_t
00480 {
00481   int size;
00482   char *srcMac;
00483   char *destMac;
00484   int numSeeds;
00485   double pktGap;
00486 };
00487 
00488 typedef struct Pkt_TfcMode_t Pkt_TfcMode_t;
00489 
00490 
00491 /**AutomaticStart*************************************************************/
00492 
00493 /*---------------------------------------------------------------------------*/
00494 /* Extern function prototypes                                                */
00495 /*---------------------------------------------------------------------------*/
00496 
00497 extern Pkt_IpHdr_t *Pkt_EthernetExtractIp (Pkt_EthernetHdr_t * ethPkt);
00498 extern int Pkt_EthernetPktHdrReadLengthNetworkOrder (Pkt_EthernetHdr_t * pkt);
00499 extern int Pkt_EthernetPktHdrReadLength (Pkt_EthernetHdr_t * pkt);
00500 extern int Pkt_EthernetHdrFree (Pkt_EthernetHdr_t * pkt);
00501 extern int Pkt_ProcessPktFree (Pkt_ProcessPkt_t * pp);
00502 extern Pkt_IcmpHdr_t *Pkt_IpExtractIcmp (Pkt_IpHdr_t * anIpPkt);
00503 extern Pkt_UdpHdr_t *Pkt_IpExtractUdp (Pkt_IpHdr_t * anIpPkt);
00504 extern Pkt_TcpHdr_t *Pkt_IpExtractTcp (Pkt_IpHdr_t * anIpPkt);
00505 extern char *Pkt_IpExtractPayload (Pkt_IpHdr_t * anIpPkt);
00506 extern Pkt_UdpHdr_t *Pkt_EthernetExtractUdp (Pkt_EthernetHdr_t *
00507                          aEthernetPkt);
00508 extern Pkt_TcpHdr_t *Pkt_EthernetExtractTcp (Pkt_EthernetHdr_t *
00509                          aEthernetPkt);
00510 extern Pkt_IcmpHdr_t *Pkt_EthernetExtractIcmp (Pkt_EthernetHdr_t *
00511                            aEthernetPkt);
00512 extern char *Pkt_UdpHdrReadPayload (Pkt_UdpHdr_t * aUdpPkt);
00513 extern char *Pkt_TcpHdrReadPayload (Pkt_TcpHdr_t * aTcpPkt);
00514 extern int Pkt_SrcIpFlowCmp (Pkt_EthernetHdr_t * pkt1,
00515                  Pkt_EthernetHdr_t * pkt2);
00516 extern int Pkt_DestIpFlowCmp (Pkt_EthernetHdr_t * pkt1,
00517                   Pkt_EthernetHdr_t * pkt2);
00518 extern int Pkt_SrcDestIpFlowCmp (Pkt_EthernetHdr_t * pkt1,
00519                  Pkt_EthernetHdr_t * pkt2);
00520 extern int Pkt_DestTcpIpFlowCmp (Pkt_EthernetHdr_t * pkt1,
00521                  Pkt_EthernetHdr_t * pkt2);
00522 extern int Pkt_SrcIpFlowHash (Pkt_EthernetHdr_t * pkt1, int modulus);
00523 extern int Pkt_DestIpFlowHash (Pkt_EthernetHdr_t * pkt1, int modulus);
00524 extern int Pkt_SrcDestIpFlowHash (Pkt_EthernetHdr_t * pkt1, int modulus);
00525 extern int Pkt_DestTcpIpFlowHash (Pkt_EthernetHdr_t * pkt1, int modulus);
00526 extern int Pkt_SrcDestTcpIpFlowHash (Pkt_EthernetHdr_t * pkt1, int modulus);
00527 extern int Pkt_SrcDestTcpIpFlowCmp (Pkt_EthernetHdr_t * pkt1,
00528                     Pkt_EthernetHdr_t * pkt2);
00529 extern int Pkt_L4FlowCompareForSt (Pkt_L4Flow_t * foo, Pkt_L4Flow_t * bar);
00530 extern int Pkt_L4FlowCompare (Pkt_L4Flow_t * foo, Pkt_L4Flow_t * bar);
00531 extern int Pkt_L4FlowHashForSt (Pkt_L4Flow_t * anL4Flow_t, int modulus);
00532 extern unsigned int Pkt_L4FlowHash (Pkt_L4Flow_t * anL4Flow_t);
00533 extern Pkt_L4Flow_t *Pkt_EthPktToL4Flow (Pkt_EthernetHdr_t * anEthPkt);
00534 extern Pkt_L4Flow_t *Pkt_IpPktToL4Flow (Pkt_IpHdr_t * anIpPkt);
00535 extern int Pkt_EthernetReadL3Type (Pkt_EthernetHdr_t * anEth);
00536 extern int Pkt_PrintEthernet (Pkt_EthernetHdr_t * anEthPkt, int length);
00537 extern int Pkt_PrintWifi (Pkt_WifiHdr_t * aWifiPkt);
00538 extern int Pkt_PrintIp (Pkt_IpHdr_t * anIpPkt);
00539 extern void Pkt_PrintIpAddressDotted (u_int32_t aNumIp);
00540 extern void Pkt_PrintIpAddressDottedGeneral ( char *, u_int32_t aNumIp);
00541 extern Pkt_ProcessPkt_t *Pkt_AllocateProcessPacket (Pkt_EthernetHdr_t * pkt,
00542                             array_t *
00543                             applicableRules);
00544 extern int Pkt_DeviceSkb ();
00545 extern Pkt_VectorBuff_t *Pkt_SocketVectorWrite (int count);
00546 extern int Pkt_EthPacketWriteToFile (int fd, Pkt_EthernetHdr_t * anEthPkt,
00547                      unsigned int length);
00548 extern int Pkt_EthPacketReadFromFile (int fd,
00549                       Pkt_EthernetHdr_t ** anEthPktPtr);
00550 extern array_t *Pkt_CreatePktsFromString (char *pktFile);
00551 extern Pkt_EthernetHdr_t *Pkt_CreatePktFromString (char *pktString);
00552 extern int Pkt_Init (char *ifName, int numRounds, int markPoint);
00553 extern Pkt_LibNet_t *Pkt_InitLibNet (char *interfaceName);
00554 extern int Pkt_LibNetFinish (Pkt_LibNet_t * obj);
00555 extern int Pkt_EthPktWrite (Pkt_EthernetHdr_t * anEth, int anEthLength,
00556                 Pkt_LibNet_t * aNetObj);
00557 extern array_t *Pkt_InitLibPcapArray (array_t * inArray);
00558 extern array_t *Pkt_InitLibNetArray (array_t * outArray);
00559 extern Pkt_LibPcap_t *Pkt_InitLibPcap (char *interfaceName);
00560 extern int Pkt_LibPcapFinish (Pkt_LibPcap_t * obj);
00561 extern util_byte_array_t *Pkt_CreateIcmpPkt (array_t * typeArray,
00562                          array_t * codeArray,
00563                          array_t * idArray,
00564                          array_t * seqArray);
00565 extern util_byte_array_t *Pkt_CreateUdpPkt (array_t * srcPorts,
00566                         array_t * destPorts,
00567                         array_t * sizes,
00568                         array_t * byteStrings);
00569 extern util_byte_array_t *Pkt_CreateTcpPkt (array_t * srcPorts,
00570                         array_t * destPorts,
00571                         array_t * seqNums,
00572                         array_t * ackNums,
00573                         st_table * flags, array_t * sizes,
00574                         array_t * byteStrings);
00575 extern util_byte_array_t *Pkt_CreateIpPkt (array_t * srcIps,
00576                        array_t * destIps,
00577                        st_table * ipFlagsTable,
00578                        array_t * offsets, array_t * ids,
00579                        st_table * ipOptions,
00580                        array_t * ttls,
00581                        util_byte_array_t * l4Payload,
00582                        int l4Protocol);
00583 extern Pkt_EthernetHdr_t *Pkt_CreateEthPkt (char *srcMac, char *destMac,
00584                         util_byte_array_t * l3Payload,
00585                         u_int16_t l3Protocol);
00586 extern Pkt_EthernetHdr_t *Pkt_CreateRandEthPkt (array_t * tmpArray);
00587 extern array_t *Pkt_SeedRandEthPktArray (Pkt_ByteOrder_t byteOrder,
00588                      int numSeeds,
00589                      Pkt_TfcMode_t * tfcMode);
00590 extern void Pkt_HTON (Pkt_EthernetHdr_t * anEth);
00591 extern void Pkt_NTOH (Pkt_EthernetHdr_t * anEth);
00592 
00593 // \todo - had to keep there here to get g++ to compile
00594 extern int Rlp_UpdateDefineTable (st_table * aTable, char *anEntry);
00595 extern array_t *Rlp_L7StringParse (char *l7Rule);
00596 extern u_int32_t Rlp_DotToInt (char *);
00597 
00598 
00599 /**AutomaticEnd***************************************************************/
00600 #ifdef __cplusplus
00601 }
00602 #endif
00603 
00604 #endif /* _PKT */