include/uapi/linux/nfc.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/nfc.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/nfc.h- Extension
.h- Size
- 11351 bytes
- Lines
- 321
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/socket.h
Detected Declarations
struct sockaddr_nfcstruct sockaddr_nfc_llcpenum nfc_commandsenum nfc_attrsenum nfc_sdp_attr
Annotated Snippet
struct sockaddr_nfc {
__kernel_sa_family_t sa_family;
__u32 dev_idx;
__u32 target_idx;
__u32 nfc_protocol;
};
#define NFC_LLCP_MAX_SERVICE_NAME 63
struct sockaddr_nfc_llcp {
__kernel_sa_family_t sa_family;
__u32 dev_idx;
__u32 target_idx;
__u32 nfc_protocol;
__u8 dsap; /* Destination SAP, if known */
__u8 ssap; /* Source SAP to be bound to */
char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */;
__kernel_size_t service_name_len;
};
/* NFC socket protocols */
#define NFC_SOCKPROTO_RAW 0
#define NFC_SOCKPROTO_LLCP 1
#define NFC_SOCKPROTO_MAX 2
#define NFC_HEADER_SIZE 1
/*
* Pseudo-header info for raw socket packets
* First byte is the adapter index
* Second byte contains flags
* - 0x01 - Direction (0=RX, 1=TX)
* - 0x02-0x04 - Payload type (000=LLCP, 001=NCI, 010=HCI, 011=Digital,
* 100=Proprietary)
* - 0x05-0x80 - Reserved
**/
#define NFC_RAW_HEADER_SIZE 2
#define NFC_DIRECTION_RX 0x00
#define NFC_DIRECTION_TX 0x01
#define RAW_PAYLOAD_LLCP 0
#define RAW_PAYLOAD_NCI 1
#define RAW_PAYLOAD_HCI 2
#define RAW_PAYLOAD_DIGITAL 3
#define RAW_PAYLOAD_PROPRIETARY 4
/* socket option names */
#define NFC_LLCP_RW 0
#define NFC_LLCP_MIUX 1
#define NFC_LLCP_REMOTE_MIU 2
#define NFC_LLCP_REMOTE_LTO 3
#define NFC_LLCP_REMOTE_RW 4
#endif /*__LINUX_NFC_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/socket.h`.
- Detected declarations: `struct sockaddr_nfc`, `struct sockaddr_nfc_llcp`, `enum nfc_commands`, `enum nfc_attrs`, `enum nfc_sdp_attr`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.