ng_hole.c (67506) | ng_hole.c (69922) |
---|---|
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@freebsd.org> 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@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_hole.c 67506 2000-10-24 17:32:45Z julian $ | 39 * $FreeBSD: head/sys/netgraph/ng_hole.c 69922 2000-12-12 18:52:14Z 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> --- 14 unchanged lines hidden (view full) --- 62 NULL, 63 NULL, 64 NULL, 65 NULL, 66 NULL, 67 NULL, 68 NULL, 69 ngh_rcvdata, | 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> --- 14 unchanged lines hidden (view full) --- 62 NULL, 63 NULL, 64 NULL, 65 NULL, 66 NULL, 67 NULL, 68 NULL, 69 ngh_rcvdata, |
70 ngh_rcvdata, | |
71 ngh_disconnect, 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, | 70 ngh_disconnect, 71 NULL 72}; 73NETGRAPH_INIT(hole, &typestruct); 74 75/* 76 * Receive data 77 */ 78static int 79ngh_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, |
81 struct mbuf **ret_m, meta_p *ret_meta) | 80 struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp) |
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} | 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} |