net/bluetooth/bnep/netdev.c
Source file repositories/reference/linux-study-clean/net/bluetooth/bnep/netdev.c
File Facts
- System
- Linux kernel
- Corpus path
net/bluetooth/bnep/netdev.c- Extension
.c- Size
- 5746 bytes
- Lines
- 228
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/etherdevice.hnet/bluetooth/bluetooth.hnet/bluetooth/hci_core.hnet/bluetooth/l2cap.hbnep.h
Detected Declarations
function stackfunction bnep_net_closefunction bnep_net_set_mc_listfunction netdev_for_each_mc_addrfunction bnep_net_set_mac_addrfunction bnep_net_timeoutfunction bnep_net_mc_filterfunction bnep_net_eth_protofunction bnep_net_proto_filterfunction bnep_net_xmitfunction bnep_net_setup
Annotated Snippet
static const struct net_device_ops bnep_netdev_ops = {
.ndo_open = bnep_net_open,
.ndo_stop = bnep_net_close,
.ndo_start_xmit = bnep_net_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_rx_mode = bnep_net_set_mc_list,
.ndo_set_mac_address = bnep_net_set_mac_addr,
.ndo_tx_timeout = bnep_net_timeout,
};
void bnep_net_setup(struct net_device *dev)
{
eth_broadcast_addr(dev->broadcast);
dev->addr_len = ETH_ALEN;
ether_setup(dev);
dev->min_mtu = 0;
dev->max_mtu = ETH_MAX_MTU;
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
dev->netdev_ops = &bnep_netdev_ops;
dev->watchdog_timeo = HZ * 2;
}
Annotation
- Immediate include surface: `linux/etherdevice.h`, `net/bluetooth/bluetooth.h`, `net/bluetooth/hci_core.h`, `net/bluetooth/l2cap.h`, `bnep.h`.
- Detected declarations: `function stack`, `function bnep_net_close`, `function bnep_net_set_mc_list`, `function netdev_for_each_mc_addr`, `function bnep_net_set_mac_addr`, `function bnep_net_timeout`, `function bnep_net_mc_filter`, `function bnep_net_eth_proto`, `function bnep_net_proto_filter`, `function bnep_net_xmit`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: pattern 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.