| plan 9 kernel history: overview | file list | diff list |
1998/0423/ip/pktmedium.c (diff list | history)
| 1998/0423/sys/src/9/ip/pktmedium.c:1,82 – 1998/0714/sys/src/9/ip/pktmedium.c:1,83 (short | long | prev | next) | ||
|
Add ares ptr.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1998/0306 | #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 pktbind(Ipifc *ifc, int argc, char **argv); static void pktunbind(Ipifc *ifc); static void pktbwrite(Ipifc *ifc, Block *bp, int version, uchar *ip); | |
| 1998/0313 | static void pktin(Fs*, Ipifc *ifc, Block *bp); | |
| 1998/0306 | Medium pktmedium = { "pkt", 14, | |
| 1998/0330 | 40, 4*1024, | |
| 1998/0306 | 6, pktbind, pktunbind, pktbwrite, nil, /* addmulti */ nil, /* remmulti */ pktin, nil, /* addroute */ nil, /* remroute */ nil, /* flushroute */ nil, /* joinmulti */ nil, /* leave multi */ | |
| 1998/0714 | nil, /* ares */ | |
| 1998/0307 | 1, /* unbind on last close */ | |
| 1998/0306 | }; /* * called to bind an IP ifc to an ethernet device * called with ifc wlock'd */ static void pktbind(Ipifc*, int, char**) { } /* * called with ifc wlock'd */ static void pktunbind(Ipifc*) { } /* * called by ipoput with a single packet to write */ static void pktbwrite(Ipifc *ifc, Block *bp, int, uchar*) { /* enqueue onto the conversation's rq */ bp = concatblock(bp); qpass(ifc->conv->rq, bp); } /* | |
| 1998/0313 | * called with ifc rlocked when someone write's to 'data' | |
| 1998/0306 | */ static void | |
| 1998/0313 | pktin(Fs *f, Ipifc *ifc, Block *bp) | |
| 1998/0306 | { if(ifc->lifc == nil) freeb(bp); else | |
| 1998/0313 | ipiput(f, ifc->lifc->local, bp); | |
| 1998/0306 | } | |
| 1998/0423 | void pktmediumlink(void) { addipmedium(&pktmedium); } | |