-
Notifications
You must be signed in to change notification settings - Fork 390
/
pkt.sandesh
431 lines (395 loc) · 9.17 KB
/
pkt.sandesh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
/**
* Message definitions for pkt module.
*
* The packet module is responsible for handling exception packets sent from vrouter
* on pkt0 interface parsed and sent to appropriate module
*
* The packet handling modules are Flow, Arp, Dns, Dhcp, Icmp, Diag
*/
include "vnsw/agent/oper/agent.sandesh"
/**
* Sandesh definition for mirror info
*/
struct MirrorInfo {
1: optional string mirror_destination;
2: optional u16 mirror_port;
3: optional string mirror_vrf;
4: optional string encap;
5: optional string analyzer;
}
/**
* Sandesh definition for flow acl uuid
*/
struct FlowAclUuid {
1: string uuid (link="AclReq");
}
/**
* Sandesh definition for flow acl
*/
struct FlowAclInfo {
1: i32 action;
2: list<FlowAclUuid> acl;
3: list<agent.ActionStr> action_str;
}
/**
* Sandesh definition for Flow Index management state
*/
struct SandeshFlowIndexTrace {
1: i64 timestamp;
2: i32 index;
3: i32 flow_handle;
4: string state;
5: string event;
6: bool skip_delete;
7: bool delete_in_progress;
8: bool vrouter_flow_handle;
}
struct SandeshFlowIndexInfo {
1: i32 index;
2: string state;
3: bool delete_in_progress;
4: i32 trace_count;
5: list<SandeshFlowIndexTrace> flow_index_trace;
}
/**
* Sandesh definition for flow
*/
struct SandeshFlowData {
16: i32 flow_handle;
39: i32 nh;
2: string sip;
3: string dip;
4: i32 src_port;
5: i32 dst_port;
6: byte protocol;
1: i32 vrf;
7: i16 dest_vrf;
8: i32 action;
9: list<MirrorInfo> mirror_l;
11: optional string direction;
12: i64 stats_bytes;
13: i64 stats_packets;
14: string uuid;
15: string nat;
18: string setup_time;
19: i32 refcount;
20: string implicit_deny;
21: optional string short_flow;
22: optional u64 setup_time_utc;
23: optional u16 ecmp_index;
24: optional string local_flow;
25: optional string egress_uuid;
53: optional list<string> src_vn_list;
54: optional list<string> dst_vn_list;
55: optional string src_vn_match;
56: optional string dst_vn_match;
28: string reverse_flow;
29: FlowAclInfo policy;
30: FlowAclInfo out_policy;
31: FlowAclInfo sg;
32: FlowAclInfo out_sg;
33: FlowAclInfo mirror;
34: FlowAclInfo out_mirror;
35: list<agent.ActionStr> action_str;
36: list<agent.ActionStr> sg_action_summary;
37: FlowAclInfo reverse_sg;
38: FlowAclInfo reverse_out_sg;
40: FlowAclInfo vrf_assign_acl;
41: string fip;
42: u32 fip_vm_interface_idx;
43: optional string sg_rule_uuid;
44: optional string nw_ace_uuid;
45: i32 rpf_nh;
46: optional string drop_reason;
47: optional string peer_vrouter;
48: optional string tunnel_type;
49: optional u16 underlay_source_port;
50: bool enable_rpf;
51: i32 aging_protocol;
52: i32 aging_port;
57: bool l3_flow;
58: u16 table_id;
59: bool deleted;
60: SandeshFlowIndexInfo flow_index_info;
}
/**
* Sandesh definition for link local flow
*/
struct LinkLocalFlowInfo {
1: u32 fd;
2: u32 flow_index;
3: string source_addr;
4: string dest_addr;
5: u32 protocol;
6: u16 source_port;
7: u16 dest_port;
8: string timestamp;
}
/**
* Request message getting flow record
*/
request sandesh FetchFlowRecord {
1: i32 nh;
2: string sip;
3: string dip;
4: i32 src_port;
5: i32 dst_port;
6: byte protocol;
}
/**
* Response message for flow record
*/
response sandesh FlowRecordResp {
1: SandeshFlowData record;
}
/**
* Response message for no flow record found for the specified key
*/
response sandesh FlowErrorResp {
1: string resp = "No Flow Record for specified key ";
}
/**
* Request message for next flow record
*/
request sandesh NextFlowRecordsSet {
1: string flow_key;
}
/**
* Request message to get all flow records
*/
request sandesh FetchAllFlowRecords {
}
/**
* Request message to delete all flow records
*/
request sandesh DeleteAllFlowRecords {
}
/**
* Request message for getting link local flow
*/
request sandesh FetchLinkLocalFlowInfo {
}
/**
* Response message Flow record list from agent introspect
*/
response sandesh FlowRecordsResp {
1: list<SandeshFlowData> flow_list;
2: string flow_key (link="NextFlowRecordsSet");
}
/**
* Response message for Link local flow list
*/
response sandesh LinkLocalFlowInfoResp {
1: list<LinkLocalFlowInfo> linklocal_flow_list;
}
/**
* @description: Trace message tap interface
* @severity: DEBUG
*/
trace sandesh TapErr {
1: string err;
}
/**
* @description: Trace message pkt0 interface
* @severity: DEBUG
*/
trace sandesh PktErr {
1: string err;
}
/**
* Sandesh definition for flow
*/
struct FlowInfo {
1: u32 flow_index;
30: u16 nh_id;
2: ipv4 source_ip;
3: u16 source_port;
4: ipv4 destination_ip;
5: u16 destination_port;
6: u16 protocol;
7: u32 vrf;
8: optional bool deny;
9: optional bool allow;
10: optional bool mirror;
11: optional bool nat;
12: optional ipv4 nat_source_ip;
13: optional ipv4 nat_destination_ip;
14: optional u16 nat_source_port;
15: optional u16 nat_destination_port;
16: optional u16 nat_protocol;
17: optional u32 nat_vrf;
18: optional u16 nat_mirror_vrf;
19: list<MirrorInfo> mirror_l;
20: optional u16 mirror_vrf;
21: optional u32 reverse_index;
22: bool implicit_deny;
23: bool short_flow;
24: optional u16 ecmp_index;
25: optional bool trap;
39: optional list<string> source_vn_list;
40: optional list<string> dest_vn_list;
41: optional string source_vn_match;
42: optional string dest_vn_match;
28: optional list<u32> source_sg_id_l;
29: optional list<u32> dest_sg_id_l;
31: optional string vrf_assign;
32: bool l3_flow;
33: string smac;
34: string dmac;
35: optional u64 sip_upper;
36: optional u64 sip_lower;
37: optional u64 dip_upper;
38: optional u64 dip_lower;
43: string drop_reason;
44: u16 table_id;
}
/**
* @description: Trace message for flow
* @severity: DEBUG
*/
traceobject sandesh FlowTrace {
1: string operation;
2: FlowInfo info;
}
/**
* @description: Trace message containing detailed error for flow entry
* @severity: DEBUG
*/
trace sandesh FlowDetailErr {
1: u32 flow_index;
2: u16 ifindex;
3: u16 vrf;
4: u32 sip;
5: u32 dip;
6: string error;
7: bool l3_flow;
8: u64 sip_upper;
9: u64 sip_lower;
10: u64 dip_upper;
11: u64 dip_lower;
}
/**
* @description: Trace message for flow entry
* @severity: DEBUG
*/
trace sandesh FlowErr {
1: u32 flow_index;
2: string error;
}
/**
* @description: Trace message for flow module
* @severity: DEBUG
*/
trace sandesh FlowModuleInfo {
1: string info;
}
/**
* Sandesh definition for flow handler
*/
struct FlowHandlerFlow {
1: optional u32 vrf;
2: optional string src_ip;
3: optional string dst_ip;
4: optional u16 src_port;
5: optional u16 dst_port;
6: optional u16 proto;
7: optional string src_vn;
8: optional u32 src_vrf;
9: optional string dst_vn;
10: optional u32 dst_vrf;
11: optional list <i32> src_sg_id_l;
12: optional list <i32> dst_sg_id_l;
13: optional i32 num_acls;
14: optional i32 num_sgs;
15: optional bool ingress;
16: optional bool implicit_deny;
17: optional bool short_flow;
}
/**
* @description: Trace message for pkt flow
* @severity: DEBUG
*/
traceobject sandesh PktFlowTrace {
1: string operation;
2: FlowHandlerFlow finfo;
}
/**
* @description: Trace message for pkt flow error
* @severity: DEBUG
*/
trace sandesh PktFlowErr {
1: string error;
}
/**
* @description: Trace message for flow route update
* @severity: DEBUG
*/
traceobject sandesh FlowRouteUpdate {
1: string vrf;
2: string ip;
3: u16 plen;
9: list<string> vn_list;
5: bool deleted;
6: bool marked_delete;
7: u32 num_sg;
8: list <i32> sg_list;
}
/**
* Response message for flow ageing
*/
response sandesh FlowAgeTimeResp {
1: u32 old_age_time;
2: u32 new_age_time;
3: u32 old_tcp_age_time;
4: u32 new_tcp_age_time;
}
/**
* Request message to get flow ageing stats
*/
request sandesh FlowAgeTimeReq {
1: u32 new_age_time;
}
/**
* Request message to get flow records based on protocol and port filters
*/
request sandesh ShowFlowStatsCollector {
1: u32 protocol;
2: u32 port;
}
/**
* Request message to get next flow record
*/
request sandesh NextFlowStatsRecordsSet {
1: string flow_key;
}
/**
* Response message for flow records based on protocol and port filters
* also having link for next flow
*/
response sandesh FlowStatsCollectorRecordsResp {
1: list<SandeshFlowData> flow_list;
2: string flow_key (link="NextFlowStatsRecordsSet");
}
/**
* Request message to get summary of flow tables
*/
request sandesh SandeshFlowTableInfoRequest{
}
/**
* Sandesh definition for every flow-table
*/
struct SandeshFlowTableInfo {
1: u32 index;
2: u32 count;
3: u64 total_add;
4: u64 total_del;
}
/**
* Response message for flow tables
*/
response sandesh SandeshFlowTableInfoResp {
1: list<SandeshFlowTableInfo> table_list;
}