include/linux/if_pppox.h
Source file repositories/reference/linux-study-clean/include/linux/if_pppox.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/if_pppox.h- Extension
.h- Size
- 2583 bytes
- Lines
- 84
- 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/if.hlinux/netdevice.hlinux/ppp_channel.hlinux/skbuff.hlinux/workqueue.huapi/linux/if_pppox.hnet/sock.h
Detected Declarations
struct pppoe_optstruct pptp_optstruct pppox_sockstruct modulestruct pppox_protofunction Ethernet
Annotated Snippet
struct pppoe_opt {
struct net_device *dev; /* device associated with socket*/
int ifindex; /* ifindex of device associated with socket */
struct pppoe_addr pa; /* what this socket is bound to*/
struct work_struct padt_work;/* Work item for handling PADT */
};
struct pptp_opt {
struct pptp_addr src_addr;
struct pptp_addr dst_addr;
u32 ack_sent, ack_recv;
u32 seq_sent, seq_recv;
int ppp_flags;
};
#include <net/sock.h>
struct pppox_sock {
/* struct sock must be the first member of pppox_sock */
struct sock sk;
struct ppp_channel chan;
struct pppox_sock __rcu *next; /* for hash table */
union {
struct pppoe_opt pppoe;
struct pptp_opt pptp;
} proto;
__be16 num;
};
#define pppoe_dev proto.pppoe.dev
#define pppoe_ifindex proto.pppoe.ifindex
#define pppoe_pa proto.pppoe.pa
static inline struct pppox_sock *pppox_sk(struct sock *sk)
{
return container_of(sk, struct pppox_sock, sk);
}
struct module;
struct pppox_proto {
int (*create)(struct net *net, struct socket *sock, int kern);
int (*ioctl)(struct socket *sock, unsigned int cmd,
unsigned long arg);
struct module *owner;
};
extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp);
extern void unregister_pppox_proto(int proto_num);
extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
extern int pppox_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
/* PPPoX socket states */
enum {
PPPOX_NONE = 0, /* initial state */
PPPOX_CONNECTED = 1, /* connection established ==TCP_ESTABLISHED */
PPPOX_BOUND = 2, /* bound to ppp device */
PPPOX_DEAD = 16 /* dead, useless, please clean me up!*/
};
#endif /* !(__LINUX_IF_PPPOX_H) */
Annotation
- Immediate include surface: `linux/if.h`, `linux/netdevice.h`, `linux/ppp_channel.h`, `linux/skbuff.h`, `linux/workqueue.h`, `uapi/linux/if_pppox.h`, `net/sock.h`.
- Detected declarations: `struct pppoe_opt`, `struct pptp_opt`, `struct pppox_sock`, `struct module`, `struct pppox_proto`, `function Ethernet`.
- 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.