]> The Tcpdump Group git mirrors - tcpdump/commitdiff
justify declarations of struct tok arrays
authorDenis Ovsienko <[email protected]>
Tue, 24 Sep 2013 16:46:24 +0000 (20:46 +0400)
committerDenis Ovsienko <[email protected]>
Tue, 24 Sep 2013 16:54:03 +0000 (20:54 +0400)
Make sure all of them are declared const and most of them -- static.
Proper declaration of token arrays is a common review point for new code
that is based on existing decoders. Thus fix the issue at its root.

50 files changed:
ppp.h
print-arcnet.c
print-arp.c
print-atalk.c
print-atm.c
print-bgp.c
print-bootp.c
print-cdp.c
print-chdlc.c
print-decnet.c
print-domain.c
print-dtp.c
print-forces.c
print-fr.c
print-gre.c
print-hsrp.c
print-icmp.c
print-icmp6.c
print-igmp.c
print-igrp.c
print-ip.c
print-ipnet.c
print-isoclns.c
print-juniper.c
print-krb.c
print-l2tp.c
print-llc.c
print-lwres.c
print-nflog.c
print-nfs.c
print-ntp.c
print-olsr.c
print-ospf.c
print-ospf6.c
print-pflog.c
print-pim.c
print-ppp.c
print-pppoe.c
print-radius.c
print-rsvp.c
print-rx.c
print-sctp.c
print-sll.c
print-stp.c
print-sunrpc.c
print-tcp.c
print-tftp.c
print-udld.c
print-vtp.c
print-zephyr.c

diff --git a/ppp.h b/ppp.h
index f1a2c48b98d814ad9ce050b6eee8ce05246e4d86..ba7aea72e3dd3315d29c803f001535bb052e2ab9 100644 (file)
--- a/ppp.h
+++ b/ppp.h
@@ -67,5 +67,3 @@
 #define PPP_MPCP               0xc03d  /* Multi-Link */
 #define PPP_SPAP_OLD    0xc123
 #define PPP_EAP         0xc227
-
-extern struct tok ppptype2str[];
index 9531f346bff70e1610536a4f68c0f2fa4a4347ba..2d605373a4076de3dcdbead06d647f626553e5c9 100644 (file)
@@ -41,7 +41,7 @@ static const char rcsid[] _U_ =
 static int arcnet_encap_print(u_char arctype, const u_char *p,
     u_int length, u_int caplen);
 
