ng_base.c (101241) | ng_base.c (102244) |
---|---|
1/* 2 * ng_base.c 3 * 4 * Copyright (c) 1996-1999 Whistle Communications, Inc. 5 * All rights reserved. 6 * 7 * Subject to the following obligations and disclaimer of warranty, use and 8 * redistribution of this software, in source or object code forms, with or --- 22 unchanged lines hidden (view full) --- 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 34 * OF SUCH DAMAGE. 35 * 36 * Authors: Julian Elischer <julian@freebsd.org> 37 * Archie Cobbs <archie@freebsd.org> 38 * | 1/* 2 * ng_base.c 3 * 4 * Copyright (c) 1996-1999 Whistle Communications, Inc. 5 * All rights reserved. 6 * 7 * Subject to the following obligations and disclaimer of warranty, use and 8 * redistribution of this software, in source or object code forms, with or --- 22 unchanged lines hidden (view full) --- 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 34 * OF SUCH DAMAGE. 35 * 36 * Authors: Julian Elischer <julian@freebsd.org> 37 * Archie Cobbs <archie@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_base.c 101241 2002-08-02 20:56:07Z mux $ | 39 * $FreeBSD: head/sys/netgraph/ng_base.c 102244 2002-08-22 00:30:03Z archie $ |
40 * $Whistle: ng_base.c,v 1.39 1999/01/28 23:54:53 julian Exp $ 41 */ 42 43/* 44 * This file implements the base netgraph code. 45 */ 46 47#include <sys/param.h> --- 3071 unchanged lines hidden (view full) --- 3119 } 3120 switch (item->el_flags & NGQF_TYPE) { 3121 case NGQF_DATA: 3122 /* If we have an mbuf and metadata still attached.. */ 3123 NG_FREE_M(_NGI_M(item)); 3124 NG_FREE_META(_NGI_META(item)); 3125 break; 3126 case NGQF_MESG: | 40 * $Whistle: ng_base.c,v 1.39 1999/01/28 23:54:53 julian Exp $ 41 */ 42 43/* 44 * This file implements the base netgraph code. 45 */ 46 47#include <sys/param.h> --- 3071 unchanged lines hidden (view full) --- 3119 } 3120 switch (item->el_flags & NGQF_TYPE) { 3121 case NGQF_DATA: 3122 /* If we have an mbuf and metadata still attached.. */ 3123 NG_FREE_M(_NGI_M(item)); 3124 NG_FREE_META(_NGI_META(item)); 3125 break; 3126 case NGQF_MESG: |
3127 _NGI_RETADDR(item) = NULL; | 3127 _NGI_RETADDR(item) = 0; |
3128 NG_FREE_MSG(_NGI_MSG(item)); 3129 break; 3130 case NGQF_FN: 3131 /* nothing to free really, */ 3132 _NGI_FN(item) = NULL; 3133 _NGI_ARG1(item) = NULL; 3134 _NGI_ARG2(item) = 0; 3135 case NGQF_UNDEF: --- 312 unchanged lines hidden (view full) --- 3448 } 3449 ITEM_DEBUG_CHECKS; 3450 item->el_flags = NGQF_MESG; 3451 item->el_next = NULL; 3452 /* 3453 * Set the current lasthook into the queue item 3454 */ 3455 NGI_MSG(item) = msg; | 3128 NG_FREE_MSG(_NGI_MSG(item)); 3129 break; 3130 case NGQF_FN: 3131 /* nothing to free really, */ 3132 _NGI_FN(item) = NULL; 3133 _NGI_ARG1(item) = NULL; 3134 _NGI_ARG2(item) = 0; 3135 case NGQF_UNDEF: --- 312 unchanged lines hidden (view full) --- 3448 } 3449 ITEM_DEBUG_CHECKS; 3450 item->el_flags = NGQF_MESG; 3451 item->el_next = NULL; 3452 /* 3453 * Set the current lasthook into the queue item 3454 */ 3455 NGI_MSG(item) = msg; |
3456 NGI_RETADDR(item) = NULL; | 3456 NGI_RETADDR(item) = 0; |
3457 return (item); 3458} 3459 3460 3461 3462#define SET_RETADDR(item, here, retaddr) \ 3463 do { /* Data or fn items don't have retaddrs */ \ 3464 if ((item->el_flags & NGQF_TYPE) == NGQF_MESG) { \ --- 266 unchanged lines hidden --- | 3457 return (item); 3458} 3459 3460 3461 3462#define SET_RETADDR(item, here, retaddr) \ 3463 do { /* Data or fn items don't have retaddrs */ \ 3464 if ((item->el_flags & NGQF_TYPE) == NGQF_MESG) { \ --- 266 unchanged lines hidden --- |