~kris/9p

9hist

ref: 17dd2cf113bef1c53c47f29940e331ed6980b631 9hist/ip/nullmedium.c -rw-r--r-- 755 bytes
17dd2cf1 — David du Colombier Plan 9 from Bell Labs 1998-03-25 28 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#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 */
	0,		/* don't unbind on last close */
};