ng_socket.c (97897) | ng_socket.c (102244) |
---|---|
1 2/* 3 * ng_socket.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: Julian Elischer <julian@freebsd.org> 38 * | 1 2/* 3 * ng_socket.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: Julian Elischer <julian@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_socket.c 97897 2002-06-05 23:35:31Z archie $ | 39 * $FreeBSD: head/sys/netgraph/ng_socket.c 102244 2002-08-22 00:30:03Z archie $ |
40 * $Whistle: ng_socket.c,v 1.28 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * Netgraph socket nodes 45 * 46 * There are two types of netgraph sockets, control and data. 47 * Control sockets have a netgraph node, but data sockets are --- 223 unchanged lines hidden (view full) --- 271else { 272printf("errx=%d\n",error); 273} 274 (msg) = NULL; 275 } while (0); 276 277#else 278 /* The callee will free the msg when done. The path is our business. */ | 40 * $Whistle: ng_socket.c,v 1.28 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * Netgraph socket nodes 45 * 46 * There are two types of netgraph sockets, control and data. 47 * Control sockets have a netgraph node, but data sockets are --- 223 unchanged lines hidden (view full) --- 271else { 272printf("errx=%d\n",error); 273} 274 (msg) = NULL; 275 } while (0); 276 277#else 278 /* The callee will free the msg when done. The path is our business. */ |
279 NG_SEND_MSG_PATH(error, pcbp->sockdata->node, msg, path, NULL); | 279 NG_SEND_MSG_PATH(error, pcbp->sockdata->node, msg, path, 0); |
280#endif 281release: 282 if (path != NULL) 283 FREE(path, M_NETGRAPH_PATH); 284 if (control != NULL) 285 m_freem(control); 286 if (m != NULL) 287 m_freem(m); --- 357 unchanged lines hidden (view full) --- 645 */ 646 647 sap = (struct sockaddr_ng *) nam; 648 /* The item will hold the node reference */ 649 item = ng_package_data(NULL, NULL); 650 if (item == NULL) { 651 return (ENOMEM); 652 } | 280#endif 281release: 282 if (path != NULL) 283 FREE(path, M_NETGRAPH_PATH); 284 if (control != NULL) 285 m_freem(control); 286 if (m != NULL) 287 m_freem(m); --- 357 unchanged lines hidden (view full) --- 645 */ 646 647 sap = (struct sockaddr_ng *) nam; 648 /* The item will hold the node reference */ 649 item = ng_package_data(NULL, NULL); 650 if (item == NULL) { 651 return (ENOMEM); 652 } |
653 if ((error = ng_address_path(NULL, item, sap->sg_data, NULL))) | 653 if ((error = ng_address_path(NULL, item, sap->sg_data, 0))) |
654 return (error); /* item is freed on failure */ 655 656 /* 657 * Extract node from item and free item. Remember we now have 658 * a reference on the node. The item holds it for us. 659 * when we free the item we release the reference. 660 */ 661 farnode = item->el_dest; /* shortcut */ --- 433 unchanged lines hidden --- | 654 return (error); /* item is freed on failure */ 655 656 /* 657 * Extract node from item and free item. Remember we now have 658 * a reference on the node. The item holds it for us. 659 * when we free the item we release the reference. 660 */ 661 farnode = item->el_dest; /* shortcut */ --- 433 unchanged lines hidden --- |