aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2009-09-14 08:21:47 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-14 20:03:01 -0400
commit32613090a96dba2ca2cc524c8d4749d3126fdde5 (patch)
tree5e0e5f9097aca737e8a7356eb1b72e53539cda0b /net/ipv4/af_inet.c
parente4c57d0f964cdbe278ed6b3bf632138fe575267e (diff)
net: constify struct net_protocol
Remove long removed "inet_protocol_base" declaration. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 6c30a73f03f5..58c4b0f7c4aa 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -244,7 +244,7 @@ EXPORT_SYMBOL(build_ehash_secret);
244static inline int inet_netns_ok(struct net *net, int protocol) 244static inline int inet_netns_ok(struct net *net, int protocol)
245{ 245{
246 int hash; 246 int hash;
247 struct net_protocol *ipprot; 247 const struct net_protocol *ipprot;
248 248
249 if (net_eq(net, &init_net)) 249 if (net_eq(net, &init_net))
250 return 1; 250 return 1;
@@ -1162,7 +1162,7 @@ EXPORT_SYMBOL(inet_sk_rebuild_header);
1162static int inet_gso_send_check(struct sk_buff *skb) 1162static int inet_gso_send_check(struct sk_buff *skb)
1163{ 1163{
1164 struct iphdr *iph; 1164 struct iphdr *iph;
1165 struct net_protocol *ops; 1165 const struct net_protocol *ops;
1166 int proto; 1166 int proto;
1167 int ihl; 1167 int ihl;
1168 int err = -EINVAL; 1168 int err = -EINVAL;
@@ -1198,7 +1198,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
1198{ 1198{
1199 struct sk_buff *segs = ERR_PTR(-EINVAL); 1199 struct sk_buff *segs = ERR_PTR(-EINVAL);
1200 struct iphdr *iph; 1200 struct iphdr *iph;
1201 struct net_protocol *ops; 1201 const struct net_protocol *ops;
1202 int proto; 1202 int proto;
1203 int ihl; 1203 int ihl;
1204 int id; 1204 int id;
@@ -1265,7 +1265,7 @@ out:
1265static struct sk_buff **inet_gro_receive(struct sk_buff **head, 1265static struct sk_buff **inet_gro_receive(struct sk_buff **head,
1266 struct sk_buff *skb) 1266 struct sk_buff *skb)
1267{ 1267{
1268 struct net_protocol *ops; 1268 const struct net_protocol *ops;
1269 struct sk_buff **pp = NULL; 1269 struct sk_buff **pp = NULL;
1270 struct sk_buff *p; 1270 struct sk_buff *p;
1271 struct iphdr *iph; 1271 struct iphdr *iph;
@@ -1342,7 +1342,7 @@ out:
1342 1342
1343static int inet_gro_complete(struct sk_buff *skb) 1343static int inet_gro_complete(struct sk_buff *skb)
1344{ 1344{
1345 struct net_protocol *ops; 1345 const struct net_protocol *ops;
1346 struct iphdr *iph = ip_hdr(skb); 1346 struct iphdr *iph = ip_hdr(skb);
1347 int proto = iph->protocol & (MAX_INET_PROTOS - 1); 1347 int proto = iph->protocol & (MAX_INET_PROTOS - 1);
1348 int err = -ENOSYS; 1348 int err = -ENOSYS;
@@ -1427,13 +1427,13 @@ void snmp_mib_free(void *ptr[2])
1427EXPORT_SYMBOL_GPL(snmp_mib_free); 1427EXPORT_SYMBOL_GPL(snmp_mib_free);
1428 1428
1429#ifdef CONFIG_IP_MULTICAST 1429#ifdef CONFIG_IP_MULTICAST
1430static struct net_protocol igmp_protocol = { 1430static const struct net_protocol igmp_protocol = {
1431 .handler = igmp_rcv, 1431 .handler = igmp_rcv,
1432 .netns_ok = 1, 1432 .netns_ok = 1,
1433}; 1433};
1434#endif 1434#endif
1435 1435
1436static struct net_protocol tcp_protocol = { 1436static const struct net_protocol tcp_protocol = {
1437 .handler = tcp_v4_rcv, 1437 .handler = tcp_v4_rcv,
1438 .err_handler = tcp_v4_err, 1438 .err_handler = tcp_v4_err,
1439 .gso_send_check = tcp_v4_gso_send_check, 1439 .gso_send_check = tcp_v4_gso_send_check,
@@ -1444,7 +1444,7 @@ static struct net_protocol tcp_protocol = {
1444 .netns_ok = 1, 1444 .netns_ok = 1,
1445}; 1445};
1446 1446
1447static struct net_protocol udp_protocol = { 1447static const struct net_protocol udp_protocol = {
1448 .handler = udp_rcv, 1448 .handler = udp_rcv,
1449 .err_handler = udp_err, 1449 .err_handler = udp_err,
1450 .gso_send_check = udp4_ufo_send_check, 1450 .gso_send_check = udp4_ufo_send_check,
@@ -1453,7 +1453,7 @@ static struct net_protocol udp_protocol = {
1453 .netns_ok = 1, 1453 .netns_ok = 1,
1454}; 1454};
1455 1455
1456static struct net_protocol icmp_protocol = { 1456static const struct net_protocol icmp_protocol = {
1457 .handler = icmp_rcv, 1457 .handler = icmp_rcv,
1458 .no_policy = 1, 1458 .no_policy = 1,
1459 .netns_ok = 1, 1459 .netns_ok = 1,