28 |
|
* SUCH DAMAGE. |
29 |
|
* |
30 |
|
* @(#)protosw.h 8.1 (Berkeley) 6/2/93 |
31 |
< |
* $FreeBSD: stable/10/sys/sys/protosw.h 247667 2013-03-02 21:11:30Z pjd $ |
31 |
> |
* $FreeBSD: stable/11/sys/sys/protosw.h 331722 2018-03-29 02:50:57Z eadler $ |
32 |
|
*/ |
33 |
|
|
34 |
|
#ifndef _SYS_PROTOSW_H_ |
35 |
|
#define _SYS_PROTOSW_H_ |
36 |
|
|
37 |
|
/* Forward declare these structures referenced from prototypes below. */ |
38 |
+ |
struct kaiocb; |
39 |
|
struct mbuf; |
40 |
|
struct thread; |
41 |
|
struct sockaddr; |
66 |
|
* similar to the vnode VOP interface. |
67 |
|
*/ |
68 |
|
/* USE THESE FOR YOUR PROTOTYPES ! */ |
69 |
< |
typedef void pr_input_t (struct mbuf *, int); |
70 |
< |
typedef int pr_input6_t (struct mbuf **, int*, int); /* XXX FIX THIS */ |
70 |
< |
typedef int pr_output_t (struct mbuf *, struct socket *); |
69 |
> |
typedef int pr_input_t (struct mbuf **, int*, int); |
70 |
> |
typedef int pr_output_t (struct mbuf *, struct socket *, ...); |
71 |
|
typedef void pr_ctlinput_t (int, struct sockaddr *, void *); |
72 |
|
typedef int pr_ctloutput_t (struct socket *, struct sockopt *); |
73 |
|
typedef void pr_init_t (void); |
74 |
– |
typedef void pr_destroy_t (void); |
74 |
|
typedef void pr_fasttimo_t (void); |
75 |
|
typedef void pr_slowtimo_t (void); |
76 |
|
typedef void pr_drain_t (void); |
87 |
|
pr_ctloutput_t *pr_ctloutput; /* control output (from above) */ |
88 |
|
/* utility hooks */ |
89 |
|
pr_init_t *pr_init; |
91 |
– |
pr_destroy_t *pr_destroy; |
90 |
|
pr_fasttimo_t *pr_fasttimo; /* fast timeout (200ms) */ |
91 |
|
pr_slowtimo_t *pr_slowtimo; /* slow timeout (500ms) */ |
92 |
|
pr_drain_t *pr_drain; /* flush any excess space possible */ |
208 |
|
#define PRUS_OOB 0x1 |
209 |
|
#define PRUS_EOF 0x2 |
210 |
|
#define PRUS_MORETOCOME 0x4 |
211 |
+ |
#define PRUS_NOTREADY 0x8 |
212 |
+ |
int (*pru_ready)(struct socket *so, struct mbuf *m, int count); |
213 |
|
int (*pru_sense)(struct socket *so, struct stat *sb); |
214 |
|
int (*pru_shutdown)(struct socket *so); |
215 |
|
int (*pru_flush)(struct socket *so, int direction); |
228 |
|
struct thread *td); |
229 |
|
int (*pru_connectat)(int fd, struct socket *so, |
230 |
|
struct sockaddr *nam, struct thread *td); |
231 |
+ |
int (*pru_aio_queue)(struct socket *so, struct kaiocb *job); |
232 |
|
}; |
233 |
|
|
234 |
|
/* |
235 |
|
* All nonvoid pru_*() functions below return EOPNOTSUPP. |
236 |
|
*/ |
237 |
|
int pru_accept_notsupp(struct socket *so, struct sockaddr **nam); |
238 |
+ |
int pru_aio_queue_notsupp(struct socket *so, struct kaiocb *job); |
239 |
|
int pru_attach_notsupp(struct socket *so, int proto, struct thread *td); |
240 |
|
int pru_bind_notsupp(struct socket *so, struct sockaddr *nam, |
241 |
|
struct thread *td); |
255 |
|
int pru_rcvoob_notsupp(struct socket *so, struct mbuf *m, int flags); |
256 |
|
int pru_send_notsupp(struct socket *so, int flags, struct mbuf *m, |
257 |
|
struct sockaddr *addr, struct mbuf *control, struct thread *td); |
258 |
+ |
int pru_ready_notsupp(struct socket *so, struct mbuf *m, int count); |
259 |
|
int pru_sense_null(struct socket *so, struct stat *sb); |
260 |
|
int pru_shutdown_notsupp(struct socket *so); |
261 |
|
int pru_sockaddr_notsupp(struct socket *so, struct sockaddr **nam); |
279 |
|
#define PRC_IFDOWN 0 /* interface transition */ |
280 |
|
#define PRC_ROUTEDEAD 1 /* select new route if possible ??? */ |
281 |
|
#define PRC_IFUP 2 /* interface has come back up */ |
282 |
< |
#define PRC_QUENCH2 3 /* DEC congestion bit says slow down */ |
283 |
< |
#define PRC_QUENCH 4 /* some one said to slow down */ |
282 |
> |
/* was PRC_QUENCH2 3 DEC congestion bit says slow down */ |
283 |
> |
/* was PRC_QUENCH 4 Deprecated by RFC 6633 */ |
284 |
|
#define PRC_MSGSIZE 5 /* message size forced drop */ |
285 |
|
#define PRC_HOSTDEAD 6 /* host appears to be down */ |
286 |
|
#define PRC_HOSTUNREACH 7 /* deprecated (use PRC_UNREACH_HOST) */ |