Skip to content

Commit 679e78d

Browse files
committed
LWAPP: Use flag bit names closer to those in the RFC
L Bit: If set, it's not "Last Fragment", but "Not Last". Add comments on flag bits. Moreover: Remove extra spaces in the output.
1 parent 29d8905 commit 679e78d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

print-lwapp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ struct lwapp_control_header {
7373
#define LWAPP_EXTRACT_CONTROL_BIT(x) (((x)&0x04)>>2)
7474

7575
static const struct tok lwapp_header_bits_values[] = {
76-
{ 0x01, "Last Fragment Bit"},
77-
{ 0x02, "Fragment Bit"},
78-
{ 0x04, "Control Bit"},
76+
{ 0x01, "Not Last"}, /* L Bit */
77+
{ 0x02, "Fragment"}, /* F Bit */
78+
{ 0x04, "Control"}, /* C Bit */
7979
{ 0, NULL}
8080
};
8181

@@ -335,7 +335,7 @@ lwapp_data_print(netdissect_options *ndo,
335335
/* ok they seem to want to know everything - lets fully decode it */
336336
tlen=GET_BE_U_2(lwapp_trans_header->length);
337337
if (tlen < sizeof(struct lwapp_transport_header)) {
338-
ND_PRINT("LWAPPv%u, %s frame, Radio-id %u, Flags [%s], length %u < transport header length",
338+
ND_PRINT("LWAPPv%u, %s frame, Radio-id %u, Flags [%s], length %u < transport header length",
339339
LWAPP_EXTRACT_VERSION(version),
340340
LWAPP_EXTRACT_CONTROL_BIT(version) ? "Control" : "Data",
341341
LWAPP_EXTRACT_RID(version),
@@ -344,7 +344,7 @@ lwapp_data_print(netdissect_options *ndo,
344344
return;
345345
}
346346

347-
ND_PRINT("LWAPPv%u, %s frame, Radio-id %u, Flags [%s], Frag-id %u, length %u",
347+
ND_PRINT("LWAPPv%u, %s frame, Radio-id %u, Flags [%s], Frag-id %u, length %u",
348348
LWAPP_EXTRACT_VERSION(version),
349349
LWAPP_EXTRACT_CONTROL_BIT(version) ? "Control" : "Data",
350350
LWAPP_EXTRACT_RID(version),

0 commit comments

Comments
 (0)