diff options
| author | Hideaki Yoshifuji <yoshfuji@linux-ipv6.org> | 2003-03-23 05:38:47 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2003-03-23 05:38:47 -0800 |
| commit | 5123f71c09e894812d1065290151073f0f952e96 (patch) | |
| tree | f8d77de163e0773d1133dfcccf11fcee9ff89850 /include/net | |
| parent | f05cd468a4c2f13f4b73529d7dd097ed1f62e4db (diff) | |
[IPV6]: Use "const" qualifier.
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/addrconf.h | 6 | ||||
| -rw-r--r-- | include/net/ipv6.h | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 1da77eae6a9b..3a63c42022cf 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -175,7 +175,7 @@ extern void addrconf_forwarding_on(void); * Hash function taken from net_alias.c */ -static __inline__ u8 ipv6_addr_hash(struct in6_addr *addr) +static __inline__ u8 ipv6_addr_hash(const struct in6_addr *addr) { __u32 word; @@ -195,7 +195,7 @@ static __inline__ u8 ipv6_addr_hash(struct in6_addr *addr) * compute link-local solicited-node multicast address */ -static inline void addrconf_addr_solict_mult(struct in6_addr *addr, +static inline void addrconf_addr_solict_mult(const struct in6_addr *addr, struct in6_addr *solicited) { ipv6_addr_set(solicited, @@ -219,7 +219,7 @@ static inline void ipv6_addr_all_routers(struct in6_addr *addr) __constant_htonl(0x2)); } -static inline int ipv6_addr_is_multicast(struct in6_addr *addr) +static inline int ipv6_addr_is_multicast(const struct in6_addr *addr) { return (addr->s6_addr32[0] & __constant_htonl(0xFF000000)) == __constant_htonl(0xFF000000); } diff --git a/include/net/ipv6.h b/include/net/ipv6.h index d79e71e13394..627e2a68b4c5 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -222,21 +222,21 @@ typedef int (*inet_getfrag_t) (const void *data, unsigned int, unsigned int); -extern int ipv6_addr_type(struct in6_addr *addr); +extern int ipv6_addr_type(const struct in6_addr *addr); -static inline int ipv6_addr_scope(struct in6_addr *addr) +static inline int ipv6_addr_scope(const struct in6_addr *addr) { return ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK; } -static inline int ipv6_addr_cmp(struct in6_addr *a1, struct in6_addr *a2) +static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2) { - return memcmp((void *) a1, (void *) a2, sizeof(struct in6_addr)); + return memcmp((const void *) a1, (const void *) a2, sizeof(struct in6_addr)); } -static inline void ipv6_addr_copy(struct in6_addr *a1, struct in6_addr *a2) +static inline void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2) { - memcpy((void *) a1, (void *) a2, sizeof(struct in6_addr)); + memcpy((void *) a1, (const void *) a2, sizeof(struct in6_addr)); } #ifndef __HAVE_ARCH_ADDR_SET @@ -251,7 +251,7 @@ static inline void ipv6_addr_set(struct in6_addr *addr, } #endif -static inline int ipv6_addr_any(struct in6_addr *a) +static inline int ipv6_addr_any(const struct in6_addr *a) { return ((a->s6_addr32[0] | a->s6_addr32[1] | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); |
