plan 9 kernel history: overview | file list | diff list

2000/1111/ip/tripmedium.c (diff list | history)

1998/0630/sys/src/9/ip/tripmedium.c:21,481999/0731/sys/src/9/ip/tripmedium.c:21,38 (short | long)
1998/0630    
 
Medium tripmedium = 
{ 
	"trip", 
	0,			/* Header size */ 
                 
	20,			/* Min TU */ 
	64*1024,		/* Max TU */ 
                 
	LCIMACSIZE,		/* Maximum MAC address length */ 
                 
	tripbind, 
	tripunbind, 
	tripbwrite, 
	tripaddmulti, 
	tripremmulti, 
	nil,			/* pktin */ 
	tripaddroute, 
	tripremroute, 
	nil,			/* flushroutes */ 
	nil,			/* joinmulti */ 
	nil,			/* leavemulti */ 
	tripares,		/* address cache enter */ 
                 
	0 
1999/0731    
.name=		"trip", 
.minmtu=	20, 
.maxmtu=	64*1024, 
.maclen=	LCIMACSIZE, 
.bind=		tripbind, 
.unbind=	tripunbind, 
.bwrite=	tripbwrite, 
.addmulti=	tripaddmulti, 
.remmulti=	tripremmulti, 
.addroute=	tripaddroute, 
.remroute=	tripremroute, 
.ares=		tripares, 
1998/0630    
}; 
 
typedef struct	Tripinfo Tripinfo; 
1999/0731/sys/src/9/ip/tripmedium.c:7,132000/1111/sys/src/9/ip/tripmedium.c:7,12 (short | long)
1998/0630    
 
#include "ip.h" 
#include "trip.h" 
#include "kernel.h" 
 
static void	tripread(void *a); 
static void	tripbind(Ipifc *ifc, int argc, char **argv); 
2000/1111/sys/src/9/ip/tripmedium.c:142,1482001/0623/sys/src/9/ip/tripmedium.c:142,148 (short | long)
1998/0630    
	for(;;) { 
		bp = devtab[er->mchan->type]->bread(er->mchan, ifc->maxmtu, 0); 
		ifc->in++; 
		ipiput(er->fs, ifc->lifc->local, bp); 
2001/0623    
		ipiput(er->fs, ifc, bp); 
1998/0630    
	} 
 
	pexit("hangup", 1); 
2001/0623/sys/src/9/ip/tripmedium.c:142,1482002/0507/sys/src/9/ip/tripmedium.c:142,148 (short | long)
1998/0630    
	for(;;) { 
		bp = devtab[er->mchan->type]->bread(er->mchan, ifc->maxmtu, 0); 
		ifc->in++; 
2001/0623    
		ipiput(er->fs, ifc, bp); 
2002/0507    
		ipiput4(er->fs, ifc, bp); 
1998/0630    
	} 
 
	pexit("hangup", 1); 
2002/0507/sys/src/9/ip/tripmedium.c:21,282003/0209/sys/src/9/ip/tripmedium.c:21,28 (short | long)
1998/0630    
Medium tripmedium = 
{ 
1999/0731    
.name=		"trip", 
.minmtu=	20, 
.maxmtu=	64*1024, 
2003/0209    
.mintu=	20, 
.maxtu=	64*1024, 
1999/0731    
.maclen=	LCIMACSIZE, 
.bind=		tripbind, 
.unbind=	tripunbind, 
2002/0507/sys/src/9/ip/tripmedium.c:140,1462003/0209/sys/src/9/ip/tripmedium.c:140,146
1998/0630    
	er->readp = up;	/* hide identity under a rock for unbind */ 
 
	for(;;) { 
		bp = devtab[er->mchan->type]->bread(er->mchan, ifc->maxmtu, 0); 
2003/0209    
		bp = devtab[er->mchan->type]->bread(er->mchan, ifc->maxtu, 0); 
1998/0630    
		ifc->in++; 
2002/0507    
		ipiput4(er->fs, ifc, bp); 
1998/0630    
	} 
2002/0507/sys/src/9/ip/tripmedium.c:255,2622003/0209/sys/src/9/ip/tripmedium.c:255,262
1998/0630    
			continue; 
 
		mtc.type = T_CTLIFADMIN; 
		mtc.maxtu = ifc->maxmtu; 
		mtc.mintu = ifc->minmtu; 
2003/0209    
		mtc.maxtu = ifc->maxtu; 
		mtc.mintu = ifc->mintu; 
1998/0630    
 
		mtc.port = 0; 
		if(ifc->m == &tripmedium) { 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)