Deleted Added
full compact
ng_hole.c (54249) ng_hole.c (59728)
1
2/*
3 * ng_hole.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 Elisher <julian@whistle.com>
38 *
1
2/*
3 * ng_hole.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 Elisher <julian@whistle.com>
38 *
39 * $FreeBSD: head/sys/netgraph/ng_hole.c 54249 1999-12-07 05:50:48Z julian $
39 * $FreeBSD: head/sys/netgraph/ng_hole.c 59728 2000-04-28 17:09:00Z julian $
40 * $Whistle: ng_hole.c,v 1.10 1999/11/01 09:24:51 julian Exp $
41 */
42
43/*
44 * This node is a 'black hole' that simply discards everything it receives
45 */
46
47#include <sys/param.h>

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

72 NULL
73};
74NETGRAPH_INIT(hole, &typestruct);
75
76/*
77 * Receive data
78 */
79static int
40 * $Whistle: ng_hole.c,v 1.10 1999/11/01 09:24:51 julian Exp $
41 */
42
43/*
44 * This node is a 'black hole' that simply discards everything it receives
45 */
46
47#include <sys/param.h>

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

72 NULL
73};
74NETGRAPH_INIT(hole, &typestruct);
75
76/*
77 * Receive data
78 */
79static int
80ngh_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
80ngh_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
81 struct mbuf **ret_m, meta_p *ret_meta)
81{
82 NG_FREE_DATA(m, meta);
83 return 0;
84}
85
86/*
87 * Hook disconnection
88 */
89static int
90ngh_disconnect(hook_p hook)
91{
92 if (hook->node->numhooks == 0)
93 ng_rmnode(hook->node);
94 return (0);
95}
82{
83 NG_FREE_DATA(m, meta);
84 return 0;
85}
86
87/*
88 * Hook disconnection
89 */
90static int
91ngh_disconnect(hook_p hook)
92{
93 if (hook->node->numhooks == 0)
94 ng_rmnode(hook->node);
95 return (0);
96}