@@ -53,6 +53,7 @@ func TestConversions(t *testing.T) {
53
53
DnsRecord : ebpf.BpfDnsRecordT {
54
54
Errno : 0 ,
55
55
},
56
+ FlowEncrypted : true ,
56
57
},
57
58
},
58
59
Interfaces : []model.IntfDirUdn {model .NewIntfDirUdn ("eth0" , model .DirectionEgress , nil )},
@@ -61,25 +62,27 @@ func TestConversions(t *testing.T) {
61
62
AgentIP : net .IPv4 (0x0a , 0x0b , 0x0c , 0x0d ),
62
63
},
63
64
expected : & config.GenericMap {
64
- "IfDirections" : []int {1 },
65
- "Bytes" : 456 ,
66
- "SrcAddr" : "6.7.8.9" ,
67
- "DstAddr" : "10.11.12.13" ,
68
- "Dscp" : 64 ,
69
- "DstMac" : "0A:0B:0C:0D:0E:0F" ,
70
- "SrcMac" : "04:05:06:07:08:09" ,
71
- "Etype" : 2048 ,
72
- "Packets" : 123 ,
73
- "Proto" : 6 ,
74
- "SrcPort" : 23000 ,
75
- "DstPort" : 443 ,
76
- "Flags" : 0x100 ,
77
- "Sampling" : 1 ,
78
- "TimeFlowStartMs" : someTime .UnixMilli (),
79
- "TimeFlowEndMs" : someTime .UnixMilli (),
80
- "Interfaces" : []string {"eth0" },
81
- "Udns" : []string {"" },
82
- "AgentIP" : "10.11.12.13" ,
65
+ "IfDirections" : []int {1 },
66
+ "Bytes" : 456 ,
67
+ "SrcAddr" : "6.7.8.9" ,
68
+ "DstAddr" : "10.11.12.13" ,
69
+ "Dscp" : 64 ,
70
+ "DstMac" : "0A:0B:0C:0D:0E:0F" ,
71
+ "SrcMac" : "04:05:06:07:08:09" ,
72
+ "Etype" : 2048 ,
73
+ "Packets" : 123 ,
74
+ "Proto" : 6 ,
75
+ "SrcPort" : 23000 ,
76
+ "DstPort" : 443 ,
77
+ "Flags" : 0x100 ,
78
+ "Sampling" : 1 ,
79
+ "TimeFlowStartMs" : someTime .UnixMilli (),
80
+ "TimeFlowEndMs" : someTime .UnixMilli (),
81
+ "Interfaces" : []string {"eth0" },
82
+ "Udns" : []string {"" },
83
+ "AgentIP" : "10.11.12.13" ,
84
+ "EncryptedFlow" : true ,
85
+ "EncryptedFlowRet" : 0 ,
83
86
},
84
87
},
85
88
{
@@ -345,6 +348,7 @@ func TestConversions(t *testing.T) {
345
348
LatestState : 6 ,
346
349
LatestDropCause : 5 ,
347
350
},
351
+ FlowEncrypted : true ,
348
352
},
349
353
},
350
354
Interfaces : []model.IntfDirUdn {model .NewIntfDirUdn ("eth0" , model .DirectionEgress , nil )},
@@ -383,6 +387,8 @@ func TestConversions(t *testing.T) {
383
387
"DnsFlags" : 0x8001 ,
384
388
"DnsFlagsResponseCode" : "FormErr" ,
385
389
"TimeFlowRttNs" : someDuration .Nanoseconds (),
390
+ "EncryptedFlow" : true ,
391
+ "EncryptedFlowRet" : 0 ,
386
392
},
387
393
},
388
394
{
@@ -409,6 +415,7 @@ func TestConversions(t *testing.T) {
409
415
DnsRecord : ebpf.BpfDnsRecordT {
410
416
Errno : 0 ,
411
417
},
418
+ FlowEncrypted : true ,
412
419
},
413
420
},
414
421
Interfaces : []model.IntfDirUdn {
@@ -420,24 +427,26 @@ func TestConversions(t *testing.T) {
420
427
AgentIP : net .IPv4 (0x0a , 0x0b , 0x0c , 0x0d ),
421
428
},
422
429
expected : & config.GenericMap {
423
- "IfDirections" : []int {0 , 1 },
424
- "Bytes" : 64 ,
425
- "SrcAddr" : "6.7.8.9" ,
426
- "DstAddr" : "10.11.12.13" ,
427
- "Dscp" : 64 ,
428
- "DstMac" : "0A:0B:0C:0D:0E:0F" ,
429
- "SrcMac" : "04:05:06:07:08:09" ,
430
- "Etype" : 2048 ,
431
- "Packets" : 1 ,
432
- "Proto" : 6 ,
433
- "SrcPort" : 23000 ,
434
- "DstPort" : 443 ,
435
- "Flags" : 0x100 ,
436
- "TimeFlowStartMs" : someTime .UnixMilli (),
437
- "TimeFlowEndMs" : someTime .UnixMilli (),
438
- "Interfaces" : []string {"5e6e92caa1d51cf" , "eth0" },
439
- "Udns" : []string {"" , "" },
440
- "AgentIP" : "10.11.12.13" ,
430
+ "IfDirections" : []int {0 , 1 },
431
+ "Bytes" : 64 ,
432
+ "SrcAddr" : "6.7.8.9" ,
433
+ "DstAddr" : "10.11.12.13" ,
434
+ "Dscp" : 64 ,
435
+ "DstMac" : "0A:0B:0C:0D:0E:0F" ,
436
+ "SrcMac" : "04:05:06:07:08:09" ,
437
+ "Etype" : 2048 ,
438
+ "Packets" : 1 ,
439
+ "Proto" : 6 ,
440
+ "SrcPort" : 23000 ,
441
+ "DstPort" : 443 ,
442
+ "Flags" : 0x100 ,
443
+ "TimeFlowStartMs" : someTime .UnixMilli (),
444
+ "TimeFlowEndMs" : someTime .UnixMilli (),
445
+ "Interfaces" : []string {"5e6e92caa1d51cf" , "eth0" },
446
+ "Udns" : []string {"" , "" },
447
+ "AgentIP" : "10.11.12.13" ,
448
+ "EncryptedFlow" : true ,
449
+ "EncryptedFlowRet" : 0 ,
441
450
},
442
451
},
443
452
}
0 commit comments