Deleted Added
full compact
ng_ip_input.c (84053) ng_ip_input.c (111888)
1/*
2 * ng_ip_input.c
3 *
4 * Copyright 2001 The Aerospace Corporation. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

57 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
58 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
59 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
60 * OF SUCH DAMAGE.
61 *
62 * Author: Brooks Davis <brooks@FreeBSD.org>
63 * Derived from: ng_hole.c
64 *
1/*
2 * ng_ip_input.c
3 *
4 * Copyright 2001 The Aerospace Corporation. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

57 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
58 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
59 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
60 * OF SUCH DAMAGE.
61 *
62 * Author: Brooks Davis <brooks@FreeBSD.org>
63 * Derived from: ng_hole.c
64 *
65 * $FreeBSD: head/sys/netgraph/ng_ip_input.c 84053 2001-09-27 21:54:27Z brooks $
65 * $FreeBSD: head/sys/netgraph/ng_ip_input.c 111888 2003-03-04 23:19:55Z jlemon $
66 */
67
68/*
69 * This node simply takes IP packets and calls ip_input on them
70 */
71
72#include <sys/param.h>
73#include <sys/systm.h>

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

120 */
121static int
122ngipi_rcvdata(hook_p hook, item_p item)
123{
124 struct mbuf *m;
125
126 NGI_GET_M(item, m);
127 NG_FREE_ITEM(item);
66 */
67
68/*
69 * This node simply takes IP packets and calls ip_input on them
70 */
71
72#include <sys/param.h>
73#include <sys/systm.h>

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

120 */
121static int
122ngipi_rcvdata(hook_p hook, item_p item)
123{
124 struct mbuf *m;
125
126 NGI_GET_M(item, m);
127 NG_FREE_ITEM(item);
128 schednetisr(NETISR_IP);
129 (void) IF_HANDOFF(&ipintrq, m, NULL);
128 netisr_dispatch(NETISR_IP, m);
130 return 0;
131}
132
133/*
134 * Hook disconnection
135 */
136static int
137ngipi_disconnect(hook_p hook)
138{
139 if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
140 ng_rmnode_self(NG_HOOK_NODE(hook));
141 return (0);
142}
129 return 0;
130}
131
132/*
133 * Hook disconnection
134 */
135static int
136ngipi_disconnect(hook_p hook)
137{
138 if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
139 ng_rmnode_self(NG_HOOK_NODE(hook));
140 return (0);
141}