diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-10 02:42:10 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-12 00:43:18 -0400 |
commit | 9acd9f3ae92d0dc0ca7504fb48c1040e8bbc39fe (patch) | |
tree | 8438f08bc6b8642d1d373f07607e8e117e01aaa6 /include/net | |
parent | dfd982baff01c18e3e1717c97fdac79c28f105ce (diff) |
[IPV6]: Make address arguments const.
- net/ipv6/addrconf.c:
ipv6_get_ifaddr(), ipv6_dev_get_saddr()
- net/ipv6/mcast.c:
ipv6_sock_mc_join(), ipv6_sock_mc_drop(),
inet6_mc_check(),
ipv6_dev_mc_inc(), __ipv6_dev_mc_dec(), ipv6_dev_mc_dec(),
ipv6_chk_mcast_addr()
- net/ipv6/route.c:
rt6_lookup(), icmp6_dst_alloc()
- net/ipv6/ip6_output.c:
ip6_nd_hdr()
- net/ipv6/ndisc.c:
ndisc_send_ns(), ndisc_send_rs(), ndisc_send_redirect(),
ndisc_get_neigh(), __ndisc_send()
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/addrconf.h | 28 | ||||
-rw-r--r-- | include/net/ip6_route.h | 6 | ||||
-rw-r--r-- | include/net/ipv6.h | 4 | ||||
-rw-r--r-- | include/net/ndisc.h | 14 |
4 files changed, 27 insertions, 25 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 8317c1bcd86c..92af23d66eb9 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -76,12 +76,12 @@ extern int ipv6_chk_prefix(struct in6_addr *addr, | |||
76 | struct net_device *dev); | 76 | struct net_device *dev); |
77 | 77 | ||
78 | extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, | 78 | extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, |
79 | struct in6_addr *addr, | 79 | const struct in6_addr *addr, |
80 | struct net_device *dev, | 80 | struct net_device *dev, |
81 | int strict); | 81 | int strict); |
82 | 82 | ||
83 | extern int ipv6_dev_get_saddr(struct net_device *dev, | 83 | extern int ipv6_dev_get_saddr(struct net_device *dev, |
84 | struct in6_addr *daddr, | 84 | const struct in6_addr *daddr, |
85 | unsigned int srcprefs, | 85 | unsigned int srcprefs, |
86 | struct in6_addr *saddr); | 86 | struct in6_addr *saddr); |
87 | extern int ipv6_get_lladdr(struct net_device *dev, | 87 | extern int ipv6_get_lladdr(struct net_device *dev, |
@@ -105,25 +105,27 @@ extern u32 ipv6_addr_label(const struct in6_addr *addr, | |||
105 | /* | 105 | /* |
106 | * multicast prototypes (mcast.c) | 106 | * multicast prototypes (mcast.c) |
107 | */ | 107 | */ |
108 | extern int ipv6_sock_mc_join(struct sock *sk, int ifindex, | 108 | extern int ipv6_sock_mc_join(struct sock *sk, int ifindex, |
109 | struct in6_addr *addr); | 109 | const struct in6_addr *addr); |
110 | extern int ipv6_sock_mc_drop(struct sock *sk, int ifindex, | 110 | extern int ipv6_sock_mc_drop(struct sock *sk, int ifindex, |
111 | struct in6_addr *addr); | 111 | const struct in6_addr *addr); |
112 | extern void ipv6_sock_mc_close(struct sock *sk); | 112 | extern void ipv6_sock_mc_close(struct sock *sk); |
113 | extern int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr, | 113 | extern int inet6_mc_check(struct sock *sk, |
114 | struct in6_addr *src_addr); | 114 | const struct in6_addr *mc_addr, |
115 | const struct in6_addr *src_addr); | ||
115 | 116 | ||
116 | extern int ipv6_dev_mc_inc(struct net_device *dev, struct in6_addr *addr); | 117 | extern int ipv6_dev_mc_inc(struct net_device *dev, const struct in6_addr *addr); |
117 | extern int __ipv6_dev_mc_dec(struct inet6_dev *idev, struct in6_addr *addr); | 118 | extern int __ipv6_dev_mc_dec(struct inet6_dev *idev, const struct in6_addr *addr); |
118 | extern int ipv6_dev_mc_dec(struct net_device *dev, struct in6_addr *addr); | 119 | extern int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr); |
119 | extern void ipv6_mc_up(struct inet6_dev *idev); | 120 | extern void ipv6_mc_up(struct inet6_dev *idev); |
120 | extern void ipv6_mc_down(struct inet6_dev *idev); | 121 | extern void ipv6_mc_down(struct inet6_dev *idev); |
121 | extern void ipv6_mc_init_dev(struct inet6_dev *idev); | 122 | extern void ipv6_mc_init_dev(struct inet6_dev *idev); |
122 | extern void ipv6_mc_destroy_dev(struct inet6_dev *idev); | 123 | extern void ipv6_mc_destroy_dev(struct inet6_dev *idev); |
123 | extern void addrconf_dad_failure(struct inet6_ifaddr *ifp); | 124 | extern void addrconf_dad_failure(struct inet6_ifaddr *ifp); |
124 | 125 | ||
125 | extern int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group, | 126 | extern int ipv6_chk_mcast_addr(struct net_device *dev, |
126 | struct in6_addr *src_addr); | 127 | const struct in6_addr *group, |
128 | const struct in6_addr *src_addr); | ||
127 | extern int ipv6_is_mld(struct sk_buff *skb, int nexthdr); | 129 | extern int ipv6_is_mld(struct sk_buff *skb, int nexthdr); |
128 | 130 | ||
129 | extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len); | 131 | extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len); |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 9080076ce0e5..9313491e3dad 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -61,13 +61,13 @@ extern int ip6_ins_rt(struct rt6_info *); | |||
61 | extern int ip6_del_rt(struct rt6_info *); | 61 | extern int ip6_del_rt(struct rt6_info *); |
62 | 62 | ||
63 | extern struct rt6_info *rt6_lookup(struct net *net, | 63 | extern struct rt6_info *rt6_lookup(struct net *net, |
64 | struct in6_addr *daddr, | 64 | const struct in6_addr *daddr, |
65 | struct in6_addr *saddr, | 65 | const struct in6_addr *saddr, |
66 | int oif, int flags); | 66 | int oif, int flags); |
67 | 67 | ||
68 | extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, | 68 | extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, |
69 | struct neighbour *neigh, | 69 | struct neighbour *neigh, |
70 | struct in6_addr *addr); | 70 | const struct in6_addr *addr); |
71 | extern int icmp6_dst_gc(int *more); | 71 | extern int icmp6_dst_gc(int *more); |
72 | 72 | ||
73 | extern void fib6_force_start_gc(struct net *net); | 73 | extern void fib6_force_start_gc(struct net *net); |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index a0c285b6311e..49c48983019f 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -451,8 +451,8 @@ extern int ip6_xmit(struct sock *sk, | |||
451 | extern int ip6_nd_hdr(struct sock *sk, | 451 | extern int ip6_nd_hdr(struct sock *sk, |
452 | struct sk_buff *skb, | 452 | struct sk_buff *skb, |
453 | struct net_device *dev, | 453 | struct net_device *dev, |
454 | struct in6_addr *saddr, | 454 | const struct in6_addr *saddr, |
455 | struct in6_addr *daddr, | 455 | const struct in6_addr *daddr, |
456 | int proto, int len); | 456 | int proto, int len); |
457 | 457 | ||
458 | extern int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); | 458 | extern int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 16424236fe2f..9c451ff2f4f4 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -94,17 +94,17 @@ extern int ndisc_rcv(struct sk_buff *skb); | |||
94 | 94 | ||
95 | extern void ndisc_send_ns(struct net_device *dev, | 95 | extern void ndisc_send_ns(struct net_device *dev, |
96 | struct neighbour *neigh, | 96 | struct neighbour *neigh, |
97 | struct in6_addr *solicit, | 97 | const struct in6_addr *solicit, |
98 | struct in6_addr *daddr, | 98 | const struct in6_addr *daddr, |
99 | struct in6_addr *saddr); | 99 | const struct in6_addr *saddr); |
100 | 100 | ||
101 | extern void ndisc_send_rs(struct net_device *dev, | 101 | extern void ndisc_send_rs(struct net_device *dev, |
102 | struct in6_addr *saddr, | 102 | const struct in6_addr *saddr, |
103 | struct in6_addr *daddr); | 103 | const struct in6_addr *daddr); |
104 | 104 | ||
105 | extern void ndisc_send_redirect(struct sk_buff *skb, | 105 | extern void ndisc_send_redirect(struct sk_buff *skb, |
106 | struct neighbour *neigh, | 106 | struct neighbour *neigh, |
107 | struct in6_addr *target); | 107 | const struct in6_addr *target); |
108 | 108 | ||
109 | extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir); | 109 | extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir); |
110 | 110 | ||
@@ -134,7 +134,7 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, | |||
134 | extern void inet6_ifinfo_notify(int event, | 134 | extern void inet6_ifinfo_notify(int event, |
135 | struct inet6_dev *idev); | 135 | struct inet6_dev *idev); |
136 | 136 | ||
137 | static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, struct in6_addr *addr) | 137 | static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, const struct in6_addr *addr) |
138 | { | 138 | { |
139 | 139 | ||
140 | if (dev) | 140 | if (dev) |