]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ipv6 statics
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 20 Jun 2002 05:43:30 +0000 (22:43 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 20 Jun 2002 05:43:30 +0000 (22:43 -0700)
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).

16 files changed:
include/net/ip6_route.h
net/ipv6/addrconf.c
net/ipv6/af_inet6.c
net/ipv6/exthdrs.c
net/ipv6/icmp.c
net/ipv6/ipv6_sockglue.c
net/ipv6/mcast.c
net/ipv6/ndisc.c
net/ipv6/proc.c
net/ipv6/raw.c
net/ipv6/reassembly.c
net/ipv6/route.c
net/ipv6/sit.c
net/ipv6/sysctl_net_ipv6.c
net/ipv6/tcp_ipv6.c
net/ipv6/udp.c

index 89ab4a4164ae53b99ecb0904aa7eb816fb482ae7..20389ddc6f97e566a2b9ee7a34e18fd5a60ffff2 100644 (file)
@@ -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);
index 983eab13091ed32a0e718cc39593e037bcfd62b8..ea89f420e34eabc541f83a504d1ba6b61905594a 100644 (file)
@@ -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 @@ done:
  *     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;
index 4cceee46c88ff8e0f2c2d16a2d9e836bb135ea91..ef18c7f59ffbdd62fa7ed6912c63f2352750759a 100644 (file)
@@ -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,
 };
index 46839d92de8e81a5176dc7fb0d01cfe8301ea5de..d405be5dc1ce9aab7558238462783ece4c94110d 100644 (file)
@@ -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 @@ bad:
   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 @@ fail:
    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 @@ drop:
        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;
index 38a9b66c69aa77351adaa054b18d9c87f80e19d2..4cb9df365f0769a92d1bc7cf5141b15fb1319004 100644 (file)
@@ -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;
index 808481d9848807f79e66f00cc9fb6a0056f174ed..b3aafa3c2ffa9599dc86ff30b5d126f54298c7ca 100644 (file)
@@ -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 */
index 62815e2f65c04d3064ff955f6af39a56ef549154..9615ef396ccfea195b381ccb819425e30dfe083a 100644 (file)
@@ -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;
 
index 994e627963f19cffb738f8d8cb4ca2e374a41734..3724b0fe42db6cd374c61e38b350946dbfe08b6a 100644 (file)
@@ -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) 
 {
index 427476bf9c272d6a7fe4a01fae40bb148de7c8f9..ae5f80dd9aa708a1ca3637e9fbe45ee99cbe708b 100644 (file)
@@ -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;
index 22db31eea3f5ff280b8fbe406523a4bfc35986f6..893adf62be2321e6a8fdd175ff003cf0ab419604 100644 (file)
@@ -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);
index 4b510958db4c543a367840cc82f51e871c086ce1..c8dc8cd000a1d8f0c0ec53904d3347c0501c635f 100644 (file)
 #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
 {
index 4c572114f13da0b28691394a8b6223c6f09dcf85..fc281bece104d21b9938184791645f003abbca83 100644 (file)
 #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;
index 265871498e038780e2b277fc06a693bcc181cdc7..693d8fbb91b9e4f434b9e845f7e0c4f518deb63b 100644 (file)
@@ -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;
index 6fbc022e120277948f928210dc09b1c6b82722c4..dbd8f4a77c9f65256034657429294e35334fdf2c 100644 (file)
@@ -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}
 };
 
index 3c01f153166f73f78726a039723d83d0a90e42e3..64cb4aa69bd20260ac944548a55878946558b5fa 100644 (file)
@@ -712,7 +712,7 @@ failure:
        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 @@ ipv6_pktoptions:
        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;
index 6a6f2b8d432ad53420119d233be00f7124075625..988fa8b0ca404de4f06b019544b9811781edb64f 100644 (file)
@@ -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 @@ csum_copy_err:
        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 @@ free_skb:
        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;