Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef _RT_PROTOCOL_H
00035 #define _RT_PROTOCOL_H
00036
00037 #include "libtrace.h"
00038 #include <time.h>
00039
00048 #define COLLECTOR_PORT 3435
00049
00051 #define RT_MAX_HDR_SIZE 256
00052
00053 #define MAX_SEQUENCE 2147483647
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00080 typedef struct fifo_info {
00081 uint64_t in;
00082 uint64_t out;
00083 uint64_t ack;
00084 uint64_t length;
00085 uint64_t used;
00086 } fifo_info_t;
00087
00089 typedef struct rt_header {
00091 libtrace_rt_types_t type;
00093 uint16_t length;
00095 uint32_t sequence;
00096 } rt_header_t;
00097
00098
00099
00101 typedef struct rt_hello {
00104 uint8_t reliable;
00105 } rt_hello_t;
00106
00107 #if 0
00108 typedef struct rt_start {
00109
00110 } rt_start_t;
00111 #endif
00112
00114 typedef struct rt_ack {
00116 uint32_t sequence;
00117 } rt_ack_t;
00118
00120 typedef struct rt_status {
00122 fifo_info_t fifo_status;
00123 } rt_status_t;
00124
00125 #if 0
00126 typedef struct rt_duck {
00127
00128 } rt_duck_t;
00129 #endif
00130
00131 #if 0
00132 typedef struct rt_end_data {
00133
00134 } rt_end_data_t;
00135 #endif
00136
00137 #if 0
00138 typedef struct rt_close {
00139
00140 } rt_close_t;
00141 #endif
00142
00144 enum rt_conn_denied_t {
00146 RT_DENY_WRAPPER =1,
00148 RT_DENY_FULL =2,
00150 RT_DENY_AUTH =3
00151 };
00152
00154 typedef struct rt_deny_conn {
00156 enum rt_conn_denied_t reason;
00157 } rt_deny_conn_t;
00158
00159 #if 0
00160 typedef struct rt_pause {
00161
00162 } rt_pause_t;
00163 #endif
00164
00165 #if 0
00166 typedef struct rt_pause_ack {
00167
00168 } rt_pause_ack_t;
00169 #endif
00170
00171 #if 0
00172 typedef struct rt_option {
00173
00174 } rt_option_t;
00175 #endif
00176
00177 #if 0
00178 typedef struct rt_keychange {
00179
00180 } rt_keychange_t;
00181 #endif
00182
00184 typedef struct rt_metadata {
00186 uint32_t label_len;
00188 uint32_t value_len;
00189 } rt_metadata_t ;
00190
00198 typedef struct duck2_4 {
00199 uint32_t Command;
00200 uint32_t Config;
00201 uint32_t Clock_Inc;
00202 uint32_t Clock_Wrap;
00203 uint32_t DDS_Rate;
00204 uint32_t Crystal_Freq;
00205 uint32_t Synth_Freq;
00206 uint32_t Sync_Rate;
00207 uint64_t Last_Ticks;
00208 uint32_t Resyncs;
00209 uint32_t Bad_Diffs;
00210 uint32_t Bad_Offs;
00211 uint32_t Bad_Pulses;
00212 uint32_t Worst_Error;
00213 uint32_t Worst_Off;
00214 uint32_t Off_Limit;
00215 uint32_t Off_Damp;
00216 uint32_t Pulses;
00217 uint32_t Single_Pulses_Missing;
00218 uint32_t Longest_Pulse_Missing;
00219 uint32_t Health;
00220 uint32_t Sickness;
00221 int32_t Error;
00222 int32_t Offset;
00223 uint32_t Stat_Start;
00224 uint32_t Stat_End;
00225 uint32_t Set_Duck_Field;
00226 } PACKED duck2_4_t;
00227
00229 typedef struct duck2_5 {
00230 uint32_t Crystal_Freq;
00231 uint32_t Synth_Freq;
00232 uint64_t Last_Ticks;
00233 uint32_t Resyncs;
00234 uint32_t Bad_Pulses;
00235 uint32_t Worst_Freq_Err;
00236 uint32_t Worst_Phase_Err;
00237 uint32_t Health_Thresh;
00238 uint32_t Pulses;
00239 uint32_t Single_Pulses_Missing;
00240 uint32_t Longest_Pulse_Missing;
00241 uint32_t Health;
00242 uint32_t Sickness;
00243 int32_t Freq_Err;
00244 int32_t Phase_Err;
00245 uint32_t Set_Duck_Field;
00246 uint32_t Stat_Start;
00247 uint32_t Stat_End;
00248 uint64_t Last_TSC;
00249 } PACKED duck2_5_t;
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261 #endif