Give the sockbuf structure its own header file and supporting source file.
[dragonfly/vkernel-mp.git] / sys / net / netmsg.h
blobfb424442cfa2d5ad09c13c148711bdd78b27c2ca
1 /*
2 * Copyright (c) 2003 Jeffrey Hsu
3 * All rights reserved.
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
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by Jeffrey M. Hsu.
16 * 4. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 * $DragonFly: src/sys/net/netmsg.h,v 1.5 2007/04/22 01:13:11 dillon Exp $
33 #ifndef _NET_NETMSG_H_
34 #define _NET_NETMSG_H_
36 #ifndef _SYS_THREAD_H_
37 #include <sys/thread.h>
38 #endif
39 #ifndef _SYS_PROTOSW_H_
40 #include <sys/protosw.h>
41 #endif
44 * User protocol requests messages.
46 struct netmsg_pru_abort {
47 struct lwkt_msg nm_lmsg;
48 pru_abort_fn_t nm_prufn;
49 struct socket *nm_so;
52 struct netmsg_pru_accept {
53 struct lwkt_msg nm_lmsg;
54 pru_accept_fn_t nm_prufn;
55 struct socket *nm_so;
56 struct sockaddr **nm_nam;
59 struct netmsg_pru_attach {
60 struct lwkt_msg nm_lmsg;
61 pru_attach_fn_t nm_prufn;
62 struct socket *nm_so;
63 int nm_proto;
64 struct pru_attach_info *nm_ai;
67 struct netmsg_pru_bind {
68 struct lwkt_msg nm_lmsg;
69 pru_bind_fn_t nm_prufn;
70 struct socket *nm_so;
71 struct sockaddr *nm_nam;
72 struct thread *nm_td;
75 struct netmsg_pru_connect {
76 struct lwkt_msg nm_lmsg;
77 pru_connect_fn_t nm_prufn;
78 struct socket *nm_so;
79 struct sockaddr *nm_nam;
80 struct thread *nm_td;
83 struct netmsg_pru_connect2 {
84 struct lwkt_msg nm_lmsg;
85 pru_connect2_fn_t nm_prufn;
86 struct socket *nm_so1;
87 struct socket *nm_so2;
90 struct netmsg_pru_control {
91 struct lwkt_msg nm_lmsg;
92 pru_control_fn_t nm_prufn;
93 struct socket *nm_so;
94 u_long nm_cmd;
95 caddr_t nm_data;
96 struct ifnet *nm_ifp;
97 struct thread *nm_td;
100 struct netmsg_pru_detach {
101 struct lwkt_msg nm_lmsg;
102 pru_detach_fn_t nm_prufn;
103 struct socket *nm_so;
106 struct netmsg_pru_disconnect {
107 struct lwkt_msg nm_lmsg;
108 pru_disconnect_fn_t nm_prufn;
109 struct socket *nm_so;
112 struct netmsg_pru_listen {
113 struct lwkt_msg nm_lmsg;
114 pru_listen_fn_t nm_prufn;
115 struct socket *nm_so;
116 struct thread *nm_td;
119 struct netmsg_pru_peeraddr {
120 struct lwkt_msg nm_lmsg;
121 pru_peeraddr_fn_t nm_prufn;
122 struct socket *nm_so;
123 struct sockaddr **nm_nam;
126 struct netmsg_pru_rcvd {
127 struct lwkt_msg nm_lmsg;
128 pru_rcvd_fn_t nm_prufn;
129 struct socket *nm_so;
130 int nm_flags;
133 struct netmsg_pru_rcvoob {
134 struct lwkt_msg nm_lmsg;
135 pru_rcvoob_fn_t nm_prufn;
136 struct socket *nm_so;
137 struct mbuf *nm_m;
138 int nm_flags;
141 struct netmsg_pru_send {
142 struct lwkt_msg nm_lmsg;
143 pru_send_fn_t nm_prufn;
144 struct socket *nm_so;
145 int nm_flags;
146 struct mbuf *nm_m;
147 struct sockaddr *nm_addr;
148 struct mbuf *nm_control;
149 struct thread *nm_td;
152 struct netmsg_pru_sense {
153 struct lwkt_msg nm_lmsg;
154 pru_sense_fn_t nm_prufn;
155 struct socket *nm_so;
156 struct stat *nm_stat;
159 struct netmsg_pru_shutdown {
160 struct lwkt_msg nm_lmsg;
161 pru_shutdown_fn_t nm_prufn;
162 struct socket *nm_so;
165 struct netmsg_pru_sockaddr {
166 struct lwkt_msg nm_lmsg;
167 pru_sockaddr_fn_t nm_prufn;
168 struct socket *nm_so;
169 struct sockaddr **nm_nam;
172 struct netmsg_pru_sosend {
173 struct lwkt_msg nm_lmsg;
174 pru_sosend_fn_t nm_prufn;
175 struct socket *nm_so;
176 struct sockaddr *nm_addr;
177 struct uio *nm_uio;
178 struct mbuf *nm_top;
179 struct mbuf *nm_control;
180 int nm_flags;
181 struct thread *nm_td;
184 struct netmsg_pru_soreceive {
185 struct lwkt_msg nm_lmsg;
186 pru_soreceive_fn_t nm_prufn;
187 struct sockaddr *nm_addr;
188 struct socket *nm_so;
189 struct sockaddr **nm_paddr;
190 struct uio *nm_uio;
191 struct sockbuf *nm_sio;
192 struct mbuf **nm_controlp;
193 int *nm_flagsp;
196 struct netmsg_pru_sopoll {
197 struct lwkt_msg nm_lmsg;
198 pru_sopoll_fn_t nm_prufn;
199 struct socket *nm_so;
200 int nm_events;
201 struct ucred *nm_cred;
202 struct thread *nm_td;
205 #endif