/epan/dissectors/packet-ppp.c
C | 6870 lines | 5576 code | 732 blank | 562 comment | 274 complexity | d565937fffc7e1d4a6d6170abe1b6cf1 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause
Large files files are truncated, but you can click here to view the full file
- /* packet-ppp.c
- * Routines for ppp packet disassembly
- * RFC 1661, RFC 1662
- *
- * $Id$
- *
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
- *
- * This file created and by Mike Hall <mlh@io.com>
- * Copyright 1998
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
- #include "config.h"
- #include <glib.h>
- #include <epan/packet.h>
- #include <epan/prefs.h>
- #include <epan/wmem/wmem.h>
- #include "packet-ppp.h"
- #include <epan/ppptypes.h>
- #include <epan/etypes.h>
- #include <epan/expert.h>
- #include <epan/ip_opts.h>
- #include <epan/atalk-utils.h>
- #include "packet-chdlc.h"
- #include "packet-ip.h"
- #include "packet-ipx.h"
- #include "packet-vines.h"
- #include <epan/nlpid.h>
- #include <epan/crc16-tvb.h>
- #include <epan/crc32-tvb.h>
- #include <epan/ipproto.h>
- #include <epan/addr_resolv.h>
- #include <epan/oui.h>
- #include "packet-usb.h"
- #include "packet-sll.h"
- static int proto_ppp = -1;
- static int hf_ppp_direction = -1;
- static int hf_ppp_address = -1;
- static int hf_ppp_control = -1;
- static int hf_ppp_protocol = -1;
- static int hf_ppp_code = -1;
- static int hf_ppp_identifier = -1;
- static int hf_ppp_length = -1;
- static int hf_ppp_magic_number = -1;
- static int hf_ppp_oui = -1;
- static int hf_ppp_kind = -1;
- static int hf_ppp_data = -1;
- static int hf_ppp_opt_type = -1;
- static int hf_ppp_opt_type_copy = -1;
- static int hf_ppp_opt_type_class = -1;
- static int hf_ppp_opt_type_number = -1;
- static gint ett_ppp = -1;
- static gint ett_ppp_opt_type = -1;
- static expert_field ei_ppp_opt_len_invalid = EI_INIT;
- static int proto_ppp_hdlc = -1;
- static gint ett_ppp_hdlc_data = -1;
- static int proto_lcp = -1;
- static gint ett_lcp = -1;
- static gint ett_lcp_options = -1;
- static gint ett_lcp_vendor_opt = -1;
- static gint ett_lcp_mru_opt = -1;
- static gint ett_lcp_asyncmap_opt = -1;
- static gint ett_lcp_authprot_opt = -1;
- static gint ett_lcp_qualprot_opt = -1;
- static gint ett_lcp_magicnumber_opt = -1;
- static gint ett_lcp_linkqualmon_opt = -1;
- static gint ett_lcp_pcomp_opt = -1;
- static gint ett_lcp_acccomp_opt = -1;
- static gint ett_lcp_fcs_alternatives_opt = -1;
- static gint ett_lcp_self_desc_pad_opt = -1;
- static gint ett_lcp_numbered_mode_opt = -1;
- static gint ett_lcp_callback_opt = -1;
- static gint ett_lcp_compound_frames_opt = -1;
- static gint ett_lcp_nomdataencap_opt = -1;
- static gint ett_lcp_multilink_mrru_opt = -1;
- static gint ett_lcp_multilink_ssnh_opt = -1;
- static gint ett_lcp_multilink_ep_disc_opt = -1;
- static gint ett_lcp_magic_block = -1;
- static gint ett_lcp_dce_identifier_opt = -1;
- static gint ett_lcp_multilink_pp_opt = -1;
- static gint ett_lcp_bacp_link_discrim_opt = -1;
- static gint ett_lcp_auth_opt = -1;
- static gint ett_lcp_cobs_opt = -1;
- static gint ett_lcp_prefix_elision_opt = -1;
- static gint ett_multilink_hdr_fmt_opt = -1;
- static gint ett_lcp_internationalization_opt = -1;
- static gint ett_lcp_simple_opt = -1;
- static int proto_ipcp = -1;
- static gint ett_ipcp = -1;
- static gint ett_ipcp_options = -1;
- static gint ett_ipcp_ipaddrs_opt = -1;
- static gint ett_ipcp_compress_opt = -1;
- static gint ett_ipcp_ipaddr_opt = -1;
- static gint ett_ipcp_mobileipv4_opt = -1;
- static gint ett_ipcp_pridns_opt = -1;
- static gint ett_ipcp_secdns_opt = -1;
- static gint ett_ipcp_prinbns_opt = -1;
- static gint ett_ipcp_secnbns_opt = -1;
- static gint ett_ipcp_iphc_rtp_compress_opt = -1;
- static gint ett_ipcp_iphc_enhanced_rtp_compress_opt = -1;
- static gint ett_ipcp_iphc_neghdrcomp_opt = -1;
- static gint ett_ipcp_rohc_profiles_opt = -1;
- static int proto_vsncp = -1;
- static gint ett_vsncp = -1;
- static gint ett_vsncp_options = -1;
- static int proto_vsnp = -1;
- static gint hf_vsnp_pdnid = -1;
- static gint ett_vsnp =-1;
- static int proto_osinlcp = -1;
- static gint ett_osinlcp = -1;
- static gint ett_osinlcp_options = -1;
- static gint ett_osinlcp_align_npdu_opt = -1;
- static int proto_bcp = -1;
- static int hf_bcp_flags = -1;
- static int hf_bcp_fcs_present = -1;
- static int hf_bcp_zeropad = -1;
- static int hf_bcp_bcontrol = -1;
- static int hf_bcp_pads = -1;
- static int hf_bcp_mac_type = -1;
- static gint ett_bcp = -1;
- static gint ett_bcp_flags = -1;
- static int proto_ccp = -1;
- static gint ett_ccp = -1;
- static gint ett_ccp_options = -1;
- static gint ett_ccp_oui_opt = -1;
- static gint ett_ccp_predict1_opt = -1;
- static gint ett_ccp_predict2_opt = -1;
- static gint ett_ccp_puddle_opt = -1;
- static gint ett_ccp_hpppc_opt = -1;
- static gint ett_ccp_stac_opt = -1;
- static gint ett_ccp_stac_opt_check_mode = -1;
- static gint ett_ccp_mppe_opt = -1;
- static gint ett_ccp_mppe_opt_supp_bits = -1;
- static gint ett_ccp_gfza_opt = -1;
- static gint ett_ccp_v42bis_opt = -1;
- static gint ett_ccp_bsdcomp_opt = -1;
- static gint ett_ccp_lzsdcp_opt = -1;
- static gint ett_ccp_mvrca_opt = -1;
- static gint ett_ccp_dce_opt = -1;
- static gint ett_ccp_deflate_opt = -1;
- static gint ett_ccp_v44lzjh_opt = -1;
- static int proto_cbcp = -1;
- static gint ett_cbcp = -1;
- static gint ett_cbcp_options = -1;
- static gint ett_cbcp_callback_opt = -1;
- static gint ett_cbcp_callback_opt_addr = -1;
- static int proto_bacp = -1;
- static gint ett_bacp = -1;
- static gint ett_bacp_options = -1;
- static gint ett_bacp_favored_peer_opt = -1;
- static int proto_bap = -1;
- static gint ett_bap = -1;
- static gint ett_bap_options = -1;
- static gint ett_bap_link_type_opt = -1;
- static gint ett_bap_phone_delta_opt = -1;
- static gint ett_bap_phone_delta_subopt = -1;
- static gint ett_bap_call_status_opt = -1;
- static int proto_comp_data = -1;
- #if 0 /* see dissect_comp_data() */
- static gint ett_comp_data = -1;
- #endif
- static int proto_pppmuxcp = -1;
- static int hf_pppmux_flags_pid = -1;
- static int hf_pppmux_flags_field_length = -1;
- static gint ett_pppmuxcp = -1;
- static gint ett_pppmuxcp_options = -1;
- static int proto_pppmux = -1;
- static int hf_pppmux_protocol = -1;
- static gint ett_pppmux = -1;
- static gint ett_pppmux_subframe = -1;
- static gint ett_pppmux_subframe_hdr = -1;
- static gint ett_pppmux_subframe_flags = -1;
- static gint ett_pppmux_subframe_info = -1;
- static int proto_mp = -1;
- static int hf_mp_frag_first = -1;
- static int hf_mp_frag_last = -1;
- static int hf_mp_short_sequence_num_reserved = -1;
- static int hf_mp_sequence_num = -1;
- static int hf_mp_sequence_num_reserved = -1;
- static int hf_mp_short_sequence_num = -1;
- static int ett_mp = -1;
- static int ett_mp_flags = -1;
- static int proto_mplscp = -1;
- static gint ett_mplscp = -1;
- static gint ett_mplscp_options = -1;
- static int proto_cdpcp = -1;
- static gint ett_cdpcp = -1;
- static gint ett_cdpcp_options = -1;
- static int proto_pap = -1; /* PAP vars */
- static gint ett_pap = -1;
- static gint ett_pap_data = -1;
- static gint hf_pap_code = -1;
- static gint hf_pap_identifier = -1;
- static gint hf_pap_length = -1;
- static gint hf_pap_data = -1;
- static gint hf_pap_peer_id = -1;
- static gint hf_pap_peer_id_length = -1;
- static gint hf_pap_password = -1;
- static gint hf_pap_password_length = -1;
- static gint hf_pap_message = -1;
- static gint hf_pap_message_length = -1;
- static gint hf_pap_stuff = -1;
- static int proto_chap = -1; /* CHAP vars */
- static gint ett_chap = -1;
- static gint ett_chap_data = -1;
- static gint hf_chap_code = -1;
- static gint hf_chap_identifier = -1;
- static gint hf_chap_length = -1;
- static gint hf_chap_data = -1;
- static gint hf_chap_value_size = -1;
- static gint hf_chap_value = -1;
- static gint hf_chap_name = -1;
- static gint hf_chap_message = -1;
- static int proto_ipv6cp = -1; /* IPv6CP vars */
- static gint ett_ipv6cp = -1;
- static gint ett_ipv6cp_options = -1;
- static gint ett_ipv6cp_if_id_opt = -1;
- static gint ett_ipv6cp_compress_opt = -1;
- static int proto_iphc_crtp = -1; /* CRTP vars */
- static int hf_iphc_crtp_cid8 = -1;
- static int hf_iphc_crtp_cid16 = -1;
- static int hf_iphc_crtp_gen = -1;
- static int hf_iphc_crtp_seq = -1;
- static int hf_iphc_crtp_fh_flags = -1;
- static int hf_iphc_crtp_cs_flags = -1;
- static int hf_iphc_crtp_cs_cnt = -1;
- static int hf_iphc_crtp_cs_invalid = -1;
- static gint ett_iphc_crtp = -1;
- static gint ett_iphc_crtp_hdr = -1;
- static gint ett_iphc_crtp_info = -1;
- static dissector_table_t ppp_subdissector_table;
- static dissector_handle_t chdlc_handle;
- static dissector_handle_t data_handle;
- static dissector_handle_t eth_withfcs_handle;
- static dissector_handle_t eth_withoutfcs_handle;
- static const value_string ppp_direction_vals[] = {
- {P2P_DIR_RECV, "DCE->DTE"},
- {P2P_DIR_SENT, "DTE->DCE"},
- {0, NULL}
- };
- /* options */
- static gint ppp_fcs_decode = 0; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */
- #define NO_FCS 0
- #define FCS_16 1
- #define FCS_32 2
- const enum_val_t fcs_options[] = {
- {"none", "None", NO_FCS},
- {"16-bit", "16-Bit", FCS_16},
- {"32-bit", "32-Bit", FCS_32},
- {NULL, NULL, -1}
- };
- gboolean ppp_vj_decomp = TRUE; /* Default to VJ header decompression */
- /*
- * For Default Protocol ID negotiated with PPPMuxCP. We need to
- * this ID so that if the first subframe doesn't have protocol
- * ID, we can use it
- */
- static guint pppmux_def_prot_id = 0;
- /* PPP definitions */
- /*
- * Used by the GTP dissector as well.
- * www.iana.org/assignments/ppp-numbers
- */
- static const value_string ppp_vals[] = {
- {PPP_PADDING, "Padding Protocol"},
- {PPP_ROHC_SCID, "ROHC small-CID"},
- {PPP_ROHC_LCID, "ROHC large-CID"},
- {PPP_IP, "Internet Protocol version 4"},
- {PPP_OSI, "OSI Network Layer"},
- {PPP_XNSIDP, "Xerox NS IDP"},
- {PPP_DEC4, "DECnet Phase IV"},
- {PPP_AT, "Appletalk"},
- {PPP_IPX, "Novell IPX"},
- {PPP_VJC_COMP, "Van Jacobson Compressed TCP/IP"},
- {PPP_VJC_UNCOMP, "Van Jacobson Uncompressed TCP/IP"},
- {PPP_BCP, "Bridging PDU"},
- {PPP_ST, "Stream Protocol (ST-II)"},
- {PPP_VINES, "Banyan Vines"},
- {PPP_AT_EDDP, "AppleTalk EDDP"},
- {PPP_AT_SB, "AppleTalk SmartBuffered"},
- {PPP_MP, "Multi-Link"},
- {PPP_NB, "NETBIOS Framing"},
- {PPP_CISCO, "Cisco Systems"},
- {PPP_ASCOM, "Ascom Timeplex"},
- {PPP_LBLB, "Fujitsu Link Backup and Load Balancing (LBLB)"},
- {PPP_RL, "DCA Remote Lan"},
- {PPP_SDTP, "Serial Data Transport Protocol (PPP-SDTP)"},
- {PPP_LLC, "SNA over 802.2"},
- {PPP_SNA, "SNA"},
- {PPP_IPV6HC, "IPv6 Header Compression "},
- {PPP_KNX, "KNX Bridging Data"},
- {PPP_ENCRYPT, "Encryption"},
- {PPP_ILE, "Individual Link Encryption"},
- {PPP_IPV6, "Internet Protocol version 6"},
- {PPP_MUX, "PPP Muxing"},
- {PPP_VSNP, "Vendor-Specific Network Protocol (VSNP)"},
- {PPP_TNP, "TRILL Network Protocol (TNP)"},
- {PPP_RTP_FH, "RTP IPHC Full Header"},
- {PPP_RTP_CTCP, "RTP IPHC Compressed TCP"},
- {PPP_RTP_CNTCP, "RTP IPHC Compressed Non TCP"},
- {PPP_RTP_CUDP8, "RTP IPHC Compressed UDP 8"},
- {PPP_RTP_CRTP8, "RTP IPHC Compressed RTP 8"},
- {PPP_STAMPEDE, "Stampede Bridging"},
- {PPP_MPPLUS, "MP+ Protocol"},
- {PPP_NTCITS_IPI, "NTCITS IPI"},
- {PPP_ML_SLCOMP, "Single link compression in multilink"},
- {PPP_COMP, "Compressed datagram"},
- {PPP_STP_HELLO, "802.1d Hello Packets"},
- {PPP_IBM_SR, "IBM Source Routing BPDU"},
- {PPP_DEC_LB, "DEC LANBridge100 Spanning Tree"},
- {PPP_CDP, "Cisco Discovery Protocol"},
- {PPP_NETCS, "Netcs Twin Routing"},
- {PPP_STP, "STP - Scheduled Transfer Protocol"},
- {PPP_EDP, "EDP - Extreme Discovery Protocol"},
- {PPP_OSCP, "Optical Supervisory Channel Protocol (OSCP)"},
- {PPP_OSCP2, "Optical Supervisory Channel Protocol (OSCP)"},
- {PPP_LUXCOM, "Luxcom"},
- {PPP_SIGMA, "Sigma Network Systems"},
- {PPP_ACSP, "Apple Client Server Protocol"},
- {PPP_MPLS_UNI, "MPLS Unicast"},
- {PPP_MPLS_MULTI, "MPLS Multicast"},
- {PPP_P12844, "IEEE p1284.4 standard - data packets"},
- {PPP_TETRA, "ETSI TETRA Network Protocol Type 1"},
- {PPP_MFTP, "Multichannel Flow Treatment Protocol"},
- {PPP_RTP_CTCPND, "RTP IPHC Compressed TCP No Delta"},
- {PPP_RTP_CS, "RTP IPHC Context State"},
- {PPP_RTP_CUDP16, "RTP IPHC Compressed UDP 16"},
- {PPP_RTP_CRDP16, "RTP IPHC Compressed RTP 16"},
- {PPP_CCCP, "Cray Communications Control Protocol"},
- {PPP_CDPD_MNRP, "CDPD Mobile Network Registration Protocol"},
- {PPP_EXPANDAP, "Expand accelerator protocol"},
- {PPP_ODSICP, "ODSICP NCP"},
- {PPP_DOCSIS, "DOCSIS DLL"},
- {PPP_CETACEANNDP, "Cetacean Network Detection Protocol"},
- {PPP_LZS, "Stacker LZS"},
- {PPP_REFTEK, "RefTek Protocol"},
- {PPP_FC, "Fibre Channel"},
- {PPP_EMIT, "EMIT Protocols"},
- {PPP_VSP, "Vendor-Specific Protocol (VSP)"},
- {PPP_TLSP, "TRILL Link State Protocol (TLSP)"},
- {PPP_IPCP, "Internet Protocol Control Protocol"},
- {PPP_OSINLCP, "OSI Network Layer Control Protocol"},
- {PPP_XNSIDPCP, "Xerox NS IDP Control Protocol"},
- {PPP_DECNETCP, "DECnet Phase IV Control Protocol"},
- {PPP_ATCP, "AppleTalk Control Protocol"},
- {PPP_IPXCP, "Novell IPX Control Protocol"},
- {PPP_BRIDGENCP, "Bridging NCP"},
- {PPP_SPCP, "Stream Protocol Control Protocol"},
- {PPP_BVCP, "Banyan Vines Control Protocol"},
- {PPP_MLCP, "Multi-Link Control Protocol"},
- {PPP_NBCP, "NETBIOS Framing Control Protocol"},
- {PPP_CISCOCP, "Cisco Systems Control Protocol"},
- {PPP_ASCOMCP, "Ascom Timeplex"},
- {PPP_LBLBCP, "Fujitsu LBLB Control Protocol"},
- {PPP_RLNCP, "DCA Remote Lan Network Control Protocol (RLNCP)"},
- {PPP_SDCP, "Serial Data Control Protocol (PPP-SDCP)"},
- {PPP_LLCCP, "SNA over 802.2 Control Protocol"},
- {PPP_SNACP, "SNA Control Protocol"},
- {PPP_IP6HCCP, "IP6 Header Compression Control Protocol"},
- {PPP_KNXCP, "KNX Bridging Control Protocol"},
- {PPP_ECP, "Encryption Control Protocol"},
- {PPP_ILECP, "Individual Link Encryption Control Protocol"},
- {PPP_IPV6CP, "IPv6 Control Protocol"},
- {PPP_MUXCP, "PPP Muxing Control Protocol"},
- {PPP_VSNCP, "Vendor-Specific Network Control Protocol (VSNCP)"},
- {PPP_TNCP, "TRILL Network Control Protocol"},
- {PPP_STAMPEDECP, "Stampede Bridging Control Protocol"},
- {PPP_MPPCP, "MP+ Control Protocol"},
- {PPP_IPICP, "NTCITS IPI Control Protocol"},
- {PPP_SLCC, "Single link compression in multilink control"},
- {PPP_CCP, "Compression Control Protocol"},
- {PPP_CDPCP, "Cisco Discovery Protocol Control Protocol"},
- {PPP_NETCSCP, "Netcs Twin Routing"},
- {PPP_STPCP, "STP - Control Protocol"},
- {PPP_EDPCP, "EDPCP - Extreme Discovery Protocol Control Protocol"},
- {PPP_ACSPC, "Apple Client Server Protocol Control"},
- {PPP_MPLSCP, "MPLS Control Protocol"},
- {PPP_P12844CP, "IEEE p1284.4 standard - Protocol Control"},
- {PPP_TETRACP, "ETSI TETRA TNP1 Control Protocol"},
- {PPP_MFTPCP, "Multichannel Flow Treatment Protocol"},
- {PPP_LCP, "Link Control Protocol"},
- {PPP_PAP, "Password Authentication Protocol"},
- {PPP_LQR, "Link Quality Report"},
- {PPP_SPAP, "Shiva Password Authentication Protocol"},
- {PPP_CBCP, "Callback Control Protocol (CBCP)"},
- {PPP_BACP, "BACP Bandwidth Allocation Control Protocol"},
- {PPP_BAP, "BAP Bandwidth Allocation Protocol"},
- {PPP_VSAP, "Vendor-Specific Authentication Protocol (VSAP)"},
- {PPP_CONTCP, "Container Control Protocol"},
- {PPP_CHAP, "Challenge Handshake Authentication Protocol"},
- {PPP_RSAAP, "RSA Authentication Protocol"},
- {PPP_EAP, "Extensible Authentication Protocol"},
- {PPP_SIEP, "Mitsubishi Security Information Exchange Protocol (SIEP)"},
- {PPP_SBAP, "Stampede Bridging Authorization Protocol"},
- {PPP_PRPAP, "Proprietary Authentication Protocol"},
- {PPP_PRPAP2, "Proprietary Authentication Protocol"},
- {PPP_PRPNIAP, "Proprietary Node ID Authentication Protocol"},
- {0, NULL}
- };
- value_string_ext ppp_vals_ext = VALUE_STRING_EXT_INIT(ppp_vals);
- /* CP (LCP, CCP, IPCP, etc.) codes.
- * from pppd fsm.h
- */
- #define VNDRSPCFC 0 /* Vendor Specific: RFC 2153 */
- #define CONFREQ 1 /* Configuration Request */
- #define CONFACK 2 /* Configuration Ack */
- #define CONFNAK 3 /* Configuration Nak */
- #define CONFREJ 4 /* Configuration Reject */
- #define TERMREQ 5 /* Termination Request */
- #define TERMACK 6 /* Termination Ack */
- #define CODEREJ 7 /* Code Reject */
- static const value_string cp_vals[] = {
- {VNDRSPCFC, "Vendor Specific"},
- {CONFREQ, "Configuration Request"},
- {CONFACK, "Configuration Ack"},
- {CONFNAK, "Configuration Nak"},
- {CONFREJ, "Configuration Reject"},
- {TERMREQ, "Termination Request"},
- {TERMACK, "Termination Ack"},
- {CODEREJ, "Code Reject"},
- {0, NULL}
- };
- /*
- * LCP-specific packet types.
- */
- #define PROTREJ 8 /* Protocol Reject */
- #define ECHOREQ 9 /* Echo Request */
- #define ECHOREP 10 /* Echo Reply */
- #define DISCREQ 11 /* Discard Request */
- #define IDENT 12 /* Identification */
- #define TIMEREMAIN 13 /* Time remaining */
- /*
- * CCP-specific packet types.
- */
- #define RESETREQ 14 /* Reset Request */
- #define RESETACK 15 /* Reset Ack */
- /*
- * CBCP-specific packet types.
- */
- #define CBREQ 1 /* Callback Request */
- #define CBRES 2 /* Callback Response */
- #define CBACK 3 /* Callback Ack */
- #define CBCP_OPT 6 /* Use callback control protocol */
- /*
- * BAP-specific packet types.
- */
- #define BAP_CREQ 1 /* Call Request */
- #define BAP_CRES 2 /* Call Response */
- #define BAP_CBREQ 3 /* Callback Request */
- #define BAP_CBRES 4 /* Callback Response */
- #define BAP_LDQREQ 5 /* Link Drop Query Request */
- #define BAP_LDQRES 6 /* Link Drop Query Response */
- #define BAP_CSI 7 /* Call Status Indication */
- #define BAP_CSRES 8 /* Call Status Response */
- static const value_string lcp_vals[] = {
- {VNDRSPCFC, "Vendor Specific"},
- {CONFREQ, "Configuration Request"},
- {CONFACK, "Configuration Ack"},
- {CONFNAK, "Configuration Nak"},
- {CONFREJ, "Configuration Reject"},
- {TERMREQ, "Termination Request"},
- {TERMACK, "Termination Ack"},
- {CODEREJ, "Code Reject"},
- {PROTREJ, "Protocol Reject"},
- {ECHOREQ, "Echo Request"},
- {ECHOREP, "Echo Reply"},
- {DISCREQ, "Discard Request"},
- {IDENT, "Identification"},
- {TIMEREMAIN, "Time Remaining"},
- {0, NULL}
- };
- static const value_string ccp_vals[] = {
- {VNDRSPCFC, "Vendor Specific"},
- {CONFREQ, "Configuration Request"},
- {CONFACK, "Configuration Ack"},
- {CONFNAK, "Configuration Nak"},
- {CONFREJ, "Configuration Reject"},
- {TERMREQ, "Termination Request"},
- {TERMACK, "Termination Ack"},
- {CODEREJ, "Code Reject"},
- {RESETREQ, "Reset Request"},
- {RESETACK, "Reset Ack"},
- {0, NULL}
- };
- static const value_string cbcp_vals[] = {
- {CBREQ, "Callback Request"},
- {CBRES, "Callback Response"},
- {CBACK, "Callback Ack"},
- {0, NULL}
- };
- static const value_string bap_vals[] = {
- {BAP_CREQ, "Call Request"},
- {BAP_CRES, "Call Response"},
- {BAP_CBREQ, "Callback Request"},
- {BAP_CBRES, "Callback Response"},
- {BAP_LDQREQ, "Link Drop Query Request"},
- {BAP_LDQRES, "Link Drop Query Response"},
- {BAP_CSI, "Call Status Indication"},
- {BAP_CSRES, "Call Status Response"},
- {0, NULL}
- };
- #define BAP_RESP_CODE_REQACK 0x00
- #define BAP_RESP_CODE_REQNAK 0x01
- #define BAP_RESP_CODE_REQREJ 0x02
- #define BAP_RESP_CODE_REQFULLNAK 0x03
- static const value_string bap_resp_code_vals[] = {
- {BAP_RESP_CODE_REQACK, "Request Ack"},
- {BAP_RESP_CODE_REQNAK, "Request Nak"},
- {BAP_RESP_CODE_REQREJ, "Request Rej"},
- {BAP_RESP_CODE_REQFULLNAK, "Request Full Nak"},
- {0, NULL}
- };
- #define BAP_LINK_TYPE_ISDN 0 /* ISDN */
- #define BAP_LINK_TYPE_X25 1 /* X.25 */
- #define BAP_LINK_TYPE_ANALOG 2 /* Analog */
- #define BAP_LINK_TYPE_SD 3 /* Switched Digital (non-ISDN) */
- #define BAP_LINK_TYPE_ISDNOV 4 /* ISDN data over voice */
- #define BAP_LINK_TYPE_RESV5 5 /* Reserved */
- #define BAP_LINK_TYPE_RESV6 6 /* Reserved */
- #define BAP_LINK_TYPE_RESV7 7 /* Reserved */
- static const value_string bap_link_type_vals[] = {
- {BAP_LINK_TYPE_ISDN, "ISDN"},
- {BAP_LINK_TYPE_X25, "X.25"},
- {BAP_LINK_TYPE_ANALOG, "Analog"},
- {BAP_LINK_TYPE_SD, "Switched Digital (non-ISDN)"},
- {BAP_LINK_TYPE_ISDNOV, "ISDN data over voice"},
- {BAP_LINK_TYPE_RESV5, "Reserved"},
- {BAP_LINK_TYPE_RESV6, "Reserved"},
- {BAP_LINK_TYPE_RESV7, "Reserved"},
- {0, NULL}
- };
- #define BAP_PHONE_DELTA_SUBOPT_UNIQ_DIGIT 1 /* Unique Digit */
- #define BAP_PHONE_DELTA_SUBOPT_SUBSC_NUM 2 /* Subscriber Number */
- #define BAP_PHONE_DELTA_SUBOPT_PHONENUM_SUBADDR 3 /* Phone Number Sub Address */
- static const value_string bap_phone_delta_subopt_vals[] = {
- {BAP_PHONE_DELTA_SUBOPT_UNIQ_DIGIT, "Unique Digit"},
- {BAP_PHONE_DELTA_SUBOPT_SUBSC_NUM, "Subscriber Number"},
- {BAP_PHONE_DELTA_SUBOPT_PHONENUM_SUBADDR, "Phone Number Sub Address"},
- {0, NULL}
- };
- /*
- * Cause codes for Cause.
- *
- * The following code table is taken from packet-q931.c but is slightly
- * adapted to BAP protocol.
- */
- static const value_string q931_cause_code_vals[] = {
- {0x00, "Call successful"},
- {0x01, "Unallocated (unassigned) number"},
- {0x02, "No route to specified transit network"},
- {0x03, "No route to destination"},
- {0x04, "Send special information tone"},
- {0x05, "Misdialled trunk prefix"},
- {0x06, "Channel unacceptable"},
- {0x07, "Call awarded and being delivered in an established channel"},
- {0x08, "Prefix 0 dialed but not allowed"},
- {0x09, "Prefix 1 dialed but not allowed"},
- {0x0A, "Prefix 1 dialed but not required"},
- {0x0B, "More digits received than allowed, call is proceeding"},
- {0x10, "Normal call clearing"},
- {0x11, "User busy"},
- {0x12, "No user responding"},
- {0x13, "No answer from user (user alerted)"},
- {0x14, "Subscriber absent"},
- {0x15, "Call rejected"},
- {0x16, "Number changed"},
- {0x17, "Reverse charging rejected"},
- {0x18, "Call suspended"},
- {0x19, "Call resumed"},
- {0x1A, "Non-selected user clearing"},
- {0x1B, "Destination out of order"},
- {0x1C, "Invalid number format (incomplete number)"},
- {0x1D, "Facility rejected"},
- {0x1E, "Response to STATUS ENQUIRY"},
- {0x1F, "Normal unspecified"},
- {0x21, "Circuit out of order"},
- {0x22, "No circuit/channel available"},
- {0x23, "Destination unattainable"},
- {0x25, "Degraded service"},
- {0x26, "Network out of order"},
- {0x27, "Transit delay range cannot be achieved"},
- {0x28, "Throughput range cannot be achieved"},
- {0x29, "Temporary failure"},
- {0x2A, "Switching equipment congestion"},
- {0x2B, "Access information discarded"},
- {0x2C, "Requested circuit/channel not available"},
- {0x2D, "Pre-empted"},
- {0x2E, "Precedence call blocked"},
- {0x2F, "Resources unavailable, unspecified"},
- {0x31, "Quality of service unavailable"},
- {0x32, "Requested facility not subscribed"},
- {0x33, "Reverse charging not allowed"},
- {0x34, "Outgoing calls barred"},
- {0x35, "Outgoing calls barred within CUG"},
- {0x36, "Incoming calls barred"},
- {0x37, "Incoming calls barred within CUG"},
- {0x38, "Call waiting not subscribed"},
- {0x39, "Bearer capability not authorized"},
- {0x3A, "Bearer capability not presently available"},
- {0x3E, "Inconsistency in designated outgoing access information and subscriber class"},
- {0x3F, "Service or option not available, unspecified"},
- {0x41, "Bearer capability not implemented"},
- {0x42, "Channel type not implemented"},
- {0x43, "Transit network selection not implemented"},
- {0x44, "Message not implemented"},
- {0x45, "Requested facility not implemented"},
- {0x46, "Only restricted digital information bearer capability is available"},
- {0x4F, "Service or option not implemented, unspecified"},
- {0x51, "Invalid call reference value"},
- {0x52, "Identified channel does not exist"},
- {0x53, "Call identity does not exist for suspended call"},
- {0x54, "Call identity in use"},
- {0x55, "No call suspended"},
- {0x56, "Call having the requested call identity has been cleared"},
- {0x57, "Called user not member of CUG"},
- {0x58, "Incompatible destination"},
- {0x59, "Non-existent abbreviated address entry"},
- {0x5A, "Destination address missing, and direct call not subscribed"},
- {0x5B, "Invalid transit network selection (national use)"},
- {0x5C, "Invalid facility parameter"},
- {0x5D, "Mandatory information element is missing"},
- {0x5F, "Invalid message, unspecified"},
- {0x60, "Mandatory information element is missing"},
- {0x61, "Message type non-existent or not implemented"},
- {0x62, "Message not compatible with call state or message type non-existent or not implemented"},
- {0x63, "Information element non-existent or not implemented"},
- {0x64, "Invalid information element contents"},
- {0x65, "Message not compatible with call state"},
- {0x66, "Recovery on timer expiry"},
- {0x67, "Parameter non-existent or not implemented - passed on"},
- {0x6E, "Message with unrecognized parameter discarded"},
- {0x6F, "Protocol error, unspecified"},
- {0x7F, "Internetworking, unspecified"},
- {0xFF, "Non-specific failure"},
- {0, NULL}
- };
- static value_string_ext q931_cause_code_vals_ext = VALUE_STRING_EXT_INIT(q931_cause_code_vals);
- static const value_string bap_call_status_opt_action_vals[] = {
- {0, "No retry"},
- {1, "Retry"},
- {0, NULL}
- };
- #define STAC_CM_NONE 0
- #define STAC_CM_LCB 1
- #define STAC_CM_CRC 2
- #define STAC_CM_SN 3
- #define STAC_CM_EXTMODE 4
- static const value_string stac_checkmode_vals[] = {
- {STAC_CM_NONE, "None"},
- {STAC_CM_LCB, "LCB"},
- {STAC_CM_CRC, "CRC"},
- {STAC_CM_SN, "Sequence Number"},
- {STAC_CM_EXTMODE, "Extended Mode"},
- {0, NULL}
- };
- #define LZSDCP_CM_NONE 0
- #define LZSDCP_CM_LCB 1
- #define LZSDCP_CM_SN 2
- #define LZSDCP_CM_SN_LCB 3
- static const value_string lzsdcp_checkmode_vals[] = {
- {LZSDCP_CM_NONE, "None"},
- {LZSDCP_CM_LCB, "LCB"},
- {LZSDCP_CM_SN, "Sequence Number"},
- {LZSDCP_CM_SN_LCB, "Sequence Number + LCB (default)"},
- {0, NULL}
- };
- #define LZSDCP_PM_NONE 0
- #define LZSDCP_PM_PROC_UNCOMP 1
- static const value_string lzsdcp_processmode_vals[] = {
- {LZSDCP_PM_NONE, "None (default)"},
- {LZSDCP_PM_PROC_UNCOMP, "Process-Uncompressed"},
- {0, NULL}
- };
- #define DCE_MODE_1 1
- #define DCE_MODE_2 2
- static const value_string dce_mode_vals[] = {
- {DCE_MODE_1, "No Additional Negotiation"},
- {DCE_MODE_2, "Full PPP Negotiation and State Machine"},
- {0, NULL}
- };
- /*
- * Options. (LCP)
- */
- #define CI_VENDORSPECIFIC 0 /* Vendor Specific [RFC2153] */
- #define CI_MRU 1 /* Maximum Receive Unit [RFC1661] */
- #define CI_ASYNCMAP 2 /* Async Control Character Map */
- #define CI_AUTHPROT 3 /* Authentication Protocol [RFC1661] */
- #define CI_QUALITY 4 /* Quality Protocol [RFC1661] */
- #define CI_MAGICNUMBER 5 /* Magic Number [RFC1661] */
- #define CI_LINKQUALMON 6 /* DEPRECATED (Quality Protocol) [RFC1172] */
- #define CI_PCOMPRESSION 7 /* Protocol Field Compression [RFC1661] */
- #define CI_ACCOMPRESSION 8 /* Address/Control Field Compression
- [RFC1661] */
- #define CI_FCS_ALTERNATIVES 9 /* FCS Alternatives [RFC1570] */
- #define CI_SELF_DESCRIBING_PAD 10 /* Self-Describing Pad [RFC1570] */
- #define CI_NUMBERED_MODE 11 /* Numbered Mode [RFC1663] */
- #define CI_MULTILINK_PROC 12 /* DEPRECATED (Multi-Link Procedure) */
- #define CI_CALLBACK 13 /* Callback [RFC1570] */
- #define CI_CONNECTTIME 14 /* DEPRECATED (Connect Time) */
- #define CI_COMPOUND_FRAMES 15 /* DEPRECATED (Compound Frames) [RFC1570] */
- #define CI_NOMDATAENCAP 16 /* DEPRECATED (Nominal Data Encapsulation) */
- /* NOTE: IANA lists CI_NOMDATAENCAP as 16, but it is listed as 14 in
- * http://tools.ietf.org/html/draft-ietf-pppext-dataencap-03.
- * Which is correct is anyone's guess. */
- #define CI_MULTILINK_MRRU 17 /* Multilink MRRU [RFC1990] */
- #define CI_MULTILINK_SSNH 18 /* Multilink Short Sequence Number Header
- [RFC1990] */
- #define CI_MULTILINK_EP_DISC 19 /* Multilink Endpoint Discriminator
- [RFC1990] */
- #define CI_PROP_KEN 20 /* Proprietary [Ken Culbert] ken@funk.com */
- #define CI_DCE_IDENTIFIER 21 /* DCE Identifier [RFC1976]: Warning:
- Option type 25 in the RFC is incorrect */
- #define CI_MULTILINK_PLUS_PROC 22 /* Multilink Plus Procedure [RFC1934] */
- #define CI_LINK_DISC_FOR_BACP 23 /* Link Discriminator for BACP [RFC2125] */
- #define CI_LCP_AUTHENTICATION 24 /* LCP Authentication Option [Culbert] */
- #define CI_COBS 25 /* Consistent Overhead Byte Stuffing (COBS)
- [Carlson] */
- #define CI_PREFIX_ELISION 26 /* Prefix elision [RFC2686][RFC2687] */
- #define CI_MULTILINK_HDR_FMT 27 /* Multilink header format
- [RFC2686][RFC2687] */
- #define CI_INTERNATIONALIZATION 28 /* Internationalization [RFC2484] */
- #define CI_SDL_ON_SONET_SDH 29 /* Simple Data Link on SONET/SDH
- [RFC2823] */
- #define CI_UNASSIGNED 30 /* Unassigned ... but so are 31-255, so
- why do they bother specifically
- mentioning this one, I wonder? */
- static int hf_lcp_magic_number = -1;
- static int hf_lcp_data = -1;
- static int hf_lcp_message = -1;
- static int hf_lcp_secs_remaining = -1;
- static int hf_lcp_rej_proto = -1;
- static int hf_lcp_opt_type = -1;
- static int hf_lcp_opt_length = -1;
- static int hf_lcp_opt_oui = -1;
- static int hf_lcp_opt_kind = -1;
- static int hf_lcp_opt_data = -1;
- static int hf_lcp_opt_mru = -1;
- static int hf_lcp_opt_asyncmap = -1;
- static int hf_lcp_opt_asyncmap_nul = -1;
- static int hf_lcp_opt_asyncmap_soh = -1;
- static int hf_lcp_opt_asyncmap_stx = -1;
- static int hf_lcp_opt_asyncmap_etx = -1;
- static int hf_lcp_opt_asyncmap_eot = -1;
- static int hf_lcp_opt_asyncmap_enq = -1;
- static int hf_lcp_opt_asyncmap_ack = -1;
- static int hf_lcp_opt_asyncmap_bel = -1;
- static int hf_lcp_opt_asyncmap_bs = -1;
- static int hf_lcp_opt_asyncmap_ht = -1;
- static int hf_lcp_opt_asyncmap_lf = -1;
- static int hf_lcp_opt_asyncmap_vt = -1;
- static int hf_lcp_opt_asyncmap_ff = -1;
- static int hf_lcp_opt_asyncmap_cr = -1;
- static int hf_lcp_opt_asyncmap_so = -1;
- static int hf_lcp_opt_asyncmap_si = -1;
- static int hf_lcp_opt_asyncmap_dle = -1;
- static int hf_lcp_opt_asyncmap_dc1 = -1;
- static int hf_lcp_opt_asyncmap_dc2 = -1;
- static int hf_lcp_opt_asyncmap_dc3 = -1;
- static int hf_lcp_opt_asyncmap_dc4 = -1;
- static int hf_lcp_opt_asyncmap_nak = -1;
- static int hf_lcp_opt_asyncmap_syn = -1;
- static int hf_lcp_opt_asyncmap_etb = -1;
- static int hf_lcp_opt_asyncmap_can = -1;
- static int hf_lcp_opt_asyncmap_em = -1;
- static int hf_lcp_opt_asyncmap_sub = -1;
- static int hf_lcp_opt_asyncmap_esc = -1;
- static int hf_lcp_opt_asyncmap_fs = -1;
- static int hf_lcp_opt_asyncmap_gs = -1;
- static int hf_lcp_opt_asyncmap_rs = -1;
- static int hf_lcp_opt_asyncmap_us = -1;
- static int hf_lcp_opt_auth_protocol = -1;
- static int hf_lcp_opt_algorithm = -1;
- static int hf_lcp_opt_quality_protocol = -1;
- static int hf_lcp_opt_magic_number = -1;
- static int hf_lcp_opt_reportingperiod = -1;
- static int hf_lcp_opt_fcs_alternatives = -1;
- static int hf_lcp_opt_fcs_alternatives_null = -1;
- static int hf_lcp_opt_fcs_alternatives_ccitt16 = -1;
- static int hf_lcp_opt_fcs_alternatives_ccitt32 = -1;
- static int hf_lcp_opt_maximum = -1;
- static int hf_lcp_opt_window = -1;
- static int hf_lcp_opt_hdlc_address = -1;
- static int hf_lcp_opt_operation = -1;
- static int hf_lcp_opt_message = -1;
- static int hf_lcp_opt_mrru = -1;
- static int hf_lcp_opt_ep_disc_class = -1;
- static int hf_lcp_opt_ip_address = -1;
- static int hf_lcp_opt_802_1_address = -1;
- static int hf_lcp_opt_magic_block = -1;
- static int hf_lcp_opt_psndn = -1;
- static int hf_lcp_opt_mode = -1;
- static int hf_lcp_opt_unused = -1;
- static int hf_lcp_opt_link_discrim = -1;
- static int hf_lcp_opt_id = -1;
- static int hf_lcp_opt_cobs_flags = -1;
- static int hf_lcp_opt_cobs_flags_res = -1;
- static int hf_lcp_opt_cobs_flags_pre = -1;
- static int hf_lcp_opt_cobs_flags_zxe = -1;
- static int hf_lcp_opt_class = -1;
- static int hf_lcp_opt_prefix = -1;
- static int hf_lcp_opt_code = -1;
- static int hf_lcp_opt_max_susp_classes = -1;
- static int hf_lcp_opt_MIBenum = -1;
- static int hf_lcp_opt_language_tag = -1;
- static void dissect_lcp_vendor_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_mru_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_async_map_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_authprot_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_qualprot_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_magicnumber_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_linkqualmon_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_simple_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_fcs_alternatives_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_self_describing_pad_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_numbered_mode_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_multilink_mrru_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_multilink_ep_disc_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_dce_identifier_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_multilink_pp_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_bacp_link_discriminator_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_auth_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_cobs_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_lcp_prefix_elision_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_multilink_hdr_fmt_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_lcp_internationalization_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
- static const ip_tcp_opt lcp_opts[] = {
- {CI_VENDORSPECIFIC, "Vendor Specific", &ett_lcp_vendor_opt,
- OPT_LEN_VARIABLE_LENGTH, 6, dissect_lcp_vendor_opt},
- {CI_MRU, "Maximum Receive Unit", &ett_lcp_mru_opt,
- OPT_LEN_FIXED_LENGTH, 4, dissect_lcp_mru_opt},
- {CI_ASYNCMAP, "Async Control Character Map", &ett_lcp_asyncmap_opt,
- OPT_LEN_FIXED_LENGTH, 6, dissect_lcp_async_map_opt},
- {CI_AUTHPROT, "Authentication Protocol", &ett_lcp_authprot_opt,
- OPT_LEN_VARIABLE_LENGTH, 4, dissect_lcp_authprot_opt},
- {CI_QUALITY, "Quality Protocol", &ett_lcp_qualprot_opt,
- OPT_LEN_VARIABLE_LENGTH, 4, dissect_lcp_qualprot_opt},
- {CI_MAGICNUMBER, "Magic Number", &ett_lcp_magicnumber_opt,
- OPT_LEN_FIXED_LENGTH, 6, dissect_lcp_magicnumber_opt},
- {CI_LINKQUALMON, "Link Quality Monitoring", &ett_lcp_linkqualmon_opt,
- OPT_LEN_FIXED_LENGTH, 6, dissect_lcp_linkqualmon_opt},
- {CI_PCOMPRESSION, "Protocol Field Compression", &ett_lcp_pcomp_opt,
- OPT_LEN_FIXED_LENGTH, 2, dissect_lcp_simple_opt},
- {CI_ACCOMPRESSION, "Address and Control Field Compression", &ett_lcp_acccomp_opt,
- OPT_LEN_FIXED_LENGTH, 2, dissect_lcp_simple_opt},
- {CI_FCS_ALTERNATIVES, "FCS Alternatives", &ett_lcp_fcs_alternatives_opt,
- OPT_LEN_FIXED_LENGTH, 3, dissect_lcp_fcs_alternatives_opt},
- {CI_SELF_DESCRIBING_PAD, "Self Describing Pad", &ett_lcp_self_desc_pad_opt,
- OPT_LEN_FIXED_LENGTH, 3, dissect_lcp_self_describing_pad_opt},
- {CI_NUMBERED_MODE, "Numbered Mode", &ett_lcp_numbered_mode_opt,
- OPT_LEN_VARIABLE_LENGTH, 4, dissect_lcp_numbered_mode_opt},
- /* TODO? CI_MULTILINK_PROC */
- {CI_CALLBACK, "Callback", &ett_lcp_callback_opt,
- OPT_LEN_VARIABLE_LENGTH, 3, dissect_lcp_callback_opt},
- /* TODO? CI_CONNECTTIME */
- {CI_COMPOUND_FRAMES, "Compound Frames (Deprecated)", &ett_lcp_compound_frames_opt,
- OPT_LEN_FIXED_LENGTH, 2, dissect_lcp_simple_opt},
- {CI_NOMDATAENCAP, "Nominal Data Encapsulation (Deprecated)", &ett_lcp_nomdataencap_opt,
- OPT_LEN_FIXED_LENGTH, 2, dissect_lcp_simple_opt},
- {CI_MULTILINK_MRRU, "Multilink MRRU", &ett_lcp_multilink_mrru_opt,
- OPT_LEN_FIXED_LENGTH, 4, dissect_lcp_multilink_mrru_opt},
- {CI_MULTILINK_SSNH, "Multilink Short Sequence Number Header", &ett_lcp_multilink_ssnh_opt,
- OPT_LEN_FIXED_LENGTH, 2, dissect_lcp_simple_opt},
- {CI_MULTILINK_EP_DISC, "Multilink Endpoint Discriminator", &ett_lcp_multilink_ep_disc_opt,
- OPT_LEN_VARIABLE_LENGTH, 3, dissect_lcp_multilink_ep_disc_opt},
- /* TODO? CI_PROP_KEN: ken@funk.com: www.funk.com => www.juniper.net */
- {CI_DCE_IDENTIFIER, "DCE Identifier", &ett_lcp_dce_identifier_opt,
- OPT_LEN_FIXED_LENGTH, 3, dissect_lcp_dce_identifier_opt},
- {CI_MULTILINK_PLUS_PROC, "Multi Link Plus Procedure", &ett_lcp_multilink_pp_opt,
- OPT_LEN_FIXED_LENGTH, 4, dissect_lcp_multilink_pp_opt},
- {CI_LINK_DISC_FOR_BACP, "Link Discriminator for BACP", &ett_lcp_bacp_link_discrim_opt,
- OPT_LEN_FIXED_LENGTH, 4, dissect_lcp_bacp_link_discriminator_opt},
- {CI_LCP_AUTHENTICATION, "LCP Authentication Option", &ett_lcp_auth_opt,
- OPT_LEN_VARIABLE_LENGTH, 3, dissect_lcp_auth_opt},
- {CI_COBS, "Consistent Overhead Byte Stuffing (COBS)", &ett_lcp_cobs_opt,
- OPT_LEN_FIXED_LENGTH, 3, dissect_lcp_cobs_opt},
- {CI_PREFIX_ELISION, "Prefix Elision", &ett_lcp_prefix_elision_opt,
- OPT_LEN_VARIABLE_LENGTH, 2, dissect_lcp_prefix_elision_opt},
- {CI_MULTILINK_HDR_FMT, "Multilink header format", &ett_multilink_hdr_fmt_opt,
- OPT_LEN_FIXED_LENGTH, 4, dissect_lcp_multilink_hdr_fmt_opt},
- {CI_INTERNATIONALIZATION, "Internationalization", &ett_lcp_internationalization_opt,
- OPT_LEN_VARIABLE_LENGTH, 7, dissect_lcp_internationalization_opt},
- {CI_SDL_ON_SONET_SDH, "Simple Data Link on SONET/SDH", &ett_lcp_simple_opt,
- OPT_LEN_FIXED_LENGTH, 2, dissect_lcp_simple_opt}
- /* TODO? CI_UNASSIGNED */
- };
- #define N_LCP_OPTS (sizeof lcp_opts / sizeof lcp_opts[0])
- /* 3GPP2 X.S0057-B v1.0
- * 9.1.4.1 3GPP2 VSNCP Configuration Options
- * Options. (VSNCP)
- */
- #define CI_PDN_IDENTIFIER 1
- #define CI_ACCESS_POINT_NM 2
- #define CI_PDN_TYPE 3
- #define CI_PDN_ADDRESS 4
- #define CI_PROTOCOL_CONFIG 5
- #define CI_ERROR_CODE 6
- #define CI_ATTACH_TYPE 7
- #define CI_IPv4DEFAULT_ROUTER 8
- #define CI_ADDRESS_ALLOC 9
- #define CI_APN_AMBR 10
- #define CI_IPv6_HSGW_LLA_IID 11
- static void dissect_vsncp_pdnid_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_apname_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_pdntype_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_pdnaddress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_pco_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_errorcode_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_attachtype_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_ipv4address_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_addressalloc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_apn_ambr_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static void dissect_vsncp_ipv6_hsgw_lla_iid_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo, proto_tree *tree, void *data _U_);
- static const ip_tcp_opt vsncp_opts[] = {
- {CI_PDN_IDENTIFIER, "PDN Identifier", NULL,
- OPT_LEN_FIXED_LENGTH, 3, dissect_vsncp_pdnid_opt},
- {CI_ACCESS_POINT_NM, "Access Point Name", NULL,
- OPT_LEN_VARIABLE_LENGTH, 2, dissect_vsncp_apname_opt},
- {CI_PDN_TYPE, "PDN Type", NULL,
- OPT_LEN_FIXED_LENGTH, 3, dissect_vsncp_pdntype_opt},
- {CI_PDN_ADDRESS, "PDN Address", NULL,
- OPT_LEN_VARIABLE_LENGTH, 3, dissect_vsncp_pdnaddress_opt},
- {CI_PROTOCOL_CONFIG, "Protocol Configuration Options", NULL,
- OPT_LEN_VARIABLE_LENGTH, 3, dissect_vsncp_pco_opt},
- {CI_ERROR_CODE, "Error Code", NULL,
- OPT_LEN_FIXED_LENGTH, 3, dissect_vsncp_errorcode_opt},
- {CI_ATTACH_TYPE, "Attach Type", NULL,
- OPT_LEN_FIXED_LENGTH, 3, dissect_vsncp_attachtype_opt},
- {CI_IPv4DEFAULT_ROUTER, "IPv4 Default Router Address", NULL,
- OPT_LEN_FIXED_LENGTH, 6, dissect_vsncp_ipv4address_opt},
- {CI_ADDRESS_ALLOC, "Address Allocation Cause", NULL,
- OPT_LEN_FIXED_LENGTH, 3, dissect_vsncp_addressalloc_opt},
- {CI_APN_AMBR, "APN Aggregate Maximum Bit Rate(APN-AMBR)", NULL,
- OPT_LEN_VARIABLE_LENGTH, 4, dissect_vsncp_apn_ambr_opt},
- {CI_IPv6_HSGW_LLA_IID, "IPv6 HSGW Link Local Address IID", NULL,
- OPT_LEN_FIXED_LENGTH, 10, dissect_vsncp_ipv6_hsgw_lla_iid_opt}
- };
- #define N_VSNCP_OPTS (sizeof vsncp_opts / sizeof vsncp_opts[0])
- /*
- * CHAP Algorithms
- */
- /* 0-4: Reserved */
- #define CHAP_ALG_MD5 5 /* CHAP with MD5 */
- #define CHAP_AGL_SHA1 6 /* CHAP with SHA-1 [Black] */
- /* 7-127: Unassigned */
- #define CHAP_ALG_MSV1 128 /* MS-CHAP */
- #define CHAP_ALG_MSV2 129 /* MS-CHAP-2 */
- static const range_string chap_alg_rvals[] = {
- {0, 4, "Reserved"},
- {CHAP_ALG_MD5, CHAP_ALG_MD5, "CHAP with MD5"},
- {CHAP_AGL_SHA1, CHAP_AGL_SHA1, "CHAP with SHA-1"},
- {CHAP_ALG_MSV1, CHAP_ALG_MSV1, "MS-CHAP"},
- {CHAP_ALG_MSV2, CHAP_ALG_MSV2, "MS-CHAP-2"},
- {0, 0, NULL}
- };
- /*
- * Options. (IPCP)
- * http://tools.ietf.org/html/rfc1172
- * http://tools.ietf.org/html/rfc1332
- * http://tools.ietf.org/html/rfc1877
- * http://tools.ietf.org/html/rfc2290
- * http://tools.ietf.org/html/rfc3241
- * http://tools.ietf.org/html/rfc3545
- */
- #define CI_ADDRS 1 /* IP Addresses (deprecated) (RFC 1172) */
- #define CI_COMPRESS_PROTO 2 /* Compression Protocol (RFC 1332) */
- #define CI_ADDR 3 /* IP Address (RFC 1332) */
- #define CI_MOBILE_IPv4 4 /* Mobile IPv4 (RFC 2290) */
- #define CI_PRI_DNS 129 /* Primary DNS value (RFC 1877) */
- #define CI_PRI_NBNS 130 /* Primary NBNS value (RFC 1877) */
- #define CI_SEC_DNS 131 /* Secondary DNS value (RFC 1877) */
- #define CI_SEC_NBNS 132 /* Secondary NBNS value (RFC 1877) */
- static int hf_ipcp_opt_type = -1;
- static int hf_ipcp_opt_length = -1;
- static int hf_ipcp_opt_src_address = -1;
- static int hf_ipcp_opt_dst_address = -1;
- static int hf_ipcp_opt_compress_proto = -1;
- static int hf_ipcp_opt_max_cid = -1;
- static int hf_ipcp_opt_mrru = -1;
- static int hf_ipcp_opt_max_slot_id = -1;
- static int hf_ipcp_opt_comp_slot_id = -1;
- static int hf_ipcp_opt_tcp_space = -1;
- static int hf_ipcp_opt_non_tcp_space = -1;
- static int hf_ipcp_opt_f_max_period = -1;
- static int hf_ipcp_opt_f_max_time = -1;
- static int hf_ipcp_opt_max_header = -1;
- static int hf_ipcp_data = -1;
- static int hf_ipcp_opt_ip_address = -1;
- static int hf_ipcp_opt_mobilenodehomeaddr = -1;
- static int hf_ipcp_opt_pri_dns_address = -1;
- static int hf_ipcp_opt_pri_nbns_address = -1;
- static int hf_ipcp_opt_sec_dns_address = -1;
- static int hf_ipcp_opt_sec_nbns_address = -1;
- static int hf_ipcp_opt_rohc_type = -1;
- static int hf_ipcp_opt_rohc_length = -1;
- static int hf_ipcp_opt_rohc_profile = -1;
- static int hf_ipcp_opt_iphc_type = -1;
- static int hf_ipcp_opt_iphc_length = -1;
- static int hf_ipcp_opt_iphc_param = -1;
- static void dissect_ipcp_addrs_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_ipcp_compress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_ipcp_rohc_profiles_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_ipcp_iphc_simple_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_ipcp_iphc_neghdrcomp_opt(const ip_tcp_opt *optp,
- tvbuff_t *tvb, int offset, guint length, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_);
- static void dissect_ipcp_addr_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_ipcp_mobileipv4_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_ipcp_pri_dns_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_ipcp_pri_nbns_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *data _U_);
- static void dissect_ipcp_sec_dns_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
- int offset, guint length, packet_info *pinfo _U_, proto_tree *tree, void *…
Large files files are truncated, but you can click here to view the full file