ng_atm.c (243882) | ng_atm.c (298431) |
---|---|
1/*- 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 */ 29 30/* 31 * Netgraph module to connect NATM interfaces to netgraph. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 */ 29 30/* 31 * Netgraph module to connect NATM interfaces to netgraph. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/netgraph/atm/ng_atm.c 243882 2012-12-05 08:04:20Z glebius $"); | 35__FBSDID("$FreeBSD: head/sys/netgraph/atm/ng_atm.c 298431 2016-04-21 19:40:10Z pfg $"); |
36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/kernel.h> 40#include <sys/malloc.h> 41#include <sys/mbuf.h> 42#include <sys/errno.h> 43#include <sys/syslog.h> --- 823 unchanged lines hidden (view full) --- 867 ATM_DEVICE_NAMES 868 }; 869 870 mib = (const struct ifatm_mib *)(priv->ifp->if_linkmib); 871 872 sbuf_new(&sbuf, arg, len, SBUF_FIXEDLEN); 873 sbuf_printf(&sbuf, "interface: %s\n", priv->ifp->if_xname); 874 | 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/kernel.h> 40#include <sys/malloc.h> 41#include <sys/mbuf.h> 42#include <sys/errno.h> 43#include <sys/syslog.h> --- 823 unchanged lines hidden (view full) --- 867 ATM_DEVICE_NAMES 868 }; 869 870 mib = (const struct ifatm_mib *)(priv->ifp->if_linkmib); 871 872 sbuf_new(&sbuf, arg, len, SBUF_FIXEDLEN); 873 sbuf_printf(&sbuf, "interface: %s\n", priv->ifp->if_xname); 874 |
875 if (mib->device >= sizeof(devices) / sizeof(devices[0])) | 875 if (mib->device >= nitems(devices)) |
876 sbuf_printf(&sbuf, "device=unknown\nvendor=unknown\n"); 877 else 878 sbuf_printf(&sbuf, "device=%s\nvendor=%s\n", 879 devices[mib->device].name, devices[mib->device].vendor); 880 881 for (i = 0; atmmedia[i].name; i++) 882 if(mib->media == atmmedia[i].media) { 883 sbuf_printf(&sbuf, "media=%s\n", atmmedia[i].name); --- 565 unchanged lines hidden --- | 876 sbuf_printf(&sbuf, "device=unknown\nvendor=unknown\n"); 877 else 878 sbuf_printf(&sbuf, "device=%s\nvendor=%s\n", 879 devices[mib->device].name, devices[mib->device].vendor); 880 881 for (i = 0; atmmedia[i].name; i++) 882 if(mib->media == atmmedia[i].media) { 883 sbuf_printf(&sbuf, "media=%s\n", atmmedia[i].name); --- 565 unchanged lines hidden --- |