Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions netdissect.h
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,7 @@ extern void lldp_print(netdissect_options *, const u_char *, u_int);
extern void lmp_print(netdissect_options *, const u_char *, u_int);
extern void loopback_print(netdissect_options *, const u_char *, u_int);
extern void lspping_print(netdissect_options *, const u_char *, u_int);
extern void lwapp_control_print(netdissect_options *, const u_char *, u_int, int);
extern void lwapp_data_print(netdissect_options *, const u_char *, u_int);
extern void lwapp_print(netdissect_options *, const u_char *, const u_int, const u_char);
extern void lwres_print(netdissect_options *, const u_char *, u_int);
extern void m3ua_print(netdissect_options *, const u_char *, const u_int);
extern int macsec_print(netdissect_options *, const u_char **, u_int *, u_int *, u_int *, const struct lladdr_info *, const struct lladdr_info *);
Expand Down
982 changes: 697 additions & 285 deletions print-lwapp.c

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions print-udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,11 +642,11 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
else if (IS_SRC_OR_DST_PORT(SFLOW_PORT))
sflow_print(ndo, cp, length);
else if (dport == LWAPP_CONTROL_PORT)
lwapp_control_print(ndo, cp, length, 1);
lwapp_print(ndo, cp, length, 1);
else if (sport == LWAPP_CONTROL_PORT)
lwapp_control_print(ndo, cp, length, 0);
lwapp_print(ndo, cp, length, 0);
else if (IS_SRC_OR_DST_PORT(LWAPP_DATA_PORT))
lwapp_data_print(ndo, cp, length);
lwapp_print(ndo, cp, length, 0);
else if (IS_SRC_OR_DST_PORT(SIP_PORT))
sip_print(ndo, cp, length);
else if (IS_SRC_OR_DST_PORT(OTV_PORT))
Expand Down
11 changes: 11 additions & 0 deletions tests/TESTrun
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,17 @@ my @decode_tests = (
output => 'arcnet-rfc1201-arp-icmp-http-e.out',
args => '-e'
},
{
name => 'lwapp',
input => 'lwapp-data.pcap',
output => 'lwapp-data.out',
},
{
name => 'lwapp-v',
input => 'lwapp-data.pcap',
output => 'lwapp-data-v.out',
args => '-v'
},
);

