Commit e59e6180 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] ipv6 statics

This makes some more things in the ipv6 code static.  Some of them may
be wrong (or for futures) bu it looks pretty OK to me (and it builds).
parent 5dd9895a
......@@ -23,9 +23,6 @@ struct pol_chain {
extern struct rt6_info ip6_null_entry;
extern int ip6_rt_max_size;
extern int ip6_rt_gc_min;
extern int ip6_rt_gc_timeout;
extern int ip6_rt_gc_interval;
extern void ip6_route_input(struct sk_buff *skb);
......
......@@ -90,7 +90,7 @@ static rwlock_t addrconf_hash_lock = RW_LOCK_UNLOCKED;
/* Protects inet6 devices */
rwlock_t addrconf_lock = RW_LOCK_UNLOCKED;
void addrconf_verify(unsigned long);
static void addrconf_verify(unsigned long);
static struct timer_list addr_chk_timer = { function: addrconf_verify };
......@@ -588,7 +588,7 @@ int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr)
return err;
}
int ipv6_count_addresses(struct inet6_dev *idev)
static int ipv6_count_addresses(struct inet6_dev *idev)
{
int cnt = 0;
struct inet6_ifaddr *ifp;
......@@ -1613,7 +1613,7 @@ static int iface_proc_info(char *buffer, char **start, off_t offset,
* Periodic address status verification
*/
void addrconf_verify(unsigned long foo)
static void addrconf_verify(unsigned long foo)
{
struct inet6_ifaddr *ifp;
unsigned long now = jiffies;
......
......@@ -547,7 +547,7 @@ struct proto_ops inet6_dgram_ops = {
sendpage: sock_no_sendpage,
};
struct net_proto_family inet6_family_ops = {
static struct net_proto_family inet6_family_ops = {
family: PF_INET6,
create: inet6_create,
};
......
......@@ -77,7 +77,7 @@ struct tlvtype_proc
/* An unknown option is detected, decide what to do */
int ip6_tlvopt_unknown(struct sk_buff *skb, int optoff)
static int ip6_tlvopt_unknown(struct sk_buff *skb, int optoff)
{
switch ((skb->nh.raw[optoff] & 0xC0) >> 6) {
case 0: /* ignore */
......@@ -159,7 +159,7 @@ static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff *skb)
Destination options header.
*****************************/
struct tlvtype_proc tlvprocdestopt_lst[] = {
static struct tlvtype_proc tlvprocdestopt_lst[] = {
/* No destination options are defined now */
{-1, NULL}
};
......@@ -425,7 +425,7 @@ static int ipv6_auth_hdr(struct sk_buff **skb_ptr, int nhoff)
generate error.
*/
struct hdrtype_proc hdrproc_lst[] = {
static struct hdrtype_proc hdrproc_lst[] = {
{NEXTHDR_FRAGMENT, ipv6_reassembly},
{NEXTHDR_ROUTING, ipv6_routing_header},
{NEXTHDR_DEST, ipv6_dest_opt},
......@@ -512,7 +512,7 @@ static int ipv6_hop_jumbo(struct sk_buff *skb, int optoff)
return 0;
}
struct tlvtype_proc tlvprochopopt_lst[] = {
static struct tlvtype_proc tlvprochopopt_lst[] = {
{IPV6_TLV_ROUTERALERT, ipv6_hop_ra},
{IPV6_TLV_JUMBO, ipv6_hop_jumbo},
{-1, NULL}
......@@ -536,7 +536,7 @@ int ipv6_parse_hopopts(struct sk_buff *skb, int nhoff)
* for headers.
*/
u8 *ipv6_build_rthdr(struct sk_buff *skb, u8 *prev_hdr,
static u8 *ipv6_build_rthdr(struct sk_buff *skb, u8 *prev_hdr,
struct ipv6_rt_hdr *opt, struct in6_addr *addr)
{
struct rt0_hdr *phdr, *ihdr;
......
......@@ -68,7 +68,7 @@ struct icmpv6_mib icmpv6_statistics[NR_CPUS*2];
struct socket *icmpv6_socket;
int icmpv6_rcv(struct sk_buff *skb);
static int icmpv6_rcv(struct sk_buff *skb);
static struct inet6_protocol icmpv6_protocol =
{
......@@ -204,7 +204,7 @@ static int is_ineligible(struct sk_buff *skb)
return 0;
}
int sysctl_icmpv6_time = 1*HZ;
static int sysctl_icmpv6_time = 1*HZ;
/*
* Check the ICMP output rate limit
......@@ -491,7 +491,7 @@ static void icmpv6_notify(struct sk_buff *skb, int type, int code, u32 info)
* Handle icmp messages
*/
int icmpv6_rcv(struct sk_buff *skb)
static int icmpv6_rcv(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
struct in6_addr *saddr, *daddr;
......
......@@ -53,7 +53,7 @@
struct ipv6_mib ipv6_statistics[NR_CPUS*2];
struct packet_type ipv6_packet_type =
static struct packet_type ipv6_packet_type =
{
__constant_htons(ETH_P_IPV6),
NULL, /* All devices */
......
......@@ -65,7 +65,7 @@ static struct socket *igmp6_socket;
static void igmp6_join_group(struct ifmcaddr6 *ma);
static void igmp6_leave_group(struct ifmcaddr6 *ma);
void igmp6_timer_handler(unsigned long data);
static void igmp6_timer_handler(unsigned long data);
#define IGMP6_UNSOLICITED_IVAL (10*HZ)
......@@ -492,7 +492,7 @@ int igmp6_event_report(struct sk_buff *skb)
return 0;
}
void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
{
struct sock *sk = igmp6_socket->sk;
struct sk_buff *skb;
......@@ -608,7 +608,7 @@ static void igmp6_leave_group(struct ifmcaddr6 *ma)
spin_unlock_bh(&ma->mca_lock);
}
void igmp6_timer_handler(unsigned long data)
static void igmp6_timer_handler(unsigned long data)
{
struct ifmcaddr6 *ma = (struct ifmcaddr6 *) data;
......
......@@ -312,7 +312,7 @@ ndisc_build_ll_hdr(struct sk_buff *skb, struct net_device *dev,
* Send a Neighbour Advertisement
*/
void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
struct in6_addr *daddr, struct in6_addr *solicited_addr,
int router, int solicited, int override, int inc_opt)
{
......
......@@ -56,7 +56,7 @@ int afinet6_get_info(char *buffer, char **start, off_t offset, int length)
}
struct snmp6_item
static struct snmp6_item
{
char *name;
unsigned long *ptr;
......
......@@ -354,7 +354,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
* we return it, otherwise we block.
*/
int rawv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
static int rawv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
int noblock, int flags, int *addr_len)
{
struct ipv6_pinfo *np = inet6_sk(sk);
......
......@@ -46,10 +46,10 @@
#include <net/ndisc.h>
#include <net/addrconf.h>
int sysctl_ip6frag_high_thresh = 256*1024;
int sysctl_ip6frag_low_thresh = 192*1024;
static int sysctl_ip6frag_high_thresh = 256*1024;
static int sysctl_ip6frag_low_thresh = 192*1024;
int sysctl_ip6frag_time = IPV6_FRAG_TIMEOUT;
static int sysctl_ip6frag_time = IPV6_FRAG_TIMEOUT;
struct ip6frag_skb_cb
{
......
......@@ -59,13 +59,13 @@
#endif
int ip6_rt_max_size = 4096;
int ip6_rt_gc_min_interval = 5*HZ;
int ip6_rt_gc_timeout = 60*HZ;
static int ip6_rt_max_size = 4096;
static int ip6_rt_gc_min_interval = 5*HZ;
static int ip6_rt_gc_timeout = 60*HZ;
int ip6_rt_gc_interval = 30*HZ;
int ip6_rt_gc_elasticity = 9;
int ip6_rt_mtu_expires = 10*60*HZ;
int ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40;
static int ip6_rt_gc_elasticity = 9;
static int ip6_rt_mtu_expires = 10*60*HZ;
static int ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40;
static struct rt6_info * ip6_rt_copy(struct rt6_info *ort);
static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie);
......@@ -77,7 +77,7 @@ static int ip6_dst_gc(void);
static int ip6_pkt_discard(struct sk_buff *skb);
static void ip6_link_failure(struct sk_buff *skb);
struct dst_ops ip6_dst_ops = {
static struct dst_ops ip6_dst_ops = {
AF_INET6,
__constant_htons(ETH_P_IPV6),
1024,
......@@ -820,7 +820,7 @@ int ip6_del_rt(struct rt6_info *rt)
return err;
}
int ip6_route_del(struct in6_rtmsg *rtmsg)
static int ip6_route_del(struct in6_rtmsg *rtmsg)
{
struct fib6_node *fn;
struct rt6_info *rt;
......
......@@ -146,7 +146,7 @@ static void ipip6_tunnel_link(struct ip_tunnel *t)
*tp = t;
}
struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int create)
static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int create)
{
u32 remote = parms->iph.daddr;
u32 local = parms->iph.saddr;
......@@ -231,7 +231,7 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
}
void ipip6_err(struct sk_buff *skb, u32 info)
static void ipip6_err(struct sk_buff *skb, u32 info)
{
#ifndef I_WISH_WORLD_WERE_PERFECT
......@@ -381,7 +381,7 @@ static inline void ipip6_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb)
IP6_ECN_set_ce(skb->nh.ipv6h);
}
int ipip6_rcv(struct sk_buff *skb)
static int ipip6_rcv(struct sk_buff *skb)
{
struct iphdr *iph;
struct ip_tunnel *tunnel;
......
......@@ -22,17 +22,14 @@ ctl_table ipv6_table[] = {
#ifdef MODULE
static struct ctl_table_header *ipv6_sysctl_header;
static struct ctl_table ipv6_root_table[];
static struct ctl_table ipv6_net_table[];
ctl_table ipv6_root_table[] = {
{CTL_NET, "net", NULL, 0, 0555, ipv6_net_table},
static ctl_table ipv6_net_table[] = {
{NET_IPV6, "ipv6", NULL, 0, 0555, ipv6_table},
{0}
};
ctl_table ipv6_net_table[] = {
{NET_IPV6, "ipv6", NULL, 0, 0555, ipv6_table},
static ctl_table ipv6_root_table[] = {
{CTL_NET, "net", NULL, 0, 0555, ipv6_net_table},
{0}
};
......
......@@ -712,7 +712,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
return err;
}
void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
int type, int code, int offset, __u32 info)
{
struct ipv6hdr *hdr = (struct ipv6hdr*)skb->data;
......@@ -1576,7 +1576,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
return 0;
}
int tcp_v6_rcv(struct sk_buff *skb)
static int tcp_v6_rcv(struct sk_buff *skb)
{
struct tcphdr *th;
struct sock *sk;
......
......@@ -371,7 +371,7 @@ static void udpv6_close(struct sock *sk, long timeout)
* return it, otherwise we block.
*/
int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
static int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
int noblock, int flags, int *addr_len)
{
struct ipv6_pinfo *np = inet6_sk(sk);
......@@ -470,7 +470,7 @@ int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
goto out_free;
}
void udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
static void udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
int type, int code, int offset, __u32 info)
{
struct ipv6_pinfo *np;
......@@ -603,7 +603,7 @@ static void udpv6_mcast_deliver(struct udphdr *uh,
read_unlock(&udp_hash_lock);
}
int udpv6_rcv(struct sk_buff *skb)
static int udpv6_rcv(struct sk_buff *skb)
{
struct sock *sk;
struct udphdr *uh;
......
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