Deleted Added
full compact
ng_ether.c (64653) ng_ether.c (65305)
1
2/*
3 * ng_ether.c
4 *
5 * Copyright (c) 1996-2000 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: Archie Cobbs <archie@freebsd.org>
38 * Julian Elischer <julian@freebsd.org>
39 *
1
2/*
3 * ng_ether.c
4 *
5 * Copyright (c) 1996-2000 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: Archie Cobbs <archie@freebsd.org>
38 * Julian Elischer <julian@freebsd.org>
39 *
40 * $FreeBSD: head/sys/netgraph/ng_ether.c 64653 2000-08-15 01:05:50Z archie $
40 * $FreeBSD: head/sys/netgraph/ng_ether.c 65305 2000-09-01 00:28:03Z archie $
41 */
42
43/*
44 * ng_ether(4) netgraph node type
45 */
46
47#include <sys/param.h>
48#include <sys/systm.h>

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

729
730static int
731ng_enaddr_unparse(const struct ng_parse_type *type,
732 const u_char *data, int *off, char *cbuf, int cbuflen)
733{
734 int len;
735
736 len = snprintf(cbuf, cbuflen, "%02x:%02x:%02x:%02x:%02x:%02x",
41 */
42
43/*
44 * ng_ether(4) netgraph node type
45 */
46
47#include <sys/param.h>
48#include <sys/systm.h>

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

729
730static int
731ng_enaddr_unparse(const struct ng_parse_type *type,
732 const u_char *data, int *off, char *cbuf, int cbuflen)
733{
734 int len;
735
736 len = snprintf(cbuf, cbuflen, "%02x:%02x:%02x:%02x:%02x:%02x",
737 data[0], data[1], data[2], data[3], data[4], data[5]);
737 data[*off], data[*off + 1], data[*off + 2],
738 data[*off + 3], data[*off + 4], data[*off + 5]);
738 if (len >= cbuflen)
739 return (ERANGE);
740 *off += ETHER_ADDR_LEN;
741 return (0);
742}
743
744/******************************************************************
745 INITIALIZATION

--- 60 unchanged lines hidden ---
739 if (len >= cbuflen)
740 return (ERANGE);
741 *off += ETHER_ADDR_LEN;
742 return (0);
743}
744
745/******************************************************************
746 INITIALIZATION

--- 60 unchanged lines hidden ---