#include <linux/capability.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <net/bonding.h>
struct slave_attribute { … };
#define SLAVE_ATTR_RO(_name) …
static ssize_t state_show(struct slave *slave, char *buf)
{ … }
static SLAVE_ATTR_RO(state);
static ssize_t mii_status_show(struct slave *slave, char *buf)
{ … }
static SLAVE_ATTR_RO(mii_status);
static ssize_t link_failure_count_show(struct slave *slave, char *buf)
{ … }
static SLAVE_ATTR_RO(link_failure_count);
static ssize_t perm_hwaddr_show(struct slave *slave, char *buf)
{ … }
static SLAVE_ATTR_RO(perm_hwaddr);
static ssize_t queue_id_show(struct slave *slave, char *buf)
{ … }
static SLAVE_ATTR_RO(queue_id);
static ssize_t ad_aggregator_id_show(struct slave *slave, char *buf)
{ … }
static SLAVE_ATTR_RO(ad_aggregator_id);
static ssize_t ad_actor_oper_port_state_show(struct slave *slave, char *buf)
{ … }
static SLAVE_ATTR_RO(ad_actor_oper_port_state);
static ssize_t ad_partner_oper_port_state_show(struct slave *slave, char *buf)
{ … }
static SLAVE_ATTR_RO(ad_partner_oper_port_state);
static const struct attribute *slave_attrs[] = …;
#define to_slave_attr(_at) …
static ssize_t slave_show(struct kobject *kobj,
struct attribute *attr, char *buf)
{ … }
const struct sysfs_ops slave_sysfs_ops = …;
int bond_sysfs_slave_add(struct slave *slave)
{ … }
void bond_sysfs_slave_del(struct slave *slave)
{ … }