include/net/phonet/pep.h
Source file repositories/reference/linux-study-clean/include/net/phonet/pep.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/phonet/pep.h- Extension
.h- Size
- 3291 bytes
- Lines
- 160
- 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.
- 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
linux/skbuff.hnet/phonet/phonet.h
Detected Declarations
struct pep_sockstruct pnpipehdr
Annotated Snippet
extern const struct proto_ops phonet_stream_ops;
/* Pipe protocol definitions */
struct pnpipehdr {
u8 utid; /* transaction ID */
u8 message_id;
u8 pipe_handle;
union {
u8 state_after_connect; /* connect request */
u8 state_after_reset; /* reset request */
u8 error_code; /* any response */
u8 pep_type; /* status indication */
u8 data0; /* anything else */
};
u8 data[];
};
#define other_pep_type data[0]
static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb)
{
return (struct pnpipehdr *)skb_transport_header(skb);
}
#define MAX_PNPIPE_HEADER (MAX_PHONET_HEADER + 4)
enum {
PNS_PIPE_CREATE_REQ = 0x00,
PNS_PIPE_CREATE_RESP,
PNS_PIPE_REMOVE_REQ,
PNS_PIPE_REMOVE_RESP,
PNS_PIPE_DATA = 0x20,
PNS_PIPE_ALIGNED_DATA,
PNS_PEP_CONNECT_REQ = 0x40,
PNS_PEP_CONNECT_RESP,
PNS_PEP_DISCONNECT_REQ,
PNS_PEP_DISCONNECT_RESP,
PNS_PEP_RESET_REQ,
PNS_PEP_RESET_RESP,
PNS_PEP_ENABLE_REQ,
PNS_PEP_ENABLE_RESP,
PNS_PEP_CTRL_REQ,
PNS_PEP_CTRL_RESP,
PNS_PEP_DISABLE_REQ = 0x4C,
PNS_PEP_DISABLE_RESP,
PNS_PEP_STATUS_IND = 0x60,
PNS_PIPE_CREATED_IND,
PNS_PIPE_RESET_IND = 0x63,
PNS_PIPE_ENABLED_IND,
PNS_PIPE_REDIRECTED_IND,
PNS_PIPE_DISABLED_IND = 0x66,
};
#define PN_PIPE_INVALID_HANDLE 0xff
#define PN_PEP_TYPE_COMMON 0x00
/* Phonet pipe status indication */
enum {
PN_PEP_IND_FLOW_CONTROL,
PN_PEP_IND_ID_MCFC_GRANT_CREDITS,
};
/* Phonet pipe error codes */
enum {
PN_PIPE_NO_ERROR,
PN_PIPE_ERR_INVALID_PARAM,
PN_PIPE_ERR_INVALID_HANDLE,
PN_PIPE_ERR_INVALID_CTRL_ID,
PN_PIPE_ERR_NOT_ALLOWED,
PN_PIPE_ERR_PEP_IN_USE,
PN_PIPE_ERR_OVERLOAD,
PN_PIPE_ERR_DEV_DISCONNECTED,
PN_PIPE_ERR_TIMEOUT,
PN_PIPE_ERR_ALL_PIPES_IN_USE,
PN_PIPE_ERR_GENERAL,
PN_PIPE_ERR_NOT_SUPPORTED,
};
/* Phonet pipe states */
enum {
PN_PIPE_DISABLE,
PN_PIPE_ENABLE,
};
/* Phonet pipe sub-block types */
enum {
PN_PIPE_SB_CREATE_REQ_PEP_SUB_TYPE,
PN_PIPE_SB_CONNECT_REQ_PEP_SUB_TYPE,
Annotation
- Immediate include surface: `linux/skbuff.h`, `net/phonet/phonet.h`.
- Detected declarations: `struct pep_sock`, `struct pnpipehdr`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: pattern 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.