-struct tok arctypemap[] = {
+static const struct tok arctypemap[] = {
        { ARCTYPE_IP_OLD,       "oldip" },
        { ARCTYPE_ARP_OLD,      "oldarp" },
        { ARCTYPE_IP,           "ip" },
index 905ef4656003a2c4f88b0ec719dc0cc161dd0be8..b5047a0d1075bb92e5eb2b58618fcc2107547fba 100644 (file)
@@ -99,7 +99,7 @@ struct  arp_pkthdr {
 #define TPA(ap) (ar_tpa(ap))
 
 
-struct tok arpop_values[] = {
+static const struct tok arpop_values[] = {
     { ARPOP_REQUEST, "Request" },
     { ARPOP_REPLY, "Reply" },
     { ARPOP_REVREQUEST, "Reverse Request" },
@@ -110,7 +110,7 @@ struct tok arpop_values[] = {
     { 0, NULL }
 };
 
-struct tok arphrd_values[] = {
+static const struct tok arphrd_values[] = {
     { ARPHRD_ETHER, "Ethernet" },
     { ARPHRD_IEEE802, "TokenRing" },
     { ARPHRD_ARCNET, "ArcNet" },
index a075b189e5f14f03e506e7135047fc1eb7d9e080..be1c154f843ea494f579482a32a8c7c87bffeaae 100644 (file)
@@ -43,7 +43,7 @@ static const char rcsid[] _U_ =
 #include "extract.h"                   /* must come after interface.h */
 #include "appletalk.h"
 
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
        { ddpRTMP,              "rtmp" },
        { ddpRTMPrequest,       "rtmpReq" },
        { ddpECHO,              "echo" },
@@ -602,7 +602,7 @@ ataddr_string(u_short atnet, u_char athost)
        return (tp->name);
 }
 
-static struct tok skt2str[] = {
+static const struct tok skt2str[] = {
        { rtmpSkt,      "rtmp" },       /* routing table maintenance */
        { nbpSkt,       "nis" },        /* name info socket */
        { echoSkt,      "echo" },       /* AppleTalk echo protocol */
index 935d182753b800122df6ed4b2165839b1051e81f..b132a6de5fd459a01eb81b50b42507dd40f25499 100644 (file)
@@ -48,13 +48,13 @@ static const char rcsid[] _U_ =
 #define OAM_FUNCTION_SPECIFIC_LEN 45 /* this excludes crc10 and cell-type/function-type */
 #define OAM_CELLTYPE_FUNCTYPE_LEN 1
 
-struct tok oam_f_values[] = {
+static const struct tok oam_f_values[] = {
     { VCI_OAMF4SC, "OAM F4 (segment)" },
     { VCI_OAMF4EC, "OAM F4 (end)" },
     { 0, NULL }
 };
 
-struct tok atm_pty_values[] = {
+static const struct tok atm_pty_values[] = {
     { 0x0, "user data, uncongested, SDU 0" },
     { 0x1, "user data, uncongested, SDU 1" },
     { 0x2, "user data, congested, SDU 0" },
@@ -70,7 +70,7 @@ struct tok atm_pty_values[] = {
 #define OAM_CELLTYPE_AD 0x8
 #define OAM_CELLTYPE_SM 0xf
 
-struct tok oam_celltype_values[] = {
+static const struct tok oam_celltype_values[] = {
     { OAM_CELLTYPE_FM, "Fault Management" },
     { OAM_CELLTYPE_PM, "Performance Management" },
     { OAM_CELLTYPE_AD, "activate/deactivate" },
@@ -83,7 +83,7 @@ struct tok oam_celltype_values[] = {
 #define OAM_FM_FUNCTYPE_CONTCHECK 0x4
 #define OAM_FM_FUNCTYPE_LOOPBACK  0x8
 
-struct tok oam_fm_functype_values[] = {
+static const struct tok oam_fm_functype_values[] = {
     { OAM_FM_FUNCTYPE_AIS, "AIS" },
     { OAM_FM_FUNCTYPE_RDI, "RDI" },
     { OAM_FM_FUNCTYPE_CONTCHECK, "Continuity Check" },
@@ -91,14 +91,14 @@ struct tok oam_fm_functype_values[] = {
     { 0, NULL }
 };
 
-struct tok oam_pm_functype_values[] = {
+static const struct tok oam_pm_functype_values[] = {
     { 0x0, "Forward Monitoring" },
     { 0x1, "Backward Reporting" },
     { 0x2, "Monitoring and Reporting" },
     { 0, NULL }
 };
 
-struct tok oam_ad_functype_values[] = {
+static const struct tok oam_ad_functype_values[] = {
     { 0x0, "Performance Monitoring" },
     { 0x1, "Continuity Check" },
     { 0, NULL }
@@ -106,7 +106,7 @@ struct tok oam_ad_functype_values[] = {
 
 #define OAM_FM_LOOPBACK_INDICATOR_MASK 0x1
 
-struct tok oam_fm_loopback_indicator_values[] = {
+static const struct tok oam_fm_loopback_indicator_values[] = {
     { 0x0, "Reply" },
     { 0x1, "Request" },
     { 0, NULL }
@@ -229,7 +229,7 @@ atm_if_print(const struct pcap_pkthdr *h, const u_char *p)
 /*
  * ATM signalling.
  */
-static struct tok msgtype2str[] = {
+static const struct tok msgtype2str[] = {
        { CALL_PROCEED,         "Call_proceeding" },
        { CONNECT,              "Connect" },
        { CONNECT_ACK,          "Connect_ack" },
index 4f7053c284c6db29a659878eeac171e98a80002e..2ad7cbcb4d58c70a12c093e771724ea3a4ea20fb 100644 (file)
@@ -65,7 +65,7 @@ struct bgp {
 #define BGP_KEEPALIVE          4
 #define BGP_ROUTE_REFRESH       5
 
-static struct tok bgp_msg_values[] = {
+static const struct tok bgp_msg_values[] = {
     { BGP_OPEN,                 "Open"},
     { BGP_UPDATE,               "Update"},
     { BGP_NOTIFICATION,         "Notification"},
@@ -142,7 +142,7 @@ struct bgp_route_refresh {
 
 #define BGP_MP_NLRI_MINSIZE              3       /* End of RIB Marker detection */
 
-static struct tok bgp_attr_values[] = {
+static const struct tok bgp_attr_values[] = {
     { BGPTYPE_ORIGIN,           "Origin"},
     { BGPTYPE_AS_PATH,          "AS Path"},
     { BGPTYPE_AS4_PATH,         "AS4 Path"},
@@ -175,7 +175,7 @@ static struct tok bgp_attr_values[] = {
 #define BGP_AS_SEG_TYPE_MIN    BGP_AS_SET
 #define BGP_AS_SEG_TYPE_MAX    BGP_CONFED_AS_SET
 
-static struct tok bgp_as_path_segment_open_values[] = {
+static const struct tok bgp_as_path_segment_open_values[] = {
     { BGP_AS_SEQUENCE,         ""},
     { BGP_AS_SET,              "{ "},
     { BGP_CONFED_AS_SEQUENCE,  "( "},
@@ -183,7 +183,7 @@ static struct tok bgp_as_path_segment_open_values[] = {
     { 0, NULL}
 };
 
-static struct tok bgp_as_path_segment_close_values[] = {
+static const struct tok bgp_as_path_segment_close_values[] = {
     { BGP_AS_SEQUENCE,         ""},
     { BGP_AS_SET,              "}"},
     { BGP_CONFED_AS_SEQUENCE,  ")"},
@@ -195,7 +195,7 @@ static struct tok bgp_as_path_segment_close_values[] = {
 #define BGP_OPT_CAP                     2
 
 
-static struct tok bgp_opt_values[] = {
+static const struct tok bgp_opt_values[] = {
     { BGP_OPT_AUTH,             "Authentication Information"},
     { BGP_OPT_CAP,              "Capabilities Advertisement"},
     { 0, NULL}
@@ -209,7 +209,7 @@ static struct tok bgp_opt_values[] = {
 #define BGP_CAPCODE_DYN_CAP            67 /* XXX */
 #define BGP_CAPCODE_RR_CISCO          128
 
-static struct tok bgp_capcode_values[] = {
+static const struct tok bgp_capcode_values[] = {
     { BGP_CAPCODE_MP,           "Multiprotocol Extensions"},
     { BGP_CAPCODE_RR,           "Route Refresh"},
     { BGP_CAPCODE_ORF,          "Cooperative Route Filtering"},
@@ -228,7 +228,7 @@ static struct tok bgp_capcode_values[] = {
 #define BGP_NOTIFY_MAJOR_CEASE          6
 #define BGP_NOTIFY_MAJOR_CAP            7
 
-static struct tok bgp_notify_major_values[] = {
+static const struct tok bgp_notify_major_values[] = {
     { BGP_NOTIFY_MAJOR_MSG,     "Message Header Error"},
     { BGP_NOTIFY_MAJOR_OPEN,    "OPEN Message Error"},
     { BGP_NOTIFY_MAJOR_UPDATE,  "UPDATE Message Error"},
@@ -241,7 +241,7 @@ static struct tok bgp_notify_major_values[] = {
 
 /* draft-ietf-idr-cease-subcode-02 */
 #define BGP_NOTIFY_MINOR_CEASE_MAXPRFX  1
-static struct tok bgp_notify_minor_cease_values[] = {
+static const struct tok bgp_notify_minor_cease_values[] = {
     { BGP_NOTIFY_MINOR_CEASE_MAXPRFX, "Maximum Number of Prefixes Reached"},
     { 2,                        "Administratively Shutdown"},
     { 3,                        "Peer Unconfigured"},
@@ -252,14 +252,14 @@ static struct tok bgp_notify_minor_cease_values[] = {
     { 0, NULL}
 };
 
-static struct tok bgp_notify_minor_msg_values[] = {
+static const struct tok bgp_notify_minor_msg_values[] = {
     { 1,                        "Connection Not Synchronized"},
     { 2,                        "Bad Message Length"},
     { 3,                        "Bad Message Type"},
     { 0, NULL}
 };
 
-static struct tok bgp_notify_minor_open_values[] = {
+static const struct tok bgp_notify_minor_open_values[] = {
     { 1,                        "Unsupported Version Number"},
     { 2,                        "Bad Peer AS"},
     { 3,                        "Bad BGP Identifier"},
@@ -270,7 +270,7 @@ static struct tok bgp_notify_minor_open_values[] = {
     { 0, NULL}
 };
 
-static struct tok bgp_notify_minor_update_values[] = {
+static const struct tok bgp_notify_minor_update_values[] = {
     { 1,                        "Malformed Attribute List"},
     { 2,                        "Unrecognized Well-known Attribute"},
     { 3,                        "Missing Well-known Attribute"},
@@ -285,7 +285,7 @@ static struct tok bgp_notify_minor_update_values[] = {
     { 0, NULL}
 };
 
-static struct tok bgp_notify_minor_cap_values[] = {
+static const struct tok bgp_notify_minor_cap_values[] = {
     { 1,                        "Invalid Action Value" },
     { 2,                        "Invalid Capability Length" },
     { 3,                        "Malformed Capability Value" },
@@ -293,7 +293,7 @@ static struct tok bgp_notify_minor_cap_values[] = {
     { 0, NULL }
 };
 
-static struct tok bgp_origin_values[] = {
+static const struct tok bgp_origin_values[] = {
     { 0,                        "IGP"},
     { 1,                        "EGP"},
     { 2,                        "Incomplete"},
@@ -308,7 +308,7 @@ static struct tok bgp_origin_values[] = {
 #define BGP_PMSI_TUNNEL_INGRESS   6
 #define BGP_PMSI_TUNNEL_LDP_MP2MP 7
 
-static struct tok bgp_pmsi_tunnel_values[] = {
+static const struct tok bgp_pmsi_tunnel_values[] = {
     { BGP_PMSI_TUNNEL_RSVP_P2MP, "RSVP-TE P2MP LSP"},
     { BGP_PMSI_TUNNEL_LDP_P2MP, "LDP P2MP LSP"},
     { BGP_PMSI_TUNNEL_PIM_SSM, "PIM-SSM Tree"},
@@ -319,7 +319,7 @@ static struct tok bgp_pmsi_tunnel_values[] = {
     { 0, NULL}
 };
 
-static struct tok bgp_pmsi_flag_values[] = {
+static const struct tok bgp_pmsi_flag_values[] = {
     { 0x01, "Leaf Information required"},
     { 0, NULL}
 };
@@ -347,7 +347,7 @@ static struct tok bgp_pmsi_flag_values[] = {
 
 #define BGP_VPN_RD_LEN                  8
 
-static struct tok bgp_safi_values[] = {
+static const struct tok bgp_safi_values[] = {
     { SAFNUM_RES,               "Reserved"},
     { SAFNUM_UNICAST,           "Unicast"},
     { SAFNUM_MULTICAST,         "Multicast"},
@@ -405,13 +405,13 @@ static struct tok bgp_safi_values[] = {
 #define BGP_EXT_COM_EIGRP_EXT_REMAS_REMID  0x8804
 #define BGP_EXT_COM_EIGRP_EXT_REMPROTO_REMMETRIC 0x8805
 
-static struct tok bgp_extd_comm_flag_values[] = {
+static const struct tok bgp_extd_comm_flag_values[] = {
     { 0x8000,                  "vendor-specific"},
     { 0x4000,                  "non-transitive"},
     { 0, NULL},
 };
 
-static struct tok bgp_extd_comm_subtype_values[] = {
+static const struct tok bgp_extd_comm_subtype_values[] = {
     { BGP_EXT_COM_RT_0,        "target"},
     { BGP_EXT_COM_RT_1,        "target"},
     { BGP_EXT_COM_RT_2,        "target"},
@@ -450,7 +450,7 @@ static struct tok bgp_extd_comm_subtype_values[] = {
 #define BGP_OSPF_RTYPE_SHAM     129 /* OSPF-MPLS-VPN Sham link */
 #define BGP_OSPF_RTYPE_METRIC_TYPE 0x1 /* LSB of RTYPE Options Field */
 
-static struct tok bgp_extd_comm_ospf_rtype_values[] = {
+static const struct tok bgp_extd_comm_ospf_rtype_values[] = {
   { BGP_OSPF_RTYPE_RTR, "Router" },  
   { BGP_OSPF_RTYPE_NET, "Network" },  
   { BGP_OSPF_RTYPE_SUM, "Summary" },  
@@ -838,7 +838,7 @@ return -2;
 #define BGP_MULTICAST_VPN_ROUTE_TYPE_SHARED_TREE_JOIN  6
 #define BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_TREE_JOIN  7
 
-static struct tok bgp_multicast_vpn_route_type_values[] = {
+static const struct tok bgp_multicast_vpn_route_type_values[] = {
     { BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_I_PMSI, "Intra-AS I-PMSI"},
     { BGP_MULTICAST_VPN_ROUTE_TYPE_INTER_AS_I_PMSI, "Inter-AS I-PMSI"},
     { BGP_MULTICAST_VPN_ROUTE_TYPE_S_PMSI, "S-PMSI"},
index c7538ff8714029e19d4365f02a5f42ee30edc87a..c9e7a11efff518dd8761d81de6fc7808d646bf66 100644 (file)
@@ -187,7 +187,7 @@ trunc:
  *     B - on/off (8 bits)
  *     $ - special (explicit code to handle)
  */
-static struct tok tag2str[] = {
+static const struct tok tag2str[] = {
 /* RFC1048 tags */
        { TAG_PAD,              " PAD" },
        { TAG_SUBNET_MASK,      "iSubnet-Mask" },       /* subnet mask (RFC950) */
@@ -308,12 +308,12 @@ static struct tok tag2str[] = {
        { 0,                    NULL }
 };
 /* 2-byte extended tags */
-static struct tok xtag2str[] = {
+static const struct tok xtag2str[] = {
        { 0,                    NULL }
 };
 
 /* DHCP "options overload" types */
-static struct tok oo2str[] = {
+static const struct tok oo2str[] = {
        { 1,                    "file" },
        { 2,                    "sname" },
        { 3,                    "file+sname" },
@@ -321,7 +321,7 @@ static struct tok oo2str[] = {
 };
 
 /* NETBIOS over TCP/IP node type options */
-static struct tok nbo2str[] = {
+static const struct tok nbo2str[] = {
        { 0x1,                  "b-node" },
        { 0x2,                  "p-node" },
        { 0x4,                  "m-node" },
@@ -330,7 +330,7 @@ static struct tok nbo2str[] = {
 };
 
 /* ARP Hardware types, for Client-ID option */
-static struct tok arp2str[] = {
+static const struct tok arp2str[] = {
        { 0x1,                  "ether" },
        { 0x6,                  "ieee802" },
        { 0x7,                  "arcnet" },
@@ -340,7 +340,7 @@ static struct tok arp2str[] = {
        { 0,                    NULL }
 };
 
-static struct tok dhcp_msg_values[] = {
+static const struct tok dhcp_msg_values[] = {
         { DHCPDISCOVER, "Discover" },
         { DHCPOFFER, "Offer" },
         { DHCPREQUEST, "Request" },
@@ -355,7 +355,7 @@ static struct tok dhcp_msg_values[] = {
 #define AGENT_SUBOPTION_CIRCUIT_ID     1       /* RFC 3046 */
 #define AGENT_SUBOPTION_REMOTE_ID      2       /* RFC 3046 */
 #define AGENT_SUBOPTION_SUBSCRIBER_ID  6       /* RFC 3993 */
-static struct tok agent_suboption_values[] = {
+static const struct tok agent_suboption_values[] = {
         { AGENT_SUBOPTION_CIRCUIT_ID, "Circuit-ID" },
         { AGENT_SUBOPTION_REMOTE_ID, "Remote-ID" },
         { AGENT_SUBOPTION_SUBSCRIBER_ID, "Subscriber-ID" },
index 7bc617a963570222e8a7c53932e06ef554290c68..152b2f9878ccba1bf2652a865e653e5fe3510293 100644 (file)
@@ -45,7 +45,7 @@ static const char rcsid[] _U_ =
 
 #define CDP_HEADER_LEN  4
 
-static struct tok cdp_tlv_values[] = {
+static const struct tok cdp_tlv_values[] = {
     { 0x01,             "Device-ID"},
     { 0x02,             "Address"},
     { 0x03,             "Port-ID"},
@@ -70,7 +70,7 @@ static struct tok cdp_tlv_values[] = {
     { 0, NULL}
 };
 
-static struct tok cdp_capability_values[] = {
+static const struct tok cdp_capability_values[] = {
     { 0x01,             "Router" },
     { 0x02,             "Transparent Bridge" },
     { 0x04,             "Source Route Bridge" },
index 261b15ad7efde71dd9c16b8dce4fdfc4baae13a1..36db69db104dc192feda66ecd2a6e1ec612ad3bd 100644 (file)
@@ -42,7 +42,7 @@ static const char rcsid[] _U_ =
 
 static void chdlc_slarp_print(const u_char *, u_int);
 
-const struct tok chdlc_cast_values[] = { 
+static const struct tok chdlc_cast_values[] = { 
     { CHDLC_UNICAST, "unicast" },
     { CHDLC_BCAST, "bcast" },
     { 0, NULL}
index 7fea582e8a00ec5794b040bbd02352bba203f9bf..5b9dcfb5050be7d328981f51cc2da1d3532265d9 100644 (file)
@@ -819,7 +819,7 @@ trunc:
        return (0);
 }
 
-static struct tok reason2str[] = {
+static const struct tok reason2str[] = {
        { UC_OBJREJECT,         "object rejected connect" },
        { UC_RESOURCES,         "insufficient resources" },
        { UC_NOSUCHNODE,        "unrecognized node name" },
index 4bf1a52ded5a4e2d126b11a4c4760b541a49da36..80e8ce9d0fd2f36f57d39986abd4929903bbe7f3 100644 (file)
@@ -242,7 +242,7 @@ ns_cprint(register const u_char *cp)
 }
 
 /* http://www.iana.org/assignments/dns-parameters */
-struct tok ns_type2str[] = {
+const struct tok ns_type2str[] = {
        { T_A,          "A" },                  /* RFC 1035 */
        { T_NS,         "NS" },                 /* RFC 1035 */
        { T_MD,         "MD" },                 /* RFC 1035 */
@@ -307,7 +307,7 @@ struct tok ns_type2str[] = {
        { 0,            NULL }
 };
 
-struct tok ns_class2str[] = {
+const struct tok ns_class2str[] = {
        { C_IN,         "IN" },         /* Not used */
        { C_CHAOS,      "CHAOS" },
        { C_HS,         "HS" },
index c358a8930743a59bdf417914c2f330a9c4872a3f..14ac6916be03ecec551c975e1854f1a3a2289e7b 100644 (file)
@@ -37,7 +37,7 @@
 #define DTP_DTP_TYPE_TLV               0x0003
 #define DTP_NEIGHBOR_TLV               0x0004
 
-static struct tok dtp_tlv_values[] = {
+static const struct tok dtp_tlv_values[] = {
     { DTP_DOMAIN_TLV, "Domain TLV"},
     { DTP_STATUS_TLV, "Status TLV"},
     { DTP_DTP_TYPE_TLV, "DTP type TLV"},
index dda94d82fc80e2c9e75abcda4b1812a5dada89d2..9fcc68b9da09241bf20a8ba5eeeeabbcf1d638f6 100644 (file)
@@ -199,7 +199,7 @@ struct forcesh {
 #define F_LFB_RSVD 0x0
 #define F_LFB_FEO 0x1
 #define F_LFB_FEPO 0x2
-const struct tok ForCES_LFBs[] = {
+static const struct tok ForCES_LFBs[] = {
        {F_LFB_RSVD, "Invalid TLV"},
        {F_LFB_FEO, "FEObj LFB"},
        {F_LFB_FEPO, "FEProtoObj LFB"},
@@ -627,7 +627,7 @@ enum {
        E_UNSPECIFIED_ERROR = 0XFF
 };
 
-const struct tok ForCES_errs[] = {
+static const struct tok ForCES_errs[] = {
        {E_SUCCESS, "SUCCESS"},
        {E_INVALID_HEADER, "INVALID HEADER"},
        {E_LENGTH_MISMATCH, "LENGTH MISMATCH"},
index 51263066a77efeac3b08a17630d6e07b6dd96b5e..9fb763ccf1b6aa17f67fa62e62b3f980d5fc7b79 100644 (file)
@@ -73,7 +73,7 @@ static void frf15_print(const u_char *, u_int);
 #define FR_SDLC_BIT    0x00000002
 
 
-struct tok fr_header_flag_values[] = {
+static const struct tok fr_header_flag_values[] = {
     { FR_CR_BIT, "C!" },
     { FR_DE_BIT, "DE" },
     { FR_BECN_BIT, "BECN" },
@@ -90,7 +90,7 @@ struct tok fr_header_flag_values[] = {
 #define MFR_CTRL_FRAME  (MFR_B_BIT | MFR_E_BIT | MFR_C_BIT)
 #define MFR_FRAG_FRAME  (MFR_B_BIT | MFR_E_BIT )
 
-struct tok frf_flag_values[] = {
+static const struct tok frf_flag_values[] = {
     { MFR_B_BIT, "Begin" },
     { MFR_E_BIT, "End" },
     { MFR_C_BIT, "Control" },
@@ -360,7 +360,7 @@ mfr_if_print(const struct pcap_pkthdr *h, register const u_char *p)
 #define MFR_CTRL_MSG_REMOVE_LINK     6
 #define MFR_CTRL_MSG_REMOVE_LINK_ACK 7
 
-struct tok mfr_ctrl_msg_values[] = {
+static const struct tok mfr_ctrl_msg_values[] = {
     { MFR_CTRL_MSG_ADD_LINK, "Add Link" },
     { MFR_CTRL_MSG_ADD_LINK_ACK, "Add Link ACK" },
     { MFR_CTRL_MSG_ADD_LINK_REJ, "Add Link Reject" },
@@ -378,7 +378,7 @@ struct tok mfr_ctrl_msg_values[] = {
 #define MFR_CTRL_IE_VENDOR_EXT 6
 #define MFR_CTRL_IE_CAUSE      7
 
-struct tok mfr_ctrl_ie_values[] = {
+static const struct tok mfr_ctrl_ie_values[] = {
     { MFR_CTRL_IE_BUNDLE_ID, "Bundle ID"},
     { MFR_CTRL_IE_LINK_ID, "Link ID"},
     { MFR_CTRL_IE_MAGIC_NUM, "Magic Number"},
@@ -626,7 +626,7 @@ frf15_print (const u_char *p, u_int length) {
 #define MSG_TYPE_STATUS           0x7D
 #define MSG_TYPE_STATUS_ENQ       0x75
 
-struct tok fr_q933_msg_values[] = {
+static const struct tok fr_q933_msg_values[] = {
     { MSG_TYPE_ESC_TO_NATIONAL, "ESC to National" },
     { MSG_TYPE_ALERT, "Alert" },
     { MSG_TYPE_CALL_PROCEEDING, "Call proceeding" },
@@ -655,7 +655,7 @@ struct tok fr_q933_msg_values[] = {
 #define FR_LMI_CCITT_LINK_VERIFY_IE    0x53
 #define FR_LMI_CCITT_PVC_STATUS_IE     0x57
 
-struct tok fr_q933_ie_values_codeset5[] = {
+static const struct tok fr_q933_ie_values_codeset5[] = {
     { FR_LMI_ANSI_REPORT_TYPE_IE, "ANSI Report Type" },
     { FR_LMI_ANSI_LINK_VERIFY_IE_91, "ANSI Link Verify" },
     { FR_LMI_ANSI_LINK_VERIFY_IE, "ANSI Link Verify" },
@@ -670,7 +670,7 @@ struct tok fr_q933_ie_values_codeset5[] = {
 #define FR_LMI_REPORT_TYPE_IE_LINK_VERIFY 1
 #define FR_LMI_REPORT_TYPE_IE_ASYNC_PVC   2
 
-struct tok fr_lmi_report_type_ie_values[] = {
+static const struct tok fr_lmi_report_type_ie_values[] = {
     { FR_LMI_REPORT_TYPE_IE_FULL_STATUS, "Full Status" },
     { FR_LMI_REPORT_TYPE_IE_LINK_VERIFY, "Link verify" },
     { FR_LMI_REPORT_TYPE_IE_ASYNC_PVC, "Async PVC Status" },
@@ -678,7 +678,7 @@ struct tok fr_lmi_report_type_ie_values[] = {
 };
 
 /* array of 16 codepages - currently we only support codepage 1,5 */
-static struct tok *fr_q933_ie_codesets[] = {
+static const struct tok *fr_q933_ie_codesets[] = {
     NULL,
     fr_q933_ie_values_codeset5,
     NULL,
index b6fa52236695daa3df5c19d5e8cddec89799bb0b..b4ad09a44890c1c9558508b554eca5b73ba860c6 100644 (file)
@@ -65,7 +65,7 @@ static const char rcsid[] _U_ =
 #define        GRE_RECRS       0x0700          /* recursion count */
 #define        GRE_AP          0x0080          /* acknowledgment# present */
 
-struct tok gre_flag_values[] = {
+static const struct tok gre_flag_values[] = {
     { GRE_CP, "checksum present"},
     { GRE_RP, "routing present"}, 
     { GRE_KP, "key present"}, 
index 06304fd5677b8695330d190232f4047915502f4b..9f0f40c50915971b264acc0016940084fcca1077 100644 (file)
@@ -53,7 +53,7 @@ static const char *op_code_str[] = {
 };
 
 /* HSRP states and associated names. */
-static struct tok states[] = {
+static const struct tok states[] = {
        {  0, "initial" },
        {  1, "learn" },
        {  2, "listen" },
index 03b9505b1146da6f0dc91ad38466ece3ae1ef8ab..989259441e79094bfe675ce34687a1c1cc823c93 100644 (file)
@@ -194,7 +194,7 @@ struct icmp {
 #endif
 
 /* Most of the icmp types */
-static struct tok icmp2str[] = {
+static const struct tok icmp2str[] = {
        { ICMP_ECHOREPLY,               "echo reply" },
        { ICMP_SOURCEQUENCH,            "source quench" },
        { ICMP_ECHO,                    "echo request" },
@@ -208,7 +208,7 @@ static struct tok icmp2str[] = {
 };
 
 /* Formats for most of the ICMP_UNREACH codes */
-static struct tok unreach2str[] = {
+static const struct tok unreach2str[] = {
        { ICMP_UNREACH_NET,             "net %s unreachable" },
        { ICMP_UNREACH_HOST,            "host %s unreachable" },
        { ICMP_UNREACH_SRCFAIL,
@@ -235,7 +235,7 @@ static struct tok unreach2str[] = {
 };
 
 /* Formats for the ICMP_REDIRECT codes */
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
        { ICMP_REDIRECT_NET,            "redirect %s to net %s" },
        { ICMP_REDIRECT_HOST,           "redirect %s to host %s" },
        { ICMP_REDIRECT_TOSNET,         "redirect-tos %s to net %s" },
index 4f669410b649e27ec83e4b6e629f5fe44f487c0c..0b38c43e1d78c926d2b734b3b6f90c74d64cccc2 100644 (file)
@@ -65,7 +65,7 @@ static void icmp6_rrenum_print(const u_char *, const u_char *);
 /* inline the various RPL definitions */
 #define ND_RPL_MESSAGE 0x9B
 
-static struct tok icmp6_type_values[] = {
+static const struct tok icmp6_type_values[] = {
     { ICMP6_DST_UNREACH, "destination unreachable"},
     { ICMP6_PACKET_TOO_BIG, "packet too big"},
     { ICMP6_TIME_EXCEEDED, "time exceeded in-transit"},
@@ -98,7 +98,7 @@ static struct tok icmp6_type_values[] = {
     { 0,       NULL }
 };
 
-static struct tok icmp6_dst_unreach_code_values[] = {
+static const struct tok icmp6_dst_unreach_code_values[] = {
     { ICMP6_DST_UNREACH_NOROUTE, "unreachable route" },
     { ICMP6_DST_UNREACH_ADMIN, " unreachable prohibited"},
     { ICMP6_DST_UNREACH_BEYONDSCOPE, "beyond scope"},
@@ -107,21 +107,21 @@ static struct tok icmp6_dst_unreach_code_values[] = {
     { 0,       NULL }
 };
 
-static struct tok icmp6_opt_pi_flag_values[] = {
+static const struct tok icmp6_opt_pi_flag_values[] = {
     { ND_OPT_PI_FLAG_ONLINK, "onlink" },
     { ND_OPT_PI_FLAG_AUTO, "auto" },
     { ND_OPT_PI_FLAG_ROUTER, "router" },
     { 0,       NULL }
 };
 
-static struct tok icmp6_opt_ra_flag_values[] = {
+static const struct tok icmp6_opt_ra_flag_values[] = {
     { ND_RA_FLAG_MANAGED, "managed" },
     { ND_RA_FLAG_OTHER, "other stateful"},
     { ND_RA_FLAG_HOME_AGENT, "home agent"},
     { 0,       NULL }
 };
 
-static struct tok icmp6_nd_na_flag_values[] = {
+static const struct tok icmp6_nd_na_flag_values[] = {
     { ND_NA_FLAG_ROUTER, "router" },
     { ND_NA_FLAG_SOLICITED, "solicited" },
     { ND_NA_FLAG_OVERRIDE, "override" },
@@ -129,7 +129,7 @@ static struct tok icmp6_nd_na_flag_values[] = {
 };
 
 
-static struct tok icmp6_opt_values[] = {
+static const struct tok icmp6_opt_values[] = {
    { ND_OPT_SOURCE_LINKADDR, "source link-address"},
    { ND_OPT_TARGET_LINKADDR, "destination link-address"},
    { ND_OPT_PREFIX_INFORMATION, "prefix info"},
@@ -144,7 +144,7 @@ static struct tok icmp6_opt_values[] = {
 };
 
 /* mldv2 report types */
-static struct tok mldv2report2str[] = {
+static const struct tok mldv2report2str[] = {
        { 1,    "is_in" },
        { 2,    "is_ex" },
        { 3,    "to_in" },
index 4087ee0980205cc6ea17e845c8cbe84bb9617e9a..bc431026e66ab0594d5908b08ee3b40305553fa4 100644 (file)
@@ -96,7 +96,7 @@ struct tr_resp {
 #define TR_PROTO_CBT    4
 
 /* igmpv3 report types */
-static struct tok igmpv3report2str[] = {
+static const struct tok igmpv3report2str[] = {
        { 1,    "is_in" },
        { 2,    "is_ex" },
        { 3,    "to_in" },
index 3cede7ec89da6984cadd3dc2d829748550685d9e..90694b3a012a906c05ae7fc5659e9a7ba50ab6ce 100644 (file)
@@ -70,7 +70,7 @@ igrp_entry_print(register struct igrprte *igr, register int is_interior,
            mtu, igr->igr_hct);
 }
 
-static struct tok op2str[] = {
+static const struct tok op2str[] = {
        { IGRP_UPDATE,          "update" },
        { IGRP_REQUEST,         "request" },
        { 0,                    NULL }
index 494eb2958e656ebadb964f35305dab088a6c4e6b..c74bdae1be4f6bca56bf9ee3cd5b77932127587a 100644 (file)
@@ -41,7 +41,7 @@ static const char rcsid[] _U_ =
 #include "ip.h"
 #include "ipproto.h"
 
-struct tok ip_option_values[] = {
+static const struct tok ip_option_values[] = {
     { IPOPT_EOL, "EOL" },
     { IPOPT_NOP, "NOP" },
     { IPOPT_TS, "timestamp" },
@@ -303,7 +303,7 @@ trunc:
 
 #define IP_RES 0x8000
 
-static struct tok ip_frag_values[] = {
+static const struct tok ip_frag_values[] = {
         { IP_MF,        "+" },
         { IP_DF,        "DF" },
        { IP_RES,       "rsvd" }, /* The RFC3514 evil ;-) bit */
index 187f939d3f8c130ceef06bcc62a47767a3669579..e8ed94d52005b531adeedb540771524496bdcda0 100644 (file)
@@ -14,7 +14,7 @@
 
 #ifdef DLT_IPNET
 
-const struct tok ipnet_values[] = {
+static const struct tok ipnet_values[] = {
        { IPH_AF_INET,          "IPv4" },
        { IPH_AF_INET6,         "IPv6" },
        { 0,                    NULL }
index 4f8a5bb7d13a7d747d6a8bcae5973d2eef566f04..4b72f549ef2914f67700fda04e786b24494f2ca0 100644 (file)
@@ -76,7 +76,7 @@ static const char rcsid[] _U_ =
 #define ISIS_PDU_L1_PSNP        26
 #define ISIS_PDU_L2_PSNP        27
 
-static struct tok isis_pdu_values[] = {
+static const struct tok isis_pdu_values[] = {
     { ISIS_PDU_L1_LAN_IIH,       "L1 Lan IIH"},
     { ISIS_PDU_L2_LAN_IIH,       "L2 Lan IIH"},
     { ISIS_PDU_PTP_IIH,          "p2p IIH"},
@@ -146,7 +146,7 @@ static struct tok isis_pdu_values[] = {
 #define ISIS_TLV_VENDOR_PRIVATE      250 /* draft-ietf-isis-experimental-tlv-01 */
 #define ISIS_TLV_VENDOR_PRIVATE_MINLEN 3
 
-static struct tok isis_tlv_values[] = {
+static const struct tok isis_tlv_values[] = {
     { ISIS_TLV_AREA_ADDR,         "Area address(es)"},
     { ISIS_TLV_IS_REACH,           "IS Reachability"},
     { ISIS_TLV_ESNEIGH,            "ES Neighbor(s)"},
@@ -198,7 +198,7 @@ static struct tok isis_tlv_values[] = {
 #define ESIS_OPTION_ADDRESS_MASK     225 /* iso9542 */
 #define ESIS_OPTION_SNPA_MASK        226 /* iso9542 */
 
-static struct tok esis_option_values[] = {
+static const struct tok esis_option_values[] = {
     { ESIS_OPTION_PROTOCOLS,       "Protocols supported"},
     { ESIS_OPTION_QOS_MAINTENANCE, "QoS Maintenance" },
     { ESIS_OPTION_SECURITY,        "Security" },
@@ -217,7 +217,7 @@ static struct tok esis_option_values[] = {
 #define CLNP_OPTION_PADDING          204 /* iso8473 */
 #define CLNP_OPTION_PRIORITY         205 /* iso8473 */
 
-static struct tok clnp_option_values[] = {
+static const struct tok clnp_option_values[] = {
     { CLNP_OPTION_DISCARD_REASON,  "Discard Reason"},
     { CLNP_OPTION_PRIORITY,        "Priority"},
     { CLNP_OPTION_QOS_MAINTENANCE, "QoS Maintenance"},
@@ -228,7 +228,7 @@ static struct tok clnp_option_values[] = {
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_class_values[] = {
+static const struct tok clnp_option_rfd_class_values[] = {
     { 0x0, "General"},
     { 0x8, "Address"},
     { 0x9, "Source Routeing"},
@@ -238,7 +238,7 @@ static struct tok clnp_option_rfd_class_values[] = {
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_general_values[] = {
+static const struct tok clnp_option_rfd_general_values[] = {
     { 0x0, "Reason not specified"},
     { 0x1, "Protocol procedure error"},
     { 0x2, "Incorrect checksum"},
@@ -250,13 +250,13 @@ static struct tok clnp_option_rfd_general_values[] = {
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_address_values[] = {
+static const struct tok clnp_option_rfd_address_values[] = {
     { 0x0, "Destination address unreachable"},
     { 0x1, "Destination address unknown"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_source_routeing_values[] = {
+static const struct tok clnp_option_rfd_source_routeing_values[] = {
     { 0x0, "Unspecified source routeing error"},
     { 0x1, "Syntax error in source routeing field"},
     { 0x2, "Unknown address in source routeing field"},
@@ -264,13 +264,13 @@ static struct tok clnp_option_rfd_source_routeing_values[] = {
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_lifetime_values[] = {
+static const struct tok clnp_option_rfd_lifetime_values[] = {
     { 0x0, "Lifetime expired while data unit in transit"},
     { 0x1, "Lifetime expired during reassembly"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_pdu_discard_values[] = {
+static const struct tok clnp_option_rfd_pdu_discard_values[] = {
     { 0x0, "Unsupported option not specified"},
     { 0x1, "Unsupported protocol version"},
     { 0x2, "Unsupported security option"},
@@ -279,13 +279,13 @@ static struct tok clnp_option_rfd_pdu_discard_values[] = {
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_reassembly_values[] = {
+static const struct tok clnp_option_rfd_reassembly_values[] = {
     { 0x0, "Reassembly interference"},
     { 0, NULL }
 };
 
 /* array of 16 error-classes */
-static struct tok *clnp_option_rfd_error_class[] = {
+static const struct tok *clnp_option_rfd_error_class[] = {
     clnp_option_rfd_general_values,
     NULL,
     NULL,
@@ -310,26 +310,26 @@ static struct tok *clnp_option_rfd_error_class[] = {
 #define CLNP_OPTION_SCOPE_DA_SPEC   0x80
 #define CLNP_OPTION_SCOPE_GLOBAL    0xc0
 
-static struct tok clnp_option_scope_values[] = {
+static const struct tok clnp_option_scope_values[] = {
     { CLNP_OPTION_SCOPE_SA_SPEC, "Source Address Specific"},
     { CLNP_OPTION_SCOPE_DA_SPEC, "Destination Address Specific"},
     { CLNP_OPTION_SCOPE_GLOBAL, "Globally unique"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_sr_rr_values[] = {
+static const struct tok clnp_option_sr_rr_values[] = {
     { 0x0, "partial"},
     { 0x1, "complete"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_sr_rr_string_values[] = {
+static const struct tok clnp_option_sr_rr_string_values[] = {
     { CLNP_OPTION_SOURCE_ROUTING, "source routing"},
     { CLNP_OPTION_ROUTE_RECORDING, "recording of route in progress"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_qos_global_values[] = {
+static const struct tok clnp_option_qos_global_values[] = {
     { 0x20, "reserved"},
     { 0x10, "sequencing vs. delay"},
     { 0x08, "congested"},
@@ -356,7 +356,7 @@ static struct tok clnp_option_qos_global_values[] = {
 
 #define ISIS_SUBTLV_SPB_METRIC                        29 /* rfc6329 */
 
-static struct tok isis_ext_is_reach_subtlv_values[] = {
+static const struct tok isis_ext_is_reach_subtlv_values[] = {
     { ISIS_SUBTLV_EXT_IS_REACH_ADMIN_GROUP,            "Administrative groups" },
     { ISIS_SUBTLV_EXT_IS_REACH_LINK_LOCAL_REMOTE_ID,   "Link Local/Remote Identifier" },
     { ISIS_SUBTLV_EXT_IS_REACH_LINK_REMOTE_ID,         "Link Remote Identifier" },
@@ -385,14 +385,14 @@ static struct tok isis_ext_is_reach_subtlv_values[] = {
 #define ISIS_SUBTLV_EXTD_IP_REACH_ADMIN_TAG64          2 /* draft-ietf-isis-admin-tags-01 */
 #define ISIS_SUBTLV_EXTD_IP_REACH_MGMT_PREFIX_COLOR  117 /* draft-ietf-isis-wg-multi-topology-05 */
 
-static struct tok isis_ext_ip_reach_subtlv_values[] = {
+static const struct tok isis_ext_ip_reach_subtlv_values[] = {
     { ISIS_SUBTLV_EXTD_IP_REACH_ADMIN_TAG32,           "32-Bit Administrative tag" },
     { ISIS_SUBTLV_EXTD_IP_REACH_ADMIN_TAG64,           "64-Bit Administrative tag" },
     { ISIS_SUBTLV_EXTD_IP_REACH_MGMT_PREFIX_COLOR,     "Management Prefix Color" },
     { 0, NULL }
 };
 
-static struct tok isis_subtlv_link_attribute_values[] = {
+static const struct tok isis_subtlv_link_attribute_values[] = {
     { 0x01, "Local Protection Available" },
     { 0x02, "Link excluded from local protection path" },
     { 0x04, "Local maintenance required"},
@@ -405,7 +405,7 @@ static struct tok isis_subtlv_link_attribute_values[] = {
 #define ISIS_SUBTLV_AUTH_MD5_LEN      16
 #define ISIS_SUBTLV_AUTH_PRIVATE     255
 
-static struct tok isis_subtlv_auth_values[] = {
+static const struct tok isis_subtlv_auth_values[] = {
     { ISIS_SUBTLV_AUTH_SIMPLE, "simple text password"},
     { ISIS_SUBTLV_AUTH_GENERIC, "Generic Crypto key-id"},
     { ISIS_SUBTLV_AUTH_MD5,    "HMAC-MD5 password"},
@@ -417,7 +417,7 @@ static struct tok isis_subtlv_auth_values[] = {
 #define ISIS_SUBTLV_IDRP_LOCAL         1
 #define ISIS_SUBTLV_IDRP_ASN           2
 
-static struct tok isis_subtlv_idrp_values[] = {
+static const struct tok isis_subtlv_idrp_values[] = {
     { ISIS_SUBTLV_IDRP_RES,         "Reserved"},
     { ISIS_SUBTLV_IDRP_LOCAL,       "Routing-Domain Specific"},
     { ISIS_SUBTLV_IDRP_ASN,         "AS Number Tag"},
@@ -438,14 +438,14 @@ static struct tok isis_subtlv_idrp_values[] = {
 #define ISIS_SUBTLV_SPB_INSTANCE_MIN_LEN          19
 #define ISIS_SUBTLV_SPB_INSTANCE_VLAN_TUPLE_LEN   8
 
-static struct tok isis_mt_port_cap_subtlv_values[] = {
+static const struct tok isis_mt_port_cap_subtlv_values[] = {
     { ISIS_SUBTLV_SPB_MCID,           "SPB MCID" },
     { ISIS_SUBTLV_SPB_DIGEST,         "SPB Digest" },
     { ISIS_SUBTLV_SPB_BVID,           "SPB BVID" },
     { 0, NULL }
 };
 
-static struct tok isis_mt_capability_subtlv_values[] = {
+static const struct tok isis_mt_capability_subtlv_values[] = {
     { ISIS_SUBTLV_SPB_INSTANCE,      "SPB Instance" },
     { ISIS_SUBTLV_SPBM_SI,      "SPBM Service Identifier and Unicast Address" },
     { 0, NULL }
@@ -475,7 +475,7 @@ struct isis_subtlv_spb_instance {
 #define CLNP_MORE_SEGMENTS 0x40
 #define CLNP_REQUEST_ER    0x20
 
-static struct tok clnp_flag_values[] = {
+static const struct tok clnp_flag_values[] = {
     { CLNP_SEGMENT_PART, "Segmentation permitted"},
     { CLNP_MORE_SEGMENTS, "more Segments"},
     { CLNP_REQUEST_ER, "request Error Report"},
@@ -494,7 +494,7 @@ static struct tok clnp_flag_values[] = {
 #define ISIS_MASK_MTID(x)                  ((x)&0x0fff)
 #define ISIS_MASK_MTFLAGS(x)               ((x)&0xf000)
 
-static struct tok isis_mt_flag_values[] = {
+static const struct tok isis_mt_flag_values[] = {
     { 0x4000,                  "ATT bit set"},
     { 0x8000,                  "Overload bit set"},
     { 0, NULL}
@@ -513,7 +513,7 @@ static struct tok isis_mt_flag_values[] = {
 
 #define ISIS_MASK_TLV_SHARED_RISK_GROUP(x) ((x)&0x1)
 
-static struct tok isis_mt_values[] = {
+static const struct tok isis_mt_values[] = {
     { 0,    "IPv4 unicast"},
     { 1,    "In-Band Management"},
     { 2,    "IPv6 unicast"},
@@ -522,7 +522,7 @@ static struct tok isis_mt_values[] = {
     { 0, NULL }
 };
 
-static struct tok isis_iih_circuit_type_values[] = {
+static const struct tok isis_iih_circuit_type_values[] = {
     { 1,    "Level 1 only"},
     { 2,    "Level 2 only"},
     { 3,    "Level 1, Level 2"},
@@ -534,7 +534,7 @@ static struct tok isis_iih_circuit_type_values[] = {
 #define ISIS_LSP_TYPE_UNUSED2   2
 #define ISIS_LSP_TYPE_LEVEL_2   3
 
-static struct tok isis_lsp_istype_values[] = {
+static const struct tok isis_lsp_istype_values[] = {
     { ISIS_LSP_TYPE_UNUSED0,   "Unused 0x0 (invalid)"},
     { ISIS_LSP_TYPE_LEVEL_1,   "L1 IS"},
     { ISIS_LSP_TYPE_UNUSED2,   "Unused 0x2 (invalid)"},
@@ -551,7 +551,7 @@ static struct tok isis_lsp_istype_values[] = {
 #define ISIS_PTP_ADJ_INIT 1
 #define ISIS_PTP_ADJ_DOWN 2
 
-static struct tok isis_ptp_adjancey_values[] = {
+static const struct tok isis_ptp_adjancey_values[] = {
     { ISIS_PTP_ADJ_UP,    "Up" },
     { ISIS_PTP_ADJ_INIT,  "Initializing" },
     { ISIS_PTP_ADJ_DOWN,  "Down" },
@@ -594,13 +594,13 @@ struct isis_tlv_ip_reach {
     u_int8_t mask[4];
 };
 
-static struct tok isis_is_reach_virtual_values[] = {
+static const struct tok isis_is_reach_virtual_values[] = {
     { 0,    "IsNotVirtual"},
     { 1,    "IsVirtual"},
     { 0, NULL }
 };
 
-static struct tok isis_restart_flag_values[] = {
+static const struct tok isis_restart_flag_values[] = {
     { 0x1,  "Restart Request"},
     { 0x2,  "Restart Acknowledgement"},
     { 0x4,  "Suppress adjacency advertisement"},
@@ -740,7 +740,7 @@ void isoclns_print(const u_int8_t *p, u_int length, u_int caplen)
 #define        CLNP_PDU_ERQ    30
 #define        CLNP_PDU_ERP    31
 
-static struct tok clnp_pdu_values[] = {
+static const struct tok clnp_pdu_values[] = {
     { CLNP_PDU_ER,  "Error Report"},
     { CLNP_PDU_MD,  "MD"},
     { CLNP_PDU_DT,  "Data"},
@@ -1007,7 +1007,7 @@ static int clnp_print (const u_int8_t *pptr, u_int length)
 #define        ESIS_PDU_ESH            2
 #define        ESIS_PDU_ISH            4
 
-static struct tok esis_pdu_values[] = {
+static const struct tok esis_pdu_values[] = {
     { ESIS_PDU_REDIRECT, "redirect"},
     { ESIS_PDU_ESH,      "ESH"},
     { ESIS_PDU_ISH,      "ISH"},
index 3bf68c382797461a4a81fdc2eede275a1741ac9f..1789fb5164a61060f6fcb7a0f6a3e68efc3c01cc 100644 (file)
@@ -65,7 +65,7 @@ __RCSID("NetBSD: print-juniper.c,v 1.3 2007/07/25 06:31:32 dogcow Exp ");
 #define JUNIPER_IPSEC_O_AH_AUTHENTICATION_TYPE 4
 #define JUNIPER_IPSEC_O_ESP_ENCRYPTION_TYPE 5
 
-static struct tok juniper_ipsec_type_values[] = {
+static const struct tok juniper_ipsec_type_values[] = {
     { JUNIPER_IPSEC_O_ESP_ENCRYPT_ESP_AUTHEN_TYPE, "ESP ENCR-AUTH" },
     { JUNIPER_IPSEC_O_ESP_ENCRYPT_AH_AUTHEN_TYPE, "ESP ENCR-AH AUTH" },
     { JUNIPER_IPSEC_O_ESP_AUTHENTICATION_TYPE, "ESP AUTH" },
@@ -74,7 +74,7 @@ static struct tok juniper_ipsec_type_values[] = {
     { 0, NULL}
 };
 
-static struct tok juniper_direction_values[] = {
+static const struct tok juniper_direction_values[] = {
     { JUNIPER_BPF_IN,  "In"},
     { JUNIPER_BPF_OUT, "Out"},
     { 0, NULL}
@@ -95,7 +95,7 @@ enum {
 /* 1 byte type and 1-byte length */
 #define JUNIPER_EXT_TLV_OVERHEAD 2
 
-struct tok jnx_ext_tlv_values[] = {
+static const struct tok jnx_ext_tlv_values[] = {
     { JUNIPER_EXT_TLV_IFD_IDX, "Device Interface Index" },
     { JUNIPER_EXT_TLV_IFD_NAME,"Device Interface Name" },
     { JUNIPER_EXT_TLV_IFD_MEDIATYPE, "Device Media Type" },
@@ -107,7 +107,7 @@ struct tok jnx_ext_tlv_values[] = {
     { 0, NULL }
 };
 
-struct tok jnx_flag_values[] = {
+static const struct tok jnx_flag_values[] = {
     { JUNIPER_BPF_EXT, "Ext" },
     { JUNIPER_BPF_FILTER, "Filter" },
     { JUNIPER_BPF_IIF, "IIF" },
@@ -177,7 +177,7 @@ struct tok jnx_flag_values[] = {
 #define JUNIPER_IFML_DFC                59
 #define JUNIPER_IFML_PICPEER            60
 
-struct tok juniper_ifmt_values[] = {
+static const struct tok juniper_ifmt_values[] = {
     { JUNIPER_IFML_ETHER, "Ethernet" },
     { JUNIPER_IFML_FDDI, "FDDI" },
     { JUNIPER_IFML_TOKENRING, "Token-Ring" },
@@ -300,7 +300,7 @@ struct tok juniper_ifmt_values[] = {
 #define JUNIPER_IFLE_DFC                    66
 #define JUNIPER_IFLE_PICPEER                67
 
-struct tok juniper_ifle_values[] = {
+static const struct tok juniper_ifle_values[] = {
     { JUNIPER_IFLE_AGGREGATOR, "Aggregator" },
     { JUNIPER_IFLE_ATM_CCC, "CCC over ATM" },
     { JUNIPER_IFLE_ATM_CELLRELAY_CCC, "ATM CCC Cell Relay" },
@@ -439,7 +439,7 @@ struct juniper_l2info_t {
 
 #define MFR_BE_MASK 0xc0
 
-static struct tok juniper_protocol_values[] = {
+static const struct tok juniper_protocol_values[] = {
     { JUNIPER_PROTO_NULL, "Null" },
     { JUNIPER_PROTO_IPV4, "IPv4" },
     { JUNIPER_PROTO_IPV6, "IPv6" },
index 213db642db63fc59e68f687ba2786396964d8b53..733334bf1596504f9811a6189b95b57a611794ee 100644 (file)
@@ -71,7 +71,7 @@ struct krb {
 
 static char tstr[] = " [|kerberos]";
 
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
        { AUTH_MSG_KDC_REQUEST,         "KDC_REQUEST" },
        { AUTH_MSG_KDC_REPLY,           "KDC_REPLY" },
        { AUTH_MSG_APPL_REQUEST,        "APPL_REQUEST" },
@@ -84,7 +84,7 @@ static struct tok type2str[] = {
        { 0,                            NULL }
 };
 
-static struct tok kerr2str[] = {
+static const struct tok kerr2str[] = {
        { KERB_ERR_OK,                  "OK" },
        { KERB_ERR_NAME_EXP,            "NAME_EXP" },
        { KERB_ERR_SERVICE_EXP,         "SERVICE_EXP" },
index 2f726574e4ee3757b493bbdbd9707de6e5855d07..840239cdb2e61a77844def97bfb3a1551554b64c 100644 (file)
@@ -55,7 +55,7 @@ static char tstr[] = " [|l2tp]";
 #define        L2TP_MSGTYPE_WEN        15 /* WAN-Error-Notify */
 #define        L2TP_MSGTYPE_SLI        16 /* Set-Link-Info */
 
-static struct tok l2tp_msgtype2str[] = {
+static const struct tok l2tp_msgtype2str[] = {
        { L2TP_MSGTYPE_SCCRQ,   "SCCRQ" },
        { L2TP_MSGTYPE_SCCRP,   "SCCRP" },
        { L2TP_MSGTYPE_SCCCN,   "SCCCN" },
@@ -115,7 +115,7 @@ static struct tok l2tp_msgtype2str[] = {
 #define L2TP_AVP_SEQ_REQUIRED          39 /* Sequencing Required */
 #define L2TP_AVP_PPP_DISCON_CC         46 /* PPP Disconnect Cause Code */
 
-static struct tok l2tp_avp2str[] = {
+static const struct tok l2tp_avp2str[] = {
        { L2TP_AVP_MSGTYPE,             "MSGTYPE" },
        { L2TP_AVP_RESULT_CODE,         "RESULT_CODE" },
        { L2TP_AVP_PROTO_VER,           "PROTO_VER" },
@@ -160,7 +160,7 @@ static struct tok l2tp_avp2str[] = {
        { 0,                            NULL }
 };
 
-static struct tok l2tp_authentype2str[] = {
+static const struct tok l2tp_authentype2str[] = {
        { L2TP_AUTHEN_TYPE_RESERVED,    "Reserved" },
        { L2TP_AUTHEN_TYPE_TEXTUAL,     "Textual" },
        { L2TP_AUTHEN_TYPE_CHAP,        "CHAP" },
@@ -174,7 +174,7 @@ static struct tok l2tp_authentype2str[] = {
 #define L2TP_PPP_DISCON_CC_DIRECTION_AT_PEER   1
 #define L2TP_PPP_DISCON_CC_DIRECTION_AT_LOCAL  2
 
-static struct tok l2tp_cc_direction2str[] = {
+static const struct tok l2tp_cc_direction2str[] = {
        { L2TP_PPP_DISCON_CC_DIRECTION_GLOBAL,  "global error" },
        { L2TP_PPP_DISCON_CC_DIRECTION_AT_PEER, "at peer" },
        { L2TP_PPP_DISCON_CC_DIRECTION_AT_LOCAL,"at local" },
index 5ba81894c4a02ac6b41c1a13d058d36f73b60342..356e313d4acde885be09fb4ace0190af6c5728db 100644 (file)
@@ -44,7 +44,7 @@ static const char rcsid[] _U_ =
 #include "ethertype.h"
 #include "oui.h"
 
-static struct tok llc_values[] = {
+static const struct tok llc_values[] = {
         { LLCSAP_NULL,     "Null" },
         { LLCSAP_GLOBAL,   "Global" },
         { LLCSAP_8021B_I,  "802.1B I" },
@@ -63,7 +63,7 @@ static struct tok llc_values[] = {
         { 0,               NULL },
 };
 
-static struct tok llc_cmd_values[] = {
+static const struct tok llc_cmd_values[] = {
        { LLC_UI,       "ui" },
        { LLC_TEST,     "test" },
        { LLC_XID,      "xid" },
index aad4eee3843bbb37ac48d391968a4a9a7399de9e..60acc5b5da8148679079141e5f62885c86462335 100644 (file)
@@ -175,7 +175,7 @@ typedef struct {
 #define LWRES_MAX_ALIASES              16              /* max # of aliases */
 #define LWRES_MAX_ADDRS                        64              /* max # of addrs */
 
-struct tok opcode[] = {
+static const struct tok opcode[] = {
        { LWRES_OPCODE_NOOP,            "noop", },
        { LWRES_OPCODE_GETADDRSBYNAME,  "getaddrsbyname", },
        { LWRES_OPCODE_GETNAMEBYADDR,   "getnamebyaddr", },
@@ -184,8 +184,8 @@ struct tok opcode[] = {
 };
 
 /* print-domain.c */
-extern struct tok ns_type2str[];
-extern struct tok ns_class2str[];
+extern const struct tok ns_type2str[];
+extern const struct tok ns_class2str[];
 
 static int lwres_printname(size_t, const char *);
 static int lwres_printnamelen(const char *);
index 238226e13a384ed1130becbe6bfcb771a2275bca..194d9304ceffb9014f048cfbaa29bc330a8cffb5 100644 (file)
@@ -44,7 +44,7 @@
 #define NFULA_PAYLOAD 9
 #define NFULA_MAX 17
 
-const struct tok nflog_values[] = {
+static const struct tok nflog_values[] = {
        { AF_INET,              "IPv4" },
        { AF_INET6,             "IPv6" },
        { 0,                            NULL }
index 6aafde7e19584ad9e6d6900ccebcd92fcd49aeb6..d5816ceee693bae2b69f2a41ba6b77e349f7a051 100644 (file)
@@ -100,7 +100,7 @@ u_int32_t nfsv3_procid[NFS_NPROCS] = {
  * the first NFS server was the SunOS 2.0 one, and until 5.0 SunOS
  * was primarily BSD-derived.
  */
-static struct tok status2str[] = {
+static const struct tok status2str[] = {
        { 1,     "Operation not permitted" },   /* EPERM */
        { 2,     "No such file or directory" }, /* ENOENT */
        { 5,     "Input/output error" },        /* EIO */
@@ -138,14 +138,14 @@ static struct tok status2str[] = {
        { 0,     NULL }
 };
 
-static struct tok nfsv3_writemodes[] = {
+static const struct tok nfsv3_writemodes[] = {
        { 0,            "unstable" },
        { 1,            "datasync" },
        { 2,            "filesync" },
        { 0,            NULL }
 };
 
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
        { NFNON,        "NON" },
        { NFREG,        "REG" },
        { NFDIR,        "DIR" },
index b814cb578f6fabf93086300f517257511b7f0c15..28c861990f5c44acd0d32ec44c39c4ce0b1de08b 100644 (file)
@@ -52,7 +52,7 @@ static void p_sfix(const struct s_fixedpt *);
 static void p_ntp_time(const struct l_fixedpt *);
 static void p_ntp_delta(const struct l_fixedpt *, const struct l_fixedpt *);
 
-static struct tok ntp_mode_values[] = {
+static const struct tok ntp_mode_values[] = {
     { MODE_UNSPEC,    "unspecified" },
     { MODE_SYM_ACT,   "symmetric active" },
     { MODE_SYM_PAS,   "symmetric passive" },
@@ -64,7 +64,7 @@ static struct tok ntp_mode_values[] = {
     { 0, NULL }
 };
 
-static struct tok ntp_leapind_values[] = {
+static const struct tok ntp_leapind_values[] = {
     { NO_WARNING,     "" },
     { PLUS_SEC,       "+1s" },
     { MINUS_SEC,      "-1s" },
@@ -72,7 +72,7 @@ static struct tok ntp_leapind_values[] = {
     { 0, NULL }
 };
 
-static struct tok ntp_stratum_values[] = {
+static const struct tok ntp_stratum_values[] = {
        { UNSPECIFIED,  "unspecified" },
        { PRIM_REF,     "primary reference" },
        { 0, NULL }
index ba0ed2bede8a14569e98de85aab86a113264a3d7..2713c09ca31bb526c68a06a3fe8eff72963567e5 100644 (file)
@@ -78,7 +78,7 @@ struct olsr_common {
 #define OLSR_HELLO_LQ_MSG    201 /* LQ extensions olsr.org */
 #define OLSR_TC_LQ_MSG       202 /* LQ extensions olsr.org */
 
-static struct tok olsr_msg_values[] = {
+static const struct tok olsr_msg_values[] = {
     { OLSR_HELLO_MSG, "Hello" },
     { OLSR_TC_MSG, "TC" },
     { OLSR_MID_MSG, "MID" },
@@ -141,7 +141,7 @@ struct olsr_hna6 {
 #define OLSR_EXTRACT_LINK_TYPE(link_code) (link_code & 0x3)
 #define OLSR_EXTRACT_NEIGHBOR_TYPE(link_code) (link_code >> 2)
 
-static struct tok olsr_link_type_values[] = {
+static const struct tok olsr_link_type_values[] = {
     { 0, "Unspecified" },
     { 1, "Asymmetric" },
     { 2, "Symmetric" },
@@ -149,7 +149,7 @@ static struct tok olsr_link_type_values[] = {
     { 0, NULL}
 };
 
-static struct tok olsr_neighbor_type_values[] = {
+static const struct tok olsr_neighbor_type_values[] = {
     { 0, "Not-Neighbor" },
     { 1, "Symmetric" },
     { 2, "Symmetric-MPR" },
index 736f5df39505c65208397fbb7b98b90a6e755e82..9533cb63312d222b7ce0c9f82255b1a2433dcd80 100644 (file)
@@ -43,7 +43,7 @@ static const char rcsid[] _U_ =
 
 #include "ip.h"
 
-static struct tok ospf_option_values[] = {
+static const struct tok ospf_option_values[] = {
         { OSPF_OPTION_T,       "MultiTopology" }, /* draft-ietf-ospf-mt-09 */
        { OSPF_OPTION_E,        "External" },
        { OSPF_OPTION_MC,       "Multicast" },
@@ -55,14 +55,14 @@ static struct tok ospf_option_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok ospf_authtype_values[] = {
+static const struct tok ospf_authtype_values[] = {
        { OSPF_AUTH_NONE,       "none" },
        { OSPF_AUTH_SIMPLE,     "simple" },
        { OSPF_AUTH_MD5,        "MD5" },
        { 0,                    NULL }
 };
 
-static struct tok ospf_rla_flag_values[] = {
+static const struct tok ospf_rla_flag_values[] = {
        { RLA_FLAG_B,           "ABR" },
        { RLA_FLAG_E,           "ASBR" },
        { RLA_FLAG_W1,          "Virtual" },
@@ -70,7 +70,7 @@ static struct tok ospf_rla_flag_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
        { OSPF_TYPE_UMD,        "UMD" },
        { OSPF_TYPE_HELLO,      "Hello" },
        { OSPF_TYPE_DD,         "Database Description" },
@@ -80,7 +80,7 @@ static struct tok type2str[] = {
        { 0,                    NULL }
 };
 
-static struct tok lsa_values[] = {
+static const struct tok lsa_values[] = {
        { LS_TYPE_ROUTER,       "Router" },
        { LS_TYPE_NETWORK,      "Network" },
        { LS_TYPE_SUM_IP,       "Summary" },
@@ -94,7 +94,7 @@ static struct tok lsa_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok ospf_dd_flag_values[] = {
+static const struct tok ospf_dd_flag_values[] = {
        { OSPF_DB_INIT,         "Init" },
        { OSPF_DB_MORE,         "More" },
        { OSPF_DB_MASTER,       "Master" },
@@ -102,20 +102,20 @@ static struct tok ospf_dd_flag_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok lsa_opaque_values[] = {
+static const struct tok lsa_opaque_values[] = {
        { LS_OPAQUE_TYPE_TE,    "Traffic Engineering" },
        { LS_OPAQUE_TYPE_GRACE, "Graceful restart" },
        { LS_OPAQUE_TYPE_RI,    "Router Information" },
        { 0,                    NULL }
 };
 
-static struct tok lsa_opaque_te_tlv_values[] = {
+static const struct tok lsa_opaque_te_tlv_values[] = {
        { LS_OPAQUE_TE_TLV_ROUTER, "Router Address" },
        { LS_OPAQUE_TE_TLV_LINK,   "Link" },
        { 0,                    NULL }
 };
 
-static struct tok lsa_opaque_te_link_tlv_subtlv_values[] = {
+static const struct tok lsa_opaque_te_link_tlv_subtlv_values[] = {
        { LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE,            "Link Type" },
        { LS_OPAQUE_TE_LINK_SUBTLV_LINK_ID,              "Link ID" },
        { LS_OPAQUE_TE_LINK_SUBTLV_LOCAL_IP,             "Local Interface IP address" },
@@ -133,14 +133,14 @@ static struct tok lsa_opaque_te_link_tlv_subtlv_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok lsa_opaque_grace_tlv_values[] = {
+static const struct tok lsa_opaque_grace_tlv_values[] = {
        { LS_OPAQUE_GRACE_TLV_PERIOD,             "Grace Period" },
        { LS_OPAQUE_GRACE_TLV_REASON,             "Graceful restart Reason" },
        { LS_OPAQUE_GRACE_TLV_INT_ADDRESS,        "IPv4 interface address" },
        { 0,                    NULL }
 };
 
-static struct tok lsa_opaque_grace_tlv_reason_values[] = {
+static const struct tok lsa_opaque_grace_tlv_reason_values[] = {
        { LS_OPAQUE_GRACE_TLV_REASON_UNKNOWN,     "Unknown" },
        { LS_OPAQUE_GRACE_TLV_REASON_SW_RESTART,  "Software Restart" },
        { LS_OPAQUE_GRACE_TLV_REASON_SW_UPGRADE,  "Software Reload/Upgrade" },
@@ -148,18 +148,18 @@ static struct tok lsa_opaque_grace_tlv_reason_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok lsa_opaque_te_tlv_link_type_sub_tlv_values[] = {
+static const struct tok lsa_opaque_te_tlv_link_type_sub_tlv_values[] = {
        { LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_PTP, "Point-to-point" },
        { LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_MA,  "Multi-Access" },
        { 0,                    NULL }
 };
 
-static struct tok lsa_opaque_ri_tlv_values[] = {
+static const struct tok lsa_opaque_ri_tlv_values[] = {
        { LS_OPAQUE_RI_TLV_CAP, "Router Capabilities" },
        { 0,                    NULL }
 };
 
-static struct tok lsa_opaque_ri_tlv_cap_values[] = {
+static const struct tok lsa_opaque_ri_tlv_cap_values[] = {
        { 1, "Reserved" },
        { 2, "Reserved" },
        { 4, "Reserved" },
@@ -173,13 +173,13 @@ static struct tok lsa_opaque_ri_tlv_cap_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok ospf_lls_tlv_values[] = {
+static const struct tok ospf_lls_tlv_values[] = {
        { OSPF_LLS_EO,  "Extended Options" },
        { OSPF_LLS_MD5, "MD5 Authentication" },
        { 0,    NULL }
 };
 
-static struct tok ospf_lls_eo_options[] = {
+static const struct tok ospf_lls_eo_options[] = {
        { OSPF_LLS_EO_LR,       "LSDB resync" },
        { OSPF_LLS_EO_RS,       "Restart" },
        { 0,    NULL }
@@ -516,7 +516,7 @@ trunc:
 }
 
 /* draft-ietf-ospf-mt-09 */
-static struct tok ospf_topology_values[] = {
+static const struct tok ospf_topology_values[] = {
     { 0, "default " },
     { 1, "multicast " },
     { 2, "management " },
index dbd07ec3d436fe76b79e6d9cc8250b5ee351d5c3..b0a6f272e8121f570852dbdfa17e46a2009c5ab6 100644 (file)
@@ -68,7 +68,7 @@ static const struct tok ospf6_asla_flag_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok ospf6_type_values[] = {
+static const struct tok ospf6_type_values[] = {
        { OSPF_TYPE_HELLO,      "Hello" },
        { OSPF_TYPE_DD,         "Database Description" },
        { OSPF_TYPE_LS_REQ,     "LS-Request" },
@@ -77,7 +77,7 @@ static struct tok ospf6_type_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok ospf6_lsa_values[] = {
+static const struct tok ospf6_lsa_values[] = {
        { LS_TYPE_ROUTER,       "Router" },
        { LS_TYPE_NETWORK,      "Network" },
        { LS_TYPE_INTER_AP,     "Inter-Area Prefix" },
@@ -92,21 +92,21 @@ static struct tok ospf6_lsa_values[] = {
        { 0,                    NULL }
 };
 
-static struct tok ospf6_ls_scope_values[] = {
+static const struct tok ospf6_ls_scope_values[] = {
        { LS_SCOPE_LINKLOCAL,   "Link Local" },
        { LS_SCOPE_AREA,        "Area Local" },
        { LS_SCOPE_AS,          "Domain Wide" },
        { 0,                    NULL }
 };
 
-static struct tok ospf6_dd_flag_values[] = {
+static const struct tok ospf6_dd_flag_values[] = {
        { OSPF6_DB_INIT,        "Init" },
        { OSPF6_DB_MORE,        "More" },
        { OSPF6_DB_MASTER,      "Master" },
        { 0,                    NULL }
 };
 
-static struct tok ospf6_lsa_prefix_option_values[] = {
+static const struct tok ospf6_lsa_prefix_option_values[] = {
         { LSA_PREFIX_OPT_NU, "No Unicast" },
         { LSA_PREFIX_OPT_LA, "Local address" },
         { LSA_PREFIX_OPT_MC, "Multicast" },
index ac325f4b0e63674b56fd7882f7f049e1d0c1073e..8a3b66aaf41402038a2ec91c71c6b47e89ec302c 100644 (file)
@@ -46,7 +46,7 @@ static const char rcsid[] _U_ =
 #include "interface.h"
 #include "addrtoname.h"
 
-static struct tok pf_reasons[] = {
+static const struct tok pf_reasons[] = {
        { 0,    "0(match)" },
        { 1,    "1(bad-offset)" },
        { 2,    "2(fragment)" },
@@ -65,7 +65,7 @@ static struct tok pf_reasons[] = {
        { 0,    NULL }
 };
 
-static struct tok pf_actions[] = {
+static const struct tok pf_actions[] = {
        { PF_PASS,              "pass" },
        { PF_DROP,              "block" },
        { PF_SCRUB,             "scrub" },
@@ -79,7 +79,7 @@ static struct tok pf_actions[] = {
        { 0,                    NULL }
 };
 
-static struct tok pf_directions[] = {
+static const struct tok pf_directions[] = {
        { PF_INOUT,     "in/out" },
        { PF_IN,        "in" },
        { PF_OUT,       "out" },
index e0cca125f675f95fce9145a4882b7fe426bc9c50..3cd681090d457f14871ff7fa12c7f574ca1ffdda 100644 (file)
@@ -50,7 +50,7 @@ static const char rcsid[] _U_ =
 #define PIMV2_TYPE_CANDIDATE_RP  8
 #define PIMV2_TYPE_PRUNE_REFRESH 9
 
-static struct tok pimv2_type_values[] = {
+static const struct tok pimv2_type_values[] = {
     { PIMV2_TYPE_HELLO,         "Hello" },
     { PIMV2_TYPE_REGISTER,      "Register" },
     { PIMV2_TYPE_REGISTER_STOP, "Register Stop" },
@@ -74,7 +74,7 @@ static struct tok pimv2_type_values[] = {
 #define PIMV2_HELLO_OPTION_ADDRESS_LIST        24
 #define PIMV2_HELLO_OPTION_ADDRESS_LIST_OLD 65001
 
-static struct tok pimv2_hello_option_values[] = {
+static const struct tok pimv2_hello_option_values[] = {
     { PIMV2_HELLO_OPTION_HOLDTIME,         "Hold Time" },
     { PIMV2_HELLO_OPTION_LANPRUNEDELAY,    "LAN Prune Delay" },
     { PIMV2_HELLO_OPTION_DR_PRIORITY_OLD,  "DR Priority (Old)" },
@@ -91,7 +91,7 @@ static struct tok pimv2_hello_option_values[] = {
 #define PIMV2_REGISTER_FLAG_BORDER 0x80000000
 #define PIMV2_REGISTER_FLAG_NULL   0x40000000
 
-static struct tok pimv2_register_flag_values[] = {
+static const struct tok pimv2_register_flag_values[] = {
     { PIMV2_REGISTER_FLAG_BORDER, "Border" },
     { PIMV2_REGISTER_FLAG_NULL, "Null" },
     { 0, NULL}
index ea8e00b244f9194d1810dc92a08791ad0f513c75..0ae88118fb96e7f409c56436c713e1cc5c367524 100644 (file)
@@ -65,7 +65,7 @@ static const char rcsid[] _U_ =
 
 /* Protocol Codes defined in ppp.h */
 
-struct tok ppptype2str[] = {
+static const struct tok ppptype2str[] = {
         { PPP_IP,        "IP" },
         { PPP_OSI,       "OSI" },
         { PPP_NS,        "NS" },
@@ -129,7 +129,7 @@ struct tok ppptype2str[] = {
 #define CPCODES_RESET_REQ      14      /* Reset-Request (CCP only) RFC1962 */
 #define CPCODES_RESET_REP      15      /* Reset-Reply (CCP only) */
 
-struct tok cpcodes[] = {
+static const struct tok cpcodes[] = {
        {CPCODES_VEXT,      "Vendor-Extension"}, /* RFC2153 */
        {CPCODES_CONF_REQ,  "Conf-Request"},
         {CPCODES_CONF_ACK,  "Conf-Ack"},
@@ -243,7 +243,7 @@ static const char *lcpconfopts[] = {
 /* 27-254 unassigned */
 #define CCPOPT_RESV    255     /* RFC1962 */
 
-const struct tok ccpconfopts_values[] = {
+static const struct tok ccpconfopts_values[] = {
         { CCPOPT_OUI, "OUI" },
         { CCPOPT_PRED1, "Pred-1" },
         { CCPOPT_PRED2, "Pred-2" },
@@ -266,7 +266,7 @@ const struct tok ccpconfopts_values[] = {
 
 #define BACPOPT_FPEER  1       /* RFC2125 */
 
-const struct tok bacconfopts_values[] = {
+static const struct tok bacconfopts_values[] = {
         { BACPOPT_FPEER, "Favored-Peer" },
         {0,                 NULL}
 };
@@ -284,7 +284,7 @@ const struct tok bacconfopts_values[] = {
 #define IPCPOPT_SECDNS 131     /* RFC1877 */
 #define IPCPOPT_SECNBNS        132     /* RFC1877 */
 
-struct tok ipcpopt_values[] = {
+static const struct tok ipcpopt_values[] = {
         { IPCPOPT_2ADDR, "IP-Addrs" },
         { IPCPOPT_IPCOMP, "IP-Comp" },
         { IPCPOPT_ADDR, "IP-Addr" },
@@ -299,13 +299,13 @@ struct tok ipcpopt_values[] = {
 #define IPCPOPT_IPCOMP_HDRCOMP 0x61  /* rfc3544 */
 #define IPCPOPT_IPCOMP_MINLEN    14
 
-struct tok ipcpopt_compproto_values[] = {
+static const struct tok ipcpopt_compproto_values[] = {
         { PPP_VJC, "VJ-Comp" },
         { IPCPOPT_IPCOMP_HDRCOMP, "IP Header Compression" },
        { 0,              NULL }
 };
 
-struct tok ipcpopt_compproto_subopt_values[] = {
+static const struct tok ipcpopt_compproto_subopt_values[] = {
         { 1, "RTP-Compression" },
         { 2, "Enhanced RTP-Compression" },
        { 0,              NULL }
@@ -314,7 +314,7 @@ struct tok ipcpopt_compproto_subopt_values[] = {
 /* IP6CP Config Options */
 #define IP6CP_IFID      1
 
-struct tok ip6cpopt_values[] = {
+static const struct tok ip6cpopt_values[] = {
         { IP6CP_IFID, "Interface-ID" },
        { 0,              NULL }
 };
@@ -333,7 +333,7 @@ struct tok ip6cpopt_values[] = {
 #define AUTHALG_MSCHAP1        128     /* RFC2433 */
 #define AUTHALG_MSCHAP2        129     /* RFC2795 */
 
-struct tok authalg_values[] = {
+static const struct tok authalg_values[] = {
         { AUTHALG_CHAPMD5, "MD5" },
         { AUTHALG_MSCHAP1, "MS-CHAPv1" },
         { AUTHALG_MSCHAP2, "MS-CHAPv2" },
@@ -358,7 +358,7 @@ struct tok authalg_values[] = {
 #define CALLBACK_X500  4       /* X.500 distinguished name */
 #define CALLBACK_CBCP  6       /* Location is determined during CBCP nego */
 
-struct tok ppp_callback_values[] = {
+static const struct tok ppp_callback_values[] = {
         { CALLBACK_AUTH, "UserAuth" },
         { CALLBACK_DSTR, "DialString" },
         { CALLBACK_LID, "LocalID" },
@@ -375,7 +375,7 @@ struct tok ppp_callback_values[] = {
 #define CHAP_SUCC      3
 #define CHAP_FAIL      4
 
-struct tok chapcode_values[] = {
+static const struct tok chapcode_values[] = {
        { CHAP_CHAL, "Challenge" },
        { CHAP_RESP, "Response" },
        { CHAP_SUCC, "Success" },
@@ -389,7 +389,7 @@ struct tok chapcode_values[] = {
 #define PAP_AACK       2
 #define PAP_ANAK       3
 
-struct tok papcode_values[] = {
+static const struct tok papcode_values[] = {
         { PAP_AREQ, "Auth-Req" },
         { PAP_AACK, "Auth-ACK" },
         { PAP_ANAK, "Auth-NACK" },
@@ -773,7 +773,7 @@ trunc:
 }
 
 /* ML-PPP*/
-struct tok ppp_ml_flag_values[] = {
+static const struct tok ppp_ml_flag_values[] = {
     { 0x80, "begin" },
     { 0x40, "end" },
     { 0, NULL }
index 8040c7ae09c2375ec8ccd8f1616cba49af000596..f8c9008aee8bc5c5967322bbb7f92966e903635c 100644 (file)
@@ -51,7 +51,7 @@ enum {
        PPPOE_PADT = 0xa7
 };
 
-static struct tok pppoecode2str[] = {
+static const struct tok pppoecode2str[] = {
        { PPPOE_PADI, "PADI" },
        { PPPOE_PADO, "PADO" },
        { PPPOE_PADR, "PADR" },
@@ -76,7 +76,7 @@ enum {
        PPPOE_GENERIC_ERROR = 0x0203
 };
 
-static struct tok pppoetag2str[] = {
+static const struct tok pppoetag2str[] = {
        { PPPOE_EOL, "EOL" },
        { PPPOE_SERVICE_NAME, "Service-Name" },
        { PPPOE_AC_NAME, "AC-Name" },
index 44f0c7fce9cef1deae71b31de3a1396355b299e1..74fd72d15310c84d9137eb74c2828ef5ecbd4374 100644 (file)
@@ -84,7 +84,7 @@ static const char rcsid[] _U_ =
 #define RADCMD_STATUS_CLI  13 /* Status-Client       */
 #define RADCMD_RESERVED   255 /* Reserved            */
 
-static struct tok radius_command_values[] = {
+static const struct tok radius_command_values[] = {
     { RADCMD_ACCESS_REQ, "Access Request" },
     { RADCMD_ACCESS_ACC, "Access Accept" },
     { RADCMD_ACCESS_REJ, "Access Reject" },
index 1c76dcbbf6a9ac85f05236581c8356947a5da807..2d54a3eb55bbcc2d91bb23f2fcf1eaf9c747a68e 100644 (file)
@@ -390,7 +390,7 @@ static const struct tok rsvp_intserv_parameter_id_values[] = {
     { 0, NULL}
 };
 
-static struct tok rsvp_session_attribute_flag_values[] = {
+static const struct tok rsvp_session_attribute_flag_values[] = {
     { 0x01,                  "Local Protection" },
     { 0x02,                   "Label Recording" },
     { 0x04,                   "SE Style" },
@@ -399,7 +399,7 @@ static struct tok rsvp_session_attribute_flag_values[] = {
     { 0, NULL}
 };
 
-static struct tok rsvp_obj_prop_tlv_values[] = {
+static const struct tok rsvp_obj_prop_tlv_values[] = {
     { 0x01,                   "Cos" },
     { 0x02,                   "Metric 1" },
     { 0x04,                   "Metric 2" },
@@ -413,7 +413,7 @@ static struct tok rsvp_obj_prop_tlv_values[] = {
 #define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE 28
 #define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD 125
 
-static struct tok rsvp_obj_error_code_values[] = {
+static const struct tok rsvp_obj_error_code_values[] = {
     { RSVP_OBJ_ERROR_SPEC_CODE_ROUTING, "Routing Problem" },
     { RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY,  "Notify Error" },
     { RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE, "Diffserv TE Error" },
@@ -421,7 +421,7 @@ static struct tok rsvp_obj_error_code_values[] = {
     { 0, NULL}
 };
 
-static struct tok rsvp_obj_error_code_routing_values[] = {
+static const struct tok rsvp_obj_error_code_routing_values[] = {
     { 1,                      "Bad EXPLICIT_ROUTE object" },
     { 2,                      "Bad strict node" },
     { 3,                      "Bad loose node" },
@@ -435,7 +435,7 @@ static struct tok rsvp_obj_error_code_routing_values[] = {
     { 0, NULL}
 };
 
-static struct tok rsvp_obj_error_code_diffserv_te_values[] = {
+static const struct tok rsvp_obj_error_code_diffserv_te_values[] = {
     { 1,                      "Unexpected CT object" },
     { 2,                      "Unsupported CT" },
     { 3,                      "Invalid CT value" },
index 383ef3713ffc17aea18a701e572910a01b145c05..1b4f949fb3651c40d25b490f6cc88b800dd395c0 100644 (file)
@@ -54,7 +54,7 @@ static const char rcsid[] _U_ =
 
 #include "ip.h"
 
-static struct tok rx_types[] = {
+static const struct tok rx_types[] = {
        { RX_PACKET_TYPE_DATA,          "data" },
        { RX_PACKET_TYPE_ACK,           "ack" },
        { RX_PACKET_TYPE_BUSY,          "busy" },
@@ -82,7 +82,7 @@ static struct double_tok {
        { RX_JUMBO_PACKET,      RX_PACKET_TYPE_DATA,    "jumbogram" }
 };
 
-static struct tok fs_req[] = {
+static const struct tok fs_req[] = {
        { 130,          "fetch-data" },
        { 131,          "fetch-acl" },
        { 132,          "fetch-status" },
@@ -127,7 +127,7 @@ static struct tok fs_req[] = {
        { 0,            NULL },
 };
 
-static struct tok cb_req[] = {
+static const struct tok cb_req[] = {
        { 204,          "callback" },
        { 205,          "initcb" },
        { 206,          "probe" },
@@ -149,7 +149,7 @@ static struct tok cb_req[] = {
        { 0,            NULL },
 };
 
-static struct tok pt_req[] = {
+static const struct tok pt_req[] = {
        { 500,          "new-user" },
        { 501,          "where-is-it" },
        { 502,          "dump-entry" },
@@ -176,7 +176,7 @@ static struct tok pt_req[] = {
        { 0,            NULL },
 };
 
-static struct tok vldb_req[] = {
+static const struct tok vldb_req[] = {
        { 501,          "create-entry" },
        { 502,          "delete-entry" },
        { 503,          "get-entry-by-id" },
@@ -214,7 +214,7 @@ static struct tok vldb_req[] = {
        { 0,            NULL },
 };
 
-static struct tok kauth_req[] = {
+static const struct tok kauth_req[] = {
        { 1,            "auth-old" },
        { 21,           "authenticate" },
        { 22,           "authenticate-v2" },
@@ -236,7 +236,7 @@ static struct tok kauth_req[] = {
        { 0,            NULL },
 };
 
-static struct tok vol_req[] = {
+static const struct tok vol_req[] = {
        { 100,          "create-volume" },
        { 101,          "delete-volume" },
        { 102,          "restore" },
@@ -272,7 +272,7 @@ static struct tok vol_req[] = {
        { 0,            NULL },
 };
 
-static struct tok bos_req[] = {
+static const struct tok bos_req[] = {
        { 80,           "create-bnode" },
        { 81,           "delete-bnode" },
        { 82,           "set-status" },
@@ -313,7 +313,7 @@ static struct tok bos_req[] = {
        { 0,            NULL },
 };
 
-static struct tok ubik_req[] = {
+static const struct tok ubik_req[] = {
        { 10000,        "vote-beacon" },
        { 10001,        "vote-debug-old" },
        { 10002,        "vote-sdebug-old" },
@@ -344,14 +344,14 @@ static struct tok ubik_req[] = {
 #define DISK_LOW       20000
 #define DISK_HIGH      20013
 
-static struct tok cb_types[] = {
+static const struct tok cb_types[] = {
        { 1,            "exclusive" },
        { 2,            "shared" },
        { 3,            "dropped" },
        { 0,            NULL },
 };
 
-static struct tok ubik_lock_types[] = {
+static const struct tok ubik_lock_types[] = {
        { 1,            "read" },
        { 2,            "write" },
        { 3,            "wait" },
@@ -360,7 +360,7 @@ static struct tok ubik_lock_types[] = {
 
 static const char *voltype[] = { "read-write", "read-only", "backup" };
 
-static struct tok afs_fs_errors[] = {
+static const struct tok afs_fs_errors[] = {
        { 101,          "salvage volume" },
        { 102,          "no such vnode" },
        { 103,          "no such volume" },
@@ -381,7 +381,7 @@ static struct tok afs_fs_errors[] = {
  * Reasons for acknowledging a packet
  */
 
-static struct tok rx_ack_reasons[] = {
+static const struct tok rx_ack_reasons[] = {
        { 1,            "ack requested" },
        { 2,            "duplicate packet" },
        { 3,            "out of sequence" },
index fb5d7e3a9910ef4e6079bbcb211669b743745035..5a4b1e93ed9aebff0ac81a6e9a690725bff55104 100644 (file)
@@ -63,7 +63,7 @@ static const char rcsid[] _U_ =
 #define CHAN_MP 6705
 #define CHAN_LP 6706
 
-struct tok ForCES_channels[] = {
+static const struct tok ForCES_channels[] = {
        { CHAN_HP, "ForCES HP" },
        { CHAN_MP, "ForCES MP" },
        { CHAN_LP, "ForCES LP" },
index a044de6709fbe5ba666db7842e73e4e843f63e5a..062398e18afe159c104cebf27c0ac501bfd498ce 100644 (file)
@@ -41,7 +41,7 @@ static const char rcsid[] _U_ =
 #include "ether.h"
 #include "sll.h"
 
-const struct tok sll_pkttype_values[] = {
+static const struct tok sll_pkttype_values[] = {
     { LINUX_SLL_HOST, "In" },
     { LINUX_SLL_BROADCAST, "B" },
     { LINUX_SLL_MULTICAST, "M" },
index 1b6f38f8fa5fd670c0cb741a39cfe2288342c94a..5c9b12d7c458dd1dab01f6879f7a5e4256846793 100644 (file)
@@ -54,7 +54,7 @@ struct stp_bpdu_ {
 #define STP_PROTO_MSTP    0x03
 #define STP_PROTO_SPB     0x04
 
-struct tok stp_proto_values[] = {
+static const struct tok stp_proto_values[] = {
     { STP_PROTO_REGULAR, "802.1d" },
     { STP_PROTO_RAPID, "802.1w" },
     { STP_PROTO_MSTP, "802.1s" },
@@ -66,7 +66,7 @@ struct tok stp_proto_values[] = {
 #define STP_BPDU_TYPE_RSTP        0x02
 #define STP_BPDU_TYPE_TOPO_CHANGE 0x80
 
-struct tok stp_bpdu_flag_values[] = {
+static const struct tok stp_bpdu_flag_values[] = {
     { 0x01, "Topology change" },
     { 0x02, "Proposal" },
     { 0x10, "Learn" },
@@ -76,14 +76,14 @@ struct tok stp_bpdu_flag_values[] = {
     { 0, NULL}
 };
 
-struct tok stp_bpdu_type_values[] = {
+static const struct tok stp_bpdu_type_values[] = {
     { STP_BPDU_TYPE_CONFIG, "Config" },
     { STP_BPDU_TYPE_RSTP, "Rapid STP" },
     { STP_BPDU_TYPE_TOPO_CHANGE, "Topology Change" },
     { 0, NULL}
 };
 
-struct tok rstp_obj_port_role_values[] = {
+static const struct tok rstp_obj_port_role_values[] = {
     { 0x00, "Unknown" },
     { 0x01, "Alternate" },
     { 0x02, "Root" },
index 21cd85a9c509fd079c652da49a7e1573ab8f8246..195825d7a39b806dd11319d83f4f50491eb0e1be 100644 (file)
@@ -68,7 +68,7 @@ static const char rcsid[] _U_ =
 #include "rpc_msg.h"
 #include "pmap_prot.h"
 
-static struct tok proc2str[] = {
+static const struct tok proc2str[] = {
        { SUNRPC_PMAPPROC_NULL,         "null" },
        { SUNRPC_PMAPPROC_SET,          "set" },
        { SUNRPC_PMAPPROC_UNSET,        "unset" },
index 032001d1564c88cac98746b47dd39228e882409f..48dd6254132b959635bed5ab4585f3c208431915 100644 (file)
@@ -94,7 +94,7 @@ struct tcp_seq_hash {
 
 static struct tcp_seq_hash tcp_seq_hash[TSEQ_HASHSIZE];
 
-struct tok tcp_flag_values[] = {
+static const struct tok tcp_flag_values[] = {
         { TH_FIN, "F" },
         { TH_SYN, "S" },
         { TH_RST, "R" },
@@ -106,7 +106,7 @@ struct tok tcp_flag_values[] = {
         { 0, NULL }
 };
 
-struct tok tcp_option_values[] = {
+static const struct tok tcp_option_values[] = {
         { TCPOPT_EOL, "eol" },
         { TCPOPT_NOP, "nop" },
         { TCPOPT_MAXSEG, "mss" },
index 84cde3969d08bfd8f898da610f0606cf6fc4ad07..62e2c99893e561b10b1e0b2ea173e92178a7b892 100644 (file)
@@ -45,7 +45,7 @@ static const char rcsid[] _U_ =
 #include "tftp.h"
 
 /* op code to string mapping */
-static struct tok op2str[] = {
+static const struct tok op2str[] = {
        { RRQ,          "RRQ" },        /* read request */
        { WRQ,          "WRQ" },        /* write request */
        { DATA,         "DATA" },       /* data packet */
@@ -56,7 +56,7 @@ static struct tok op2str[] = {
 };
 
 /* error code to string mapping */
-static struct tok err2str[] = {
+static const struct tok err2str[] = {
        { EUNDEF,       "EUNDEF" },     /* not defined */
        { ENOTFOUND,    "ENOTFOUND" },  /* file not found */
        { EACCESS,      "EACCESS" },    /* access violation */
index a5488dda451ff3f56f70b6614d927e9b2bc29138..e8395d0a56a2546b769bd2676c68a4b0826f83e3 100644 (file)
@@ -41,7 +41,7 @@
 #define UDLD_DEVICE_NAME_TLV           0x0006
 #define UDLD_SEQ_NUMBER_TLV            0x0007
 
-static struct tok udld_tlv_values[] = {
+static const struct tok udld_tlv_values[] = {
     { UDLD_DEVICE_ID_TLV, "Device-ID TLV"},
     { UDLD_PORT_ID_TLV, "Port-ID TLV"},
     { UDLD_ECHO_TLV, "Echo TLV"},
@@ -52,7 +52,7 @@ static struct tok udld_tlv_values[] = {
     { 0, NULL}
 };
 
-static struct tok udld_code_values[] = {
+static const struct tok udld_code_values[] = {
     { 0x00, "Reserved"},
     { 0x01, "Probe message"},
     { 0x02, "Echo message"},
@@ -60,7 +60,7 @@ static struct tok udld_code_values[] = {
     { 0, NULL}
 };
 
-static struct tok udld_flags_values[] = {
+static const struct tok udld_flags_values[] = {
     { 0x00, "RT"},
     { 0x01, "RSY"},
     { 0, NULL}
index 7631c6f618424b24e26a8659eebc1612f95dbb7b..04ae24c7d4356cfe37ffaf1b11e05a3e999e0426 100644 (file)
@@ -57,7 +57,7 @@ struct vtp_vlan_ {
     u_int32_t index;
 };
 
-static struct tok vtp_message_type_values[] = {
+static const struct tok vtp_message_type_values[] = {
     { VTP_SUMMARY_ADV, "Summary advertisement"},
     { VTP_SUBSET_ADV, "Subset advertisement"},
     { VTP_ADV_REQUEST, "Advertisement request"},
@@ -65,7 +65,7 @@ static struct tok vtp_message_type_values[] = {
     { 0, NULL }
 };
 
-static struct tok vtp_header_values[] = {
+static const struct tok vtp_header_values[] = {
     { 0x01, "Followers"}, /* On Summary advertisement, 3rd byte is Followers */
     { 0x02, "Seq number"}, /* On Subset  advertisement, 3rd byte is Sequence number */
     { 0x03, "Rsvd"}, /* On Adver. requests 3rd byte is Rsvd */
@@ -73,7 +73,7 @@ static struct tok vtp_header_values[] = {
     { 0, NULL }
 };
 
-static struct tok vtp_vlan_type_values[] = {
+static const struct tok vtp_vlan_type_values[] = {
     { 0x01, "Ethernet"},
     { 0x02, "FDDI"},
     { 0x03, "TrCRF"},
@@ -82,7 +82,7 @@ static struct tok vtp_vlan_type_values[] = {
     { 0, NULL }
 };
 
-static struct tok vtp_vlan_status[] = {
+static const struct tok vtp_vlan_status[] = {
     { 0x00, "Operational"},
     { 0x01, "Suspended"},
     { 0, NULL }
@@ -99,7 +99,7 @@ static struct tok vtp_vlan_status[] = {
 #define VTP_VLAN_STE_HOP_COUNT                   0x09
 #define VTP_VLAN_BACKUP_CRF_MODE                 0x0A
 
-static struct tok vtp_vlan_tlv_values[] = {
+static const struct tok vtp_vlan_tlv_values[] = {
     { VTP_VLAN_SOURCE_ROUTING_RING_NUMBER, "Source-Routing Ring Number TLV"},
     { VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER, "Source-Routing Bridge Number TLV"},
     { VTP_VLAN_STP_TYPE, "STP type TLV"},
@@ -113,7 +113,7 @@ static struct tok vtp_vlan_tlv_values[] = {
     { 0,                                  NULL }
 };
 
-static struct tok vtp_stp_type_values[] = {
+static const struct tok vtp_stp_type_values[] = {
     { 1, "SRT"},
     { 2, "SRB"},
     { 3, "Auto"},
index 7c52e65406589f2c12a86e84a4dc011edf435096..d8252cca920a7b1a94859d5921b43c286e63531d 100644 (file)
@@ -70,7 +70,7 @@ enum z_packet_type {
     Z_PACKET_STAT
 };
 
-static struct tok z_types[] = {
+static const struct tok z_types[] = {
     { Z_PACKET_UNSAFE,         "unsafe" },
     { Z_PACKET_UNACKED,                "unacked" },
     { Z_PACKET_ACKED,          "acked" },