Deleted Added
full compact
ng_etf.c (129823) ng_etf.c (131155)
1/*-
2 * ng_etf.c Ethertype filter
3 *
4 * Copyright (c) 2001, FreeBSD Incorporated
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * Author: Julian Elischer <julian@freebsd.org>
30 *
1/*-
2 * ng_etf.c Ethertype filter
3 *
4 * Copyright (c) 2001, FreeBSD Incorporated
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * Author: Julian Elischer <julian@freebsd.org>
30 *
31 * $FreeBSD: head/sys/netgraph/ng_etf.c 129823 2004-05-29 00:51:19Z julian $
31 * $FreeBSD: head/sys/netgraph/ng_etf.c 131155 2004-06-26 22:24:16Z julian $
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/mbuf.h>
38#include <sys/malloc.h>
39#include <sys/ctype.h>

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

346 /* Free the message and return */
347 NG_FREE_MSG(msg);
348 return(error);
349}
350
351/*
352 * Receive data, and do something with it.
353 * Actually we receive a queue item which holds the data.
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/mbuf.h>
38#include <sys/malloc.h>
39#include <sys/ctype.h>

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

346 /* Free the message and return */
347 NG_FREE_MSG(msg);
348 return(error);
349}
350
351/*
352 * Receive data, and do something with it.
353 * Actually we receive a queue item which holds the data.
354 * If we free the item it wil also froo the data and metadata unless
355 * we have previously disassociated them using the NGI_GET_etf() macros.
354 * If we free the item it will also free the data unless we have previously
355 * disassociated it using the NGI_GET_etf() macro.
356 * Possibly send it out on another link after processing.
357 * Possibly do something different if it comes from different
356 * Possibly send it out on another link after processing.
357 * Possibly do something different if it comes from different
358 * hooks. the caller will never free m or meta, so
359 * if we use up this data or abort we must free BOTH of these.
358 * hooks. The caller will never free m , so if we use up this data
359 * or abort we must free it.
360 *
361 * If we want, we may decide to force this data to be queued and reprocessed
362 * at the netgraph NETISR time.
363 * We would do that by setting the HK_QUEUE flag on our hook. We would do that
364 * in the connect() method.
365 */
366static int
367ng_etf_rcvdata(hook_p hook, item_p item )

--- 132 unchanged lines hidden ---
360 *
361 * If we want, we may decide to force this data to be queued and reprocessed
362 * at the netgraph NETISR time.
363 * We would do that by setting the HK_QUEUE flag on our hook. We would do that
364 * in the connect() method.
365 */
366static int
367ng_etf_rcvdata(hook_p hook, item_p item )

--- 132 unchanged lines hidden ---