typedef struct tab_t tab_t;
struct tab_t {
int n;
char *str;
tab_t *tab;
};
tab_t Ipcpopts[] = {
{ 1, "IP-Addresses (deprecated)" },
{ 2, "IP-Compression-Protocol" },
{ 3, "IP-Address" },
{ 4, "Mobile-IPv4" },
{ 129, "Primary DNS Server Address" },
{ 130, "Primary NBNS Server Address" },
{ 131, "Secondary DNS Server Address" },
{ 132, "Secondary NBNS Server Address" },
{ -1, "?" },
};
tab_t Ccpopts[] = {
{ 0, "OUI" },
{ 1, "Predictor type 1" },
{ 2, "Predictor type 2" },
{ 3, "Puddle Jumper" },
{ 16, "Hewlett-Packard PPC" },
{ 17, "Stac Electronics LZS" },
{ 18, "Microsoft PPC" },
{ 19, "Gandalf FZA" },
{ 20, "V.42bis compression" },
{ 21, "BSD Compress" },
{ 22, "unassigned" },
{ 23, "LZS-DCP" },
{ 24, "MVRCA (Magnalink)" },
{ 25, "Unassigned" },
{ 26, "Deflate" },
{ 27, "V.44/LZJH Compression Protocol" },
{ 31, "THWACK bell-labs, unofficial" },
{ 255, "Reserved" },
{ -1, "?" },
};
tab_t Ecpopts[] = {
{ 0, "OUI" },
{ 1, "Deprecated (DESE)" },
{ 2, "3DESE" },
{ 3, "DESE-bis" },
{ -1, "?" },
};
tab_t Lcpopts[] = {
{ 0, "Vendor Specific" },
{ 1, "Maximum-Receive-Unit" },
{ 2, "Async-Control-Character-Map" },
{ 3, "Authentication-Protocol" },
{ 4, "Quality-Protocol" },
{ 5, "Magic-Number" },
{ 6, "DEPRECATED (Quality-Protocol)" },
{ 7, "Protocol-Field-Compression" },
{ 8, "Address-and-Control-Field-Compression" },
{ 9, "FCS-Alternatives" },
{ 10, "Self-Describing-Pad" },
{ 11, "Numbered-Mode" },
{ 12, "DEPRECATED (Multi-Link-Procedure)" },
{ 13, "Callback" },
{ 14, "DEPRECATED (Connect-Time)" },
{ 15, "DEPRECATED (Compound-Frames)" },
{ 16, "DEPRECATED (Nominal-Data-Encapsulation)" },
{ 17, "Multilink-MRRU" },
{ 18, "Multilink-Short-Sequence-Number-Header" },
{ 19, "Multilink-Endpoint-Discriminator" },
{ 20, "Proprietary" },
{ 21, "DCE-Identifier" },
{ 22, "Multi-Link-Plus-Procedure" },
{ 23, "Link Discriminator for BACP" },
{ 24, "LCP-Authentication-Option" },
{ 25, "Consistent Overhead Byte Stuffing (COBS)" },
{ 26, "Prefix elision" },
{ 27, "Multilink header format" },
{ 28, "Internationalization" },
{ 29, "Simple Data Link on SONET/SDH" },
{ 30, "Reserved until 14-Oct-2002" },
{ -1, "?" }
};
tab_t Sdcpopts[] = {
{ 1, "Packet-Format" },
{ 2, "Header-Type" },
{ 3, "Length-Field-Present" },
{ 4, "Multi-Port" },
{ 5, "Transport-Mode" },
{ 6, "Maximum-Frame-Size" },
{ 7, "Allow-Odd-Frames" },
{ 8, "FCS-Type" },
{ 9, "Flow-Expiration-Time" },
{ -1, "?" }
};
tab_t Callback[] = {
{ 0, "Location determined by user authentication." },
{ 1, "Dialing string." },
{ 2, "Location identifier." },
{ 3, "E.164 number." },
{ 4, "X.500 distinguished name." },
{ 5, "unassigned" },
{ 6, "Location is determined during CBCP negotiation." },
{ -1, "?" }
};
tab_t Fcsopts[] = {
{ 1, "Null FCS" },
{ 2, "CCITT 16-Bit FCS" },
{ 4, "CCITT 32-bit FCS" },
{ -1, "?" }
};
tab_t Chapopts[] = {
{ 0, "Reserved" },
{ 1, "Reserved" },
{ 2, "Reserved" },
{ 3, "Reserved" },
{ 4, "Reserved" },
{ 5, "CHAP with MD5" },
{ 128, "MS-CHAP" },
{ 129, "MS-CHAP-2" },
{ -1, "?" }
};
tab_t Papopts[] = {
{ 1, "Auth-Request" },
{ 2, "Auth-Ack" },
{ 3, "Auth-Nak" },
{ -1, "?" }
};
tab_t Options[] = {
{ 0, "Vendor Specific" },
{ 1, "Configure-Request" },
{ 2, "Configure-Ack" },
{ 3, "Configure-Nak" },
{ 4, "Configure-Reject" },
{ 5, "Terminate-Request" },
{ 6, "Terminate-Ack" },
{ 7, "Code-Reject" },
{ 8, "Protocol-Reject" },
{ 9, "Echo-Request" },
{ 10, "Echo-Reply" },
{ 11, "Discard-Request" },
{ 12, "Identification" },
{ 13, "Time-Remaining" },
{ 14, "Reset-Request" },
{ 15, "Reset-Reply" },
{ -1, "?" }
};
tab_t Protocols[] = {
{ 0x0001, "Padding Protocol" },
{ 0x0003, "ROHC small-CID" },
{ 0x0005, "ROHC large-CID" },
{ 0x0021, "Internet Protocol version 4" },
{ 0x0023, "OSI Network Layer" },
{ 0x0025, "Xerox NS IDP" },
{ 0x0027, "DECnet Phase IV" },
{ 0x0029, "Appletalk" },
{ 0x002b, "Novell IPX" },
{ 0x002d, "Van Jacobson Compressed TCP/IP" },
{ 0x002f, "Van Jacobson Uncompressed TCP/IP" },
{ 0x0031, "Bridging PDU" },
{ 0x0033, "Stream Protocol (ST-II)" },
{ 0x0035, "Banyan Vines" },
{ 0x0037, "reserved (until 1993)" },
{ 0x0039, "AppleTalk EDDP" },
{ 0x003b, "AppleTalk SmartBuffered" },
{ 0x003d, "Multi-Link" },
{ 0x003f, "NETBIOS Framing" },
{ 0x0041, "Cisco Systems" },
{ 0x0043, "Ascom Timeplex" },
{ 0x0045, "Fujitsu Link Backup and Load Balancing (LBLB)" },
{ 0x0047, "DCA Remote Lan" },
{ 0x0049, "Serial Data Transport Protocol (PPP-SDTP)" },
{ 0x004b, "SNA over 802.2" },
{ 0x004d, "SNA" },
{ 0x004f, "IPv6 Header Compression" },
{ 0x0051, "KNX Bridging Data" },
{ 0x0053, "Encryption" },
{ 0x0055, "Individual Link Encryption" },
{ 0x0057, "Internet Protocol version 6" },
{ 0x0059, "PPP Muxing" },
{ 0x0061, "RTP IPHC Full Header" },
{ 0x0063, "RTP IPHC Compressed TCP" },
{ 0x0065, "RTP IPHC Compressed Non TCP" },
{ 0x0067, "RTP IPHC Compressed UDP 8" },
{ 0x0069, "RTP IPHC Compressed RTP 8" },
{ 0x006f, "Stampede Bridging" },
{ 0x0071, "Reserved" },
{ 0x0073, "MP+ Protocol" },
{ 0x007d, "reserved (Control Escape)" },
{ 0x007f, "reserved (compression inefficient)" },
{ 0x0081, "Reserved Until 20-Oct-2000" },
{ 0x0083, "Reserved Until 20-Oct-2000" },
{ 0x00c1, "NTCITS IPI" },
{ 0x00cf, "reserved (PPP NLPID)" },
{ 0x00fb, "single link compression in multilink" },
{ 0x00fd, "compressed datagram" },
{ 0x00ff, "reserved (compression inefficient)" },
{ 0x0201, "802.1d Hello Packets" },
{ 0x0203, "IBM Source Routing BPDU" },
{ 0x0205, "DEC LANBridge100 Spanning Tree" },
{ 0x0207, "Cisco Discovery Protocol" },
{ 0x0209, "Netcs Twin Routing" },
{ 0x020b, "STP - Scheduled Transfer Protocol" },
{ 0x020d, "EDP - Extreme Discovery Protocol" },
{ 0x0211, "Optical Supervisory Channel Protocol (OSCP)" },
{ 0x0213, "Optical Supervisory Channel Protocol (OSCP)" },
{ 0x0231, "Luxcom" },
{ 0x0233, "Sigma Network Systems" },
{ 0x0235, "Apple Client Server Protocol" },
{ 0x0281, "MPLS Unicast" },
{ 0x0283, "MPLS Multicast" },
{ 0x0285, "IEEE p1284.4 standard - data packets" },
{ 0x0287, "ETSI TETRA Network Protocol Type 1" },
{ 0x0289, "Multichannel Flow Treatment Protocol" },
{ 0x2063, "RTP IPHC Compressed TCP No Delta" },
{ 0x2065, "RTP IPHC Context State" },
{ 0x2067, "RTP IPHC Compressed UDP 16" },
{ 0x2069, "RTP IPHC Compressed RTP 16" },
{ 0x4001, "Cray Communications Control Protocol" },
{ 0x4003, "CDPD Mobile Network Registration Protocol" },
{ 0x4005, "Expand accelerator dllcol" },
{ 0x4007, "ODSICP NCP" },
{ 0x4009, "DOCSIS DLL" },
{ 0x4021, "Stacker LZS" },
{ 0x4023, "RefTek Protocol" },
{ 0x4025, "Fibre Channel" },
{ 0x4027, "EMIT Protocols" },
{ 0x8021, "Internet Protocol Control Protocol" },
{ 0x8023, "OSI Network Layer Control Protocol" },
{ 0x8025, "Xerox NS IDP Control Protocol" },
{ 0x8027, "DECnet Phase IV Control Protocol" },
{ 0x8029, "Appletalk Control Protocol" },
{ 0x802b, "Novell IPX Control Protocol" },
{ 0x802d, "reserved" },
{ 0x802f, "reserved" },
{ 0x8031, "Bridging NCP" },
{ 0x8033, "Stream Protocol Control Protocol" },
{ 0x8035, "Banyan Vines Control Protocol" },
{ 0x8037, "reserved (until 1993)" },
{ 0x8039, "reserved" },
{ 0x803b, "reserved" },
{ 0x803d, "Multi-Link Control Protocol" },
{ 0x803f, "NETBIOS Framing Control Protocol" },
{ 0x8041, "Cisco Systems Control Protocol" },
{ 0x8043, "Ascom Timeplex" },
{ 0x8045, "Fujitsu LBLB Control Protocol" },
{ 0x8047, "DCA Remote Lan Network Control Protocol (RLNCP)" },
{ 0x8049, "Serial Data Control Protocol (PPP-SDCP)" },
{ 0x804b, "SNA over 802.2 Control Protocol" },
{ 0x804d, "SNA Control Protocol" },
{ 0x804f, "IP6 Header Compression Control Protocol" },
{ 0x8051, "KNX Bridging Control Protocol" },
{ 0x8053, "Encryption Control Protocol" },
{ 0x8055, "Individual Link Encryption Control Protocol" },
{ 0x8057, "IPv6 Control Protovol" },
{ 0x8059, "PPP Muxing Control Protocol" },
{ 0x806f, "Stampede Bridging Control Protocol" },
{ 0x8073, "MP+ Control Protocol" },
{ 0x8071, "Reserved" },
{ 0x807d, "Not Used - reserved" },
{ 0x8081, "Reserved Until 20-Oct-2000" },
{ 0x8083, "Reserved Until 20-Oct-2000" },
{ 0x80c1, "NTCITS IPI Control Protocol" },
{ 0x80cf, "Not Used - reserved" },
{ 0x80fb, "single link compression in multilink control" },
{ 0x80fd, "Compression Control Protocol" },
{ 0x80ff, "Not Used - reserved" },
{ 0x8207, "Cisco Discovery Protocol Control" },
{ 0x8209, "Netcs Twin Routing" },
{ 0x820b, "STP - Control Protocol" },
{ 0x820d, "EDPCP - Extreme Discovery Protocol Ctrl Prtcl" },
{ 0x8235, "Apple Client Server Protocol Control" },
{ 0x8281, "MPLSCP" },
{ 0x8285, "IEEE p1284.4 standard - Protocol Control" },
{ 0x8287, "ETSI TETRA TNP1 Control Protocol" },
{ 0x8289, "Multichannel Flow Treatment Protocol" },
{ 0xc021, "Link Control Protocol" },
{ 0xc023, "Password Authentication Protocol" },
{ 0xc025, "Link Quality Report" },
{ 0xc027, "Shiva Password Authentication Protocol" },
{ 0xc029, "CallBack Control Protocol (CBCP)" },
{ 0xc02b, "BACP Bandwidth Allocation Control Protocol" },
{ 0xc02d, "BAP" },
{ 0xc081, "Container Control Protocol" },
{ 0xc223, "Challenge Handshake Authentication Protocol" },
{ 0xc225, "RSA Authentication Protocol" },
{ 0xc227, "Extensible Authentication Protocol" },
{ 0xc229, "Mitsubishi Security Info Exch Ptcl (SIEP)" },
{ 0xc26f, "Stampede Bridging Authorization Protocol" },
{ 0xc281, "Proprietary Authentication Protocol" },
{ 0xc283, "Proprietary Authentication Protocol" },
{ 0xc481, "Proprietary Node ID Authentication Protocol" },
{ -1, "?" }
};
/*
* FCS lookup table as calculated by genfcstab.
*/
static unsigned short fcstab[256] = {
0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
tab_t Lcpvals[] = {
{ 0, " Vendor specific\n" },
{ 1, " mtu=%d\n" },
{ 2, " async char map=0x%lx\n"},
{ 3, " authentication proto='%t'\n", Protocols },
{ 4, " monitoring proto='%t'\n", Protocols },
{ 5, " magic=0x%lx\n"},
{ 7, " Enabled\n" },
{ 8, " Enabled\n" },
{ 9, " FCS type='%bt'\n", Fcsopts },
{ 10, " padding length=%bd\n" },
{ 11, " callback type='%bt'\n"
" callback msg='%s'\n", Callback },
{ 13, " number='%bt'\n\n", Callback },
{ 15, " Enabled\n" },
{ -1, " ?" }
};
tab_t Ipcpvals[] = {
{ 0, " Vendor specific\n" },
{ 1, " %bd.%bd.%bd.%bd\n"
" %bd.%bd.%bd.%bd\n" },
{ 2, " proto='%t'\n"
" max slot id=%bd\n"
" comp slot id=%bd\n", Protocols },
{ 3, " %bd.%bd.%bd.%bd\n" },
{ 4, " %bd.%bd.%bd.%bd\n" },
{ 129, " %bd.%bd.%bd.%bd\n" },
{ 130, " %bd.%bd.%bd.%bd\n" },
{ 131, " %bd.%bd.%bd.%bd\n" },
{ 132, " %bd.%bd.%bd.%bd\n" },
{ -1, " ?" }
};
/* These values are bitmapped so other combinations are possable */
tab_t Mppvals[] = {
{ 0, "Macintosh ?\n" },
{ 1, "Compression only"},
{ 0x20, "40bit key encryption"},
{ 0x21, "Compression & 40bit key encryption"},
{ 0x40, "128bit key encryption"},
{ 0x41, "Compression & 56bit key encryption"},
{ 0x80, "128bit key encryption"},
{ 0x81, "Compression & 56bit key encryption"},
{ 0x1000, "dynamic key encryption"},
{ 0x1001, "Compression & dynamic key encryption"},
};
tab_t Ccpvals[] = {
{ 17, " Hist count=%wd\n"
" check mode=0x%bx\n" }, /* Stac Electronics LZS */
{ 18, " bitmask='%lt'\n", Mppvals }, /* Microsoft PPC */
{ -1, " ?" }
};
|