diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2016-01-02 18:38:31 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-02 18:48:57 +0100 |
commit | 05e6878c8767cf7006675d5e5a646b2f74aa88c7 (patch) | |
tree | 3cba4a57d98573761d4538f6a24f1be1c2b2c197 /pfinet/linux-src/include/net | |
parent | 5714421bb1d066abebc7e993bdf06e655b879b3a (diff) |
allow pfinet to link using -O0
This fixes a long list of undefined references when compiling with -O0
by using static instead of extern in header files.
Diffstat (limited to 'pfinet/linux-src/include/net')
-rw-r--r-- | pfinet/linux-src/include/net/addrconf.h | 10 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/checksum.h | 2 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/dst.h | 22 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/if_inet6.h | 2 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/ip.h | 12 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/ip6_fib.h | 4 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/ip6_route.h | 2 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/ip_fib.h | 14 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/ipv6.h | 12 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/ndisc.h | 2 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/neighbour.h | 18 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/pkt_cls.h | 4 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/pkt_sched.h | 6 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/profile.h | 30 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/route.h | 6 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/sock.h | 23 | ||||
-rw-r--r-- | pfinet/linux-src/include/net/tcp.h | 28 |
17 files changed, 98 insertions, 99 deletions
diff --git a/pfinet/linux-src/include/net/addrconf.h b/pfinet/linux-src/include/net/addrconf.h index 4b270775..d54f5e78 100644 --- a/pfinet/linux-src/include/net/addrconf.h +++ b/pfinet/linux-src/include/net/addrconf.h @@ -119,7 +119,7 @@ static __inline__ int ipv6_devindex_hash(int ifindex) * compute link-local solicited-node multicast address */ -extern __inline__ void addrconf_addr_solict_mult_old(struct in6_addr *addr, +static __inline__ void addrconf_addr_solict_mult_old(struct in6_addr *addr, struct in6_addr *solicited) { ipv6_addr_set(solicited, @@ -127,7 +127,7 @@ extern __inline__ void addrconf_addr_solict_mult_old(struct in6_addr *addr, __constant_htonl(0x1), addr->s6_addr32[3]); } -extern __inline__ void addrconf_addr_solict_mult_new(struct in6_addr *addr, +static __inline__ void addrconf_addr_solict_mult_new(struct in6_addr *addr, struct in6_addr *solicited) { ipv6_addr_set(solicited, @@ -137,21 +137,21 @@ extern __inline__ void addrconf_addr_solict_mult_new(struct in6_addr *addr, } -extern __inline__ void ipv6_addr_all_nodes(struct in6_addr *addr) +static __inline__ void ipv6_addr_all_nodes(struct in6_addr *addr) { ipv6_addr_set(addr, __constant_htonl(0xFF020000), 0, 0, __constant_htonl(0x1)); } -extern __inline__ void ipv6_addr_all_routers(struct in6_addr *addr) +static __inline__ void ipv6_addr_all_routers(struct in6_addr *addr) { ipv6_addr_set(addr, __constant_htonl(0xFF020000), 0, 0, __constant_htonl(0x2)); } -extern __inline__ int ipv6_addr_is_multicast(struct in6_addr *addr) +static __inline__ int ipv6_addr_is_multicast(struct in6_addr *addr) { return (addr->s6_addr32[0] & __constant_htonl(0xFF000000)) == __constant_htonl(0xFF000000); } diff --git a/pfinet/linux-src/include/net/checksum.h b/pfinet/linux-src/include/net/checksum.h index 041d4760..3b72321a 100644 --- a/pfinet/linux-src/include/net/checksum.h +++ b/pfinet/linux-src/include/net/checksum.h @@ -93,7 +93,7 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, #endif #ifndef _HAVE_ARCH_COPY_AND_CSUM_FROM_USER -extern __inline__ +static __inline__ unsigned int csum_and_copy_from_user (const char *src, char *dst, int len, int sum, int *err_ptr) { diff --git a/pfinet/linux-src/include/net/dst.h b/pfinet/linux-src/include/net/dst.h index baf4f414..ceb4f400 100644 --- a/pfinet/linux-src/include/net/dst.h +++ b/pfinet/linux-src/include/net/dst.h @@ -80,7 +80,7 @@ struct dst_ops extern struct dst_entry * dst_garbage_list; extern atomic_t dst_total; -extern __inline__ +static __inline__ struct dst_entry * dst_clone(struct dst_entry * dst) { if (dst) @@ -88,7 +88,7 @@ struct dst_entry * dst_clone(struct dst_entry * dst) return dst; } -extern __inline__ +static __inline__ void dst_release(struct dst_entry * dst) { if (dst) @@ -99,7 +99,7 @@ void dst_release(struct dst_entry * dst) destination entry has just been removed from a location accessed directly by hard irq. */ -extern __inline__ +static __inline__ void dst_release_irqwait(struct dst_entry * dst) { if (dst) { @@ -108,7 +108,7 @@ void dst_release_irqwait(struct dst_entry * dst) } } -extern __inline__ +static __inline__ struct dst_entry * dst_check(struct dst_entry ** dst_p, u32 cookie) { struct dst_entry * dst = *dst_p; @@ -117,7 +117,7 @@ struct dst_entry * dst_check(struct dst_entry ** dst_p, u32 cookie) return (*dst_p = dst); } -extern __inline__ +static __inline__ struct dst_entry * dst_reroute(struct dst_entry ** dst_p, struct sk_buff *skb) { struct dst_entry * dst = *dst_p; @@ -127,11 +127,11 @@ struct dst_entry * dst_reroute(struct dst_entry ** dst_p, struct sk_buff *skb) } -extern void * dst_alloc(int size, struct dst_ops * ops); extern void __dst_free(struct dst_entry * dst); +extern void * dst_alloc(int size, struct dst_ops * ops); extern void dst_destroy(struct dst_entry * dst); -extern __inline__ +static __inline__ void dst_free(struct dst_entry * dst) { if (dst->obsolete > 1) @@ -143,27 +143,27 @@ void dst_free(struct dst_entry * dst) __dst_free(dst); } -extern __inline__ void dst_confirm(struct dst_entry *dst) +static __inline__ void dst_confirm(struct dst_entry *dst) { if (dst) neigh_confirm(dst->neighbour); } -extern __inline__ void dst_negative_advice(struct dst_entry **dst_p) +static __inline__ void dst_negative_advice(struct dst_entry **dst_p) { struct dst_entry * dst = *dst_p; if (dst && dst->ops->negative_advice) *dst_p = dst->ops->negative_advice(dst); } -extern __inline__ void dst_link_failure(struct sk_buff *skb) +static __inline__ void dst_link_failure(struct sk_buff *skb) { struct dst_entry * dst = skb->dst; if (dst && dst->ops && dst->ops->link_failure) dst->ops->link_failure(skb); } -extern __inline__ void dst_set_expires(struct dst_entry *dst, int timeout) +static __inline__ void dst_set_expires(struct dst_entry *dst, int timeout) { unsigned long expires = jiffies + timeout; diff --git a/pfinet/linux-src/include/net/if_inet6.h b/pfinet/linux-src/include/net/if_inet6.h index 4e9ed978..515b8c76 100644 --- a/pfinet/linux-src/include/net/if_inet6.h +++ b/pfinet/linux-src/include/net/if_inet6.h @@ -117,7 +117,7 @@ struct inet6_dev extern struct ipv6_devconf ipv6_devconf; -extern __inline__ void ipv6_eth_mc_map(struct in6_addr *addr, char *buf) +static __inline__ void ipv6_eth_mc_map(struct in6_addr *addr, char *buf) { /* * +-------+-------+-------+-------+-------+-------+ diff --git a/pfinet/linux-src/include/net/ip.h b/pfinet/linux-src/include/net/ip.h index 1a6cb610..1519ea0f 100644 --- a/pfinet/linux-src/include/net/ip.h +++ b/pfinet/linux-src/include/net/ip.h @@ -137,7 +137,7 @@ extern struct linux_mib net_statistics; extern int sysctl_local_port_range[2]; -extern __inline__ int ip_finish_output(struct sk_buff *skb) +static __inline__ int ip_finish_output(struct sk_buff *skb) { struct dst_entry *dst = skb->dst; struct device *dev = dst->dev; @@ -159,7 +159,7 @@ extern __inline__ int ip_finish_output(struct sk_buff *skb) return -EINVAL; } -extern __inline__ void ip_send(struct sk_buff *skb) +static __inline__ void ip_send(struct sk_buff *skb) { if (skb->len > skb->dst->pmtu) ip_fragment(skb, __ip_finish_output); @@ -167,7 +167,7 @@ extern __inline__ void ip_send(struct sk_buff *skb) ip_finish_output(skb); } -extern __inline__ +static __inline__ int ip_decrease_ttl(struct iphdr *iph) { u16 check = iph->check; @@ -178,7 +178,7 @@ int ip_decrease_ttl(struct iphdr *iph) return --iph->ttl; } -extern __inline__ +static __inline__ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) { return (sk->ip_pmtudisc == IP_PMTUDISC_DO || @@ -190,7 +190,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) * Map a multicast IP onto multicast MAC for type ethernet. */ -extern __inline__ void ip_eth_mc_map(u32 addr, char *buf) +static __inline__ void ip_eth_mc_map(u32 addr, char *buf) { addr=ntohl(addr); buf[0]=0x01; @@ -210,7 +210,7 @@ extern __inline__ void ip_eth_mc_map(u32 addr, char *buf) * multicast packets. */ -extern __inline__ void ip_tr_mc_map(u32 addr, char *buf) +static __inline__ void ip_tr_mc_map(u32 addr, char *buf) { buf[0]=0xC0; buf[1]=0x00; diff --git a/pfinet/linux-src/include/net/ip6_fib.h b/pfinet/linux-src/include/net/ip6_fib.h index efd652f2..64b0ef20 100644 --- a/pfinet/linux-src/include/net/ip6_fib.h +++ b/pfinet/linux-src/include/net/ip6_fib.h @@ -95,7 +95,7 @@ struct fib6_walker_t extern struct fib6_walker_t fib6_walker_list; -extern __inline__ void fib6_walker_link(struct fib6_walker_t *w) +static __inline__ void fib6_walker_link(struct fib6_walker_t *w) { w->next = fib6_walker_list.next; w->prev = &fib6_walker_list; @@ -103,7 +103,7 @@ extern __inline__ void fib6_walker_link(struct fib6_walker_t *w) w->prev->next = w; } -extern __inline__ void fib6_walker_unlink(struct fib6_walker_t *w) +static __inline__ void fib6_walker_unlink(struct fib6_walker_t *w) { w->next->prev = w->prev; w->prev->next = w->next; diff --git a/pfinet/linux-src/include/net/ip6_route.h b/pfinet/linux-src/include/net/ip6_route.h index 9311cc34..369f4227 100644 --- a/pfinet/linux-src/include/net/ip6_route.h +++ b/pfinet/linux-src/include/net/ip6_route.h @@ -92,7 +92,7 @@ extern void rt6_mtu_change(struct device *dev, unsigned mtu); * For UDP/RAW sockets this is done on udp_connect. */ -extern __inline__ void ip6_dst_store(struct sock *sk, struct dst_entry *dst, +static __inline__ void ip6_dst_store(struct sock *sk, struct dst_entry *dst, struct in6_addr *daddr) { struct ipv6_pinfo *np; diff --git a/pfinet/linux-src/include/net/ip_fib.h b/pfinet/linux-src/include/net/ip_fib.h index 76a2fbc3..60338945 100644 --- a/pfinet/linux-src/include/net/ip_fib.h +++ b/pfinet/linux-src/include/net/ip_fib.h @@ -138,19 +138,19 @@ struct fib_table extern struct fib_table *local_table; extern struct fib_table *main_table; -extern __inline__ struct fib_table *fib_get_table(int id) +static __inline__ struct fib_table *fib_get_table(int id) { if (id != RT_TABLE_LOCAL) return main_table; return local_table; } -extern __inline__ struct fib_table *fib_new_table(int id) +static __inline__ struct fib_table *fib_new_table(int id) { return fib_get_table(id); } -extern __inline__ int fib_lookup(const struct rt_key *key, struct fib_result *res) +static __inline__ int fib_lookup(const struct rt_key *key, struct fib_result *res) { if (local_table->tb_lookup(local_table, key, res) && main_table->tb_lookup(main_table, key, res)) @@ -158,7 +158,7 @@ extern __inline__ int fib_lookup(const struct rt_key *key, struct fib_result *re return 0; } -extern __inline__ void fib_select_default(const struct rt_key *key, struct fib_result *res) +static __inline__ void fib_select_default(const struct rt_key *key, struct fib_result *res) { if (FIB_RES_GW(*res) && FIB_RES_NH(*res).nh_scope == RT_SCOPE_LINK) main_table->tb_select_default(main_table, key, res); @@ -172,7 +172,7 @@ extern struct fib_table * fib_tables[RT_TABLE_MAX+1]; extern int fib_lookup(const struct rt_key *key, struct fib_result *res); extern struct fib_table *__fib_new_table(int id); -extern __inline__ struct fib_table *fib_get_table(int id) +static __inline__ struct fib_table *fib_get_table(int id) { if (id == 0) id = RT_TABLE_MAIN; @@ -180,7 +180,7 @@ extern __inline__ struct fib_table *fib_get_table(int id) return fib_tables[id]; } -extern __inline__ struct fib_table *fib_new_table(int id) +static __inline__ struct fib_table *fib_new_table(int id) { if (id == 0) id = RT_TABLE_MAIN; @@ -238,7 +238,7 @@ extern u32 fib_rules_policy(u32 saddr, struct fib_result *res, unsigned *flags); extern void fib_rules_init(void); #endif -extern __inline__ void fib_combine_itag(u32 *itag, struct fib_result *res) +static __inline__ void fib_combine_itag(u32 *itag, struct fib_result *res) { #ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_IP_MULTIPLE_TABLES diff --git a/pfinet/linux-src/include/net/ipv6.h b/pfinet/linux-src/include/net/ipv6.h index 60ea0536..11625091 100644 --- a/pfinet/linux-src/include/net/ipv6.h +++ b/pfinet/linux-src/include/net/ipv6.h @@ -159,7 +159,7 @@ extern int ipv6_flowlabel_opt(struct sock *sk, char *optval, int optlen); extern void ip6_flowlabel_init(void); extern void ip6_flowlabel_cleanup(void); -extern __inline__ void fl6_sock_release(struct ip6_flowlabel *fl) +static __inline__ void fl6_sock_release(struct ip6_flowlabel *fl) { if (fl) atomic_dec(&fl->users); @@ -193,23 +193,23 @@ typedef int (*inet_getfrag_t) (const void *data, extern int ipv6_addr_type(struct in6_addr *addr); -extern __inline__ int ipv6_addr_scope(struct in6_addr *addr) +static __inline__ int ipv6_addr_scope(struct in6_addr *addr) { return ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK; } -extern __inline__ int ipv6_addr_cmp(struct in6_addr *a1, struct in6_addr *a2) +static __inline__ int ipv6_addr_cmp(struct in6_addr *a1, struct in6_addr *a2) { return memcmp((void *) a1, (void *) a2, sizeof(struct in6_addr)); } -extern __inline__ void ipv6_addr_copy(struct in6_addr *a1, struct in6_addr *a2) +static __inline__ void ipv6_addr_copy(struct in6_addr *a1, struct in6_addr *a2) { memcpy((void *) a1, (void *) a2, sizeof(struct in6_addr)); } #ifndef __HAVE_ARCH_ADDR_SET -extern __inline__ void ipv6_addr_set(struct in6_addr *addr, +static __inline__ void ipv6_addr_set(struct in6_addr *addr, __u32 w1, __u32 w2, __u32 w3, __u32 w4) { @@ -220,7 +220,7 @@ extern __inline__ void ipv6_addr_set(struct in6_addr *addr, } #endif -extern __inline__ int ipv6_addr_any(struct in6_addr *a) +static __inline__ int ipv6_addr_any(struct in6_addr *a) { return ((a->s6_addr32[0] | a->s6_addr32[1] | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); diff --git a/pfinet/linux-src/include/net/ndisc.h b/pfinet/linux-src/include/net/ndisc.h index 7a51f367..9c603207 100644 --- a/pfinet/linux-src/include/net/ndisc.h +++ b/pfinet/linux-src/include/net/ndisc.h @@ -101,7 +101,7 @@ extern int igmp6_event_report(struct sk_buff *skb, extern void igmp6_cleanup(void); -extern __inline__ struct neighbour * ndisc_get_neigh(struct device *dev, struct in6_addr *addr) +static __inline__ struct neighbour * ndisc_get_neigh(struct device *dev, struct in6_addr *addr) { if (dev) { diff --git a/pfinet/linux-src/include/net/neighbour.h b/pfinet/linux-src/include/net/neighbour.h index ab79f17c..67ba3e53 100644 --- a/pfinet/linux-src/include/net/neighbour.h +++ b/pfinet/linux-src/include/net/neighbour.h @@ -207,26 +207,26 @@ extern void neigh_sysctl_unregister(struct neigh_parms *p); * is only referenced by the corresponding table. */ -extern __inline__ void neigh_release(struct neighbour *neigh) +static __inline__ void neigh_release(struct neighbour *neigh) { if (atomic_dec_and_test(&neigh->refcnt) && neigh->tbl == NULL) neigh_destroy(neigh); } -extern __inline__ struct neighbour * neigh_clone(struct neighbour *neigh) +static __inline__ struct neighbour * neigh_clone(struct neighbour *neigh) { if (neigh) atomic_inc(&neigh->refcnt); return neigh; } -extern __inline__ void neigh_confirm(struct neighbour *neigh) +static __inline__ void neigh_confirm(struct neighbour *neigh) { if (neigh) neigh->confirmed = jiffies; } -extern __inline__ struct neighbour * +static __inline__ struct neighbour * neigh_lookup(struct neigh_table *tbl, const void *pkey, struct device *dev) { struct neighbour *neigh; @@ -236,17 +236,17 @@ neigh_lookup(struct neigh_table *tbl, const void *pkey, struct device *dev) return neigh; } -extern __inline__ int neigh_is_connected(struct neighbour *neigh) +static __inline__ int neigh_is_connected(struct neighbour *neigh) { return neigh->nud_state&NUD_CONNECTED; } -extern __inline__ int neigh_is_valid(struct neighbour *neigh) +static __inline__ int neigh_is_valid(struct neighbour *neigh) { return neigh->nud_state&NUD_VALID; } -extern __inline__ int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) +static __inline__ int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) { neigh->used = jiffies; if (!(neigh->nud_state&(NUD_CONNECTED|NUD_DELAY|NUD_PROBE))) @@ -254,13 +254,13 @@ extern __inline__ int neigh_event_send(struct neighbour *neigh, struct sk_buff * return 0; } -extern __inline__ void neigh_table_lock(struct neigh_table *tbl) +static __inline__ void neigh_table_lock(struct neigh_table *tbl) { atomic_inc(&tbl->lock); synchronize_bh(); } -extern __inline__ void neigh_table_unlock(struct neigh_table *tbl) +static __inline__ void neigh_table_unlock(struct neigh_table *tbl) { atomic_dec(&tbl->lock); } diff --git a/pfinet/linux-src/include/net/pkt_cls.h b/pfinet/linux-src/include/net/pkt_cls.h index b8547e60..13e24a9b 100644 --- a/pfinet/linux-src/include/net/pkt_cls.h +++ b/pfinet/linux-src/include/net/pkt_cls.h @@ -63,7 +63,7 @@ struct tcf_proto_ops specific classifiers. */ -extern __inline__ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, struct tcf_result *res) +static __inline__ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, struct tcf_result *res) { int err = 0; u32 protocol = skb->protocol; @@ -77,7 +77,7 @@ extern __inline__ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, str return -1; } -extern __inline__ unsigned long cls_set_class(unsigned long *clp, unsigned long cl) +static __inline__ unsigned long cls_set_class(unsigned long *clp, unsigned long cl) { unsigned long old_cl; diff --git a/pfinet/linux-src/include/net/pkt_sched.h b/pfinet/linux-src/include/net/pkt_sched.h index c2ef8656..b441789e 100644 --- a/pfinet/linux-src/include/net/pkt_sched.h +++ b/pfinet/linux-src/include/net/pkt_sched.h @@ -354,7 +354,7 @@ extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr * extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p); extern int tcf_police(struct sk_buff *skb, struct tcf_police *p); -extern __inline__ void tcf_police_release(struct tcf_police *p) +static __inline__ void tcf_police_release(struct tcf_police *p) { if (p && --p->refcnt == 0) tcf_police_destroy(p); @@ -387,7 +387,7 @@ int pktsched_init(void); void qdisc_run_queues(void); int qdisc_restart(struct device *dev); -extern __inline__ void qdisc_wakeup(struct device *dev) +static __inline__ void qdisc_wakeup(struct device *dev) { if (!dev->tbusy) { struct Qdisc *q = dev->qdisc; @@ -398,7 +398,7 @@ extern __inline__ void qdisc_wakeup(struct device *dev) } } -extern __inline__ unsigned psched_mtu(struct device *dev) +static __inline__ unsigned psched_mtu(struct device *dev) { unsigned mtu = dev->mtu; return dev->hard_header ? mtu + dev->hard_header_len : mtu; diff --git a/pfinet/linux-src/include/net/profile.h b/pfinet/linux-src/include/net/profile.h index 82fad0a3..e4b24e9f 100644 --- a/pfinet/linux-src/include/net/profile.h +++ b/pfinet/linux-src/include/net/profile.h @@ -28,14 +28,14 @@ extern void net_profile_irq_adjust(struct timeval *entered, struct timeval* leav #if CPU == 586 || CPU == 686 -extern __inline__ void net_profile_stamp(struct timeval *pstamp) +static __inline__ void net_profile_stamp(struct timeval *pstamp) { __asm__ __volatile__ (".byte 0x0f,0x31" :"=a" (pstamp->tv_usec), "=d" (pstamp->tv_sec)); } -extern __inline__ void net_profile_accumulate(struct timeval *entered, +static __inline__ void net_profile_accumulate(struct timeval *entered, struct timeval *leaved, struct timeval *acc) { @@ -51,7 +51,7 @@ extern __inline__ void net_profile_accumulate(struct timeval *entered, "0" (acc->tv_usec), "1" (acc->tv_sec)); } -extern __inline__ void net_profile_sub(struct timeval *sub, +static __inline__ void net_profile_sub(struct timeval *sub, struct timeval *acc) { __asm__ __volatile__ ("subl %2,%0\n\t" @@ -61,7 +61,7 @@ extern __inline__ void net_profile_sub(struct timeval *sub, "0" (acc->tv_usec), "1" (acc->tv_sec)); } -extern __inline__ void net_profile_add(struct timeval *add, +static __inline__ void net_profile_add(struct timeval *add, struct timeval *acc) { __asm__ __volatile__ ("addl %2,%0\n\t" @@ -79,7 +79,7 @@ extern long alpha_hi; /* On alpha cycle counter has only 32 bits :-( :-( */ -extern __inline__ void net_profile_stamp(struct timeval *pstamp) +static __inline__ void net_profile_stamp(struct timeval *pstamp) { __u32 result; __asm__ __volatile__ ("rpcc %0" : "r="(result)); @@ -90,7 +90,7 @@ extern __inline__ void net_profile_stamp(struct timeval *pstamp) pstamp->tv_usec = alpha_lo; } -extern __inline__ void net_profile_accumulate(struct timeval *entered, +static __inline__ void net_profile_accumulate(struct timeval *entered, struct timeval *leaved, struct timeval *acc) { @@ -112,7 +112,7 @@ extern __inline__ void net_profile_accumulate(struct timeval *entered, acc->tv_usec = usecs; } -extern __inline__ void net_profile_sub(struct timeval *entered, +static __inline__ void net_profile_sub(struct timeval *entered, struct timeval *leaved) { time_t usecs = leaved->tv_usec - entered->tv_usec; @@ -126,7 +126,7 @@ extern __inline__ void net_profile_sub(struct timeval *entered, leaved->tv_usec = usecs; } -extern __inline__ void net_profile_add(struct timeval *entered, struct timeval *leaved) +static __inline__ void net_profile_add(struct timeval *entered, struct timeval *leaved) { time_t usecs = leaved->tv_usec + entered->tv_usec; time_t secs = leaved->tv_sec + entered->tv_sec; @@ -142,7 +142,7 @@ extern __inline__ void net_profile_add(struct timeval *entered, struct timeval #else -extern __inline__ void net_profile_stamp(struct timeval *pstamp) +static __inline__ void net_profile_stamp(struct timeval *pstamp) { /* Not "fast" counterpart! On architectures without cpu clock "fast" routine is absolutely useless in this @@ -153,7 +153,7 @@ extern __inline__ void net_profile_stamp(struct timeval *pstamp) do_gettimeofday(pstamp); } -extern __inline__ void net_profile_accumulate(struct timeval *entered, +static __inline__ void net_profile_accumulate(struct timeval *entered, struct timeval *leaved, struct timeval *acc) { @@ -175,7 +175,7 @@ extern __inline__ void net_profile_accumulate(struct timeval *entered, acc->tv_usec = usecs; } -extern __inline__ void net_profile_sub(struct timeval *entered, +static __inline__ void net_profile_sub(struct timeval *entered, struct timeval *leaved) { time_t usecs = leaved->tv_usec - entered->tv_usec; @@ -189,7 +189,7 @@ extern __inline__ void net_profile_sub(struct timeval *entered, leaved->tv_usec = usecs; } -extern __inline__ void net_profile_add(struct timeval *entered, struct timeval *leaved) +static __inline__ void net_profile_add(struct timeval *entered, struct timeval *leaved) { time_t usecs = leaved->tv_usec + entered->tv_usec; time_t secs = leaved->tv_sec + entered->tv_sec; @@ -206,7 +206,7 @@ extern __inline__ void net_profile_add(struct timeval *entered, struct timeval #endif -extern __inline__ void net_profile_enter(struct net_profile_slot *s) +static __inline__ void net_profile_enter(struct net_profile_slot *s) { unsigned long flags; @@ -219,7 +219,7 @@ extern __inline__ void net_profile_enter(struct net_profile_slot *s) restore_flags(flags); } -extern __inline__ void net_profile_leave_irq(struct net_profile_slot *s) +static __inline__ void net_profile_leave_irq(struct net_profile_slot *s) { unsigned long flags; @@ -240,7 +240,7 @@ extern __inline__ void net_profile_leave_irq(struct net_profile_slot *s) restore_flags(flags); } -extern __inline__ void net_profile_leave(struct net_profile_slot *s) +static __inline__ void net_profile_leave(struct net_profile_slot *s) { unsigned long flags; save_flags(flags); diff --git a/pfinet/linux-src/include/net/route.h b/pfinet/linux-src/include/net/route.h index 66df4712..40aabdf6 100644 --- a/pfinet/linux-src/include/net/route.h +++ b/pfinet/linux-src/include/net/route.h @@ -124,7 +124,7 @@ extern void ip_rt_get_source(u8 *src, struct rtable *rt); extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); -extern __inline__ void ip_rt_put(struct rtable * rt) +static __inline__ void ip_rt_put(struct rtable * rt) { if (rt) dst_release(&rt->u.dst); @@ -132,12 +132,12 @@ extern __inline__ void ip_rt_put(struct rtable * rt) extern __u8 ip_tos2prio[16]; -extern __inline__ char rt_tos2priority(u8 tos) +static __inline__ char rt_tos2priority(u8 tos) { return ip_tos2prio[IPTOS_TOS(tos)>>1]; } -extern __inline__ int ip_route_connect(struct rtable **rp, u32 dst, u32 src, u32 tos, int oif) +static __inline__ int ip_route_connect(struct rtable **rp, u32 dst, u32 src, u32 tos, int oif) { int err; err = ip_route_output(rp, dst, src, tos, oif); diff --git a/pfinet/linux-src/include/net/sock.h b/pfinet/linux-src/include/net/sock.h index 96fdfe8b..b149224a 100644 --- a/pfinet/linux-src/include/net/sock.h +++ b/pfinet/linux-src/include/net/sock.h @@ -724,7 +724,6 @@ extern struct sk_buff *sock_rmalloc(struct sock *sk, extern void sock_wfree(struct sk_buff *skb); extern void sock_rfree(struct sk_buff *skb); extern unsigned long sock_rspace(struct sock *sk); -extern unsigned long sock_wspace(struct sock *sk); extern int sock_setsockopt(struct socket *sock, int level, int op, char *optval, @@ -800,7 +799,7 @@ extern void sklist_destroy_socket(struct sock **list, struct sock *sk); * sk_run_filter. If pkt_len is 0 we toss packet. If skb->len is smaller * than pkt_len we keep whole skb->data. */ -extern __inline__ int sk_filter(struct sk_buff *skb, struct sk_filter *filter) +static __inline__ int sk_filter(struct sk_buff *skb, struct sk_filter *filter) { int pkt_len; @@ -813,7 +812,7 @@ extern __inline__ int sk_filter(struct sk_buff *skb, struct sk_filter *filter) return 0; } -extern __inline__ void sk_filter_release(struct sock *sk, struct sk_filter *fp) +static __inline__ void sk_filter_release(struct sock *sk, struct sk_filter *fp) { unsigned int size = sk_filter_len(fp); @@ -823,7 +822,7 @@ extern __inline__ void sk_filter_release(struct sock *sk, struct sk_filter *fp) kfree_s(fp, size); } -extern __inline__ void sk_filter_charge(struct sock *sk, struct sk_filter *fp) +static __inline__ void sk_filter_charge(struct sock *sk, struct sk_filter *fp) { atomic_inc(&fp->refcnt); atomic_add(sk_filter_len(fp), &sk->omem_alloc); @@ -840,14 +839,14 @@ extern __inline__ void sk_filter_charge(struct sock *sk, struct sk_filter *fp) * packet ever received. */ -extern __inline__ void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) +static __inline__ void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) { skb->sk = sk; skb->destructor = sock_wfree; atomic_add(skb->truesize, &sk->wmem_alloc); } -extern __inline__ void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) +static __inline__ void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) { skb->sk = sk; skb->destructor = sock_rfree; @@ -855,7 +854,7 @@ extern __inline__ void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) } -extern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) +static __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) { #ifdef CONFIG_FILTER struct sk_filter *filter; @@ -878,7 +877,7 @@ extern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) return 0; } -extern __inline__ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) +static __inline__ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) { /* Cast skb->rcvbuf to unsigned... It's pointless, but reduces number of warnings when compiling with -W --ANK @@ -896,13 +895,13 @@ extern __inline__ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) * Recover an error report and clear atomically */ -extern __inline__ int sock_error(struct sock *sk) +static __inline__ int sock_error(struct sock *sk) { int err=xchg(&sk->err,0); return -err; } -extern __inline__ unsigned long sock_wspace(struct sock *sk) +static __inline__ unsigned long sock_wspace(struct sock *sk) { int amt = 0; @@ -918,7 +917,7 @@ extern __inline__ unsigned long sock_wspace(struct sock *sk) * Default write policy as shown to user space via poll/select/SIGIO * Kernel internally doesn't use the MIN_WRITE_SPACE threshold. */ -extern __inline__ int sock_writeable(struct sock *sk) +static __inline__ int sock_writeable(struct sock *sk) { return sock_wspace(sk) >= MIN_WRITE_SPACE; } @@ -933,7 +932,7 @@ extern void net_delete_timer (struct sock *); extern void net_reset_timer (struct sock *, int, unsigned long); extern void net_timer (unsigned long); -extern __inline__ int gfp_any(void) +static __inline__ int gfp_any(void) { return in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; } diff --git a/pfinet/linux-src/include/net/tcp.h b/pfinet/linux-src/include/net/tcp.h index abb4b210..96b8071d 100644 --- a/pfinet/linux-src/include/net/tcp.h +++ b/pfinet/linux-src/include/net/tcp.h @@ -428,19 +428,19 @@ struct tcp_func { * and worry about wraparound (automatic with unsigned arithmetic). */ -extern __inline int before(__u32 seq1, __u32 seq2) +static __inline int before(__u32 seq1, __u32 seq2) { return (__s32)(seq1-seq2) < 0; } -extern __inline int after(__u32 seq1, __u32 seq2) +static __inline int after(__u32 seq1, __u32 seq2) { return (__s32)(seq2-seq1) < 0; } /* is s2<=s1<=s3 ? */ -extern __inline int between(__u32 seq1, __u32 seq2, __u32 seq3) +static __inline int between(__u32 seq1, __u32 seq2, __u32 seq3) { return seq3 - seq2 >= seq1 - seq2; } @@ -659,7 +659,7 @@ extern u32 __tcp_select_window(struct sock *sk); * value can be stuffed directly into th->window for an outgoing * frame. */ -extern __inline__ u16 tcp_select_window(struct sock *sk) +static __inline__ u16 tcp_select_window(struct sock *sk) { struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); u32 cur_win = tcp_receive_window(tp); @@ -686,7 +686,7 @@ extern __inline__ u16 tcp_select_window(struct sock *sk) * can increase our advertisement. If it becomes more than * twice what we are talking about right now, return true. */ -extern __inline__ int tcp_raise_window(struct sock *sk) +static __inline__ int tcp_raise_window(struct sock *sk) { struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); u32 cur_win = tcp_receive_window(tp); @@ -704,7 +704,7 @@ extern __inline__ int tcp_raise_window(struct sock *sk) * as well, however we keep track of that using different * units so a conversion is necessary. -DaveM */ -extern __inline__ __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) +static __inline__ __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) { __u32 snd_wnd_packets = tp->snd_wnd / max(tp->mss_cache, 1); @@ -847,7 +847,7 @@ static __inline__ void tcp_push_pending_frames(struct sock *sk, struct tcp_opt * * problem. Thanks to Stephen A. Wood <saw@cebaf.gov> -FvK */ -extern __inline const int tcp_connected(const int state) +static __inline const int tcp_connected(const int state) { return ((1 << state) & (TCPF_ESTABLISHED|TCPF_CLOSE_WAIT|TCPF_FIN_WAIT1| @@ -934,7 +934,7 @@ static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct tcp_opt * * MAX_SYN_SIZE to match the new maximum number of options that you * can generate. */ -extern __inline__ void tcp_syn_build_options(__u32 *ptr, int mss, int ts, int sack, +static __inline__ void tcp_syn_build_options(__u32 *ptr, int mss, int ts, int sack, int offer_wscale, int wscale, __u32 tstamp, __u32 ts_recent) { /* We always get an MSS option. @@ -974,7 +974,7 @@ extern __inline__ void tcp_syn_build_options(__u32 *ptr, int mss, int ts, int sa * be a multiple of mss if possible. We assume here that mss >= 1. * This MUST be enforced by all callers. */ -extern __inline__ void tcp_select_initial_window(__u32 space, __u16 mss, +static __inline__ void tcp_select_initial_window(__u32 space, __u16 mss, __u32 *rcv_wnd, __u32 *window_clamp, int wscale_ok, @@ -1008,28 +1008,28 @@ extern __inline__ void tcp_select_initial_window(__u32 space, __u16 mss, (*window_clamp) = min(65535<<(*rcv_wscale),*window_clamp); } -extern __inline__ void tcp_synq_unlink(struct tcp_opt *tp, struct open_request *req, struct open_request *prev) +static __inline__ void tcp_synq_unlink(struct tcp_opt *tp, struct open_request *req, struct open_request *prev) { if(!req->dl_next) tp->syn_wait_last = (struct open_request **)prev; prev->dl_next = req->dl_next; } -extern __inline__ void tcp_synq_queue(struct tcp_opt *tp, struct open_request *req) +static __inline__ void tcp_synq_queue(struct tcp_opt *tp, struct open_request *req) { req->dl_next = NULL; *tp->syn_wait_last = req; tp->syn_wait_last = &req->dl_next; } -extern __inline__ void tcp_synq_init(struct tcp_opt *tp) +static __inline__ void tcp_synq_init(struct tcp_opt *tp) { tp->syn_wait_queue = NULL; tp->syn_wait_last = &tp->syn_wait_queue; } extern void __tcp_inc_slow_timer(struct tcp_sl_timer *slt); -extern __inline__ void tcp_inc_slow_timer(int timer) +static __inline__ void tcp_inc_slow_timer(int timer) { struct tcp_sl_timer *slt = &tcp_slt_array[timer]; @@ -1041,7 +1041,7 @@ extern __inline__ void tcp_inc_slow_timer(int timer) atomic_inc(&slt->count); } -extern __inline__ void tcp_dec_slow_timer(int timer) +static __inline__ void tcp_dec_slow_timer(int timer) { struct tcp_sl_timer *slt = &tcp_slt_array[timer]; |