source: lib/rt_protocol.h @ 1fbd938

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 1fbd938 was 1fbd938, checked in by Perry Lorier <perry@…>, 16 years ago

More -pedantic cleanups
Changed the format structure (again) for pause and seek support

  • Property mode set to 100644
File size: 1.8 KB
Line 
1#ifndef _RT_PROTOCOL_H
2#define _RT_PROTOCOL_H
3
4#include "libtrace.h"
5
6#define CAPTURE_PORT 3434
7#define COLLECTOR_PORT 3435
8
9/* Type field definitions */
10enum rt_field_t {
11 RT_HELLO       =0,     /* Connection accepted */
12 RT_DATA        =1,     /* Libtrace data packet */
13 RT_START       =2,     /* Request for data transmission to begin */
14 RT_ACK         =3,     /* Data acknowledgement */
15 RT_STATUS      =4,     /* Fifo status packet */
16 RT_DUCK        =5,     /* Dag duck info packet */
17 RT_END_DATA    =6,     /* Server is exiting message */
18 RT_CLOSE       =7,     /* Client is exiting message */
19 RT_DENY_CONN   =8,     /* Connection has been denied */
20 RT_PAUSE       =9,     /* Request server to suspend sending data */
21 RT_PAUSE_ACK   =10,    /* Server is paused message */
22 RT_OPTION      =11     /* Option request */
23};
24
25/* Format field definitions */
26enum rt_format_t {
27 RT_FORMAT_ERF          =1,
28 RT_FORMAT_PCAP         =2,
29 RT_FORMAT_WAG          =3
30};
31
32typedef struct fifo_state {
33        uint64_t in;
34        uint64_t out;
35        uint64_t ack;
36        uint64_t length;
37        uint64_t used;
38} fifo_state_t;
39
40/* RT packet header */
41typedef struct rt_header {
42        enum rt_field_t type;
43        uint16_t length;
44} rt_header_t;
45
46typedef struct rt_data {
47        uint16_t format;
48        char *data;
49} rt_data_t;
50
51typedef struct rt_hello {
52
53} rt_hello_t;
54
55typedef struct rt_start {
56
57} rt_start_t;
58
59typedef struct rt_ack {
60        uint64_t timestamp;
61} rt_ack_t;
62
63typedef struct rt_status {
64        fifo_state_t fifo_status;
65} rt_status_t;
66
67typedef struct rt_duck {
68        /*duckinf_t duck; */
69} rt_duck_t;
70
71typedef struct rt_end_data {
72
73} rt_end_data_t;
74
75typedef struct rt_close {
76
77} rt_close_t;
78
79
80/* Connection denied reasons */
81enum rt_conn_denied_t {
82 RT_DENY_WRAPPER        =1,
83 RT_DENY_FULL           =2,
84 RT_DENY_AUTH           =3
85};
86
87typedef struct rt_deny_conn {
88        enum rt_conn_denied_t reason;
89} rt_deny_conn_t;
90
91
92typedef struct rt_pause {
93
94} rt_pause_t;
95
96typedef struct rt_pause_ack {
97
98} rt_pause_ack_t;
99
100typedef struct rt_option {
101
102} rt_option_t;
103
104
105
106
107#endif
Note: See TracBrowser for help on using the repository browser.