diff options
author | Joe Perches <joe@perches.com> | 2013-09-21 13:22:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-21 14:01:38 -0400 |
commit | 5c3a0fd7d0fc2985fcd540aa9d7656dcc2d57b41 (patch) | |
tree | cff00e1aae6c891ebe29de574a67c23ce2a31946 /include/net/ipv6.h | |
parent | 1fd51155387264e3ca72094abadcaadb3f5969f6 (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.h | 268 |
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 | ||
247 | extern struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); | 247 | struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); |
248 | extern struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space, | 248 | struct 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); |
251 | extern void fl6_free_socklist(struct sock *sk); | 251 | void fl6_free_socklist(struct sock *sk); |
252 | extern int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); | 252 | int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); |
253 | extern int ip6_flowlabel_init(void); | 253 | int ip6_flowlabel_init(void); |
254 | extern void ip6_flowlabel_cleanup(void); | 254 | void ip6_flowlabel_cleanup(void); |
255 | 255 | ||
256 | static inline void fl6_sock_release(struct ip6_flowlabel *fl) | 256 | static 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 | ||
262 | extern void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); | 262 | void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); |
263 | 263 | ||
264 | int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, | 264 | int 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, | |||
267 | struct dst_entry *icmpv6_route_lookup(struct net *net, struct sk_buff *skb, | 267 | struct 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 | ||
270 | extern int ip6_ra_control(struct sock *sk, int sel); | 270 | int ip6_ra_control(struct sock *sk, int sel); |
271 | 271 | ||
272 | extern int ipv6_parse_hopopts(struct sk_buff *skb); | 272 | int ipv6_parse_hopopts(struct sk_buff *skb); |
273 | 273 | ||
274 | extern struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt); | 274 | struct ipv6_txoptions *ipv6_dup_options(struct sock *sk, |
275 | extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, | 275 | struct ipv6_txoptions *opt); |
276 | int newtype, | 276 | struct 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); | ||
279 | struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, | 281 | struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, |
280 | struct ipv6_txoptions *opt); | 282 | struct ipv6_txoptions *opt); |
281 | 283 | ||
282 | extern bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); | 284 | bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); |
283 | 285 | ||
284 | static inline bool ipv6_accept_ra(struct inet6_dev *idev) | 286 | static 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 | ||
309 | extern int __ipv6_addr_type(const struct in6_addr *addr); | 311 | int __ipv6_addr_type(const struct in6_addr *addr); |
310 | static inline int ipv6_addr_type(const struct in6_addr *addr) | 312 | static 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 | ||
659 | extern void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); | 661 | void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); |
660 | 662 | ||
661 | extern int ip6_dst_hoplimit(struct dst_entry *dst); | 663 | int 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 | ||
685 | extern int ipv6_rcv(struct sk_buff *skb, | 687 | int 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 | ||
690 | extern int ip6_rcv_finish(struct sk_buff *skb); | 690 | int ip6_rcv_finish(struct sk_buff *skb); |
691 | 691 | ||
692 | /* | 692 | /* |
693 | * upper-layer output functions | 693 | * upper-layer output functions |
694 | */ | 694 | */ |
695 | extern int ip6_xmit(struct sock *sk, | 695 | int 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, | 698 | int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); |
699 | int tclass); | 699 | |
700 | 700 | int ip6_append_data(struct sock *sk, | |
701 | extern 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), | |
703 | extern 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, | 707 | int ip6_push_pending_frames(struct sock *sk); |
708 | int hlimit, | 708 | |
709 | int tclass, | 709 | void ip6_flush_pending_frames(struct sock *sk); |
710 | struct ipv6_txoptions *opt, | 710 | |
711 | struct flowi6 *fl6, | 711 | int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi6 *fl6); |
712 | struct rt6_info *rt, | 712 | struct 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 | 715 | struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, | |
716 | extern int ip6_push_pending_frames(struct sock *sk); | 716 | const struct in6_addr *final_dst, |
717 | 717 | bool can_sleep); | |
718 | extern void ip6_flush_pending_frames(struct sock *sk); | 718 | struct dst_entry *ip6_blackhole_route(struct net *net, |
719 | 719 | struct dst_entry *orig_dst); | |
720 | extern int ip6_dst_lookup(struct sock *sk, | ||
721 | struct dst_entry **dst, | ||
722 | struct flowi6 *fl6); | ||
723 | extern 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); | ||
727 | extern 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); | ||
731 | extern 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 | ||
738 | extern int ip6_output(struct sk_buff *skb); | 725 | int ip6_output(struct sk_buff *skb); |
739 | extern int ip6_forward(struct sk_buff *skb); | 726 | int ip6_forward(struct sk_buff *skb); |
740 | extern int ip6_input(struct sk_buff *skb); | 727 | int ip6_input(struct sk_buff *skb); |
741 | extern int ip6_mc_input(struct sk_buff *skb); | 728 | int ip6_mc_input(struct sk_buff *skb); |
742 | 729 | ||
743 | extern int __ip6_local_out(struct sk_buff *skb); | 730 | int __ip6_local_out(struct sk_buff *skb); |
744 | extern int ip6_local_out(struct sk_buff *skb); | 731 | int 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 | ||
750 | extern void ipv6_push_nfrag_opts(struct sk_buff *skb, | 737 | void 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, | 739 | void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, |
753 | struct in6_addr **daddr_p); | 740 | u8 *proto); |
754 | extern void ipv6_push_frag_opts(struct sk_buff *skb, | ||
755 | struct ipv6_txoptions *opt, | ||
756 | u8 *proto); | ||
757 | 741 | ||
758 | extern int ipv6_skip_exthdr(const struct sk_buff *, int start, | 742 | int ipv6_skip_exthdr(const struct sk_buff *, int start, u8 *nexthdrp, |
759 | u8 *nexthdrp, __be16 *frag_offp); | 743 | __be16 *frag_offp); |
760 | 744 | ||
761 | extern bool ipv6_ext_hdr(u8 nexthdr); | 745 | bool ipv6_ext_hdr(u8 nexthdr); |
762 | 746 | ||
763 | enum { | 747 | enum { |
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 */ |
770 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, | 754 | int 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 | ||
773 | extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); | 757 | int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); |
774 | 758 | ||
775 | extern struct in6_addr *fl6_update_dst(struct flowi6 *fl6, | 759 | struct 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 | ||
783 | extern int ipv6_setsockopt(struct sock *sk, int level, | 767 | int ipv6_setsockopt(struct sock *sk, int level, int optname, |
784 | int optname, | 768 | char __user *optval, unsigned int optlen); |
785 | char __user *optval, | 769 | int ipv6_getsockopt(struct sock *sk, int level, int optname, |
786 | unsigned int optlen); | 770 | char __user *optval, int __user *optlen); |
787 | extern int ipv6_getsockopt(struct sock *sk, int level, | 771 | int compat_ipv6_setsockopt(struct sock *sk, int level, int optname, |
788 | int optname, | 772 | char __user *optval, unsigned int optlen); |
789 | char __user *optval, | 773 | int compat_ipv6_getsockopt(struct sock *sk, int level, int optname, |
790 | int __user *optlen); | 774 | char __user *optval, int __user *optlen); |
791 | extern int compat_ipv6_setsockopt(struct sock *sk, | 775 | |
792 | int level, | 776 | int ip6_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len); |
793 | int optname, | 777 | |
794 | char __user *optval, | 778 | int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); |
795 | unsigned int optlen); | 779 | int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len); |
796 | extern int compat_ipv6_getsockopt(struct sock *sk, | 780 | void 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, | 782 | void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info); |
799 | char __user *optval, | 783 | void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu); |
800 | int __user *optlen); | 784 | |
801 | 785 | int inet6_release(struct socket *sock); | |
802 | extern int ip6_datagram_connect(struct sock *sk, | 786 | int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len); |
803 | struct sockaddr *addr, int addr_len); | 787 | int inet6_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, |
804 | 788 | int peer); | |
805 | extern int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); | 789 | int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); |
806 | extern int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len); | 790 | |
807 | extern void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, | 791 | int inet6_hash_connect(struct inet_timewait_death_row *death_row, |
808 | u32 info, u8 *payload); | ||
809 | extern void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info); | ||
810 | extern void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu); | ||
811 | |||
812 | extern int inet6_release(struct socket *sock); | ||
813 | extern int inet6_bind(struct socket *sock, struct sockaddr *uaddr, | ||
814 | int addr_len); | ||
815 | extern int inet6_getname(struct socket *sock, struct sockaddr *uaddr, | ||
816 | int *uaddr_len, int peer); | ||
817 | extern int inet6_ioctl(struct socket *sock, unsigned int cmd, | ||
818 | unsigned long arg); | ||
819 | |||
820 | extern 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; | |||
829 | struct group_source_req; | 800 | struct group_source_req; |
830 | struct group_filter; | 801 | struct group_filter; |
831 | 802 | ||
832 | extern int ip6_mc_source(int add, int omode, struct sock *sk, | 803 | int ip6_mc_source(int add, int omode, struct sock *sk, |
833 | struct group_source_req *pgsr); | 804 | struct group_source_req *pgsr); |
834 | extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); | 805 | int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); |
835 | extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, | 806 | int 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); | 808 | unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr, |
838 | extern 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 |
842 | extern int ac6_proc_init(struct net *net); | 812 | int ac6_proc_init(struct net *net); |
843 | extern void ac6_proc_exit(struct net *net); | 813 | void ac6_proc_exit(struct net *net); |
844 | extern int raw6_proc_init(void); | 814 | int raw6_proc_init(void); |
845 | extern void raw6_proc_exit(void); | 815 | void raw6_proc_exit(void); |
846 | extern int tcp6_proc_init(struct net *net); | 816 | int tcp6_proc_init(struct net *net); |
847 | extern void tcp6_proc_exit(struct net *net); | 817 | void tcp6_proc_exit(struct net *net); |
848 | extern int udp6_proc_init(struct net *net); | 818 | int udp6_proc_init(struct net *net); |
849 | extern void udp6_proc_exit(struct net *net); | 819 | void udp6_proc_exit(struct net *net); |
850 | extern int udplite6_proc_init(void); | 820 | int udplite6_proc_init(void); |
851 | extern void udplite6_proc_exit(void); | 821 | void udplite6_proc_exit(void); |
852 | extern int ipv6_misc_proc_init(void); | 822 | int ipv6_misc_proc_init(void); |
853 | extern void ipv6_misc_proc_exit(void); | 823 | void ipv6_misc_proc_exit(void); |
854 | extern int snmp6_register_dev(struct inet6_dev *idev); | 824 | int snmp6_register_dev(struct inet6_dev *idev); |
855 | extern int snmp6_unregister_dev(struct inet6_dev *idev); | 825 | int snmp6_unregister_dev(struct inet6_dev *idev); |
856 | 826 | ||
857 | #else | 827 | #else |
858 | static inline int ac6_proc_init(struct net *net) { return 0; } | 828 | static 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; } | |||
865 | extern struct ctl_table ipv6_route_table_template[]; | 835 | extern struct ctl_table ipv6_route_table_template[]; |
866 | extern struct ctl_table ipv6_icmp_table_template[]; | 836 | extern struct ctl_table ipv6_icmp_table_template[]; |
867 | 837 | ||
868 | extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); | 838 | struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); |
869 | extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); | 839 | struct ctl_table *ipv6_route_sysctl_init(struct net *net); |
870 | extern int ipv6_sysctl_register(void); | 840 | int ipv6_sysctl_register(void); |
871 | extern void ipv6_sysctl_unregister(void); | 841 | void ipv6_sysctl_unregister(void); |
872 | #endif | 842 | #endif |
873 | 843 | ||
874 | #endif /* _NET_IPV6_H */ | 844 | #endif /* _NET_IPV6_H */ |