Ok.
Corrections are welcome:
Q.931 describes a) single octet, and b) variable length information
elements.
a) Single octet IEs:
10010nnn - locking shift
ANSI T1.617 LMI uses it for locking shifting to codeset 5 ("IEs
for national use" - 10010101 = 0x95). This is the "magic" locking
shift I was talking about, defined in Q.931/933. The next IEs are
private to T1.617 and defined there.
It looks like other single-octet IEs are not used on FR, at least
if only PVCs are used (no SVCs = switched connections - Q.931 and
Q.933 describe "Digital subscriber signalling system #1" (DSS 1)
used on ISDN and variants, while LMI uses a small subset of DSS 1).
b) Variable length IEs used on FR are 01010001 (report type), 01010011
(link integrity verification) and 01010111 (PVC status). ANSI T1.617
defines (probably, I will check with a library) and uses, respectively,
00000001, 00000011 and 00000111 (1, 3 and 7). No other IEs are
permitted, probably with the exception of 00011001 (0x19) = older ANSI
link integrity verification code. Those ANSI IE codes are valid only
after a locking (and non-locking?) shift to codeset 5 (single 0x95
octet).
This is basically what we now have in print-fr - single octet IE
handler should be deleted as such IEs (except 0x95) are not permitted
on FR (patch attached, there will be more).
If we want to decode full DSS 1, we need single octet IEs and the
rest of things defined by Q.933 and friends - it might be worth doing
for ISDN users, but that's another story and I'm currently unable to
test such things (i.e. no access to ISDN line).
--
Krzysztof Halasa, B*FH
--- tcpdump/print-fr.c.orig 2003-10-18 00:49:03.000000000 +0200
+++ tcpdump/print-fr.c 2003-10-18 00:49:47.000000000 +0200
@@ -433,18 +433,6 @@
/* Loop through the rest of IE */
while (length > 0) {
- if (is_ansi && (ptemp[0] & ONE_BYTE_IE_MASK)) {
- /* not sure what's that - any pointers to
- documentation? Is it for ANSI T1.617 annex D only,
- isn't it? */
- printf("\t\tOne byte IE: %02x, Content %02x\n",
- (*ptemp & 0x70) >> 4, (*ptemp & 0x0F));
- length--;
- ptemp++;
- continue;
- }
-
- /* Multi-byte IE */
ie_p = (struct common_ie_header *)ptemp;
if (length < sizeof(struct common_ie_header) ||
length < sizeof(struct common_ie_header) + ie_p->ie_len) {