- short pr_protocol; /* protocol number */
- unsigned int pr_flags; /* see below */
-/* protocol-protocol hooks */
- int (*pr_input)(struct mbuf **, int *);
- /* input to protocol (from below) */
- int (*pr_output)(struct mbuf *m, struct socket *so,
- struct sockaddr_in6 *, struct mbuf *);
- /* output to protocol (from above) */
- void (*pr_ctlinput)(int, struct sockaddr *, void *);
- /* control input (from below) */
- int (*pr_ctloutput)(struct socket *, struct sockopt *);
- /* control output (from above) */
-/* user-protocol hook */
- int (*pr_usrreq)(struct socket *, int, struct mbuf *,
- struct mbuf *, struct mbuf *, struct proc *);
- /* user request: see list below */
-
-/* utility hooks */
- void (*pr_init)(void); /* initialization hook */
- void (*pr_fasttimo)(void);
- /* fast timeout (200ms) */
- void (*pr_slowtimo)(void);
- /* slow timeout (500ms) */
- void (*pr_drain)(void);
- /* flush any excess space possible */
-#ifdef __APPLE__
+ struct protosw *pr_protosw; /* pointer to self */
+ u_int16_t pr_type; /* socket type used for */
+ u_int16_t pr_protocol; /* protocol number */
+ u_int32_t pr_flags; /* see below */
+ /*
+ * protocol-protocol hooks
+ */
+ int (*pr_input) /* input to protocol (from below) */
+ (struct mbuf **, int *, int);
+ int (*pr_output) /* output to protocol (from above) */
+ (struct mbuf *m, struct socket *so,
+ struct sockaddr_in6 *, struct mbuf *);
+ void (*pr_ctlinput) /* control input (from below) */
+ (int, struct sockaddr *, void *);
+ int (*pr_ctloutput) /* control output (from above) */
+ (struct socket *, struct sockopt *);
+ /*
+ * user-protocol hook
+ */
+ struct pr_usrreqs *pr_usrreqs; /* user request; see list below */
+ /*
+ * utility hooks
+ */
+ void (*pr_init) /* initialization hook */
+ (struct ip6protosw *, struct domain *);
+ void (*pr_drain)(void); /* flush any excess space possible */