Changeset da34e20 for lib/rt_protocol.h
- Timestamp:
- 05/12/06 17:07:59 (15 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:
- cd7eec7
- Parents:
- 83445f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/rt_protocol.h
r114b8d6 rda34e20 3 3 4 4 #include "libtrace.h" 5 #include <time.h> 5 6 6 7 #define CAPTURE_PORT 3434 … … 17 18 * 18 19 * Add type to the enum list 19 * Add a struct below (even if it is empty )20 * Add a struct below (even if it is empty - wrap it in an #if 0) 20 21 * Update rt_get_capture_length 21 22 * If type is intended to be sent TO clients, update rt_read_packet … … 37 38 */ 38 39 39 /* Type field definitions */40 /** Type field definitions */ 40 41 enum rt_field_t { 41 RT_HELLO =1, /* Connection accepted */ 42 RT_START =2, /* Request for data transmission to begin */ 43 RT_ACK =3, /* Data acknowledgement */ 44 RT_STATUS =4, /* Fifo status packet */ 45 RT_DUCK =5, /* Dag duck info packet */ 46 RT_END_DATA =6, /* Server is exiting message */ 47 RT_CLOSE =7, /* Client is exiting message */ 48 RT_DENY_CONN =8, /* Connection has been denied */ 49 RT_PAUSE =9, /* Request server to suspend sending data */ 50 RT_PAUSE_ACK =10, /* Server is paused message */ 51 RT_OPTION =11, /* Option request */ 52 RT_KEYCHANGE =12, /* Anonymisation key has changed */ 42 RT_HELLO =1, /**< Connection accepted */ 43 RT_START =2, /**< Request for data transmission to begin */ 44 RT_ACK =3, /**< Data acknowledgement */ 45 RT_STATUS =4, /**< Fifo status packet */ 46 RT_DUCK =5, /**< Dag duck info packet */ 47 RT_END_DATA =6, /**< Server is exiting message */ 48 RT_CLOSE =7, /**< Client is exiting message */ 49 RT_DENY_CONN =8, /**< Connection has been denied */ 50 RT_PAUSE =9, /**< Request server to suspend sending data */ 51 RT_PAUSE_ACK =10, /**< Server is paused message */ 52 RT_OPTION =11, /**< Option request */ 53 RT_KEYCHANGE =12, /**< Anonymisation key has changed */ 54 RT_DUCK_2_4 =13, /**< Dag 2.4 Duck */ 55 RT_DUCK_2_5 =14, /**< Dag 2.5 Duck */ 53 56 54 57 RT_DATA_ERF =RT_DATA_SIMPLE + TRACE_FORMAT_ERF, … … 76 79 } fifo_info_t; 77 80 78 /* RT packet header */81 /** RT packet header */ 79 82 typedef struct rt_header { 80 83 enum rt_field_t type; … … 84 87 85 88 /* TODO: Reorganise this struct once more hello info is added */ 89 /** RT Hello packet sub-header */ 86 90 typedef struct rt_hello { 87 91 uint8_t reliable; … … 94 98 #endif 95 99 100 /** RT Ack sub-header */ 96 101 typedef struct rt_ack { 97 102 uint32_t sequence; 98 103 } rt_ack_t; 99 104 105 /** RT Status sub-header */ 100 106 typedef struct rt_status { 101 107 fifo_info_t fifo_status; … … 120 126 #endif 121 127 122 /* Connection denied reasons */128 /** Connection denied reasons */ 123 129 enum rt_conn_denied_t { 124 130 RT_DENY_WRAPPER =1, … … 127 133 }; 128 134 135 /** RT Denied Connection sub-header */ 129 136 typedef struct rt_deny_conn { 130 137 enum rt_conn_denied_t reason; … … 155 162 #endif 156 163 157 #endif 164 /** Specifications of duck structures - duck2_4 and duck2_5 match Endace's 165 * duck_inf and duckinf_t respectively */ 166 167 /** DAG 2.4 DUCK */ 168 typedef struct duck2_4 { 169 uint32_t Command; 170 uint32_t Config; 171 uint32_t Clock_Inc; 172 uint32_t Clock_Wrap; 173 uint32_t DDS_Rate; 174 uint32_t Crystal_Freq; 175 uint32_t Synth_Freq; 176 uint32_t Sync_Rate; 177 uint64_t Last_Ticks; 178 uint32_t Resyncs; 179 uint32_t Bad_Diffs; 180 uint32_t Bad_Offs; 181 uint32_t Bad_Pulses; 182 uint32_t Worst_Error; 183 uint32_t Worst_Off; 184 uint32_t Off_Limit; 185 uint32_t Off_Damp; 186 uint32_t Pulses; 187 uint32_t Single_Pulses_Missing; 188 uint32_t Longest_Pulse_Missing; 189 uint32_t Health; 190 uint32_t Sickness; 191 int32_t Error; 192 int32_t Offset; 193 time_t Stat_Start; 194 time_t Stat_End; 195 uint32_t Set_Duck_Field; 196 } duck2_4_t; 197 198 /** DAG 2.5 DUCK */ 199 typedef struct duck2_5 { 200 uint32_t Crystal_Freq; 201 uint32_t Synth_Freq; 202 uint64_t Last_Ticks; 203 uint32_t Resyncs; 204 uint32_t Bad_Pulses; 205 uint32_t Worst_Freq_Err; 206 uint32_t Worst_Phase_Err; 207 uint32_t Health_Thresh; 208 uint32_t Pulses; 209 uint32_t Single_Pulses_Missing; 210 uint32_t Longest_Pulse_Missing; 211 uint32_t Health; 212 uint32_t Sickness; 213 int32_t Freq_Err; 214 int32_t Phase_Err; 215 uint32_t Set_Duck_Field; 216 time_t Stat_Start; 217 time_t Stat_End; 218 uint64_t Last_TSC; 219 } duck2_5_t; 220 221 typedef struct rt_duck_2_4 { 222 duck2_4_t duck; 223 } rt_duck_2_4_t; 224 225 typedef struct rt_duck_2_5 { 226 duck2_5_t duck; 227 } rt_duck_2_5_t; 228 229 #endif
Note: See TracChangeset
for help on using the changeset viewer.