protosw.h (127976) | protosw.h (136692) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)protosw.h 8.1 (Berkeley) 6/2/93 | 1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)protosw.h 8.1 (Berkeley) 6/2/93 |
30 * $FreeBSD: head/sys/sys/protosw.h 127976 2004-04-07 04:19:52Z imp $ | 30 * $FreeBSD: head/sys/sys/protosw.h 136692 2004-10-19 15:13:30Z andre $ |
31 */ 32 33#ifndef _SYS_PROTOSW_H_ 34#define _SYS_PROTOSW_H_ 35 36/* Forward declare these structures referenced from prototypes below. */ 37struct mbuf; 38struct thread; --- 61 unchanged lines hidden (view full) --- 100 struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ 101}; 102/*#endif*/ 103 104#define PR_SLOWHZ 2 /* 2 slow timeouts per second */ 105#define PR_FASTHZ 5 /* 5 fast timeouts per second */ 106 107/* | 31 */ 32 33#ifndef _SYS_PROTOSW_H_ 34#define _SYS_PROTOSW_H_ 35 36/* Forward declare these structures referenced from prototypes below. */ 37struct mbuf; 38struct thread; --- 61 unchanged lines hidden (view full) --- 100 struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ 101}; 102/*#endif*/ 103 104#define PR_SLOWHZ 2 /* 2 slow timeouts per second */ 105#define PR_FASTHZ 5 /* 5 fast timeouts per second */ 106 107/* |
108 * This number should be defined again within each protocol family to avoid 109 * confusion. 110 */ 111#define PROTO_SPACER 32767 /* spacer for loadable protocols */ 112 113/* |
|
108 * Values for pr_flags. 109 * PR_ADDR requires PR_ATOMIC; 110 * PR_ADDR and PR_CONNREQUIRED are mutually exclusive. 111 * PR_IMPLOPCL means that the protocol allows sendto without prior connect, 112 * and the protocol understands the MSG_EOF flag. The first property is 113 * is only relevant if PR_CONNREQUIRED is set (otherwise sendto is allowed 114 * anyhow). 115 */ --- 110 unchanged lines hidden (view full) --- 226 int (*pru_soreceive)(struct socket *so, struct sockaddr **paddr, 227 struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, 228 int *flagsp); 229 int (*pru_sopoll)(struct socket *so, int events, 230 struct ucred *cred, struct thread *td); 231 void (*pru_sosetlabel)(struct socket *so); 232}; 233 | 114 * Values for pr_flags. 115 * PR_ADDR requires PR_ATOMIC; 116 * PR_ADDR and PR_CONNREQUIRED are mutually exclusive. 117 * PR_IMPLOPCL means that the protocol allows sendto without prior connect, 118 * and the protocol understands the MSG_EOF flag. The first property is 119 * is only relevant if PR_CONNREQUIRED is set (otherwise sendto is allowed 120 * anyhow). 121 */ --- 110 unchanged lines hidden (view full) --- 232 int (*pru_soreceive)(struct socket *so, struct sockaddr **paddr, 233 struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, 234 int *flagsp); 235 int (*pru_sopoll)(struct socket *so, int events, 236 struct ucred *cred, struct thread *td); 237 void (*pru_sosetlabel)(struct socket *so); 238}; 239 |
240/* 241 * The dummy protocol specific user requests function pointer array is 242 * initialized to the functions below. All functions return EOPNOTSUPP. 243 */ 244extern struct pr_usrreqs nousrreqs; 245 246int pru_abort_notsupp(struct socket *so); |
|
234int pru_accept_notsupp(struct socket *so, struct sockaddr **nam); | 247int pru_accept_notsupp(struct socket *so, struct sockaddr **nam); |
248int pru_attach_notsupp(struct socket *so, int proto, struct thread *td); 249int pru_bind_notsupp(struct socket *so, struct sockaddr *nam, 250 struct thread *td); |
|
235int pru_connect_notsupp(struct socket *so, struct sockaddr *nam, 236 struct thread *td); 237int pru_connect2_notsupp(struct socket *so1, struct socket *so2); 238int pru_control_notsupp(struct socket *so, u_long cmd, caddr_t data, 239 struct ifnet *ifp, struct thread *td); | 251int pru_connect_notsupp(struct socket *so, struct sockaddr *nam, 252 struct thread *td); 253int pru_connect2_notsupp(struct socket *so1, struct socket *so2); 254int pru_control_notsupp(struct socket *so, u_long cmd, caddr_t data, 255 struct ifnet *ifp, struct thread *td); |
256int pru_detach_notsupp(struct socket *so); 257int pru_disconnect_notsupp(struct socket *so); |
|
240int pru_listen_notsupp(struct socket *so, struct thread *td); | 258int pru_listen_notsupp(struct socket *so, struct thread *td); |
259int pru_peeraddr_notsupp(struct socket *so, struct sockaddr **nam); |
|
241int pru_rcvd_notsupp(struct socket *so, int flags); 242int pru_rcvoob_notsupp(struct socket *so, struct mbuf *m, int flags); | 260int pru_rcvd_notsupp(struct socket *so, int flags); 261int pru_rcvoob_notsupp(struct socket *so, struct mbuf *m, int flags); |
262int pru_send_notsupp(struct socket *so, int flags, struct mbuf *m, 263 struct sockaddr *addr, struct mbuf *control, struct thread *td); |
|
243int pru_sense_null(struct socket *so, struct stat *sb); | 264int pru_sense_null(struct socket *so, struct stat *sb); |
265int pru_shutdown_notsupp(struct socket *so); 266int pru_sockaddr_notsupp(struct socket *so, struct sockaddr **nam); 267int pru_sosend_notsupp(struct socket *so, struct sockaddr *addr, 268 struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, 269 struct thread *td); 270int pru_soreceive_notsupp(struct socket *so, struct sockaddr **paddr, 271 struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, 272 int *flagsp); 273int pru_sopoll_notsupp(struct socket *so, int events, struct ucred *cred, 274 struct thread *td); |
|
244void pru_sosetlabel_null(struct socket *so); 245 246#endif /* _KERNEL */ 247 248/* 249 * The arguments to the ctlinput routine are 250 * (*protosw[].pr_ctlinput)(cmd, sa, arg); 251 * where cmd is one of the commands below, sa is a pointer to a sockaddr, --- 62 unchanged lines hidden (view full) --- 314}; 315#endif 316 317#ifdef _KERNEL 318void pfctlinput(int, struct sockaddr *); 319void pfctlinput2(int, struct sockaddr *, void *); 320struct protosw *pffindproto(int family, int protocol, int type); 321struct protosw *pffindtype(int family, int type); | 275void pru_sosetlabel_null(struct socket *so); 276 277#endif /* _KERNEL */ 278 279/* 280 * The arguments to the ctlinput routine are 281 * (*protosw[].pr_ctlinput)(cmd, sa, arg); 282 * where cmd is one of the commands below, sa is a pointer to a sockaddr, --- 62 unchanged lines hidden (view full) --- 345}; 346#endif 347 348#ifdef _KERNEL 349void pfctlinput(int, struct sockaddr *); 350void pfctlinput2(int, struct sockaddr *, void *); 351struct protosw *pffindproto(int family, int protocol, int type); 352struct protosw *pffindtype(int family, int type); |
353int pf_proto_register(int family, struct protosw *npr); 354int pf_proto_unregister(int family, int protocol, int type); |
|
322#endif 323 324#endif | 355#endif 356 357#endif |