2 * Copyright (c) 2003 Jeffrey Hsu
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
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.2 2004/04/20 01:52:26 dillon Exp $
37 * User protocol requests messages.
39 struct netmsg_pru_abort {
40 struct lwkt_msg nm_lmsg;
41 pru_abort_fn_t nm_prufn;
45 struct netmsg_pru_accept {
46 struct lwkt_msg nm_lmsg;
47 pru_accept_fn_t nm_prufn;
49 struct sockaddr **nm_nam;
52 struct netmsg_pru_attach {
53 struct lwkt_msg nm_lmsg;
54 pru_attach_fn_t nm_prufn;
57 struct pru_attach_info *nm_ai;
60 struct netmsg_pru_bind {
61 struct lwkt_msg nm_lmsg;
62 pru_bind_fn_t nm_prufn;
64 struct sockaddr *nm_nam;
68 struct netmsg_pru_connect {
69 struct lwkt_msg nm_lmsg;
70 pru_connect_fn_t nm_prufn;
72 struct sockaddr *nm_nam;
76 struct netmsg_pru_connect2 {
77 struct lwkt_msg nm_lmsg;
78 pru_connect2_fn_t nm_prufn;
79 struct socket *nm_so1;
80 struct socket *nm_so2;
83 struct netmsg_pru_control {
84 struct lwkt_msg nm_lmsg;
85 pru_control_fn_t nm_prufn;
93 struct netmsg_pru_detach {
94 struct lwkt_msg nm_lmsg;
95 pru_detach_fn_t nm_prufn;
99 struct netmsg_pru_disconnect {
100 struct lwkt_msg nm_lmsg;
101 pru_disconnect_fn_t nm_prufn;
102 struct socket *nm_so;
105 struct netmsg_pru_listen {
106 struct lwkt_msg nm_lmsg;
107 pru_listen_fn_t nm_prufn;
108 struct socket *nm_so;
109 struct thread *nm_td;
112 struct netmsg_pru_peeraddr {
113 struct lwkt_msg nm_lmsg;
114 pru_peeraddr_fn_t nm_prufn;
115 struct socket *nm_so;
116 struct sockaddr **nm_nam;
119 struct netmsg_pru_rcvd {
120 struct lwkt_msg nm_lmsg;
121 pru_rcvd_fn_t nm_prufn;
122 struct socket *nm_so;
126 struct netmsg_pru_rcvoob {
127 struct lwkt_msg nm_lmsg;
128 pru_rcvoob_fn_t nm_prufn;
129 struct socket *nm_so;
134 struct netmsg_pru_send {
135 struct lwkt_msg nm_lmsg;
136 pru_send_fn_t nm_prufn;
137 struct socket *nm_so;
140 struct sockaddr *nm_addr;
141 struct mbuf *nm_control;
142 struct thread *nm_td;
145 struct netmsg_pru_sense {
146 struct lwkt_msg nm_lmsg;
147 pru_sense_fn_t nm_prufn;
148 struct socket *nm_so;
149 struct stat *nm_stat;
152 struct netmsg_pru_shutdown {
153 struct lwkt_msg nm_lmsg;
154 pru_shutdown_fn_t nm_prufn;
155 struct socket *nm_so;
158 struct netmsg_pru_sockaddr {
159 struct lwkt_msg nm_lmsg;
160 pru_sockaddr_fn_t nm_prufn;
161 struct socket *nm_so;
162 struct sockaddr **nm_nam;
165 struct netmsg_pru_sosend {
166 struct lwkt_msg nm_lmsg;
167 pru_sosend_fn_t nm_prufn;
168 struct socket *nm_so;
169 struct sockaddr *nm_addr;
172 struct mbuf *nm_control;
174 struct thread *nm_td;
177 struct netmsg_pru_soreceive {
178 struct lwkt_msg nm_lmsg;
179 pru_soreceive_fn_t nm_prufn;
180 struct sockaddr *nm_addr;
181 struct socket *nm_so;
182 struct sockaddr **nm_paddr;
184 struct mbuf **nm_mp0;
185 struct mbuf **nm_controlp;
189 struct netmsg_pru_sopoll {
190 struct lwkt_msg nm_lmsg;
191 pru_sopoll_fn_t nm_prufn;
192 struct socket *nm_so;
194 struct ucred *nm_cred;
195 struct thread *nm_td;