Commit ad520964 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[XFRM]: Mark some functions/data static.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 38e36e2f
...@@ -848,8 +848,6 @@ static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsig ...@@ -848,8 +848,6 @@ static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsig
#endif #endif
void xfrm_policy_init(void); void xfrm_policy_init(void);
void xfrm4_policy_init(void);
void xfrm6_policy_init(void);
struct xfrm_policy *xfrm_policy_alloc(int gfp); struct xfrm_policy *xfrm_policy_alloc(int gfp);
extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *); extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *);
int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl);
......
...@@ -116,7 +116,7 @@ static int ah_output(struct sk_buff *skb) ...@@ -116,7 +116,7 @@ static int ah_output(struct sk_buff *skb)
return err; return err;
} }
int ah_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) static int ah_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb)
{ {
int ah_hlen; int ah_hlen;
struct iphdr *iph; struct iphdr *iph;
...@@ -184,7 +184,7 @@ int ah_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buf ...@@ -184,7 +184,7 @@ int ah_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buf
return -EINVAL; return -EINVAL;
} }
void ah4_err(struct sk_buff *skb, u32 info) static void ah4_err(struct sk_buff *skb, u32 info)
{ {
struct iphdr *iph = (struct iphdr*)skb->data; struct iphdr *iph = (struct iphdr*)skb->data;
struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+(iph->ihl<<2)); struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+(iph->ihl<<2));
......
...@@ -17,7 +17,7 @@ struct esp_decap_data { ...@@ -17,7 +17,7 @@ struct esp_decap_data {
__u8 proto; __u8 proto;
}; };
int esp_output(struct sk_buff *skb) static int esp_output(struct sk_buff *skb)
{ {
int err; int err;
struct dst_entry *dst = skb->dst; struct dst_entry *dst = skb->dst;
...@@ -139,7 +139,7 @@ int esp_output(struct sk_buff *skb) ...@@ -139,7 +139,7 @@ int esp_output(struct sk_buff *skb)
* expensive, so we only support truncated data, which is the recommended * expensive, so we only support truncated data, which is the recommended
* and common case. * and common case.
*/ */
int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) static int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb)
{ {
struct iphdr *iph; struct iphdr *iph;
struct ip_esp_hdr *esph; struct ip_esp_hdr *esph;
...@@ -246,7 +246,7 @@ int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_bu ...@@ -246,7 +246,7 @@ int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_bu
return -EINVAL; return -EINVAL;
} }
int esp_post_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) static int esp_post_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb)
{ {
if (x->encap) { if (x->encap) {
...@@ -320,7 +320,7 @@ static u32 esp4_get_max_size(struct xfrm_state *x, int mtu) ...@@ -320,7 +320,7 @@ static u32 esp4_get_max_size(struct xfrm_state *x, int mtu)
return mtu + x->props.header_len + esp->auth.icv_trunc_len; return mtu + x->props.header_len + esp->auth.icv_trunc_len;
} }
void esp4_err(struct sk_buff *skb, u32 info) static void esp4_err(struct sk_buff *skb, u32 info)
{ {
struct iphdr *iph = (struct iphdr*)skb->data; struct iphdr *iph = (struct iphdr*)skb->data;
struct ip_esp_hdr *esph = (struct ip_esp_hdr*)(skb->data+(iph->ihl<<2)); struct ip_esp_hdr *esph = (struct ip_esp_hdr*)(skb->data+(iph->ihl<<2));
...@@ -338,7 +338,7 @@ void esp4_err(struct sk_buff *skb, u32 info) ...@@ -338,7 +338,7 @@ void esp4_err(struct sk_buff *skb, u32 info)
xfrm_state_put(x); xfrm_state_put(x);
} }
void esp_destroy(struct xfrm_state *x) static void esp_destroy(struct xfrm_state *x)
{ {
struct esp_data *esp = x->data; struct esp_data *esp = x->data;
...@@ -364,7 +364,7 @@ void esp_destroy(struct xfrm_state *x) ...@@ -364,7 +364,7 @@ void esp_destroy(struct xfrm_state *x)
kfree(esp); kfree(esp);
} }
int esp_init_state(struct xfrm_state *x, void *args) static int esp_init_state(struct xfrm_state *x, void *args)
{ {
struct esp_data *esp = NULL; struct esp_data *esp = NULL;
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include <net/xfrm.h> #include <net/xfrm.h>
#include <net/ip.h> #include <net/ip.h>
extern struct dst_ops xfrm4_dst_ops; static struct dst_ops xfrm4_dst_ops;
extern struct xfrm_policy_afinfo xfrm4_policy_afinfo; static struct xfrm_policy_afinfo xfrm4_policy_afinfo;
static struct xfrm_type_map xfrm4_type_map = { .lock = RW_LOCK_UNLOCKED }; static struct xfrm_type_map xfrm4_type_map = { .lock = RW_LOCK_UNLOCKED };
...@@ -243,7 +243,7 @@ static void xfrm4_update_pmtu(struct dst_entry *dst, u32 mtu) ...@@ -243,7 +243,7 @@ static void xfrm4_update_pmtu(struct dst_entry *dst, u32 mtu)
path->ops->update_pmtu(path, mtu); path->ops->update_pmtu(path, mtu);
} }
struct dst_ops xfrm4_dst_ops = { static struct dst_ops xfrm4_dst_ops = {
.family = AF_INET, .family = AF_INET,
.protocol = __constant_htons(ETH_P_IP), .protocol = __constant_htons(ETH_P_IP),
.gc = xfrm4_garbage_collect, .gc = xfrm4_garbage_collect,
...@@ -252,7 +252,7 @@ struct dst_ops xfrm4_dst_ops = { ...@@ -252,7 +252,7 @@ struct dst_ops xfrm4_dst_ops = {
.entry_size = sizeof(struct xfrm_dst), .entry_size = sizeof(struct xfrm_dst),
}; };
struct xfrm_policy_afinfo xfrm4_policy_afinfo = { static struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
.family = AF_INET, .family = AF_INET,
.lock = RW_LOCK_UNLOCKED, .lock = RW_LOCK_UNLOCKED,
.type_map = &xfrm4_type_map, .type_map = &xfrm4_type_map,
...@@ -263,12 +263,12 @@ struct xfrm_policy_afinfo xfrm4_policy_afinfo = { ...@@ -263,12 +263,12 @@ struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
.decode_session = _decode_session4, .decode_session = _decode_session4,
}; };
void __init xfrm4_policy_init(void) static void __init xfrm4_policy_init(void)
{ {
xfrm_policy_register_afinfo(&xfrm4_policy_afinfo); xfrm_policy_register_afinfo(&xfrm4_policy_afinfo);
} }
void __exit xfrm4_policy_fini(void) static void __exit xfrm4_policy_fini(void)
{ {
xfrm_policy_unregister_afinfo(&xfrm4_policy_afinfo); xfrm_policy_unregister_afinfo(&xfrm4_policy_afinfo);
} }
......
...@@ -154,7 +154,7 @@ static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len) ...@@ -154,7 +154,7 @@ static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len)
return 0; return 0;
} }
int ah6_output(struct sk_buff *skb) static int ah6_output(struct sk_buff *skb)
{ {
int err; int err;
int extlen; int extlen;
...@@ -229,7 +229,7 @@ int ah6_output(struct sk_buff *skb) ...@@ -229,7 +229,7 @@ int ah6_output(struct sk_buff *skb)
return err; return err;
} }
int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) static int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb)
{ {
/* /*
* Before process AH * Before process AH
...@@ -319,8 +319,8 @@ int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_bu ...@@ -319,8 +319,8 @@ int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_bu
return -EINVAL; return -EINVAL;
} }
void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
int type, int code, int offset, __u32 info) int type, int code, int offset, __u32 info)
{ {
struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; struct ipv6hdr *iph = (struct ipv6hdr*)skb->data;
struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+offset); struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+offset);
...@@ -448,7 +448,7 @@ static struct inet6_protocol ah6_protocol = { ...@@ -448,7 +448,7 @@ static struct inet6_protocol ah6_protocol = {
.flags = INET6_PROTO_NOPOLICY, .flags = INET6_PROTO_NOPOLICY,
}; };
int __init ah6_init(void) static int __init ah6_init(void)
{ {
if (xfrm_register_type(&ah6_type, AF_INET6) < 0) { if (xfrm_register_type(&ah6_type, AF_INET6) < 0) {
printk(KERN_INFO "ipv6 ah init: can't add xfrm type\n"); printk(KERN_INFO "ipv6 ah init: can't add xfrm type\n");
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <net/ipv6.h> #include <net/ipv6.h>
#include <linux/icmpv6.h> #include <linux/icmpv6.h>
int esp6_output(struct sk_buff *skb) static int esp6_output(struct sk_buff *skb)
{ {
int err; int err;
int hdr_len; int hdr_len;
...@@ -129,7 +129,7 @@ int esp6_output(struct sk_buff *skb) ...@@ -129,7 +129,7 @@ int esp6_output(struct sk_buff *skb)
return err; return err;
} }
int esp6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb) static int esp6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buff *skb)
{ {
struct ipv6hdr *iph; struct ipv6hdr *iph;
struct ipv6_esp_hdr *esph; struct ipv6_esp_hdr *esph;
...@@ -252,8 +252,8 @@ static u32 esp6_get_max_size(struct xfrm_state *x, int mtu) ...@@ -252,8 +252,8 @@ static u32 esp6_get_max_size(struct xfrm_state *x, int mtu)
return mtu + x->props.header_len + esp->auth.icv_full_len; return mtu + x->props.header_len + esp->auth.icv_full_len;
} }
void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
int type, int code, int offset, __u32 info) int type, int code, int offset, __u32 info)
{ {
struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; struct ipv6hdr *iph = (struct ipv6hdr*)skb->data;
struct ipv6_esp_hdr *esph = (struct ipv6_esp_hdr*)(skb->data+offset); struct ipv6_esp_hdr *esph = (struct ipv6_esp_hdr*)(skb->data+offset);
...@@ -272,7 +272,7 @@ void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -272,7 +272,7 @@ void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
xfrm_state_put(x); xfrm_state_put(x);
} }
void esp6_destroy(struct xfrm_state *x) static void esp6_destroy(struct xfrm_state *x)
{ {
struct esp_data *esp = x->data; struct esp_data *esp = x->data;
...@@ -298,7 +298,7 @@ void esp6_destroy(struct xfrm_state *x) ...@@ -298,7 +298,7 @@ void esp6_destroy(struct xfrm_state *x)
kfree(esp); kfree(esp);
} }
int esp6_init_state(struct xfrm_state *x, void *args) static int esp6_init_state(struct xfrm_state *x, void *args)
{ {
struct esp_data *esp = NULL; struct esp_data *esp = NULL;
...@@ -402,7 +402,7 @@ static struct inet6_protocol esp6_protocol = { ...@@ -402,7 +402,7 @@ static struct inet6_protocol esp6_protocol = {
.flags = INET6_PROTO_NOPOLICY, .flags = INET6_PROTO_NOPOLICY,
}; };
int __init esp6_init(void) static int __init esp6_init(void)
{ {
if (xfrm_register_type(&esp6_type, AF_INET6) < 0) { if (xfrm_register_type(&esp6_type, AF_INET6) < 0) {
printk(KERN_INFO "ipv6 esp init: can't add xfrm type\n"); printk(KERN_INFO "ipv6 esp init: can't add xfrm type\n");
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
#include <net/ipv6.h> #include <net/ipv6.h>
#include <net/ip6_route.h> #include <net/ip6_route.h>
extern struct dst_ops xfrm6_dst_ops; static struct dst_ops xfrm6_dst_ops;
extern struct xfrm_policy_afinfo xfrm6_policy_afinfo; static struct xfrm_policy_afinfo xfrm6_policy_afinfo;
static struct xfrm_type_map xfrm6_type_map = { .lock = RW_LOCK_UNLOCKED }; static struct xfrm_type_map xfrm6_type_map = { .lock = RW_LOCK_UNLOCKED };
int xfrm6_dst_lookup(struct xfrm_dst **dst, struct flowi *fl) static int xfrm6_dst_lookup(struct xfrm_dst **dst, struct flowi *fl)
{ {
int err = 0; int err = 0;
*dst = (struct xfrm_dst*)ip6_route_output(NULL, fl); *dst = (struct xfrm_dst*)ip6_route_output(NULL, fl);
...@@ -253,7 +253,7 @@ static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu) ...@@ -253,7 +253,7 @@ static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu)
return; return;
} }
struct dst_ops xfrm6_dst_ops = { static struct dst_ops xfrm6_dst_ops = {
.family = AF_INET6, .family = AF_INET6,
.protocol = __constant_htons(ETH_P_IPV6), .protocol = __constant_htons(ETH_P_IPV6),
.gc = xfrm6_garbage_collect, .gc = xfrm6_garbage_collect,
...@@ -262,7 +262,7 @@ struct dst_ops xfrm6_dst_ops = { ...@@ -262,7 +262,7 @@ struct dst_ops xfrm6_dst_ops = {
.entry_size = sizeof(struct xfrm_dst), .entry_size = sizeof(struct xfrm_dst),
}; };
struct xfrm_policy_afinfo xfrm6_policy_afinfo = { static struct xfrm_policy_afinfo xfrm6_policy_afinfo = {
.family = AF_INET6, .family = AF_INET6,
.lock = RW_LOCK_UNLOCKED, .lock = RW_LOCK_UNLOCKED,
.type_map = &xfrm6_type_map, .type_map = &xfrm6_type_map,
...@@ -273,12 +273,12 @@ struct xfrm_policy_afinfo xfrm6_policy_afinfo = { ...@@ -273,12 +273,12 @@ struct xfrm_policy_afinfo xfrm6_policy_afinfo = {
.decode_session = _decode_session6, .decode_session = _decode_session6,
}; };
void __init xfrm6_policy_init(void) static void __init xfrm6_policy_init(void)
{ {
xfrm_policy_register_afinfo(&xfrm6_policy_afinfo); xfrm_policy_register_afinfo(&xfrm6_policy_afinfo);
} }
void __exit xfrm6_policy_fini(void) static void __exit xfrm6_policy_fini(void)
{ {
xfrm_policy_unregister_afinfo(&xfrm6_policy_afinfo); xfrm_policy_unregister_afinfo(&xfrm6_policy_afinfo);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment