Deleted Added
full compact
ng_ksocket.c (97685) ng_ksocket.c (102244)
1
2/*
3 * ng_ksocket.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 22 unchanged lines hidden (view full) ---

31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Author: Archie Cobbs <archie@freebsd.org>
38 *
1
2/*
3 * ng_ksocket.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 22 unchanged lines hidden (view full) ---

31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Author: Archie Cobbs <archie@freebsd.org>
38 *
39 * $FreeBSD: head/sys/netgraph/ng_ksocket.c 97685 2002-05-31 23:48:03Z archie $
39 * $FreeBSD: head/sys/netgraph/ng_ksocket.c 102244 2002-08-22 00:30:03Z archie $
40 * $Whistle: ng_ksocket.c,v 1.1 1999/11/16 20:04:40 archie Exp $
41 */
42
43/*
44 * Kernel socket node type. This node type is basically a kernel-mode
45 * version of a socket... kindof like the reverse of the socket node type.
46 */
47

--- 1008 unchanged lines hidden (view full) ---

1056 response->header.flags |= NGF_RESP;
1057 response->header.token = priv->response_token;
1058 *(int32_t *)response->data = error;
1059 /*
1060 * send an async "response" message
1061 * to the node that set us up
1062 * (if it still exists)
1063 */
40 * $Whistle: ng_ksocket.c,v 1.1 1999/11/16 20:04:40 archie Exp $
41 */
42
43/*
44 * Kernel socket node type. This node type is basically a kernel-mode
45 * version of a socket... kindof like the reverse of the socket node type.
46 */
47

--- 1008 unchanged lines hidden (view full) ---

1056 response->header.flags |= NGF_RESP;
1057 response->header.token = priv->response_token;
1058 *(int32_t *)response->data = error;
1059 /*
1060 * send an async "response" message
1061 * to the node that set us up
1062 * (if it still exists)
1063 */
1064 NG_SEND_MSG_ID(error, node, response,
1065 priv->response_addr, NULL);
1064 NG_SEND_MSG_ID(error, node,
1065 response, priv->response_addr, 0);
1066 }
1067 priv->flags &= ~KSF_CONNECTING;
1068 }
1069 }
1070
1071 /* Check whether a pending accept operation has completed */
1072 if (priv->flags & KSF_ACCEPTING) {
1073 error = ng_ksocket_check_accept(priv);

--- 180 unchanged lines hidden (view full) ---

1254 so->so_rcv.sb_flags |= SB_UPCALL;
1255 so->so_snd.sb_flags |= SB_UPCALL;
1256
1257 /* Fill in the response data and send it or return it to the caller */
1258 resp_data = (struct ng_ksocket_accept *)resp->data;
1259 resp_data->nodeid = NG_NODE_ID(node);
1260 if (sa != NULL)
1261 bcopy(sa, &resp_data->addr, sa->sa_len);
1066 }
1067 priv->flags &= ~KSF_CONNECTING;
1068 }
1069 }
1070
1071 /* Check whether a pending accept operation has completed */
1072 if (priv->flags & KSF_ACCEPTING) {
1073 error = ng_ksocket_check_accept(priv);

--- 180 unchanged lines hidden (view full) ---

1254 so->so_rcv.sb_flags |= SB_UPCALL;
1255 so->so_snd.sb_flags |= SB_UPCALL;
1256
1257 /* Fill in the response data and send it or return it to the caller */
1258 resp_data = (struct ng_ksocket_accept *)resp->data;
1259 resp_data->nodeid = NG_NODE_ID(node);
1260 if (sa != NULL)
1261 bcopy(sa, &resp_data->addr, sa->sa_len);
1262 NG_SEND_MSG_ID(error, node, resp, priv->response_addr, NULL);
1262 NG_SEND_MSG_ID(error, node, resp, priv->response_addr, 0);
1263
1264out:
1265 if (sa != NULL)
1266 FREE(sa, M_SONAME);
1267}
1268
1269/*
1270 * Parse out either an integer value or an alias.

--- 22 unchanged lines hidden ---
1263
1264out:
1265 if (sa != NULL)
1266 FREE(sa, M_SONAME);
1267}
1268
1269/*
1270 * Parse out either an integer value or an alias.

--- 22 unchanged lines hidden ---