tcpdump mailing list archives
Re: Linux Frame-Relay and misc
From: Krzysztof Halasa <khc () pm waw pl>
Date: 12 Oct 2003 02:13:33 +0200
Hi,
I have prepared a patch (attached below) for tcpdump/print-fr.c. It isn't
a small change, so I understand it may be unacceptable in current form.
Comments will be appreciated.
I've also attached test dumps from CCITT and ANSI LMI packet exchange
and a test ping (IP on FR) dump. Tested with Linux.
Changes:
1. Unused things (mbuf, rtentry, #include "addrtoname.h") have been removed.
2. I've dropped FR_CR_BIT etc. definitions as they have only meaning in
specific location in Q.922 address. FR_EA_BIT is still there as it's
used by all Q.922 bytes.
3. a new parse_q922_addr() parses the whole Q.922 address structure
and produces DLCI, Q.922 byte count and flags in ASCII. While I can't
test 3- and 4-byte Q.922 addresses (using only default 2-byte ones),
they are supported.
4. I've trimmed comments regarding HDLC flags and CRC/FCS bytes in FR
packet. They are wire-only things and as such are never seen by
libpcap/tcpdump.
5. Changed NLPID_LMI into NLPID_CISCO_LMI and NLPID_Q933 into NLPID_LMI
(the latter is used by both ANSI (T1.617 annex D) and CCITT (Q.933
annex A) LMI).
6. fr_hdrlen() now correctly returns FR header length (4 - 6 bytes,
7 bytes with 4-byte Q.922 and incorrectly used pad byte).
7. I've changed output text formatting: "xxx-value-yyy-value" into
"xxx value, yyy value", to be consistent with Ethernet.
Not sure if it's correct.
8. added IPv6 support
9. q933_print() now reads lmi_print()
10. CCITT (Q.933 annex A) LMI is now supported, and both CCITT and ANSI
fields are now correctly displayed
10. lmi_print() no longer prints constant fields (such as always zeroed
Q.922 C/R bit or LMI Call Reference byte) unless they are set
incorrectly.
11. I've added ANSI_ and CCITT_ prefixes to appropriate #defines.
12. a new parse_dlci_el() should handle all (10, 16 and 23-bit)
DLCIs correctly (corresponding to 2, 3 and 4-byte Q.922 addresses,
respectively).
With CCITT LMI tcpdump now produces something like:
00:31:01.165621 DLCI 0, LMI, length 9: CCITT STATUS ENQUIRY
IE: 51 Len: 1, LINK VERIFY
IE: 53 Len: 2, TX Seq: 9, RX Seq: 8
00:31:01.166077 DLCI 0, LMI, length 24: CCITT STATUS REPLY
IE: 51 Len: 1, FULL STATUS
IE: 53 Len: 2, TX Seq: 9, RX Seq: 9
IE: 57 Len: 3, DLCI 101: status Active
IE: 57 Len: 3, DLCI 102: status Inactive
IE: 57 Len: 3, DLCI 110: status Active
00:31:11.164085 DLCI 0, LMI, length 9: CCITT STATUS ENQUIRY
IE: 51 Len: 1, LINK VERIFY
IE: 53 Len: 2, TX Seq: 10, RX Seq: 9
00:31:11.164474 DLCI 0, LMI, length 9: CCITT STATUS REPLY
IE: 51 Len: 1, LINK VERIFY
IE: 53 Len: 2, TX Seq: 10, RX Seq: 10
With ANSI:
00:26:44.535636 DLCI 0, LMI, length 10: ANSI STATUS ENQUIRY
IE: 01 Len: 1, FULL STATUS
IE: 03 Len: 2, TX Seq: 83, RX Seq: 81
00:26:44.536103 DLCI 0, LMI, length 25: ANSI STATUS REPLY
IE: 01 Len: 1, FULL STATUS
IE: 03 Len: 2, TX Seq: 82, RX Seq: 83
IE: 07 Len: 3, DLCI 101: status Active
IE: 07 Len: 3, DLCI 102: status Inactive
IE: 07 Len: 3, DLCI 110: status Active
00:26:54.534114 DLCI 0, LMI, length 10: ANSI STATUS ENQUIRY
IE: 01 Len: 1, LINK VERIFY
IE: 03 Len: 2, TX Seq: 84, RX Seq: 82
00:26:54.534521 DLCI 0, LMI, length 10: ANSI STATUS REPLY
IE: 01 Len: 1, LINK VERIFY
IE: 03 Len: 2, TX Seq: 83, RX Seq: 84
ping shows:
19:24:53.652794 DLCI 101, IP, length 84: IP (tos 0x0, ttl 64, id 6 ...
--
Krzysztof Halasa, B*FH
Attachment:
print-fr.diff
Description:
Current thread:
- Re: Linux Frame-Relay and misc, (continued)
- Re: Linux Frame-Relay and misc Guy Harris (Oct 16)
- Re: Linux Frame-Relay and misc Krzysztof Halasa (Oct 16)
- Re: Linux Frame-Relay and misc Guy Harris (Oct 16)
- Re: Linux Frame-Relay and misc Guy Harris (Oct 17)
- Re: Linux Frame-Relay and misc Krzysztof Halasa (Oct 17)
- Re: Linux Frame-Relay and misc Guy Harris (Oct 17)
- Re: Linux Frame-Relay and misc Krzysztof Halasa (Oct 18)
- Re: Linux Frame-Relay and misc Krzysztof Halasa (Oct 17)
- Re: Linux Frame-Relay and misc Guy Harris (Oct 17)
- Re: Linux Frame-Relay and misc Krzysztof Halasa (Oct 18)
- Re: Linux Frame-Relay and misc Guy Harris (Oct 16)
