Plan 9 from Bell Labs’s /usr/web/sources/extra/9hist/ip/nullmedium.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


## diffname ip/nullmedium.c 1998/0306
## diff -e /dev/null /n/emeliedump/1998/0306/sys/src/brazil/ip/nullmedium.c
0a
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "../port/error.h"

#include "ip.h"
#include "kernel.h"

static void
nullbind(Ipifc*, int, char**)
{
	error("can't bind null device");
}

static void
nullunbind(Ipifc*)
{
}

static void
nullbwrite(Ipifc*, Block*, int, uchar*)
{
	error("nullbwrite");
}

Medium nullmedium =
{
	"null",
	0,		/* medium header size */
	0,		/* default min mtu */
	0,		/* default max mtu */
	0,		/* mac address length  */
	nullbind,
	nullunbind,
	nullbwrite,
	nil,		/* addmulti */
	nil,		/* remmulti */
	nil,		/* pktin */
	nil,		/* addroute */
	nil,		/* remroute */
	nil,		/* flushroute */
	nil,		/* joinmulti */
	nil,		/* leave multi */
};
.
## diffname ip/nullmedium.c 1998/0307
## diff -e /n/emeliedump/1998/0306/sys/src/brazil/ip/nullmedium.c /n/emeliedump/1998/0307/sys/src/brazil/ip/nullmedium.c
45a
	0,		/* don't unbind on last close */
.
## diffname ip/nullmedium.c 1998/0423
## diff -e /n/emeliedump/1998/0307/sys/src/brazil/ip/nullmedium.c /n/emeliedump/1998/0423/sys/src/brazil/ip/nullmedium.c
47a

void
nullmediumlink(void)
{
	addipmedium(&nullmedium);
}
.
## diffname ip/nullmedium.c 1999/0731
## diff -e /n/emeliedump/1998/0423/sys/src/brazil/ip/nullmedium.c /n/emeliedump/1999/0731/sys/src/brazil/ip/nullmedium.c
30,46c
.name=		"null",
.bind=		nullbind,
.unbind=	nullunbind,
.bwrite=	nullbwrite,
.
## diffname ip/nullmedium.c 2000/1111
## diff -e /n/emeliedump/1999/0731/sys/src/brazil/ip/nullmedium.c /n/emeliedump/2000/1111/sys/src/9/ip/nullmedium.c
9d

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].