Changeset 7ac9705 for lib/rt_protocol.h


Ignore:
Timestamp:
03/06/06 15:31:15 (16 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
e4e1635
Parents:
eeab9832
Message:

Changed rt types so that every pcap dlt has a matching rt type
Added functions for conversion between rt type and pcap dlt
format_rt now uses trace_set_err appropriately if rt_connect fails
format_pcap will check if a trace is dead before trying to look at

format data

Dead traces now have their format_data set to NULL
packet->type is now 32 bits, not 8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/rt_protocol.h

    r5fb2251 r7ac9705  
    33
    44#include "libtrace.h"
     5#include <pcap.h>
    56
    67#define CAPTURE_PORT 3434
     
    910#define RT_MAX_HDR_SIZE 256
    1011#define MAX_SEQUENCE 2147483647
     12
     13#define RT_DATA_SIMPLE 1000
     14#define RT_DATA_PCAP 2000
    1115
    1216/* Type field definitions */
     
    2428 RT_OPTION      =11,    /* Option request */
    2529 
    26  RT_DATA_ERF            =12,    /* Erf data packet */
    27  RT_DATA_PCAP           =13,    /* Pcap data packet */
    28  RT_DATA_WAG            =14,    /* Wag data packet */
    29  RT_DATA_LEGACY_ATM     =15,    /* Legacy ATM packet */
    30  RT_DATA_LEGACY_POS     =16,    /* Legacy POS packet */
    31  RT_DATA_LEGACY_ETH     =17     /* Legacy ETH packet */
     30 RT_DATA_ERF            =RT_DATA_SIMPLE + TRACE_FORMAT_ERF,
     31 RT_DATA_WAG            =RT_DATA_SIMPLE + TRACE_FORMAT_WAG,
     32 RT_DATA_LEGACY_ATM     =RT_DATA_SIMPLE + TRACE_FORMAT_LEGACY_ATM,
     33 RT_DATA_LEGACY_POS     =RT_DATA_SIMPLE + TRACE_FORMAT_LEGACY_POS,
     34 RT_DATA_LEGACY_ETH     =RT_DATA_SIMPLE + TRACE_FORMAT_LEGACY_ETH,
     35
     36 RT_DATA_PCAP_NULL              =RT_DATA_PCAP + DLT_NULL,
     37 RT_DATA_PCAP_EN10MB            =RT_DATA_PCAP + DLT_EN10MB,
     38 RT_DATA_PCAP_ATM_RFC1483       =RT_DATA_PCAP + DLT_ATM_RFC1483,
     39 RT_DATA_PCAP_IEEE802_11        =RT_DATA_PCAP + DLT_IEEE802_11,
     40#ifdef DLT_LINUX_SLL
     41 RT_DATA_PCAP_LINUX_SLL         =RT_DATA_PCAP + DLT_LINUX_SLL,
     42#endif
     43#ifdef DLT_PFLOG
     44 RT_DATA_PCAP_PFLOG             =RT_DATA_PCAP + DLT_PFLOG,
     45#endif
     46
    3247};
    3348
Note: See TracChangeset for help on using the changeset viewer.