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
#endif
void xfrm_policy_init(void);
void xfrm4_policy_init(void);
void xfrm6_policy_init(void);
struct xfrm_policy *xfrm_policy_alloc(int gfp);
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);
......
......@@ -116,7 +116,7 @@ static int ah_output(struct sk_buff *skb)
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;
struct iphdr *iph;
......@@ -184,7 +184,7 @@ int ah_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_buf
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 ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+(iph->ihl<<2));
......
......@@ -17,7 +17,7 @@ struct esp_decap_data {
__u8 proto;
};
int esp_output(struct sk_buff *skb)
static int esp_output(struct sk_buff *skb)
{
int err;
struct dst_entry *dst = skb->dst;
......@@ -139,7 +139,7 @@ int esp_output(struct sk_buff *skb)
* expensive, so we only support truncated data, which is the recommended
* 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 ip_esp_hdr *esph;
......@@ -246,7 +246,7 @@ int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_bu
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) {
......@@ -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;
}
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 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)
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;
......@@ -364,7 +364,7 @@ void esp_destroy(struct xfrm_state *x)
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;
......
......@@ -12,8 +12,8 @@
#include <net/xfrm.h>
#include <net/ip.h>
extern struct dst_ops xfrm4_dst_ops;
extern struct xfrm_policy_afinfo xfrm4_policy_afinfo;
static struct dst_ops xfrm4_dst_ops;
static struct xfrm_policy_afinfo xfrm4_policy_afinfo;
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)
path->ops->update_pmtu(path, mtu);
}
struct dst_ops xfrm4_dst_ops = {
static struct dst_ops xfrm4_dst_ops = {
.family = AF_INET,
.protocol = __constant_htons(ETH_P_IP),
.gc = xfrm4_garbage_collect,
......@@ -252,7 +252,7 @@ struct dst_ops xfrm4_dst_ops = {
.entry_size = sizeof(struct xfrm_dst),
};
struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
static struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
.family = AF_INET,
.lock = RW_LOCK_UNLOCKED,
.type_map = &xfrm4_type_map,
......@@ -263,12 +263,12 @@ struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
.decode_session = _decode_session4,
};
void __init xfrm4_policy_init(void)
static void __init xfrm4_policy_init(void)
{
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);
}
......
......@@ -154,7 +154,7 @@ static int ipv6_clear_mutable_options(struct ipv6hdr *iph, int len)
return 0;
}
int ah6_output(struct sk_buff *skb)
static int ah6_output(struct sk_buff *skb)
{
int err;
int extlen;
......@@ -229,7 +229,7 @@ int ah6_output(struct sk_buff *skb)
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
......@@ -319,7 +319,7 @@ int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_bu
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)
{
struct ipv6hdr *iph = (struct ipv6hdr*)skb->data;
......@@ -448,7 +448,7 @@ static struct inet6_protocol ah6_protocol = {
.flags = INET6_PROTO_NOPOLICY,
};
int __init ah6_init(void)
static int __init ah6_init(void)
{
if (xfrm_register_type(&ah6_type, AF_INET6) < 0) {
printk(KERN_INFO "ipv6 ah init: can't add xfrm type\n");
......
......@@ -37,7 +37,7 @@
#include <net/ipv6.h>
#include <linux/icmpv6.h>
int esp6_output(struct sk_buff *skb)
static int esp6_output(struct sk_buff *skb)
{
int err;
int hdr_len;
......@@ -129,7 +129,7 @@ int esp6_output(struct sk_buff *skb)
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 ipv6_esp_hdr *esph;
......@@ -252,7 +252,7 @@ static u32 esp6_get_max_size(struct xfrm_state *x, int mtu)
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)
{
struct ipv6hdr *iph = (struct ipv6hdr*)skb->data;
......@@ -272,7 +272,7 @@ void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
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;
......@@ -298,7 +298,7 @@ void esp6_destroy(struct xfrm_state *x)
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;
......@@ -402,7 +402,7 @@ static struct inet6_protocol esp6_protocol = {
.flags = INET6_PROTO_NOPOLICY,
};
int __init esp6_init(void)
static int __init esp6_init(void)
{
if (xfrm_register_type(&esp6_type, AF_INET6) < 0) {
printk(KERN_INFO "ipv6 esp init: can't add xfrm type\n");
......
......@@ -17,12 +17,12 @@
#include <net/ipv6.h>
#include <net/ip6_route.h>
extern struct dst_ops xfrm6_dst_ops;
extern struct xfrm_policy_afinfo xfrm6_policy_afinfo;
static struct dst_ops xfrm6_dst_ops;
static struct xfrm_policy_afinfo xfrm6_policy_afinfo;
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;
*dst = (struct xfrm_dst*)ip6_route_output(NULL, fl);
......@@ -253,7 +253,7 @@ static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu)
return;
}
struct dst_ops xfrm6_dst_ops = {
static struct dst_ops xfrm6_dst_ops = {
.family = AF_INET6,
.protocol = __constant_htons(ETH_P_IPV6),
.gc = xfrm6_garbage_collect,
......@@ -262,7 +262,7 @@ struct dst_ops xfrm6_dst_ops = {
.entry_size = sizeof(struct xfrm_dst),
};
struct xfrm_policy_afinfo xfrm6_policy_afinfo = {
static struct xfrm_policy_afinfo xfrm6_policy_afinfo = {
.family = AF_INET6,
.lock = RW_LOCK_UNLOCKED,
.type_map = &xfrm6_type_map,
......@@ -273,12 +273,12 @@ struct xfrm_policy_afinfo xfrm6_policy_afinfo = {
.decode_session = _decode_session6,
};
void __init xfrm6_policy_init(void)
static void __init xfrm6_policy_init(void)
{
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);
}
......
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