net/bridge/br_private_cfm.h
Source file repositories/reference/linux-study-clean/net/bridge/br_private_cfm.h
File Facts
- System
- Linux kernel
- Corpus path
net/bridge/br_private_cfm.h- Extension
.h- Size
- 4445 bytes
- Lines
- 148
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
br_private.huapi/linux/cfm_bridge.h
Detected Declarations
struct br_cfm_mep_createstruct br_cfm_mep_configstruct br_cfm_maidstruct br_cfm_cc_configstruct br_cfm_cc_ccm_tx_infostruct br_cfm_mep_statusstruct br_cfm_cc_peer_statusstruct br_cfm_mepstruct br_cfm_peer_mep
Annotated Snippet
struct br_cfm_mep_create {
enum br_cfm_domain domain; /* Domain for this MEP */
enum br_cfm_mep_direction direction; /* Up or Down MEP direction */
u32 ifindex; /* Residence port */
};
int br_cfm_mep_create(struct net_bridge *br,
const u32 instance,
struct br_cfm_mep_create *const create,
struct netlink_ext_ack *extack);
int br_cfm_mep_delete(struct net_bridge *br,
const u32 instance,
struct netlink_ext_ack *extack);
struct br_cfm_mep_config {
u32 mdlevel;
u32 mepid; /* MEPID for this MEP */
struct mac_addr unicast_mac; /* The MEP unicast MAC */
};
int br_cfm_mep_config_set(struct net_bridge *br,
const u32 instance,
const struct br_cfm_mep_config *const config,
struct netlink_ext_ack *extack);
struct br_cfm_maid {
u8 data[CFM_MAID_LENGTH];
};
struct br_cfm_cc_config {
/* Expected received CCM PDU MAID. */
struct br_cfm_maid exp_maid;
/* Expected received CCM PDU interval. */
/* Transmitting CCM PDU interval when CCM tx is enabled. */
enum br_cfm_ccm_interval exp_interval;
bool enable; /* Enable/disable CCM PDU handling */
};
int br_cfm_cc_config_set(struct net_bridge *br,
const u32 instance,
const struct br_cfm_cc_config *const config,
struct netlink_ext_ack *extack);
int br_cfm_cc_peer_mep_add(struct net_bridge *br, const u32 instance,
u32 peer_mep_id,
struct netlink_ext_ack *extack);
int br_cfm_cc_peer_mep_remove(struct net_bridge *br, const u32 instance,
u32 peer_mep_id,
struct netlink_ext_ack *extack);
/* Transmitted CCM Remote Defect Indication status set.
* This RDI is inserted in transmitted CCM PDUs if CCM transmission is enabled.
* See br_cfm_cc_ccm_tx() with interval != BR_CFM_CCM_INTERVAL_NONE
*/
int br_cfm_cc_rdi_set(struct net_bridge *br, const u32 instance,
const bool rdi, struct netlink_ext_ack *extack);
/* OAM PDU Tx information */
struct br_cfm_cc_ccm_tx_info {
struct mac_addr dmac;
/* The CCM will be transmitted for this period in seconds.
* Call br_cfm_cc_ccm_tx before timeout to keep transmission alive.
* When period is zero any ongoing transmission will be stopped.
*/
u32 period;
bool seq_no_update; /* Update Tx CCM sequence number */
bool if_tlv; /* Insert Interface Status TLV */
u8 if_tlv_value; /* Interface Status TLV value */
bool port_tlv; /* Insert Port Status TLV */
u8 port_tlv_value; /* Port Status TLV value */
/* Sender ID TLV ??
* Organization-Specific TLV ??
*/
};
int br_cfm_cc_ccm_tx(struct net_bridge *br, const u32 instance,
const struct br_cfm_cc_ccm_tx_info *const tx_info,
struct netlink_ext_ack *extack);
struct br_cfm_mep_status {
/* Indications that an OAM PDU has been seen. */
bool opcode_unexp_seen; /* RX of OAM PDU with unexpected opcode */
bool version_unexp_seen; /* RX of OAM PDU with unexpected version */
bool rx_level_low_seen; /* Rx of OAM PDU with level low */
};
Annotation
- Immediate include surface: `br_private.h`, `uapi/linux/cfm_bridge.h`.
- Detected declarations: `struct br_cfm_mep_create`, `struct br_cfm_mep_config`, `struct br_cfm_maid`, `struct br_cfm_cc_config`, `struct br_cfm_cc_ccm_tx_info`, `struct br_cfm_mep_status`, `struct br_cfm_cc_peer_status`, `struct br_cfm_mep`, `struct br_cfm_peer_mep`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.