linux/include/uapi/linux/if_bridge.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 *	Linux ethernet bridge
 *
 *	Authors:
 *	Lennert Buytenhek		<[email protected]>
 *
 *	This program is free software; you can redistribute it and/or
 *	modify it under the terms of the GNU General Public License
 *	as published by the Free Software Foundation; either version
 *	2 of the License, or (at your option) any later version.
 */

#ifndef _UAPI_LINUX_IF_BRIDGE_H
#define _UAPI_LINUX_IF_BRIDGE_H

#include <linux/types.h>
#include <linux/if_ether.h>
#include <linux/in6.h>

#define SYSFS_BRIDGE_ATTR
#define SYSFS_BRIDGE_FDB
#define SYSFS_BRIDGE_PORT_SUBDIR
#define SYSFS_BRIDGE_PORT_ATTR
#define SYSFS_BRIDGE_PORT_LINK

#define BRCTL_VERSION

#define BRCTL_GET_VERSION
#define BRCTL_GET_BRIDGES
#define BRCTL_ADD_BRIDGE
#define BRCTL_DEL_BRIDGE
#define BRCTL_ADD_IF
#define BRCTL_DEL_IF
#define BRCTL_GET_BRIDGE_INFO
#define BRCTL_GET_PORT_LIST
#define BRCTL_SET_BRIDGE_FORWARD_DELAY
#define BRCTL_SET_BRIDGE_HELLO_TIME
#define BRCTL_SET_BRIDGE_MAX_AGE
#define BRCTL_SET_AGEING_TIME
#define BRCTL_SET_GC_INTERVAL
#define BRCTL_GET_PORT_INFO
#define BRCTL_SET_BRIDGE_STP_STATE
#define BRCTL_SET_BRIDGE_PRIORITY
#define BRCTL_SET_PORT_PRIORITY
#define BRCTL_SET_PATH_COST
#define BRCTL_GET_FDB_ENTRIES

#define BR_STATE_DISABLED
#define BR_STATE_LISTENING
#define BR_STATE_LEARNING
#define BR_STATE_FORWARDING
#define BR_STATE_BLOCKING

struct __bridge_info {};

struct __port_info {};

struct __fdb_entry {};

/* Bridge Flags */
#define BRIDGE_FLAGS_MASTER
#define BRIDGE_FLAGS_SELF

#define BRIDGE_MODE_VEB
#define BRIDGE_MODE_VEPA
#define BRIDGE_MODE_UNDEF

/* Bridge management nested attributes
 * [IFLA_AF_SPEC] = {
 *     [IFLA_BRIDGE_FLAGS]
 *     [IFLA_BRIDGE_MODE]
 *     [IFLA_BRIDGE_VLAN_INFO]
 * }
 */
enum {};
#define IFLA_BRIDGE_MAX

#define BRIDGE_VLAN_INFO_MASTER
#define BRIDGE_VLAN_INFO_PVID
#define BRIDGE_VLAN_INFO_UNTAGGED
#define BRIDGE_VLAN_INFO_RANGE_BEGIN
#define BRIDGE_VLAN_INFO_RANGE_END
#define BRIDGE_VLAN_INFO_BRENTRY
#define BRIDGE_VLAN_INFO_ONLY_OPTS

struct bridge_vlan_info {};

enum {};

#define IFLA_BRIDGE_VLAN_TUNNEL_MAX

struct bridge_vlan_xstats {};

enum {};

#define IFLA_BRIDGE_MRP_MAX

enum {};

#define IFLA_BRIDGE_MRP_INSTANCE_MAX

enum {};

#define IFLA_BRIDGE_MRP_PORT_STATE_MAX

enum {};

#define IFLA_BRIDGE_MRP_PORT_ROLE_MAX

enum {};

#define IFLA_BRIDGE_MRP_RING_STATE_MAX

enum {};

#define IFLA_BRIDGE_MRP_RING_ROLE_MAX

enum {};

#define IFLA_BRIDGE_MRP_START_TEST_MAX

enum {};

#define IFLA_BRIDGE_MRP_INFO_MAX

enum {};

#define IFLA_BRIDGE_MRP_IN_STATE_MAX

enum {};

#define IFLA_BRIDGE_MRP_IN_ROLE_MAX

enum {};

#define IFLA_BRIDGE_MRP_START_IN_TEST_MAX

struct br_mrp_instance {};

struct br_mrp_ring_state {};

struct br_mrp_ring_role {};

struct br_mrp_start_test {};

struct br_mrp_in_state {};

struct br_mrp_in_role {};

struct br_mrp_start_in_test {};

enum {};

#define IFLA_BRIDGE_CFM_MAX

enum {};

#define IFLA_BRIDGE_CFM_MEP_CREATE_MAX

enum {};

#define IFLA_BRIDGE_CFM_MEP_DELETE_MAX

enum {};

#define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX

enum {};

#define IFLA_BRIDGE_CFM_CC_CONFIG_MAX

enum {};

#define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX

enum {};

