Deleted Added
full compact
ng_base.c (52951) ng_base.c (53042)
1
2/*
3 * ng_base.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

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

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 * Authors: Julian Elischer <julian@whistle.com>
38 * Archie Cobbs <archie@whistle.com>
39 *
1
2/*
3 * ng_base.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

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

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 * Authors: Julian Elischer <julian@whistle.com>
38 * Archie Cobbs <archie@whistle.com>
39 *
40 * $FreeBSD: head/sys/netgraph/ng_base.c 52951 1999-11-07 04:18:20Z julian $
40 * $FreeBSD: head/sys/netgraph/ng_base.c 53042 1999-11-09 00:31:04Z julian $
41 * $Whistle: ng_base.c,v 1.39 1999/01/28 23:54:53 julian Exp $
42 */
43
44/*
45 * This file implements the base netgraph code.
46 */
47
48#include <sys/param.h>

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

419 /* Check for proper length, brackets, no leading junk */
420 if (len < 3 || name[0] != '[' || name[len - 1] != ']'
421 || !isxdigit(name[1]))
422 return (0);
423
424 /* Decode number */
425 val = strtoul(name + 1, &eptr, 16);
426 if (eptr - name != len - 1 || val == ULONG_MAX || val == 0)
41 * $Whistle: ng_base.c,v 1.39 1999/01/28 23:54:53 julian Exp $
42 */
43
44/*
45 * This file implements the base netgraph code.
46 */
47
48#include <sys/param.h>

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

419 /* Check for proper length, brackets, no leading junk */
420 if (len < 3 || name[0] != '[' || name[len - 1] != ']'
421 || !isxdigit(name[1]))
422 return (0);
423
424 /* Decode number */
425 val = strtoul(name + 1, &eptr, 16);
426 if (eptr - name != len - 1 || val == ULONG_MAX || val == 0)
427 return (0);
427 return ((ng_ID_t)0);
428 return (ng_ID_t)val;
429}
430
431/*
432 * Remove a name from a node. This should only be called
433 * when shutting down and removing the node.
434 */
435void

--- 1208 unchanged lines hidden ---
428 return (ng_ID_t)val;
429}
430
431/*
432 * Remove a name from a node. This should only be called
433 * when shutting down and removing the node.
434 */
435void

--- 1208 unchanged lines hidden ---