#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/etherdevice.h>
#include <net/rtnetlink.h>
#include <net/net_namespace.h>
#include <net/sock.h>
#include <uapi/linux/if_bridge.h>
#include "br_private.h"
#include "br_private_stp.h"
#include "br_private_cfm.h"
#include "br_private_tunnel.h"
#include "br_private_mcast_eht.h"
static int __get_num_vlan_infos(struct net_bridge_vlan_group *vg,
u32 filter_mask)
{ … }
static int br_get_num_vlan_infos(struct net_bridge_vlan_group *vg,
u32 filter_mask)
{ … }
static size_t br_get_link_af_size_filtered(const struct net_device *dev,
u32 filter_mask)
{ … }
static inline size_t br_port_info_size(void)
{ … }
static inline size_t br_nlmsg_size(struct net_device *dev, u32 filter_mask)
{ … }
static int br_port_fill_attrs(struct sk_buff *skb,
const struct net_bridge_port *p)
{ … }
static int br_fill_ifvlaninfo_range(struct sk_buff *skb, u16 vid_start,
u16 vid_end, u16 flags)
{ … }
static int br_fill_ifvlaninfo_compressed(struct sk_buff *skb,
struct net_bridge_vlan_group *vg)
{ … }
static int br_fill_ifvlaninfo(struct sk_buff *skb,
struct net_bridge_vlan_group *vg)
{ … }
static int br_fill_ifinfo(struct sk_buff *skb,
const struct net_bridge_port *port,
u32 pid, u32 seq, int event, unsigned int flags,
u32 filter_mask, const struct net_device *dev,
bool getlink)
{ … }
void br_info_notify(int event, const struct net_bridge *br,
const struct net_bridge_port *port, u32 filter)
{ … }
void br_ifinfo_notify(int event, const struct net_bridge *br,
const struct net_bridge_port *port)
{ … }
int br_getlink(struct sk_buff *skb, u32 pid, u32 seq,
struct net_device *dev, u32 filter_mask, int nlflags)
{ … }
static int br_vlan_info(struct net_bridge *br, struct net_bridge_port *p,
int cmd, struct bridge_vlan_info *vinfo, bool *changed,
struct netlink_ext_ack *extack)
{ … }
int br_process_vlan_info(struct net_bridge *br,
struct net_bridge_port *p, int cmd,
struct bridge_vlan_info *vinfo_curr,
struct bridge_vlan_info **vinfo_last,
bool *changed,
struct netlink_ext_ack *extack)
{ … }
static int br_afspec(struct net_bridge *br,
struct net_bridge_port *p,
struct nlattr *af_spec,
int cmd, bool *changed,
struct netlink_ext_ack *extack)
{ … }
static const struct nla_policy br_port_policy[IFLA_BRPORT_MAX + 1] = …;
static int br_set_port_state(struct net_bridge_port *p, u8 state)
{ … }
static void br_set_port_flag(struct net_bridge_port *p, struct nlattr *tb[],
int attrtype, unsigned long mask)
{ … }
static int br_setport(struct net_bridge_port *p, struct nlattr *tb[],
struct netlink_ext_ack *extack)
{ … }
int br_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags,
struct netlink_ext_ack *extack)
{ … }
int br_dellink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags)
{ … }
static int br_validate(struct nlattr *tb[], struct nlattr *data[],
struct netlink_ext_ack *extack)
{ … }
static int br_port_slave_changelink(struct net_device *brdev,
struct net_device *dev,
struct nlattr *tb[],
struct nlattr *data[],
struct netlink_ext_ack *extack)
{ … }
static int br_port_fill_slave_info(struct sk_buff *skb,
const struct net_device *brdev,
const struct net_device *dev)
{ … }
static size_t br_port_get_slave_size(const struct net_device *brdev,
const struct net_device *dev)
{ … }
static const struct nla_policy br_policy[IFLA_BR_MAX + 1] = …;
static int br_changelink(struct net_device *brdev, struct nlattr *tb[],
struct nlattr *data[],
struct netlink_ext_ack *extack)
{ … }
static int br_dev_newlink(struct net *src_net, struct net_device *dev,
struct nlattr *tb[], struct nlattr *data[],
struct netlink_ext_ack *extack)
{ … }
static size_t br_get_size(const struct net_device *brdev)
{ … }
static int br_fill_info(struct sk_buff *skb, const struct net_device *brdev)
{ … }
static size_t br_get_linkxstats_size(const struct net_device *dev, int attr)
{ … }
static int br_fill_linkxstats(struct sk_buff *skb,
const struct net_device *dev,
int *prividx, int attr)
{ … }
static struct rtnl_af_ops br_af_ops __read_mostly = …;
struct rtnl_link_ops br_link_ops __read_mostly = …;
int __init br_netlink_init(void)
{ … }
void br_netlink_fini(void)
{ … }