Lines Matching +full:4 +full:- +full:switch
15 * Original code by Ola Martin Lykkja (ola.lykkja@q-free.com)
22 #include "netdissect-stdinc.h"
31 ETSI TS 102 636-5-1 V1.1.1 (2011-02)
33 Part 5: Transport Protocols; Sub-part 1: Basic Transport Protocol
35 ETSI TS 102 636-4-1 V1.1.1 (2011-06)
37 …Part 4: Geographical addressing and forwarding for point-to-point and point-to-multipoint communic…
38 Sub-part 1: Media-Independent Functionality
67 ND_PRINT(" t:%u-%s", msg_type, in print_btp_body()
71 /* EN 302 636-5-1 V2.2.1 Section 7.2: BTP-A header */
106 int hdr_size = -1; in geonet_print()
108 ndo->ndo_protocol = "geonet"; in geonet_print()
111 ND_PRINT("src:%s", (src->addr_string)(ndo, src->addr)); in geonet_print()
120 version = GET_U_1(bp) >> 4; in geonet_print()
122 hdr_type = GET_U_1(bp + 1) >> 4; in geonet_print()
124 payload_length = GET_BE_U_2(bp + 4); in geonet_print()
127 switch (next_hdr) { in geonet_print()
129 case 1: next_hdr_txt = "BTP-A"; break; in geonet_print()
130 case 2: next_hdr_txt = "BTP-B"; break; in geonet_print()
134 switch (hdr_type) { in geonet_print()
138 case 3: switch (hdr_subtype) { in geonet_print()
144 case 4: switch (hdr_subtype) { in geonet_print()
150 case 5: switch (hdr_subtype) { in geonet_print()
151 case 0: hdr_type_txt = "TopoScopeBcast-SH"; break; in geonet_print()
152 case 1: hdr_type_txt = "TopoScopeBcast-MH"; break; in geonet_print()
155 case 6: switch (hdr_subtype) { in geonet_print()
156 case 0: hdr_type_txt = "LocService-Request"; break; in geonet_print()
157 case 1: hdr_type_txt = "LocService-Reply"; break; in geonet_print()
163 ND_PRINT("NH:%u-%s ", next_hdr, next_hdr_txt); in geonet_print()
164 ND_PRINT("HT:%u-%u-%s ", hdr_type, hdr_subtype, hdr_type_txt); in geonet_print()
171 length -= 36; in geonet_print()
175 switch (hdr_type) { in geonet_print()
184 case 3: switch (hdr_subtype) { in geonet_print()
193 case 4: switch (hdr_subtype) { in geonet_print()
202 case 5: switch (hdr_subtype) { in geonet_print()
203 case 0: /* TopoScopeBcast-SH */ in geonet_print()
206 case 1: /* TopoScopeBcast-MH */ in geonet_print()
207 hdr_size = 68 - 36; in geonet_print()
211 case 6: switch (hdr_subtype) { in geonet_print()
212 case 0: /* LocService-Request */ in geonet_print()
214 case 1: /* LocService-Reply */ in geonet_print()
227 length -= hdr_size; in geonet_print()
229 switch (next_hdr) { in geonet_print()
234 if (length < 4) { in geonet_print()
235 ND_PRINT(" (BTP length %u < 4)", length); in geonet_print()
239 length -= 4; in geonet_print()
240 bp += 4; in geonet_print()
243 * XXX - did print_btp_body() in geonet_print()
258 if (ndo->ndo_vflag) in geonet_print()
264 /* XXX - print the remaining data as hex? */ in geonet_print()