diff options
-rw-r--r-- | include/net/snmp.h | 2 | ||||
-rw-r--r-- | net/ipv4/proc.c | 4 | ||||
-rw-r--r-- | net/ipv6/proc.c | 12 | ||||
-rw-r--r-- | net/sctp/proc.c | 2 | ||||
-rw-r--r-- | net/xfrm/xfrm_proc.c | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/include/net/snmp.h b/include/net/snmp.h index f0d756f2ac99..da02ee027d69 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h | |||
@@ -32,7 +32,7 @@ | |||
32 | * - name of entries. | 32 | * - name of entries. |
33 | */ | 33 | */ |
34 | struct snmp_mib { | 34 | struct snmp_mib { |
35 | char *name; | 35 | const char *name; |
36 | int entry; | 36 | int entry; |
37 | }; | 37 | }; |
38 | 38 | ||
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index f25542c48b7d..1b09a6dde7c0 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -127,8 +127,8 @@ static const struct snmp_mib snmp4_ipextstats_list[] = { | |||
127 | SNMP_MIB_SENTINEL | 127 | SNMP_MIB_SENTINEL |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static struct { | 130 | static const struct { |
131 | char *name; | 131 | const char *name; |
132 | int index; | 132 | int index; |
133 | } icmpmibmap[] = { | 133 | } icmpmibmap[] = { |
134 | { "DestUnreachs", ICMP_DEST_UNREACH }, | 134 | { "DestUnreachs", ICMP_DEST_UNREACH }, |
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 02f20016b4c9..bfe2598dd563 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -59,7 +59,7 @@ static const struct file_operations sockstat6_seq_fops = { | |||
59 | .release = single_release_net, | 59 | .release = single_release_net, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static struct snmp_mib snmp6_ipstats_list[] = { | 62 | static const struct snmp_mib snmp6_ipstats_list[] = { |
63 | /* ipv6 mib according to RFC 2465 */ | 63 | /* ipv6 mib according to RFC 2465 */ |
64 | SNMP_MIB_ITEM("Ip6InReceives", IPSTATS_MIB_INPKTS), | 64 | SNMP_MIB_ITEM("Ip6InReceives", IPSTATS_MIB_INPKTS), |
65 | SNMP_MIB_ITEM("Ip6InHdrErrors", IPSTATS_MIB_INHDRERRORS), | 65 | SNMP_MIB_ITEM("Ip6InHdrErrors", IPSTATS_MIB_INHDRERRORS), |
@@ -92,7 +92,7 @@ static struct snmp_mib snmp6_ipstats_list[] = { | |||
92 | SNMP_MIB_SENTINEL | 92 | SNMP_MIB_SENTINEL |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static struct snmp_mib snmp6_icmp6_list[] = { | 95 | static const struct snmp_mib snmp6_icmp6_list[] = { |
96 | /* icmpv6 mib according to RFC 2466 */ | 96 | /* icmpv6 mib according to RFC 2466 */ |
97 | SNMP_MIB_ITEM("Icmp6InMsgs", ICMP6_MIB_INMSGS), | 97 | SNMP_MIB_ITEM("Icmp6InMsgs", ICMP6_MIB_INMSGS), |
98 | SNMP_MIB_ITEM("Icmp6InErrors", ICMP6_MIB_INERRORS), | 98 | SNMP_MIB_ITEM("Icmp6InErrors", ICMP6_MIB_INERRORS), |
@@ -120,7 +120,7 @@ static const char *const icmp6type2name[256] = { | |||
120 | }; | 120 | }; |
121 | 121 | ||
122 | 122 | ||
123 | static struct snmp_mib snmp6_udp6_list[] = { | 123 | static const struct snmp_mib snmp6_udp6_list[] = { |
124 | SNMP_MIB_ITEM("Udp6InDatagrams", UDP_MIB_INDATAGRAMS), | 124 | SNMP_MIB_ITEM("Udp6InDatagrams", UDP_MIB_INDATAGRAMS), |
125 | SNMP_MIB_ITEM("Udp6NoPorts", UDP_MIB_NOPORTS), | 125 | SNMP_MIB_ITEM("Udp6NoPorts", UDP_MIB_NOPORTS), |
126 | SNMP_MIB_ITEM("Udp6InErrors", UDP_MIB_INERRORS), | 126 | SNMP_MIB_ITEM("Udp6InErrors", UDP_MIB_INERRORS), |
@@ -128,7 +128,7 @@ static struct snmp_mib snmp6_udp6_list[] = { | |||
128 | SNMP_MIB_SENTINEL | 128 | SNMP_MIB_SENTINEL |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static struct snmp_mib snmp6_udplite6_list[] = { | 131 | static const struct snmp_mib snmp6_udplite6_list[] = { |
132 | SNMP_MIB_ITEM("UdpLite6InDatagrams", UDP_MIB_INDATAGRAMS), | 132 | SNMP_MIB_ITEM("UdpLite6InDatagrams", UDP_MIB_INDATAGRAMS), |
133 | SNMP_MIB_ITEM("UdpLite6NoPorts", UDP_MIB_NOPORTS), | 133 | SNMP_MIB_ITEM("UdpLite6NoPorts", UDP_MIB_NOPORTS), |
134 | SNMP_MIB_ITEM("UdpLite6InErrors", UDP_MIB_INERRORS), | 134 | SNMP_MIB_ITEM("UdpLite6InErrors", UDP_MIB_INERRORS), |
@@ -170,8 +170,8 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib) | |||
170 | return; | 170 | return; |
171 | } | 171 | } |
172 | 172 | ||
173 | static inline void | 173 | static void snmp6_seq_show_item(struct seq_file *seq, void **mib, |
174 | snmp6_seq_show_item(struct seq_file *seq, void **mib, struct snmp_mib *itemlist) | 174 | const struct snmp_mib *itemlist) |
175 | { | 175 | { |
176 | int i; | 176 | int i; |
177 | for (i=0; itemlist[i].name; i++) | 177 | for (i=0; itemlist[i].name; i++) |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index d093cbfeaac4..a5ac6e0a8d9c 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <net/sctp/sctp.h> | 40 | #include <net/sctp/sctp.h> |
41 | #include <net/ip.h> /* for snmp_fold_field */ | 41 | #include <net/ip.h> /* for snmp_fold_field */ |
42 | 42 | ||
43 | static struct snmp_mib sctp_snmp_list[] = { | 43 | static const struct snmp_mib sctp_snmp_list[] = { |
44 | SNMP_MIB_ITEM("SctpCurrEstab", SCTP_MIB_CURRESTAB), | 44 | SNMP_MIB_ITEM("SctpCurrEstab", SCTP_MIB_CURRESTAB), |
45 | SNMP_MIB_ITEM("SctpActiveEstabs", SCTP_MIB_ACTIVEESTABS), | 45 | SNMP_MIB_ITEM("SctpActiveEstabs", SCTP_MIB_ACTIVEESTABS), |
46 | SNMP_MIB_ITEM("SctpPassiveEstabs", SCTP_MIB_PASSIVEESTABS), | 46 | SNMP_MIB_ITEM("SctpPassiveEstabs", SCTP_MIB_PASSIVEESTABS), |
diff --git a/net/xfrm/xfrm_proc.c b/net/xfrm/xfrm_proc.c index fef8db553e8d..c083a4e4e796 100644 --- a/net/xfrm/xfrm_proc.c +++ b/net/xfrm/xfrm_proc.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <net/snmp.h> | 15 | #include <net/snmp.h> |
16 | #include <net/xfrm.h> | 16 | #include <net/xfrm.h> |
17 | 17 | ||
18 | static struct snmp_mib xfrm_mib_list[] = { | 18 | static const struct snmp_mib xfrm_mib_list[] = { |
19 | SNMP_MIB_ITEM("XfrmInError", LINUX_MIB_XFRMINERROR), | 19 | SNMP_MIB_ITEM("XfrmInError", LINUX_MIB_XFRMINERROR), |
20 | SNMP_MIB_ITEM("XfrmInBufferError", LINUX_MIB_XFRMINBUFFERERROR), | 20 | SNMP_MIB_ITEM("XfrmInBufferError", LINUX_MIB_XFRMINBUFFERERROR), |
21 | SNMP_MIB_ITEM("XfrmInHdrError", LINUX_MIB_XFRMINHDRERROR), | 21 | SNMP_MIB_ITEM("XfrmInHdrError", LINUX_MIB_XFRMINHDRERROR), |