Skip to content

Commit cec1ef6

Browse files
deigerinfrastation
authored andcommitted
Geneve: update format_opt_class
Per https://www.iana.org/assignments/nvo3/nvo3.xhtml Also add test for GCP
1 parent 7c9e185 commit cec1ef6

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

print-geneve.c

+52
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,58 @@ format_opt_class(const uint16_t opt_class)
9797
return "In-band Network Telemetry (INT)";
9898
case 0x0104:
9999
return "VMware";
100+
case 0x0105:
101+
case 0x0108:
102+
case 0x0109:
103+
case 0x010A:
104+
case 0x010B:
105+
case 0x010C:
106+
case 0x010D:
107+
case 0x010E:
108+
case 0x010F:
109+
case 0x0110:
110+
return "Amazon";
111+
case 0x0106:
112+
case 0x0130:
113+
case 0x0131:
114+
return "Cisco";
115+
case 0x0107:
116+
return "Oracle";
117+
case 0x0111:
118+
case 0x0112:
119+
case 0x0113:
120+
case 0x0114:
121+
case 0x0115:
122+
case 0x0116:
123+
case 0x0117:
124+
case 0x0118:
125+
return "IBM";
126+
case 0x0119:
127+
case 0x011A:
128+
case 0x011B:
129+
case 0x011C:
130+
case 0x011D:
131+
case 0x011E:
132+
case 0x011F:
133+
case 0x0120:
134+
case 0x0121:
135+
case 0x0122:
136+
case 0x0123:
137+
case 0x0124:
138+
case 0x0125:
139+
case 0x0126:
140+
case 0x0127:
141+
case 0x0128:
142+
return "Ericsson";
143+
case 0x0129:
144+
return "Oxide";
145+
case 0x0132:
146+
case 0x0133:
147+
case 0x0134:
148+
case 0x0135:
149+
return "Google";
150+
case 0x0136:
151+
return "InfoQuick";
100152
default:
101153
if (opt_class <= 0x00ff)
102154
return "Standard";

tests/TESTLIST

+1
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ aoe_1-v AoE_Linux.pcap aoe_1-v.out -v
441441
geneve-vv geneve.pcap geneve-vv.out -vv
442442
geneve-vni geneve.pcap geneve-vni.out geneve 0xb
443443
geneve-tcp geneve.pcap geneve-tcp.out "geneve && tcp"
444+
geneve-gcp geneve-gcp.pcap geneve-gcp.out -vv
444445

445446
# DHCP tests
446447
dhcp-rfc3004 dhcp-rfc3004.pcap dhcp-rfc3004-v.out -v

tests/geneve-gcp.out

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
1 10:31:03.250708 IP (tos 0x0, ttl 2, id 0, offset 0, flags [DF], proto UDP (17), length 116)
2+
192.168.100.254.62974 > 192.168.100.3.6081: [no cksum] Geneve, Flags [none], vni 0x0, options [class Google (0x132) type 0x1 len 8 data 800000d1, class Google (0x132) type 0x2 len 20 data 0800000d c0a86402 00000000 00000000, class Google (0x132) type 0x3 len 12 data 00000000 00001234]
3+
IP (tos 0x0, ttl 64, id 55620, offset 0, flags [none], proto TCP (6), length 40)
4+
192.168.100.2.2905 > 192.168.100.1.8080: Flags [none], cksum 0xf547 (correct), seq 760929856, win 512, length 0

tests/geneve-gcp.pcap

170 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)