inet: constify ip headers and in6_addr
Add const qualifiers to structs iphdr, ipv6hdr and in6_addr pointers where possible, to make code intention more obvious. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
5f8629c526
commit
b71d1d426d
@@ -61,16 +61,16 @@ extern int addrconf_set_dstaddr(struct net *net,
|
||||
void __user *arg);
|
||||
|
||||
extern int ipv6_chk_addr(struct net *net,
|
||||
struct in6_addr *addr,
|
||||
const struct in6_addr *addr,
|
||||
struct net_device *dev,
|
||||
int strict);
|
||||
|
||||
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
|
||||
extern int ipv6_chk_home_addr(struct net *net,
|
||||
struct in6_addr *addr);
|
||||
const struct in6_addr *addr);
|
||||
#endif
|
||||
|
||||
extern int ipv6_chk_prefix(struct in6_addr *addr,
|
||||
extern int ipv6_chk_prefix(const struct in6_addr *addr,
|
||||
struct net_device *dev);
|
||||
|
||||
extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net,
|
||||
@@ -89,9 +89,9 @@ extern int ipv6_get_lladdr(struct net_device *dev,
|
||||
extern int ipv6_rcv_saddr_equal(const struct sock *sk,
|
||||
const struct sock *sk2);
|
||||
extern void addrconf_join_solict(struct net_device *dev,
|
||||
struct in6_addr *addr);
|
||||
const struct in6_addr *addr);
|
||||
extern void addrconf_leave_solict(struct inet6_dev *idev,
|
||||
struct in6_addr *addr);
|
||||
const struct in6_addr *addr);
|
||||
|
||||
static inline unsigned long addrconf_timeout_fixup(u32 timeout,
|
||||
unsigned unit)
|
||||
@@ -158,15 +158,15 @@ extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len);
|
||||
/*
|
||||
* anycast prototypes (anycast.c)
|
||||
*/
|
||||
extern int ipv6_sock_ac_join(struct sock *sk,int ifindex,struct in6_addr *addr);
|
||||
extern int ipv6_sock_ac_drop(struct sock *sk,int ifindex,struct in6_addr *addr);
|
||||
extern int ipv6_sock_ac_join(struct sock *sk,int ifindex, const struct in6_addr *addr);
|
||||
extern int ipv6_sock_ac_drop(struct sock *sk,int ifindex, const struct in6_addr *addr);
|
||||
extern void ipv6_sock_ac_close(struct sock *sk);
|
||||
extern int inet6_ac_check(struct sock *sk, struct in6_addr *addr, int ifindex);
|
||||
extern int inet6_ac_check(struct sock *sk, const struct in6_addr *addr, int ifindex);
|
||||
|
||||
extern int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr);
|
||||
extern int __ipv6_dev_ac_dec(struct inet6_dev *idev, struct in6_addr *addr);
|
||||
extern int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr);
|
||||
extern int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr);
|
||||
extern int ipv6_chk_acast_addr(struct net *net, struct net_device *dev,
|
||||
struct in6_addr *addr);
|
||||
const struct in6_addr *addr);
|
||||
|
||||
|
||||
/* Device notifier */
|
||||
|
Reference in New Issue
Block a user