include/linux/ppp_channel.h
Source file repositories/reference/linux-study-clean/include/linux/ppp_channel.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ppp_channel.h- Extension
.h- Size
- 3098 bytes
- Lines
- 91
- 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/list.hlinux/skbuff.hlinux/poll.hnet/net_namespace.h
Detected Declarations
struct net_device_pathstruct net_device_path_ctxstruct ppp_channelstruct ppp_channel_opsstruct ppp_channel
Annotated Snippet
struct ppp_channel_ops {
/* Send a packet (or multilink fragment) on this channel.
Returns 1 if it was accepted, 0 if not. */
int (*start_xmit)(struct ppp_channel *, struct sk_buff *);
/* Handle an ioctl call that has come in via /dev/ppp. */
int (*ioctl)(struct ppp_channel *, unsigned int, unsigned long);
int (*fill_forward_path)(struct net_device_path_ctx *,
struct net_device_path *,
const struct ppp_channel *);
};
struct ppp_channel {
void *private; /* channel private data */
const struct ppp_channel_ops *ops; /* operations for this channel */
int mtu; /* max transmit packet size */
int hdrlen; /* amount of headroom channel needs */
void *ppp; /* opaque to channel */
int speed; /* transfer rate (bytes/second) */
bool direct_xmit; /* no qdisc, xmit directly */
};
#ifdef __KERNEL__
/* Called by the channel when it can send some more data. */
extern void ppp_output_wakeup(struct ppp_channel *);
/* Called by the channel to process a received PPP packet.
The packet should have just the 2-byte PPP protocol header. */
extern void ppp_input(struct ppp_channel *, struct sk_buff *);
/* Called by the channel when an input error occurs, indicating
that we may have missed a packet. */
extern void ppp_input_error(struct ppp_channel *);
/* Attach a channel to a given PPP unit in specified net. */
extern int ppp_register_net_channel(struct net *, struct ppp_channel *);
/* Attach a channel to a given PPP unit. */
extern int ppp_register_channel(struct ppp_channel *);
/* Detach a channel from its PPP unit (e.g. on hangup). */
extern void ppp_unregister_channel(struct ppp_channel *);
/* Get the channel number for a channel */
extern int ppp_channel_index(struct ppp_channel *);
/* Get the unit number associated with a channel, or -1 if none */
extern int ppp_unit_number(struct ppp_channel *);
/* Get the device name associated with a channel, or NULL if none.
* Caller must hold RCU read lock.
*/
extern char *ppp_dev_name(struct ppp_channel *);
/*
* SMP locking notes:
* The channel code must ensure that when it calls ppp_unregister_channel,
* nothing is executing in any of the procedures above, for that
* channel. The generic layer will ensure that nothing is executing
* in the start_xmit and ioctl routines for the channel by the time
* that ppp_unregister_channel returns.
*/
#endif /* __KERNEL__ */
#endif
Annotation
- Immediate include surface: `linux/list.h`, `linux/skbuff.h`, `linux/poll.h`, `net/net_namespace.h`.
- Detected declarations: `struct net_device_path`, `struct net_device_path_ctx`, `struct ppp_channel`, `struct ppp_channel_ops`, `struct ppp_channel`.
- 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.