Changeset 8013711 for lib/rt_protocol.h
- Timestamp:
- 11/01/05 13:34:32 (17 years ago)
- 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:
- 77509e9
- Parents:
- d18312c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/rt_protocol.h
r9c61e13 r8013711 39 39 #endif 40 40 41 #include <libfifo.h>42 43 #define CAPTURE_PORT 343444 #define COLLECTOR_PORT 343545 46 41 #define MAXDATASIZE 65536 47 42 48 // Server status codes 49 #define S_KEYCHANGE 1 // Encryption key has changed, flush collection to disk 50 #define S_DISKWARN 2 // Disk-backed fifo is > 75% used 51 #define S_DISKCRIT 4 // Disk-backed fifo is > 90% used 52 #define S_DISKFULL 8 // Disk-backed fifo is > 95% used 53 #define S_STATUS 16 // Packet is a fifo_status packet 54 #define S_LOSTDATA 32 // capture restarted, flush collection to disk 55 #define S_LOSTCONN 64 // connection to collector restarted, flush collection to disk 56 /* ----------------------*/ 57 /* Codes for messages that cannot be parsed by libtrace */ 58 #define S_ALLCONN 128 // Already someone connected. Go away 59 #define S_DUCKINFO 256 // Duck information packet 60 #define S_FINISH 512 // No more data - close connection 61 #define S_ACCEPT 1024 // Connection accepted 43 #define RT_DATA 1 44 #define RT_MSG 2 62 45 63 #define S_MESSAGE_ONLY S_ALLCONN 46 typedef struct rt_status { 47 uint8_t type; 48 uint8_t reserved; 49 uint16_t message; 50 } rt_status_t; 64 51 65 // fifo_state_t is a tricky data type to transmit and receive so66 // it's easier to create a specialised structure67 typedef struct fifo_info {68 fifo_offset_t length;69 fifo_offset_t used;70 fifo_offset_t in;71 fifo_offset_t out;72 fifo_offset_t ack;73 } fifo_info_t;74 75 typedef struct fifo_status {76 fifo_info_t fifo;77 } fifo_status_t;78 79 typedef struct duck_info {80 duck_inf duck;81 } duck_info_t;82 52 83 53 typedef struct packet_header { 84 uint32_t message;54 rt_status_t header; 85 55 dag_record_t erf; 86 56 } packet_header_t; 87 57 88 58 typedef struct ack_packet { 89 uint32_t header;59 rt_status_t header; 90 60 long long int ts; 91 61 } ack_packet_t; 92 62 93 // Client message codes94 #define M_HALT_CAPTURE 1 // Request to halt capture95 #define M_START_CAPTURE 2 // Request to restart capture96 #define M_CONFIGURE 4 // Configuration info follows97 #define M_ACK 8 // Ack98 99 63 #endif // _RT_PROTOCOL_H_
Note: See TracChangeset
for help on using the changeset viewer.