aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-09-21 13:22:42 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-21 14:01:38 -0400
commit5c3a0fd7d0fc2985fcd540aa9d7656dcc2d57b41 (patch)
treecff00e1aae6c891ebe29de574a67c23ce2a31946 /include/net/ipv6.h
parent1fd51155387264e3ca72094abadcaadb3f5969f6 (diff)
ip*.h: Remove extern from function prototypes
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h268
1 files changed, 119 insertions, 149 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index bbf1c8fb8511..fe1c7f6c9217 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -244,14 +244,14 @@ struct ipv6_fl_socklist {
244 struct rcu_head rcu; 244 struct rcu_head rcu;
245}; 245};
246 246
247extern struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); 247struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label);
248extern struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space, 248struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space,
249 struct ip6_flowlabel * fl, 249 struct ip6_flowlabel *fl,
250 struct ipv6_txoptions * fopt); 250 struct ipv6_txoptions *fopt);
251extern void fl6_free_socklist(struct sock *sk); 251void fl6_free_socklist(struct sock *sk);
252extern int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); 252int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen);
253extern int ip6_flowlabel_init(void); 253int ip6_flowlabel_init(void);
254extern void ip6_flowlabel_cleanup(void); 254void ip6_flowlabel_cleanup(void);
255 255
256static inline void fl6_sock_release(struct ip6_flowlabel *fl) 256static inline void fl6_sock_release(struct ip6_flowlabel *fl)
257{ 257{
@@ -259,7 +259,7 @@ static inline void fl6_sock_release(struct ip6_flowlabel *fl)
259 atomic_dec(&fl->users); 259 atomic_dec(&fl->users);
260} 260}
261 261
262extern void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); 262void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info);
263 263
264int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, 264int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
265 struct icmp6hdr *thdr, int len); 265 struct icmp6hdr *thdr, int len);
@@ -267,19 +267,21 @@ int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
267struct dst_entry *icmpv6_route_lookup(struct net *net, struct sk_buff *skb, 267struct dst_entry *icmpv6_route_lookup(struct net *net, struct sk_buff *skb,
268 struct sock *sk, struct flowi6 *fl6); 268 struct sock *sk, struct flowi6 *fl6);
269 269
270extern int ip6_ra_control(struct sock *sk, int sel); 270int ip6_ra_control(struct sock *sk, int sel);
271 271
272extern int ipv6_parse_hopopts(struct sk_buff *skb); 272int ipv6_parse_hopopts(struct sk_buff *skb);
273 273
274extern struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt); 274struct ipv6_txoptions *ipv6_dup_options(struct sock *sk,
275extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, 275 struct ipv6_txoptions *opt);
276 int newtype, 276struct ipv6_txoptions *ipv6_renew_options(struct sock *sk,
277 struct ipv6_opt_hdr __user *newopt, 277 struct ipv6_txoptions *opt,
278 int newoptlen); 278 int newtype,
279 struct ipv6_opt_hdr __user *newopt,
280 int newoptlen);
279struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, 281struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
280 struct ipv6_txoptions *opt); 282 struct ipv6_txoptions *opt);
281 283
282extern bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); 284bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb);
283 285
284static inline bool ipv6_accept_ra(struct inet6_dev *idev) 286static inline bool ipv6_accept_ra(struct inet6_dev *idev)
285{ 287{
@@ -306,7 +308,7 @@ static inline int ip6_frag_mem(struct net *net)
306#define IPV6_FRAG_LOW_THRESH (3 * 1024*1024) /* 3145728 */ 308#define IPV6_FRAG_LOW_THRESH (3 * 1024*1024) /* 3145728 */
307#define IPV6_FRAG_TIMEOUT (60 * HZ) /* 60 seconds */ 309#define IPV6_FRAG_TIMEOUT (60 * HZ) /* 60 seconds */
308 310
309extern int __ipv6_addr_type(const struct in6_addr *addr); 311int __ipv6_addr_type(const struct in6_addr *addr);
310static inline int ipv6_addr_type(const struct in6_addr *addr) 312static inline int ipv6_addr_type(const struct in6_addr *addr)
311{ 313{
312 return __ipv6_addr_type(addr) & 0xffff; 314 return __ipv6_addr_type(addr) & 0xffff;
@@ -656,9 +658,9 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add
656 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); 658 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
657} 659}
658 660
659extern void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); 661void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt);
660 662
661extern int ip6_dst_hoplimit(struct dst_entry *dst); 663int ip6_dst_hoplimit(struct dst_entry *dst);
662 664
663/* 665/*
664 * Header manipulation 666 * Header manipulation
@@ -682,83 +684,65 @@ static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr)
682 * rcv function (called from netdevice level) 684 * rcv function (called from netdevice level)
683 */ 685 */
684 686
685extern int ipv6_rcv(struct sk_buff *skb, 687int ipv6_rcv(struct sk_buff *skb, struct net_device *dev,
686 struct net_device *dev, 688 struct packet_type *pt, struct net_device *orig_dev);
687 struct packet_type *pt,
688 struct net_device *orig_dev);
689 689
690extern int ip6_rcv_finish(struct sk_buff *skb); 690int ip6_rcv_finish(struct sk_buff *skb);
691 691
692/* 692/*
693 * upper-layer output functions 693 * upper-layer output functions
694 */ 694 */
695extern int ip6_xmit(struct sock *sk, 695int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6,
696 struct sk_buff *skb, 696 struct ipv6_txoptions *opt, int tclass);
697 struct flowi6 *fl6, 697
698 struct ipv6_txoptions *opt, 698int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr);
699 int tclass); 699
700 700int ip6_append_data(struct sock *sk,
701extern int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); 701 int getfrag(void *from, char *to, int offset, int len,
702 702 int odd, struct sk_buff *skb),
703extern int ip6_append_data(struct sock *sk, 703 void *from, int length, int transhdrlen, int hlimit,
704 int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), 704 int tclass, struct ipv6_txoptions *opt, struct flowi6 *fl6,
705 void *from, 705 struct rt6_info *rt, unsigned int flags, int dontfrag);
706 int length, 706
707 int transhdrlen, 707int ip6_push_pending_frames(struct sock *sk);
708 int hlimit, 708
709 int tclass, 709void ip6_flush_pending_frames(struct sock *sk);
710 struct ipv6_txoptions *opt, 710
711 struct flowi6 *fl6, 711int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi6 *fl6);
712 struct rt6_info *rt, 712struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
713 unsigned int flags, 713 const struct in6_addr *final_dst,
714 int dontfrag); 714 bool can_sleep);
715 715struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
716extern int ip6_push_pending_frames(struct sock *sk); 716 const struct in6_addr *final_dst,
717 717 bool can_sleep);
718extern void ip6_flush_pending_frames(struct sock *sk); 718struct dst_entry *ip6_blackhole_route(struct net *net,
719 719 struct dst_entry *orig_dst);
720extern int ip6_dst_lookup(struct sock *sk,
721 struct dst_entry **dst,
722 struct flowi6 *fl6);
723extern struct dst_entry * ip6_dst_lookup_flow(struct sock *sk,
724 struct flowi6 *fl6,
725 const struct in6_addr *final_dst,
726 bool can_sleep);
727extern struct dst_entry * ip6_sk_dst_lookup_flow(struct sock *sk,
728 struct flowi6 *fl6,
729 const struct in6_addr *final_dst,
730 bool can_sleep);
731extern struct dst_entry * ip6_blackhole_route(struct net *net,
732 struct dst_entry *orig_dst);
733 720
734/* 721/*
735 * skb processing functions 722 * skb processing functions
736 */ 723 */
737 724
738extern int ip6_output(struct sk_buff *skb); 725int ip6_output(struct sk_buff *skb);
739extern int ip6_forward(struct sk_buff *skb); 726int ip6_forward(struct sk_buff *skb);
740extern int ip6_input(struct sk_buff *skb); 727int ip6_input(struct sk_buff *skb);
741extern int ip6_mc_input(struct sk_buff *skb); 728int ip6_mc_input(struct sk_buff *skb);
742 729
743extern int __ip6_local_out(struct sk_buff *skb); 730int __ip6_local_out(struct sk_buff *skb);
744extern int ip6_local_out(struct sk_buff *skb); 731int ip6_local_out(struct sk_buff *skb);
745 732
746/* 733/*
747 * Extension header (options) processing 734 * Extension header (options) processing
748 */ 735 */
749 736
750extern void ipv6_push_nfrag_opts(struct sk_buff *skb, 737void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
751 struct ipv6_txoptions *opt, 738 u8 *proto, struct in6_addr **daddr_p);
752 u8 *proto, 739void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
753 struct in6_addr **daddr_p); 740 u8 *proto);
754extern void ipv6_push_frag_opts(struct sk_buff *skb,
755 struct ipv6_txoptions *opt,
756 u8 *proto);
757 741
758extern int ipv6_skip_exthdr(const struct sk_buff *, int start, 742int ipv6_skip_exthdr(const struct sk_buff *, int start, u8 *nexthdrp,
759 u8 *nexthdrp, __be16 *frag_offp); 743 __be16 *frag_offp);
760 744
761extern bool ipv6_ext_hdr(u8 nexthdr); 745bool ipv6_ext_hdr(u8 nexthdr);
762 746
763enum { 747enum {
764 IP6_FH_F_FRAG = (1 << 0), 748 IP6_FH_F_FRAG = (1 << 0),
@@ -767,57 +751,44 @@ enum {
767}; 751};
768 752
769/* find specified header and get offset to it */ 753/* find specified header and get offset to it */
770extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, 754int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, int target,
771 int target, unsigned short *fragoff, int *fragflg); 755 unsigned short *fragoff, int *fragflg);
772 756
773extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); 757int ipv6_find_tlv(struct sk_buff *skb, int offset, int type);
774 758
775extern struct in6_addr *fl6_update_dst(struct flowi6 *fl6, 759struct in6_addr *fl6_update_dst(struct flowi6 *fl6,
776 const struct ipv6_txoptions *opt, 760 const struct ipv6_txoptions *opt,
777 struct in6_addr *orig); 761 struct in6_addr *orig);
778 762
779/* 763/*
780 * socket options (ipv6_sockglue.c) 764 * socket options (ipv6_sockglue.c)
781 */ 765 */
782 766
783extern int ipv6_setsockopt(struct sock *sk, int level, 767int ipv6_setsockopt(struct sock *sk, int level, int optname,
784 int optname, 768 char __user *optval, unsigned int optlen);
785 char __user *optval, 769int ipv6_getsockopt(struct sock *sk, int level, int optname,
786 unsigned int optlen); 770 char __user *optval, int __user *optlen);
787extern int ipv6_getsockopt(struct sock *sk, int level, 771int compat_ipv6_setsockopt(struct sock *sk, int level, int optname,
788 int optname, 772 char __user *optval, unsigned int optlen);
789 char __user *optval, 773int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
790 int __user *optlen); 774 char __user *optval, int __user *optlen);
791extern int compat_ipv6_setsockopt(struct sock *sk, 775
792 int level, 776int ip6_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len);
793 int optname, 777
794 char __user *optval, 778int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len);
795 unsigned int optlen); 779int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len);
796extern int compat_ipv6_getsockopt(struct sock *sk, 780void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port,
797 int level, 781 u32 info, u8 *payload);
798 int optname, 782void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info);
799 char __user *optval, 783void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu);
800 int __user *optlen); 784
801 785int inet6_release(struct socket *sock);
802extern int ip6_datagram_connect(struct sock *sk, 786int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
803 struct sockaddr *addr, int addr_len); 787int inet6_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len,
804 788 int peer);
805extern int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); 789int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
806extern int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len); 790
807extern void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, 791int inet6_hash_connect(struct inet_timewait_death_row *death_row,
808 u32 info, u8 *payload);
809extern void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info);
810extern void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu);
811
812extern int inet6_release(struct socket *sock);
813extern int inet6_bind(struct socket *sock, struct sockaddr *uaddr,
814 int addr_len);
815extern int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
816 int *uaddr_len, int peer);
817extern int inet6_ioctl(struct socket *sock, unsigned int cmd,
818 unsigned long arg);
819
820extern int inet6_hash_connect(struct inet_timewait_death_row *death_row,
821 struct sock *sk); 792 struct sock *sk);
822 793
823/* 794/*
@@ -829,30 +800,29 @@ extern const struct proto_ops inet6_dgram_ops;
829struct group_source_req; 800struct group_source_req;
830struct group_filter; 801struct group_filter;
831 802
832extern int ip6_mc_source(int add, int omode, struct sock *sk, 803int ip6_mc_source(int add, int omode, struct sock *sk,
833 struct group_source_req *pgsr); 804 struct group_source_req *pgsr);
834extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); 805int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf);
835extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, 806int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
836 struct group_filter __user *optval, 807 struct group_filter __user *optval, int __user *optlen);
837 int __user *optlen); 808unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr,
838extern unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr, 809 const struct in6_addr *daddr, u32 rnd);
839 const struct in6_addr *daddr, u32 rnd);
840 810
841#ifdef CONFIG_PROC_FS 811#ifdef CONFIG_PROC_FS
842extern int ac6_proc_init(struct net *net); 812int ac6_proc_init(struct net *net);
843extern void ac6_proc_exit(struct net *net); 813void ac6_proc_exit(struct net *net);
844extern int raw6_proc_init(void); 814int raw6_proc_init(void);
845extern void raw6_proc_exit(void); 815void raw6_proc_exit(void);
846extern int tcp6_proc_init(struct net *net); 816int tcp6_proc_init(struct net *net);
847extern void tcp6_proc_exit(struct net *net); 817void tcp6_proc_exit(struct net *net);
848extern int udp6_proc_init(struct net *net); 818int udp6_proc_init(struct net *net);
849extern void udp6_proc_exit(struct net *net); 819void udp6_proc_exit(struct net *net);
850extern int udplite6_proc_init(void); 820int udplite6_proc_init(void);
851extern void udplite6_proc_exit(void); 821void udplite6_proc_exit(void);
852extern int ipv6_misc_proc_init(void); 822int ipv6_misc_proc_init(void);
853extern void ipv6_misc_proc_exit(void); 823void ipv6_misc_proc_exit(void);
854extern int snmp6_register_dev(struct inet6_dev *idev); 824int snmp6_register_dev(struct inet6_dev *idev);
855extern int snmp6_unregister_dev(struct inet6_dev *idev); 825int snmp6_unregister_dev(struct inet6_dev *idev);
856 826
857#else 827#else
858static inline int ac6_proc_init(struct net *net) { return 0; } 828static inline int ac6_proc_init(struct net *net) { return 0; }
@@ -865,10 +835,10 @@ static inline int snmp6_unregister_dev(struct inet6_dev *idev) { return 0; }
865extern struct ctl_table ipv6_route_table_template[]; 835extern struct ctl_table ipv6_route_table_template[];
866extern struct ctl_table ipv6_icmp_table_template[]; 836extern struct ctl_table ipv6_icmp_table_template[];
867 837
868extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); 838struct ctl_table *ipv6_icmp_sysctl_init(struct net *net);
869extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); 839struct ctl_table *ipv6_route_sysctl_init(struct net *net);
870extern int ipv6_sysctl_register(void); 840int ipv6_sysctl_register(void);
871extern void ipv6_sysctl_unregister(void); 841void ipv6_sysctl_unregister(void);
872#endif 842#endif
873 843
874#endif /* _NET_IPV6_H */ 844#endif /* _NET_IPV6_H */