aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-04-22 00:53:02 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-22 14:04:14 -0400
commitb71d1d426d263b0b6cb5760322efebbfc89d4463 (patch)
tree226ca7390bd6187ec9139d2ccedd26fd94d8e57a /net/ipv6/ip6_fib.c
parent5f8629c526b4f7e529a6d27bbd802c0dc7fcc357 (diff)
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>
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 7548905e79e1..dd88df0a5d7f 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -134,9 +134,9 @@ static __inline__ u32 fib6_new_sernum(void)
134# define BITOP_BE32_SWIZZLE 0 134# define BITOP_BE32_SWIZZLE 0
135#endif 135#endif
136 136
137static __inline__ __be32 addr_bit_set(void *token, int fn_bit) 137static __inline__ __be32 addr_bit_set(const void *token, int fn_bit)
138{ 138{
139 __be32 *addr = token; 139 const __be32 *addr = token;
140 /* 140 /*
141 * Here, 141 * Here,
142 * 1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f) 142 * 1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)
@@ -822,7 +822,7 @@ st_failure:
822 822
823struct lookup_args { 823struct lookup_args {
824 int offset; /* key offset on rt6_info */ 824 int offset; /* key offset on rt6_info */
825 struct in6_addr *addr; /* search key */ 825 const struct in6_addr *addr; /* search key */
826}; 826};
827 827
828static struct fib6_node * fib6_lookup_1(struct fib6_node *root, 828static struct fib6_node * fib6_lookup_1(struct fib6_node *root,
@@ -881,8 +881,8 @@ static struct fib6_node * fib6_lookup_1(struct fib6_node *root,
881 return NULL; 881 return NULL;
882} 882}
883 883
884struct fib6_node * fib6_lookup(struct fib6_node *root, struct in6_addr *daddr, 884struct fib6_node * fib6_lookup(struct fib6_node *root, const struct in6_addr *daddr,
885 struct in6_addr *saddr) 885 const struct in6_addr *saddr)
886{ 886{
887 struct fib6_node *fn; 887 struct fib6_node *fn;
888 struct lookup_args args[] = { 888 struct lookup_args args[] = {
@@ -916,7 +916,7 @@ struct fib6_node * fib6_lookup(struct fib6_node *root, struct in6_addr *daddr,
916 916
917 917
918static struct fib6_node * fib6_locate_1(struct fib6_node *root, 918static struct fib6_node * fib6_locate_1(struct fib6_node *root,
919 struct in6_addr *addr, 919 const struct in6_addr *addr,
920 int plen, int offset) 920 int plen, int offset)
921{ 921{
922 struct fib6_node *fn; 922 struct fib6_node *fn;
@@ -946,8 +946,8 @@ static struct fib6_node * fib6_locate_1(struct fib6_node *root,
946} 946}
947 947
948struct fib6_node * fib6_locate(struct fib6_node *root, 948struct fib6_node * fib6_locate(struct fib6_node *root,
949 struct in6_addr *daddr, int dst_len, 949 const struct in6_addr *daddr, int dst_len,
950 struct in6_addr *saddr, int src_len) 950 const struct in6_addr *saddr, int src_len)
951{ 951{
952 struct fib6_node *fn; 952 struct fib6_node *fn;
953 953