net/nfc/llcp.h
Source file repositories/reference/linux-study-clean/net/nfc/llcp.h
File Facts
- System
- Linux kernel
- Corpus path
net/nfc/llcp.h- Extension
.h- Size
- 6825 bytes
- Lines
- 253
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct nfc_llcp_sockstruct llcp_sock_liststruct nfc_llcp_sdp_tlvstruct nfc_llcp_localstruct nfc_llcp_sockstruct nfc_llcp_ui_cbenum llcp_state
Annotated Snippet
struct llcp_sock_list {
struct hlist_head head;
rwlock_t lock;
};
struct nfc_llcp_sdp_tlv {
u8 *tlv;
u8 tlv_len;
char *uri;
u8 tid;
u8 sap;
unsigned long time;
struct hlist_node node;
};
struct nfc_llcp_local {
struct list_head list;
struct nfc_dev *dev;
struct kref ref;
struct mutex sdp_lock;
struct timer_list link_timer;
struct sk_buff_head tx_queue;
struct work_struct tx_work;
struct work_struct rx_work;
struct sk_buff *rx_pending;
struct work_struct timeout_work;
u32 target_idx;
u8 rf_mode;
u8 comm_mode;
u8 lto;
u8 rw;
__be16 miux;
unsigned long local_wks; /* Well known services */
unsigned long local_sdp; /* Local services */
unsigned long local_sap; /* Local SAPs, not available for discovery */
atomic_t local_sdp_cnt[LLCP_SDP_NUM_SAP];
/* local */
u8 gb[NFC_MAX_GT_LEN];
u8 gb_len;
/* remote */
u8 remote_gb[NFC_MAX_GT_LEN];
u8 remote_gb_len;
u8 remote_version;
u16 remote_miu;
u16 remote_lto;
u8 remote_opt;
u16 remote_wks;
struct mutex sdreq_lock;
struct hlist_head pending_sdreqs;
struct timer_list sdreq_timer;
struct work_struct sdreq_timeout_work;
u8 sdreq_next_tid;
/* sockets array */
struct llcp_sock_list sockets;
struct llcp_sock_list connecting_sockets;
struct llcp_sock_list raw_sockets;
};
struct nfc_llcp_sock {
struct sock sk;
struct nfc_dev *dev;
struct nfc_llcp_local *local;
u32 target_idx;
u32 nfc_protocol;
/* Link parameters */
u8 ssap;
u8 dsap;
char *service_name;
size_t service_name_len;
u8 rw;
__be16 miux;
/* Remote link parameters */
u8 remote_rw;
u16 remote_miu;
Annotation
- Detected declarations: `struct nfc_llcp_sock`, `struct llcp_sock_list`, `struct nfc_llcp_sdp_tlv`, `struct nfc_llcp_local`, `struct nfc_llcp_sock`, `struct nfc_llcp_ui_cb`, `enum llcp_state`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.