#define IFLA_BRIDGE_CFM_CC_RDI_MAX

enum {};

#define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX

enum {};

#define IFLA_BRIDGE_CFM_MEP_STATUS_MAX

enum {};

#define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX

enum {};
#define IFLA_BRIDGE_MST_MAX

enum {};
#define IFLA_BRIDGE_MST_ENTRY_MAX

struct bridge_stp_xstats {};

/* Bridge vlan RTM header */
struct br_vlan_msg {};

enum {};
#define BRIDGE_VLANDB_DUMP_MAX

/* flags used in BRIDGE_VLANDB_DUMP_FLAGS attribute to affect dumps */
#define BRIDGE_VLANDB_DUMPF_STATS
#define BRIDGE_VLANDB_DUMPF_GLOBAL

/* Bridge vlan RTM attributes
 * [BRIDGE_VLANDB_ENTRY] = {
 *     [BRIDGE_VLANDB_ENTRY_INFO]
 *     ...
 * }
 * [BRIDGE_VLANDB_GLOBAL_OPTIONS] = {
 *     [BRIDGE_VLANDB_GOPTS_ID]
 *     ...
 * }
 */
enum {};
#define BRIDGE_VLANDB_MAX

enum {};
#define BRIDGE_VLANDB_ENTRY_MAX

/* [BRIDGE_VLANDB_ENTRY] = {
 *     [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = {
 *         [BRIDGE_VLANDB_TINFO_ID]
 *         ...
 *     }
 * }
 */
enum {};
#define BRIDGE_VLANDB_TINFO_MAX

/* [BRIDGE_VLANDB_ENTRY] = {
 *     [BRIDGE_VLANDB_ENTRY_STATS] = {
 *         [BRIDGE_VLANDB_STATS_RX_BYTES]
 *         ...
 *     }
 *     ...
 * }
 */
enum {};
#define BRIDGE_VLANDB_STATS_MAX

enum {};
#define BRIDGE_VLANDB_GOPTS_MAX

/* Bridge multicast database attributes
 * [MDBA_MDB] = {
 *     [MDBA_MDB_ENTRY] = {
 *         [MDBA_MDB_ENTRY_INFO] {
 *		struct br_mdb_entry
 *		[MDBA_MDB_EATTR attributes]
 *         }
 *     }
 * }
 * [MDBA_ROUTER] = {
 *    [MDBA_ROUTER_PORT] = {
 *        u32 ifindex
 *        [MDBA_ROUTER_PATTR attributes]
 *    }
 * }
 */
enum {};
#define MDBA_MAX

enum {};
#define MDBA_MDB_MAX

enum {};
#define MDBA_MDB_ENTRY_MAX

/* per mdb entry additional attributes */
enum {};
#define MDBA_MDB_EATTR_MAX

/* per mdb entry source */
enum {};
#define MDBA_MDB_SRCLIST_MAX

/* per mdb entry per source attributes
 * these are embedded in MDBA_MDB_SRCLIST_ENTRY
 */
enum {};
#define MDBA_MDB_SRCATTR_MAX

/* multicast router types */
enum {};

enum {};
#define MDBA_ROUTER_MAX

/* router port attributes */
enum {};
#define MDBA_ROUTER_PATTR_MAX

struct br_port_msg {};

struct br_mdb_entry {};

enum {};
#define MDBA_SET_ENTRY_MAX

/* [MDBA_GET_ENTRY] = {
 *    struct br_mdb_entry
 *    [MDBA_GET_ENTRY_ATTRS] = {
 *       [MDBE_ATTR_SOURCE]
 *          struct in_addr / struct in6_addr
 *       [MDBE_ATTR_SRC_VNI]
 *          u32
 *    }
 * }
 */
enum {};
#define MDBA_GET_ENTRY_MAX

/* [MDBA_SET_ENTRY_ATTRS] = {
 *    [MDBE_ATTR_xxx]
 *    ...
 * }
 */
enum {};
#define MDBE_ATTR_MAX

/* per mdb entry source */
enum {};
#define MDBE_SRC_LIST_MAX

/* per mdb entry per source attributes
 * these are embedded in MDBE_SRC_LIST_ENTRY
 */
enum {};
#define MDBE_SRCATTR_MAX

/* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
enum {};
#define BRIDGE_XSTATS_MAX

enum {};

/* IGMP/MLD statistics */
struct br_mcast_stats {};

/* bridge boolean options
 * BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets
 * BR_BOOLOPT_MCAST_VLAN_SNOOPING - control vlan multicast snooping
 *
 * IMPORTANT: if adding a new option do not forget to handle
 *            it in br_boolopt_toggle/get and bridge sysfs
 */
enum br_boolopt_id {};

/* struct br_boolopt_multi - change multiple bridge boolean options
 *
 * @optval: new option values (bit per option)
 * @optmask: options to change (bit per option)
 */
struct br_boolopt_multi {};

enum {};
#define BRIDGE_QUERIER_MAX
#endif /* _UAPI_LINUX_IF_BRIDGE_H */