Deleted Added
full compact
ng_sample.c (132464) ng_sample.c (132828)
1
2/*
3 * ng_sample.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 Elischer <julian@freebsd.org>
38 *
1
2/*
3 * ng_sample.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 Elischer <julian@freebsd.org>
38 *
39 * $FreeBSD: head/sys/netgraph/ng_sample.c 132464 2004-07-20 17:15:38Z julian $
39 * $FreeBSD: head/sys/netgraph/ng_sample.c 132828 2004-07-29 08:05:02Z glebius $
40 * $Whistle: ng_sample.c,v 1.13 1999/11/01 09:24:52 julian Exp $
41 */
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/kernel.h>
46#include <sys/mbuf.h>
47#include <sys/malloc.h>

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

417 */
418static int
419ng_xxx_shutdown(node_p node)
420{
421 const xxx_p privdata = NG_NODE_PRIVATE(node);
422
423#ifndef PERSISTANT_NODE
424 NG_NODE_SET_PRIVATE(node, NULL);
40 * $Whistle: ng_sample.c,v 1.13 1999/11/01 09:24:52 julian Exp $
41 */
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/kernel.h>
46#include <sys/mbuf.h>
47#include <sys/malloc.h>

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

417 */
418static int
419ng_xxx_shutdown(node_p node)
420{
421 const xxx_p privdata = NG_NODE_PRIVATE(node);
422
423#ifndef PERSISTANT_NODE
424 NG_NODE_SET_PRIVATE(node, NULL);
425 NG_NODE_UNREF(privdata->node);
425 NG_NODE_UNREF(node);
426 FREE(privdata, M_NETGRAPH);
427#else
428 if (node->nd_flags & NGF_REALLY_DIE) {
429 /*
430 * WE came here because the widget card is being unloaded,
431 * so stop being persistant.
432 * Actually undo all the things we did on creation.
433 */

--- 65 unchanged lines hidden ---
426 FREE(privdata, M_NETGRAPH);
427#else
428 if (node->nd_flags & NGF_REALLY_DIE) {
429 /*
430 * WE came here because the widget card is being unloaded,
431 * so stop being persistant.
432 * Actually undo all the things we did on creation.
433 */

--- 65 unchanged lines hidden ---