net/nfc/hci/hci.h
Source file repositories/reference/linux-study-clean/net/nfc/hci/hci.h
File Facts
- System
- Linux kernel
- Corpus path
net/nfc/hci/hci.h- Extension
.h- Size
- 2898 bytes
- Lines
- 121
- 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
net/nfc/hci.h
Detected Declarations
struct gate_pipe_mapstruct hcp_messagestruct hcp_packetstruct hcp_exec_waiterstruct hci_msgstruct hci_create_pipe_paramsstruct hci_create_pipe_respstruct hci_delete_pipe_notistruct hci_all_pipe_cleared_noti
Annotated Snippet
struct gate_pipe_map {
u8 gate;
u8 pipe;
};
struct hcp_message {
u8 header; /* type -cmd,evt,rsp- + instruction */
u8 data[];
} __packed;
struct hcp_packet {
u8 header; /* cbit+pipe */
struct hcp_message message;
} __packed;
struct hcp_exec_waiter {
wait_queue_head_t *wq;
bool exec_complete;
int exec_result;
struct sk_buff *result_skb;
};
struct hci_msg {
struct list_head msg_l;
struct sk_buff_head msg_frags;
bool wait_response;
data_exchange_cb_t cb;
void *cb_context;
unsigned long completion_delay;
};
struct hci_create_pipe_params {
u8 src_gate;
u8 dest_host;
u8 dest_gate;
} __packed;
struct hci_create_pipe_resp {
u8 src_host;
u8 src_gate;
u8 dest_host;
u8 dest_gate;
u8 pipe;
} __packed;
struct hci_delete_pipe_noti {
u8 pipe;
} __packed;
struct hci_all_pipe_cleared_noti {
u8 host;
} __packed;
#define NFC_HCI_FRAGMENT 0x7f
#define HCP_HEADER(type, instr) ((((type) & 0x03) << 6) | ((instr) & 0x3f))
#define HCP_MSG_GET_TYPE(header) ((header & 0xc0) >> 6)
#define HCP_MSG_GET_CMD(header) (header & 0x3f)
int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe,
u8 type, u8 instruction,
const u8 *payload, size_t payload_len,
data_exchange_cb_t cb, void *cb_context,
unsigned long completion_delay);
void nfc_hci_hcp_message_rx(struct nfc_hci_dev *hdev, u8 pipe, u8 type,
u8 instruction, struct sk_buff *skb);
/* HCP headers */
#define NFC_HCI_HCP_PACKET_HEADER_LEN 1
#define NFC_HCI_HCP_MESSAGE_HEADER_LEN 1
#define NFC_HCI_HCP_HEADER_LEN 2
/* HCP types */
#define NFC_HCI_HCP_COMMAND 0x00
#define NFC_HCI_HCP_EVENT 0x01
#define NFC_HCI_HCP_RESPONSE 0x02
/* Generic commands */
#define NFC_HCI_ANY_SET_PARAMETER 0x01
#define NFC_HCI_ANY_GET_PARAMETER 0x02
#define NFC_HCI_ANY_OPEN_PIPE 0x03
#define NFC_HCI_ANY_CLOSE_PIPE 0x04
/* Reader RF commands */
#define NFC_HCI_WR_XCHG_DATA 0x10
/* Admin commands */
#define NFC_HCI_ADM_CREATE_PIPE 0x10
#define NFC_HCI_ADM_DELETE_PIPE 0x11
Annotation
- Immediate include surface: `net/nfc/hci.h`.
- Detected declarations: `struct gate_pipe_map`, `struct hcp_message`, `struct hcp_packet`, `struct hcp_exec_waiter`, `struct hci_msg`, `struct hci_create_pipe_params`, `struct hci_create_pipe_resp`, `struct hci_delete_pipe_noti`, `struct hci_all_pipe_cleared_noti`.
- 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.