diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-04-22 00:53:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-22 14:04:14 -0400 |
commit | b71d1d426d263b0b6cb5760322efebbfc89d4463 (patch) | |
tree | 226ca7390bd6187ec9139d2ccedd26fd94d8e57a /include/net/xfrm.h | |
parent | 5f8629c526b4f7e529a6d27bbd802c0dc7fcc357 (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 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 65ea31348631..1cdd4b7b2861 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1475,7 +1475,7 @@ extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, | |||
1475 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family); | 1475 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family); |
1476 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family); | 1476 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family); |
1477 | extern __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr); | 1477 | extern __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr); |
1478 | extern __be32 xfrm6_tunnel_spi_lookup(struct net *net, xfrm_address_t *saddr); | 1478 | extern __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr); |
1479 | extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb); | 1479 | extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb); |
1480 | extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb); | 1480 | extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb); |
1481 | extern int xfrm6_output(struct sk_buff *skb); | 1481 | extern int xfrm6_output(struct sk_buff *skb); |
@@ -1569,8 +1569,8 @@ static inline int xfrm_addr_cmp(const xfrm_address_t *a, | |||
1569 | case AF_INET: | 1569 | case AF_INET: |
1570 | return (__force u32)a->a4 - (__force u32)b->a4; | 1570 | return (__force u32)a->a4 - (__force u32)b->a4; |
1571 | case AF_INET6: | 1571 | case AF_INET6: |
1572 | return ipv6_addr_cmp((struct in6_addr *)a, | 1572 | return ipv6_addr_cmp((const struct in6_addr *)a, |
1573 | (struct in6_addr *)b); | 1573 | (const struct in6_addr *)b); |
1574 | } | 1574 | } |
1575 | } | 1575 | } |
1576 | 1576 | ||