Changeset 6dbc47a for lib/rt_protocol.h


Ignore:
Timestamp:
02/21/06 15:48:53 (15 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:
9ff68ff
Parents:
1b4901a
Message:

Updated all formats to use TRACE_FORMAT_* instead of nasty strings
format_rt is in a state where it provides basic client services
Added trace_get_format() function
libtrace_packet_t has a type field for storing format now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/rt_protocol.h

    r1fbd938 r6dbc47a  
    77#define COLLECTOR_PORT 3435
    88
     9#define RT_MAX_HDR_SIZE 256
     10#define MAX_SEQUENCE 2147483647
     11
    912/* Type field definitions */
     13/* NOTE: RT_DATA should always be zero */
    1014enum rt_field_t {
    11  RT_HELLO       =0,     /* Connection accepted */
    12  RT_DATA        =1,     /* Libtrace data packet */
     15 RT_DATA        =0,     /* Libtrace data packet */
     16 RT_HELLO       =1,     /* Connection accepted */
    1317 RT_START       =2,     /* Request for data transmission to begin */
    1418 RT_ACK         =3,     /* Data acknowledgement */
     
    2327};
    2428
    25 /* Format field definitions */
    26 enum rt_format_t {
    27  RT_FORMAT_ERF          =1,
    28  RT_FORMAT_PCAP         =2,
    29  RT_FORMAT_WAG          =3
    30 };
    31 
    32 typedef struct fifo_state {
     29typedef struct fifo_info {
    3330        uint64_t in;
    3431        uint64_t out;
     
    3633        uint64_t length;
    3734        uint64_t used;
    38 } fifo_state_t;
     35} fifo_info_t;
    3936
    4037/* RT packet header */
     
    4643typedef struct rt_data {
    4744        uint16_t format;
    48         char *data;
     45        uint32_t sequence;
    4946} rt_data_t;
    5047
     48/* TODO: Reorganise this struct once more hello info is added */
    5149typedef struct rt_hello {
    52 
     50        uint8_t reliable;
    5351} rt_hello_t;
    5452
     
    5856
    5957typedef struct rt_ack {
    60         uint64_t timestamp;
     58        uint32_t sequence;
    6159} rt_ack_t;
    6260
    6361typedef struct rt_status {
    64         fifo_state_t fifo_status;
     62        fifo_info_t fifo_status;
    6563} rt_status_t;
    6664
Note: See TracChangeset for help on using the changeset viewer.