Loading include/net/protocol.h +3 −4 Original line number Diff line number Diff line Loading @@ -94,15 +94,14 @@ struct inet_protosw { #define INET_PROTOSW_PERMANENT 0x02 /* Permanent protocols are unremovable. */ #define INET_PROTOSW_ICSK 0x04 /* Is this an inet_connection_sock? */ extern struct net_protocol *inet_protocol_base; extern struct net_protocol *inet_protos[MAX_INET_PROTOS]; extern const struct net_protocol *inet_protos[MAX_INET_PROTOS]; #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) extern struct inet6_protocol *inet6_protos[MAX_INET_PROTOS]; #endif extern int inet_add_protocol(struct net_protocol *prot, unsigned char num); extern int inet_del_protocol(struct net_protocol *prot, unsigned char num); extern int inet_add_protocol(const struct net_protocol *prot, unsigned char num); extern int inet_del_protocol(const struct net_protocol *prot, unsigned char num); extern void inet_register_protosw(struct inet_protosw *p); extern void inet_unregister_protosw(struct inet_protosw *p); Loading net/dccp/ipv4.c +1 −1 Original line number Diff line number Diff line Loading @@ -948,7 +948,7 @@ static struct proto dccp_v4_prot = { #endif }; static struct net_protocol dccp_v4_protocol = { static const struct net_protocol dccp_v4_protocol = { .handler = dccp_v4_rcv, .err_handler = dccp_v4_err, .no_policy = 1, Loading net/ipv4/af_inet.c +9 −9 Original line number Diff line number Diff line Loading @@ -244,7 +244,7 @@ EXPORT_SYMBOL(build_ehash_secret); static inline int inet_netns_ok(struct net *net, int protocol) { int hash; struct net_protocol *ipprot; const struct net_protocol *ipprot; if (net_eq(net, &init_net)) return 1; Loading Loading @@ -1162,7 +1162,7 @@ EXPORT_SYMBOL(inet_sk_rebuild_header); static int inet_gso_send_check(struct sk_buff *skb) { struct iphdr *iph; struct net_protocol *ops; const struct net_protocol *ops; int proto; int ihl; int err = -EINVAL; Loading Loading @@ -1198,7 +1198,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) { struct sk_buff *segs = ERR_PTR(-EINVAL); struct iphdr *iph; struct net_protocol *ops; const struct net_protocol *ops; int proto; int ihl; int id; Loading Loading @@ -1265,7 +1265,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) static struct sk_buff **inet_gro_receive(struct sk_buff **head, struct sk_buff *skb) { struct net_protocol *ops; const struct net_protocol *ops; struct sk_buff **pp = NULL; struct sk_buff *p; struct iphdr *iph; Loading Loading @@ -1342,7 +1342,7 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head, static int inet_gro_complete(struct sk_buff *skb) { struct net_protocol *ops; const struct net_protocol *ops; struct iphdr *iph = ip_hdr(skb); int proto = iph->protocol & (MAX_INET_PROTOS - 1); int err = -ENOSYS; Loading Loading @@ -1427,13 +1427,13 @@ void snmp_mib_free(void *ptr[2]) EXPORT_SYMBOL_GPL(snmp_mib_free); #ifdef CONFIG_IP_MULTICAST static struct net_protocol igmp_protocol = { static const struct net_protocol igmp_protocol = { .handler = igmp_rcv, .netns_ok = 1, }; #endif static struct net_protocol tcp_protocol = { static const struct net_protocol tcp_protocol = { .handler = tcp_v4_rcv, .err_handler = tcp_v4_err, .gso_send_check = tcp_v4_gso_send_check, Loading @@ -1444,7 +1444,7 @@ static struct net_protocol tcp_protocol = { .netns_ok = 1, }; static struct net_protocol udp_protocol = { static const struct net_protocol udp_protocol = { .handler = udp_rcv, .err_handler = udp_err, .gso_send_check = udp4_ufo_send_check, Loading @@ -1453,7 +1453,7 @@ static struct net_protocol udp_protocol = { .netns_ok = 1, }; static struct net_protocol icmp_protocol = { static const struct net_protocol icmp_protocol = { .handler = icmp_rcv, .no_policy = 1, .netns_ok = 1, Loading net/ipv4/ah4.c +1 −1 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ static const struct xfrm_type ah_type = .output = ah_output }; static struct net_protocol ah4_protocol = { static const struct net_protocol ah4_protocol = { .handler = xfrm4_rcv, .err_handler = ah4_err, .no_policy = 1, Loading net/ipv4/esp4.c +1 −1 Original line number Diff line number Diff line Loading @@ -615,7 +615,7 @@ static const struct xfrm_type esp_type = .output = esp_output }; static struct net_protocol esp4_protocol = { static const struct net_protocol esp4_protocol = { .handler = xfrm4_rcv, .err_handler = esp4_err, .no_policy = 1, Loading Loading
include/net/protocol.h +3 −4 Original line number Diff line number Diff line Loading @@ -94,15 +94,14 @@ struct inet_protosw { #define INET_PROTOSW_PERMANENT 0x02 /* Permanent protocols are unremovable. */ #define INET_PROTOSW_ICSK 0x04 /* Is this an inet_connection_sock? */ extern struct net_protocol *inet_protocol_base; extern struct net_protocol *inet_protos[MAX_INET_PROTOS]; extern const struct net_protocol *inet_protos[MAX_INET_PROTOS]; #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) extern struct inet6_protocol *inet6_protos[MAX_INET_PROTOS]; #endif extern int inet_add_protocol(struct net_protocol *prot, unsigned char num); extern int inet_del_protocol(struct net_protocol *prot, unsigned char num); extern int inet_add_protocol(const struct net_protocol *prot, unsigned char num); extern int inet_del_protocol(const struct net_protocol *prot, unsigned char num); extern void inet_register_protosw(struct inet_protosw *p); extern void inet_unregister_protosw(struct inet_protosw *p); Loading
net/dccp/ipv4.c +1 −1 Original line number Diff line number Diff line Loading @@ -948,7 +948,7 @@ static struct proto dccp_v4_prot = { #endif }; static struct net_protocol dccp_v4_protocol = { static const struct net_protocol dccp_v4_protocol = { .handler = dccp_v4_rcv, .err_handler = dccp_v4_err, .no_policy = 1, Loading
net/ipv4/af_inet.c +9 −9 Original line number Diff line number Diff line Loading @@ -244,7 +244,7 @@ EXPORT_SYMBOL(build_ehash_secret); static inline int inet_netns_ok(struct net *net, int protocol) { int hash; struct net_protocol *ipprot; const struct net_protocol *ipprot; if (net_eq(net, &init_net)) return 1; Loading Loading @@ -1162,7 +1162,7 @@ EXPORT_SYMBOL(inet_sk_rebuild_header); static int inet_gso_send_check(struct sk_buff *skb) { struct iphdr *iph; struct net_protocol *ops; const struct net_protocol *ops; int proto; int ihl; int err = -EINVAL; Loading Loading @@ -1198,7 +1198,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) { struct sk_buff *segs = ERR_PTR(-EINVAL); struct iphdr *iph; struct net_protocol *ops; const struct net_protocol *ops; int proto; int ihl; int id; Loading Loading @@ -1265,7 +1265,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) static struct sk_buff **inet_gro_receive(struct sk_buff **head, struct sk_buff *skb) { struct net_protocol *ops; const struct net_protocol *ops; struct sk_buff **pp = NULL; struct sk_buff *p; struct iphdr *iph; Loading Loading @@ -1342,7 +1342,7 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head, static int inet_gro_complete(struct sk_buff *skb) { struct net_protocol *ops; const struct net_protocol *ops; struct iphdr *iph = ip_hdr(skb); int proto = iph->protocol & (MAX_INET_PROTOS - 1); int err = -ENOSYS; Loading Loading @@ -1427,13 +1427,13 @@ void snmp_mib_free(void *ptr[2]) EXPORT_SYMBOL_GPL(snmp_mib_free); #ifdef CONFIG_IP_MULTICAST static struct net_protocol igmp_protocol = { static const struct net_protocol igmp_protocol = { .handler = igmp_rcv, .netns_ok = 1, }; #endif static struct net_protocol tcp_protocol = { static const struct net_protocol tcp_protocol = { .handler = tcp_v4_rcv, .err_handler = tcp_v4_err, .gso_send_check = tcp_v4_gso_send_check, Loading @@ -1444,7 +1444,7 @@ static struct net_protocol tcp_protocol = { .netns_ok = 1, }; static struct net_protocol udp_protocol = { static const struct net_protocol udp_protocol = { .handler = udp_rcv, .err_handler = udp_err, .gso_send_check = udp4_ufo_send_check, Loading @@ -1453,7 +1453,7 @@ static struct net_protocol udp_protocol = { .netns_ok = 1, }; static struct net_protocol icmp_protocol = { static const struct net_protocol icmp_protocol = { .handler = icmp_rcv, .no_policy = 1, .netns_ok = 1, Loading
net/ipv4/ah4.c +1 −1 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ static const struct xfrm_type ah_type = .output = ah_output }; static struct net_protocol ah4_protocol = { static const struct net_protocol ah4_protocol = { .handler = xfrm4_rcv, .err_handler = ah4_err, .no_policy = 1, Loading
net/ipv4/esp4.c +1 −1 Original line number Diff line number Diff line Loading @@ -615,7 +615,7 @@ static const struct xfrm_type esp_type = .output = esp_output }; static struct net_protocol esp4_protocol = { static const struct net_protocol esp4_protocol = { .handler = xfrm4_rcv, .err_handler = esp4_err, .no_policy = 1, Loading