source: lib/rt_protocol.h @ afd0b73

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since afd0b73 was afd0b73, checked in by Shane Alcock <salcock@…>, 16 years ago

Changed rt protocol to not require subheaders

  • Property mode set to 100644
File size: 2.1 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#define RT_MAX_HDR_SIZE 256
10#define MAX_SEQUENCE 2147483647
11
12/* Type field definitions */
13enum rt_field_t {
14 RT_HELLO       =1,     /* Connection accepted */
15 RT_START       =2,     /* Request for data transmission to begin */
16 RT_ACK         =3,     /* Data acknowledgement */
17 RT_STATUS      =4,     /* Fifo status packet */
18 RT_DUCK        =5,     /* Dag duck info packet */
19 RT_END_DATA    =6,     /* Server is exiting message */
20 RT_CLOSE       =7,     /* Client is exiting message */
21 RT_DENY_CONN   =8,     /* Connection has been denied */
22 RT_PAUSE       =9,     /* Request server to suspend sending data */
23 RT_PAUSE_ACK   =10,    /* Server is paused message */
24 RT_OPTION      =11,    /* Option request */
25 
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 */
32};
33
34typedef struct fifo_info {
35        uint64_t in;
36        uint64_t out;
37        uint64_t ack;
38        uint64_t length;
39        uint64_t used;
40} fifo_info_t;
41
42/* RT packet header */
43typedef struct rt_header {
44        enum rt_field_t type;
45        uint16_t length;
46        uint32_t sequence;
47} rt_header_t;
48
49/* TODO: Reorganise this struct once more hello info is added */
50typedef struct rt_hello {
51        uint8_t reliable;
52} rt_hello_t;
53
54typedef struct rt_start {
55
56} rt_start_t;
57
58typedef struct rt_ack {
59        uint32_t sequence;
60} rt_ack_t;
61
62typedef struct rt_status {
63        fifo_info_t fifo_status;
64} rt_status_t;
65
66typedef struct rt_duck {
67        /*duckinf_t duck; */
68} rt_duck_t;
69
70typedef struct rt_end_data {
71
72} rt_end_data_t;
73
74typedef struct rt_close {
75
76} rt_close_t;
77
78
79/* Connection denied reasons */
80enum rt_conn_denied_t {
81 RT_DENY_WRAPPER        =1,
82 RT_DENY_FULL           =2,
83 RT_DENY_AUTH           =3
84};
85
86typedef struct rt_deny_conn {
87        enum rt_conn_denied_t reason;
88} rt_deny_conn_t;
89
90
91typedef struct rt_pause {
92
93} rt_pause_t;
94
95typedef struct rt_pause_ack {
96
97} rt_pause_ack_t;
98
99typedef struct rt_option {
100
101} rt_option_t;
102
103
104
105
106#endif
Note: See TracBrowser for help on using the repository browser.