aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_private.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-10-18 16:48:22 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-19 19:12:11 -0400
commit348662a1429f95ed2d488c939c324ec152638742 (patch)
treee94d2acc47df1ad37e811f71c058fdb0c89c970f /net/bridge/br_private.h
parent47d27aad44169372f358cda88a223883f6760fa5 (diff)
net: 8021q/bluetooth/bridge/can/ceph: 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 'net/bridge/br_private.h')
-rw-r--r--net/bridge/br_private.h299
1 files changed, 138 insertions, 161 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index efb57d911569..767c4dad8504 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -344,10 +344,9 @@ static inline int br_is_root_bridge(const struct net_bridge *br)
344} 344}
345 345
346/* br_device.c */ 346/* br_device.c */
347extern void br_dev_setup(struct net_device *dev); 347void br_dev_setup(struct net_device *dev);
348extern void br_dev_delete(struct net_device *dev, struct list_head *list); 348void br_dev_delete(struct net_device *dev, struct list_head *list);
349extern netdev_tx_t br_dev_xmit(struct sk_buff *skb, 349netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev);
350 struct net_device *dev);
351#ifdef CONFIG_NET_POLL_CONTROLLER 350#ifdef CONFIG_NET_POLL_CONTROLLER
352static inline void br_netpoll_send_skb(const struct net_bridge_port *p, 351static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
353 struct sk_buff *skb) 352 struct sk_buff *skb)
@@ -358,8 +357,8 @@ static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
358 netpoll_send_skb(np, skb); 357 netpoll_send_skb(np, skb);
359} 358}
360 359
361extern int br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp); 360int br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp);
362extern void br_netpoll_disable(struct net_bridge_port *p); 361void br_netpoll_disable(struct net_bridge_port *p);
363#else 362#else
364static inline void br_netpoll_send_skb(const struct net_bridge_port *p, 363static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
365 struct sk_buff *skb) 364 struct sk_buff *skb)
@@ -377,116 +376,99 @@ static inline void br_netpoll_disable(struct net_bridge_port *p)
377#endif 376#endif
378 377
379/* br_fdb.c */ 378/* br_fdb.c */
380extern int br_fdb_init(void); 379int br_fdb_init(void);
381extern void br_fdb_fini(void); 380void br_fdb_fini(void);
382extern void br_fdb_flush(struct net_bridge *br); 381void br_fdb_flush(struct net_bridge *br);
383extern void br_fdb_changeaddr(struct net_bridge_port *p, 382void br_fdb_changeaddr(struct net_bridge_port *p, const unsigned char *newaddr);
384 const unsigned char *newaddr); 383void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr);
385extern void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr); 384void br_fdb_cleanup(unsigned long arg);
386extern void br_fdb_cleanup(unsigned long arg); 385void br_fdb_delete_by_port(struct net_bridge *br,
387extern void br_fdb_delete_by_port(struct net_bridge *br, 386 const struct net_bridge_port *p, int do_all);
388 const struct net_bridge_port *p, int do_all); 387struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br,
389extern struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br, 388 const unsigned char *addr, __u16 vid);
390 const unsigned char *addr, 389int br_fdb_test_addr(struct net_device *dev, unsigned char *addr);
391 __u16 vid); 390int br_fdb_fillbuf(struct net_bridge *br, void *buf, unsigned long count,
392extern int br_fdb_test_addr(struct net_device *dev, unsigned char *addr); 391 unsigned long off);
393extern int br_fdb_fillbuf(struct net_bridge *br, void *buf, 392int br_fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
394 unsigned long count, unsigned long off); 393 const unsigned char *addr, u16 vid);
395extern int br_fdb_insert(struct net_bridge *br, 394void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
396 struct net_bridge_port *source, 395 const unsigned char *addr, u16 vid);
397 const unsigned char *addr, 396int fdb_delete_by_addr(struct net_bridge *br, const u8 *addr, u16 vid);
398 u16 vid); 397
399extern void br_fdb_update(struct net_bridge *br, 398int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
400 struct net_bridge_port *source, 399 struct net_device *dev, const unsigned char *addr);
401 const unsigned char *addr, 400int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[], struct net_device *dev,
402 u16 vid); 401 const unsigned char *addr, u16 nlh_flags);
403extern int fdb_delete_by_addr(struct net_bridge *br, const u8 *addr, u16 vid); 402int br_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
404 403 struct net_device *dev, int idx);
405extern int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
406 struct net_device *dev,
407 const unsigned char *addr);
408extern int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[],
409 struct net_device *dev,
410 const unsigned char *addr,
411 u16 nlh_flags);
412extern int br_fdb_dump(struct sk_buff *skb,
413 struct netlink_callback *cb,
414 struct net_device *dev,
415 int idx);
416 404
417/* br_forward.c */ 405/* br_forward.c */
418extern void br_deliver(const struct net_bridge_port *to, 406void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb);
419 struct sk_buff *skb); 407int br_dev_queue_push_xmit(struct sk_buff *skb);
420extern int br_dev_queue_push_xmit(struct sk_buff *skb); 408void br_forward(const struct net_bridge_port *to,
421extern void br_forward(const struct net_bridge_port *to,
422 struct sk_buff *skb, struct sk_buff *skb0); 409 struct sk_buff *skb, struct sk_buff *skb0);
423extern int br_forward_finish(struct sk_buff *skb); 410int br_forward_finish(struct sk_buff *skb);
424extern void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb, 411void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb, bool unicast);
425 bool unicast); 412void br_flood_forward(struct net_bridge *br, struct sk_buff *skb,
426extern void br_flood_forward(struct net_bridge *br, struct sk_buff *skb, 413 struct sk_buff *skb2, bool unicast);
427 struct sk_buff *skb2, bool unicast);
428 414
429/* br_if.c */ 415/* br_if.c */
430extern void br_port_carrier_check(struct net_bridge_port *p); 416void br_port_carrier_check(struct net_bridge_port *p);
431extern int br_add_bridge(struct net *net, const char *name); 417int br_add_bridge(struct net *net, const char *name);
432extern int br_del_bridge(struct net *net, const char *name); 418int br_del_bridge(struct net *net, const char *name);
433extern void br_net_exit(struct net *net); 419void br_net_exit(struct net *net);
434extern int br_add_if(struct net_bridge *br, 420int br_add_if(struct net_bridge *br, struct net_device *dev);
435 struct net_device *dev); 421int br_del_if(struct net_bridge *br, struct net_device *dev);
436extern int br_del_if(struct net_bridge *br, 422int br_min_mtu(const struct net_bridge *br);
437 struct net_device *dev); 423netdev_features_t br_features_recompute(struct net_bridge *br,
438extern int br_min_mtu(const struct net_bridge *br); 424 netdev_features_t features);
439extern netdev_features_t br_features_recompute(struct net_bridge *br,
440 netdev_features_t features);
441 425
442/* br_input.c */ 426/* br_input.c */
443extern int br_handle_frame_finish(struct sk_buff *skb); 427int br_handle_frame_finish(struct sk_buff *skb);
444extern rx_handler_result_t br_handle_frame(struct sk_buff **pskb); 428rx_handler_result_t br_handle_frame(struct sk_buff **pskb);
445 429
446/* br_ioctl.c */ 430/* br_ioctl.c */
447extern int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); 431int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
448extern int br_ioctl_deviceless_stub(struct net *net, unsigned int cmd, void __user *arg); 432int br_ioctl_deviceless_stub(struct net *net, unsigned int cmd,
433 void __user *arg);
449 434
450/* br_multicast.c */ 435/* br_multicast.c */
451#ifdef CONFIG_BRIDGE_IGMP_SNOOPING 436#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
452extern unsigned int br_mdb_rehash_seq; 437extern unsigned int br_mdb_rehash_seq;
453extern int br_multicast_rcv(struct net_bridge *br, 438int br_multicast_rcv(struct net_bridge *br, struct net_bridge_port *port,
454 struct net_bridge_port *port, 439 struct sk_buff *skb);
455 struct sk_buff *skb); 440struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
456extern struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, 441 struct sk_buff *skb, u16 vid);
457 struct sk_buff *skb, u16 vid); 442void br_multicast_add_port(struct net_bridge_port *port);
458extern void br_multicast_add_port(struct net_bridge_port *port); 443void br_multicast_del_port(struct net_bridge_port *port);
459extern void br_multicast_del_port(struct net_bridge_port *port); 444void br_multicast_enable_port(struct net_bridge_port *port);
460extern void br_multicast_enable_port(struct net_bridge_port *port); 445void br_multicast_disable_port(struct net_bridge_port *port);
461extern void br_multicast_disable_port(struct net_bridge_port *port); 446void br_multicast_init(struct net_bridge *br);
462extern void br_multicast_init(struct net_bridge *br); 447void br_multicast_open(struct net_bridge *br);
463extern void br_multicast_open(struct net_bridge *br); 448void br_multicast_stop(struct net_bridge *br);
464extern void br_multicast_stop(struct net_bridge *br); 449void br_multicast_deliver(struct net_bridge_mdb_entry *mdst,
465extern void br_multicast_deliver(struct net_bridge_mdb_entry *mdst, 450 struct sk_buff *skb);
466 struct sk_buff *skb); 451void br_multicast_forward(struct net_bridge_mdb_entry *mdst,
467extern void br_multicast_forward(struct net_bridge_mdb_entry *mdst, 452 struct sk_buff *skb, struct sk_buff *skb2);
468 struct sk_buff *skb, struct sk_buff *skb2); 453int br_multicast_set_router(struct net_bridge *br, unsigned long val);
469extern int br_multicast_set_router(struct net_bridge *br, unsigned long val); 454int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val);
470extern int br_multicast_set_port_router(struct net_bridge_port *p, 455int br_multicast_toggle(struct net_bridge *br, unsigned long val);
471 unsigned long val); 456int br_multicast_set_querier(struct net_bridge *br, unsigned long val);
472extern int br_multicast_toggle(struct net_bridge *br, unsigned long val); 457int br_multicast_set_hash_max(struct net_bridge *br, unsigned long val);
473extern int br_multicast_set_querier(struct net_bridge *br, unsigned long val); 458struct net_bridge_mdb_entry *
474extern int br_multicast_set_hash_max(struct net_bridge *br, unsigned long val); 459br_mdb_ip_get(struct net_bridge_mdb_htable *mdb, struct br_ip *dst);
475extern struct net_bridge_mdb_entry *br_mdb_ip_get( 460struct net_bridge_mdb_entry *
476 struct net_bridge_mdb_htable *mdb, 461br_multicast_new_group(struct net_bridge *br, struct net_bridge_port *port,
477 struct br_ip *dst); 462 struct br_ip *group);
478extern struct net_bridge_mdb_entry *br_multicast_new_group(struct net_bridge *br, 463void br_multicast_free_pg(struct rcu_head *head);
479 struct net_bridge_port *port, struct br_ip *group); 464struct net_bridge_port_group *
480extern void br_multicast_free_pg(struct rcu_head *head); 465br_multicast_new_port_group(struct net_bridge_port *port, struct br_ip *group,
481extern struct net_bridge_port_group *br_multicast_new_port_group( 466 struct net_bridge_port_group __rcu *next,
482 struct net_bridge_port *port, 467 unsigned char state);
483 struct br_ip *group, 468void br_mdb_init(void);
484 struct net_bridge_port_group __rcu *next, 469void br_mdb_uninit(void);
485 unsigned char state); 470void br_mdb_notify(struct net_device *dev, struct net_bridge_port *port,
486extern void br_mdb_init(void); 471 struct br_ip *group, int type);
487extern void br_mdb_uninit(void);
488extern void br_mdb_notify(struct net_device *dev, struct net_bridge_port *port,
489 struct br_ip *group, int type);
490 472
491#define mlock_dereference(X, br) \ 473#define mlock_dereference(X, br) \
492 rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock)) 474 rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock))
@@ -591,22 +573,21 @@ static inline void br_mdb_uninit(void)
591 573
592/* br_vlan.c */ 574/* br_vlan.c */
593#ifdef CONFIG_BRIDGE_VLAN_FILTERING 575#ifdef CONFIG_BRIDGE_VLAN_FILTERING
594extern bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v, 576bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,
595 struct sk_buff *skb, u16 *vid); 577 struct sk_buff *skb, u16 *vid);
596extern bool br_allowed_egress(struct net_bridge *br, 578bool br_allowed_egress(struct net_bridge *br, const struct net_port_vlans *v,
597 const struct net_port_vlans *v, 579 const struct sk_buff *skb);
598 const struct sk_buff *skb); 580struct sk_buff *br_handle_vlan(struct net_bridge *br,
599extern struct sk_buff *br_handle_vlan(struct net_bridge *br, 581 const struct net_port_vlans *v,
600 const struct net_port_vlans *v, 582 struct sk_buff *skb);
601 struct sk_buff *skb); 583int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags);
602extern int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags); 584int br_vlan_delete(struct net_bridge *br, u16 vid);
603extern int br_vlan_delete(struct net_bridge *br, u16 vid); 585void br_vlan_flush(struct net_bridge *br);
604extern void br_vlan_flush(struct net_bridge *br); 586int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val);
605extern int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val); 587int nbp_vlan_add(struct net_bridge_port *port, u16 vid, u16 flags);
606extern int nbp_vlan_add(struct net_bridge_port *port, u16 vid, u16 flags); 588int nbp_vlan_delete(struct net_bridge_port *port, u16 vid);
607extern int nbp_vlan_delete(struct net_bridge_port *port, u16 vid); 589void nbp_vlan_flush(struct net_bridge_port *port);
608extern void nbp_vlan_flush(struct net_bridge_port *port); 590bool nbp_vlan_find(struct net_bridge_port *port, u16 vid);
609extern bool nbp_vlan_find(struct net_bridge_port *port, u16 vid);
610 591
611static inline struct net_port_vlans *br_get_vlan_info( 592static inline struct net_port_vlans *br_get_vlan_info(
612 const struct net_bridge *br) 593 const struct net_bridge *br)
@@ -727,9 +708,9 @@ static inline u16 br_get_pvid(const struct net_port_vlans *v)
727 708
728/* br_netfilter.c */ 709/* br_netfilter.c */
729#ifdef CONFIG_BRIDGE_NETFILTER 710#ifdef CONFIG_BRIDGE_NETFILTER
730extern int br_netfilter_init(void); 711int br_netfilter_init(void);
731extern void br_netfilter_fini(void); 712void br_netfilter_fini(void);
732extern void br_netfilter_rtable_init(struct net_bridge *); 713void br_netfilter_rtable_init(struct net_bridge *);
733#else 714#else
734#define br_netfilter_init() (0) 715#define br_netfilter_init() (0)
735#define br_netfilter_fini() do { } while(0) 716#define br_netfilter_fini() do { } while(0)
@@ -737,43 +718,39 @@ extern void br_netfilter_rtable_init(struct net_bridge *);
737#endif 718#endif
738 719
739/* br_stp.c */ 720/* br_stp.c */
740extern void br_log_state(const struct net_bridge_port *p); 721void br_log_state(const struct net_bridge_port *p);
741extern struct net_bridge_port *br_get_port(struct net_bridge *br, 722struct net_bridge_port *br_get_port(struct net_bridge *br, u16 port_no);
742 u16 port_no); 723void br_init_port(struct net_bridge_port *p);
743extern void br_init_port(struct net_bridge_port *p); 724void br_become_designated_port(struct net_bridge_port *p);
744extern void br_become_designated_port(struct net_bridge_port *p);
745 725
746extern void __br_set_forward_delay(struct net_bridge *br, unsigned long t); 726void __br_set_forward_delay(struct net_bridge *br, unsigned long t);
747extern int br_set_forward_delay(struct net_bridge *br, unsigned long x); 727int br_set_forward_delay(struct net_bridge *br, unsigned long x);
748extern int br_set_hello_time(struct net_bridge *br, unsigned long x); 728int br_set_hello_time(struct net_bridge *br, unsigned long x);
749extern int br_set_max_age(struct net_bridge *br, unsigned long x); 729int br_set_max_age(struct net_bridge *br, unsigned long x);
750 730
751 731
752/* br_stp_if.c */ 732/* br_stp_if.c */
753extern void br_stp_enable_bridge(struct net_bridge *br); 733void br_stp_enable_bridge(struct net_bridge *br);
754extern void br_stp_disable_bridge(struct net_bridge *br); 734void br_stp_disable_bridge(struct net_bridge *br);
755extern void br_stp_set_enabled(struct net_bridge *br, unsigned long val); 735void br_stp_set_enabled(struct net_bridge *br, unsigned long val);
756extern void br_stp_enable_port(struct net_bridge_port *p); 736void br_stp_enable_port(struct net_bridge_port *p);
757extern void br_stp_disable_port(struct net_bridge_port *p); 737void br_stp_disable_port(struct net_bridge_port *p);
758extern bool br_stp_recalculate_bridge_id(struct net_bridge *br); 738bool br_stp_recalculate_bridge_id(struct net_bridge *br);
759extern void br_stp_change_bridge_id(struct net_bridge *br, const unsigned char *a); 739void br_stp_change_bridge_id(struct net_bridge *br, const unsigned char *a);
760extern void br_stp_set_bridge_priority(struct net_bridge *br, 740void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio);
761 u16 newprio); 741int br_stp_set_port_priority(struct net_bridge_port *p, unsigned long newprio);
762extern int br_stp_set_port_priority(struct net_bridge_port *p, 742int br_stp_set_path_cost(struct net_bridge_port *p, unsigned long path_cost);
763 unsigned long newprio); 743ssize_t br_show_bridge_id(char *buf, const struct bridge_id *id);
764extern int br_stp_set_path_cost(struct net_bridge_port *p,
765 unsigned long path_cost);
766extern ssize_t br_show_bridge_id(char *buf, const struct bridge_id *id);
767 744
768/* br_stp_bpdu.c */ 745/* br_stp_bpdu.c */
769struct stp_proto; 746struct stp_proto;
770extern void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb, 747void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb,
771 struct net_device *dev); 748 struct net_device *dev);
772 749
773/* br_stp_timer.c */ 750/* br_stp_timer.c */
774extern void br_stp_timer_init(struct net_bridge *br); 751void br_stp_timer_init(struct net_bridge *br);
775extern void br_stp_port_timer_init(struct net_bridge_port *p); 752void br_stp_port_timer_init(struct net_bridge_port *p);
776extern unsigned long br_timer_value(const struct timer_list *timer); 753unsigned long br_timer_value(const struct timer_list *timer);
777 754
778/* br.c */ 755/* br.c */
779#if IS_ENABLED(CONFIG_ATM_LANE) 756#if IS_ENABLED(CONFIG_ATM_LANE)
@@ -782,23 +759,23 @@ extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr)
782 759
783/* br_netlink.c */ 760/* br_netlink.c */
784extern struct rtnl_link_ops br_link_ops; 761extern struct rtnl_link_ops br_link_ops;
785extern int br_netlink_init(void); 762int br_netlink_init(void);
786extern void br_netlink_fini(void); 763void br_netlink_fini(void);
787extern void br_ifinfo_notify(int event, struct net_bridge_port *port); 764void br_ifinfo_notify(int event, struct net_bridge_port *port);
788extern int br_setlink(struct net_device *dev, struct nlmsghdr *nlmsg); 765int br_setlink(struct net_device *dev, struct nlmsghdr *nlmsg);
789extern int br_dellink(struct net_device *dev, struct nlmsghdr *nlmsg); 766int br_dellink(struct net_device *dev, struct nlmsghdr *nlmsg);
790extern int br_getlink(struct sk_buff *skb, u32 pid, u32 seq, 767int br_getlink(struct sk_buff *skb, u32 pid, u32 seq, struct net_device *dev,
791 struct net_device *dev, u32 filter_mask); 768 u32 filter_mask);
792 769
793#ifdef CONFIG_SYSFS 770#ifdef CONFIG_SYSFS
794/* br_sysfs_if.c */ 771/* br_sysfs_if.c */
795extern const struct sysfs_ops brport_sysfs_ops; 772extern const struct sysfs_ops brport_sysfs_ops;
796extern int br_sysfs_addif(struct net_bridge_port *p); 773int br_sysfs_addif(struct net_bridge_port *p);
797extern int br_sysfs_renameif(struct net_bridge_port *p); 774int br_sysfs_renameif(struct net_bridge_port *p);
798 775
799/* br_sysfs_br.c */ 776/* br_sysfs_br.c */
800extern int br_sysfs_addbr(struct net_device *dev); 777int br_sysfs_addbr(struct net_device *dev);
801extern void br_sysfs_delbr(struct net_device *dev); 778void br_sysfs_delbr(struct net_device *dev);
802 779
803#else 780#else
804 781