Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/protosw.h
Show All 36 Lines | |||||
/* Forward declare these structures referenced from prototypes below. */ | /* Forward declare these structures referenced from prototypes below. */ | ||||
struct kaiocb; | struct kaiocb; | ||||
struct mbuf; | struct mbuf; | ||||
struct thread; | struct thread; | ||||
struct sockaddr; | struct sockaddr; | ||||
struct socket; | struct socket; | ||||
struct sockopt; | struct sockopt; | ||||
struct ifnet; | |||||
/*#ifdef _KERNEL*/ | /*#ifdef _KERNEL*/ | ||||
/* | /* | ||||
* Protocol switch table. | * Protocol switch table. | ||||
* | * | ||||
* Each protocol has a handle initializing one of these structures, | * Each protocol has a handle initializing one of these structures, | ||||
* which is used for protocol-protocol and system-protocol communication. | * which is used for protocol-protocol and system-protocol communication. | ||||
* | * | ||||
Show All 16 Lines | |||||
/* USE THESE FOR YOUR PROTOTYPES ! */ | /* USE THESE FOR YOUR PROTOTYPES ! */ | ||||
typedef int pr_input_t (struct mbuf **, int*, int); | typedef int pr_input_t (struct mbuf **, int*, int); | ||||
typedef int pr_output_t (struct mbuf *, struct socket *, ...); | typedef int pr_output_t (struct mbuf *, struct socket *, ...); | ||||
typedef void pr_ctlinput_t (int, struct sockaddr *, void *); | typedef void pr_ctlinput_t (int, struct sockaddr *, void *); | ||||
typedef int pr_ctloutput_t (struct socket *, struct sockopt *); | typedef int pr_ctloutput_t (struct socket *, struct sockopt *); | ||||
typedef void pr_init_t (void); | typedef void pr_init_t (void); | ||||
typedef void pr_fasttimo_t (void); | typedef void pr_fasttimo_t (void); | ||||
typedef void pr_slowtimo_t (void); | typedef void pr_slowtimo_t (void); | ||||
typedef void pr_drain_t (void); | typedef void pr_drain_t (struct ifnet *); | ||||
struct protosw { | struct protosw { | ||||
short pr_type; /* socket type used for */ | short pr_type; /* socket type used for */ | ||||
struct domain *pr_domain; /* domain protocol a member of */ | struct domain *pr_domain; /* domain protocol a member of */ | ||||
short pr_protocol; /* protocol number */ | short pr_protocol; /* protocol number */ | ||||
short pr_flags; /* see below */ | short pr_flags; /* see below */ | ||||
/* protocol-protocol hooks */ | /* protocol-protocol hooks */ | ||||
pr_input_t *pr_input; /* input to protocol (from below) */ | pr_input_t *pr_input; /* input to protocol (from below) */ | ||||
▲ Show 20 Lines • Show All 268 Lines • Show Last 20 Lines |