sub decode_exit_status {
Expand Down
79 changes: 79 additions & 0 deletions tests/lwapp-data-v.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
1 2005-09-29 12:35:51.933609 IP (tos 0x0, ttl 127, id 53, offset 0, flags [none], proto UDP (17), length 58)
10.48.74.126.20105 > 10.48.73.246.12222: LWAPPv0, Data frame, Radio-id 1, Flags [none], Frag-id 29 (MBZ!), length 24
0x0000: 0040 0000 000b 8524 e890 0002 8ad8 de9a
0x0010: 000b 8524 e890 5310
2 2005-09-29 12:35:52.069158 IP (tos 0x0, ttl 127, id 54, offset 0, flags [none], proto UDP (17), length 98)
10.48.74.126.20105 > 10.48.73.246.12222: LWAPPv0, Data frame, Radio-id 1, Flags [none], Frag-id 30 (MBZ!), length 64
0x0000: 0000 0075 000b 8524 e890 0002 8ad8 de9a
0x0010: 000b 8524 e890 53f0 0021 00c8 000b 6164
0x0020: 6761 722d 766f 6963 6501 0402 040b 16dd
0x0030: 0700 50f2 0200 0100 dd06 0040 9601 0100
3 2005-09-29 12:35:52.108063 IP (tos 0x0, ttl 127, id 59072, offset 0, flags [none], proto UDP (17), length 67)
10.48.73.246.12223 > 10.48.74.126.20105: LWAPPv0, Data frame, Radio-id 1, Flags [none], Frag-id 191 (MBZ!), length 33
0x0000: 0010 0000 0002 8ad8 de9a 000b 8524 e890
0x0010: 000b 8524 e890 0000 0421 0000 c001 0101
0x0020: 96
4 2005-09-29 12:35:52.109698 IP (tos 0x0, ttl 127, id 59073, offset 0, flags [none], proto UDP (17), length 124)
10.48.73.246.12223 > 10.48.74.126.20105: LWAPPv0, Control frame, Radio-id 0, Flags [Control], Frag-id 192 (MBZ!), length 90
Msg type: Update req (12), Seqnum: 150, Msg len: 82, Session: 0x52cc56e6
Msg Elem 0 Type: 39 (Decryption Error Report) [unexpected!], Length: 9210 [elem_len 9210 > 79] (invalid)
5 2005-09-29 12:35:52.109881 IP (tos 0x0, ttl 127, id 55, offset 0, flags [none], proto UDP (17), length 48)
10.48.74.126.20105 > 10.48.73.246.12223: LWAPPv0, Control frame, Radio-id 0, Flags [Control], Frag-id 0, length 8
AP identity: 00:0b:85:24:e8:90
Msg type: Update resp (13), Seqnum: 150, Msg len: 0, Session: 0x8048e4e0
6 2005-09-29 12:35:52.110132 IP (tos 0x0, ttl 127, id 56, offset 0, flags [none], proto UDP (17), length 83)
10.48.74.126.20105 > 10.48.73.246.12222: LWAPPv0, Data frame, Radio-id 1, Flags [none], Frag-id 31 (MBZ!), length 49
0x0000: 0108 0075 000b 8524 e890 0002 8ad8 de9a
0x0010: 000b 8524 e89f 5400 aaaa 0300 4096 0000
0x0020: 0011 4001 000b 8524 e89f 0002 8ad8 de9a
0x0030: 01
7 2005-09-29 12:35:52.111933 IP (tos 0x0, ttl 127, id 57, offset 0, flags [none], proto UDP (17), length 394)
10.48.74.126.20105 > 10.48.73.246.12222: LWAPPv0, Data frame, Radio-id 1, Flags [none], Frag-id 32 (MBZ!), length 360
0x0000: 0108 0075 000b 8524 e890 0002 8ad8 de9a
0x0010: ffff ffff ffff 5410 aaaa 0300 0000 0800
0x0020: 4500 0148 7623 0000 8011 627e 6400 fd03
0x0030: ffff ffff 0044 0043 0134 da76 0101 0600
0x0040: ae41 607e 0000 0000 6400 fd03 0000 0000
0x0050: 0000 0000 0000 0000 0002 8ad8 de9a 0000
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000
0x0100: 0000 0000 0000 0000 0000 0000 0000 0000
0x0110: 0000 0000 0000 0000 0000 0000 0000 0000
0x0120: 0000 0000 0000 0000 6382 5363 3501 033d
0x0130: 0701 0002 8ad8 de9a 0c0d 6168 7562 6572
0x0140: 742d 7732 6b30 353c 084d 5346 5420 352e
0x0150: 3037 0a01 0f03 062c 2e2f 1f21 2bff 0000
0x0160: 0000 0000 0000 0000
8 2005-09-29 12:35:52.153648 IP (tos 0x0, ttl 127, id 59074, offset 0, flags [none], proto UDP (17), length 398)
10.48.73.246.12223 > 10.48.74.126.20105: LWAPPv0, Data frame, Radio-id 1, Flags [none], Frag-id 193 (MBZ!), length 364
0x0000: 0208 0000 0002 8ad8 de9a 000b 8524 e890
0x0010: 000b 8524 e890 0000 aaaa 0300 0000 0800
0x0020: 4500 014c 0000 0000 ff11 579b 0101 0101
0x0030: 6400 fd03 0043 0044 0138 d50f 0201 0600
0x0040: ae41 607e 0000 0000 6400 fd03 6400 fd03
0x0050: 0000 0000 0000 0000 0002 8ad8 de9a 0000
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000
0x0100: 0000 0000 0000 0000 0000 0000 0000 0000
0x0110: 0000 0000 0000 0000 0000 0000 0000 0000
0x0120: 0000 0000 0000 0000 6382 5363 3501 0536
0x0130: 0401 0101 0133 0400 0151 8001 04ff ffff
0x0140: 0000 0000 0000 0000 0000 0000 0000 0000
0x0150: 0000 0000 0000 0000 0000 0000 0000 0000
0x0160: 0000 0000 0000 00ff 0000 0000
8 changes: 8 additions & 0 deletions tests/lwapp-data.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1 2005-09-29 12:35:51.933609 IP 10.48.74.126.20105 > 10.48.73.246.12222: LWAPPv0, Data frame, Flags [none], length 24
2 2005-09-29 12:35:52.069158 IP 10.48.74.126.20105 > 10.48.73.246.12222: LWAPPv0, Data frame, Flags [none], length 64
3 2005-09-29 12:35:52.108063 IP 10.48.73.246.12223 > 10.48.74.126.20105: LWAPPv0, Data frame, Flags [none], length 33
4 2005-09-29 12:35:52.109698 IP 10.48.73.246.12223 > 10.48.74.126.20105: LWAPPv0, Control frame, Flags [Control], length 90
5 2005-09-29 12:35:52.109881 IP 10.48.74.126.20105 > 10.48.73.246.12223: LWAPPv0, Control frame, Flags [Control], length 8
6 2005-09-29 12:35:52.110132 IP 10.48.74.126.20105 > 10.48.73.246.12222: LWAPPv0, Data frame, Flags [none], length 49
7 2005-09-29 12:35:52.111933 IP 10.48.74.126.20105 > 10.48.73.246.12222: LWAPPv0, Data frame, Flags [none], length 360
8 2005-09-29 12:35:52.153648 IP 10.48.73.246.12223 > 10.48.74.126.20105: LWAPPv0, Data frame, Flags [none], length 364
Binary file added tests/lwapp-data.pcap
Binary file not shown.