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

1998/0330/ip/ipifc.c (diff list | history)

1998/0318/sys/src/9/ip/ipifc.c:286,2911998/0330/sys/src/9/ip/ipifc.c:286,310 (short | long | prev | next)
Add ipifcsetmtu and mtu control message.
rsc Fri Mar 4 12:44:25 2005
1998/0306    
} 
 
/* 
1998/0330    
 *  change an interface's mtu 
 */ 
char* 
ipifcsetmtu(Ipifc *ifc, char **argv, int argc) 
{ 
	int mtu; 
 
	if(argc < 2) 
		return Ebadarg; 
	if(ifc->m == nil) 
		return Ebadarg; 
	mtu = strtoul(argv[1], 0, 0); 
	if(mtu < ifc->m->minmtu || mtu > ifc->m->maxmtu) 
		return Ebadarg; 
	ifc->maxmtu = mtu; 
	return nil; 
} 
 
/* 
1998/0306    
 *  add an address to an interface. 
 */ 
char* 
1998/0318/sys/src/9/ip/ipifc.c:566,5711998/0330/sys/src/9/ip/ipifc.c:585,592
1998/0306    
		return ipifcjoinmulti(ifc, argv, argc); 
	else if(strcmp(argv[0], "leavemulti") == 0) 
		return ipifcleavemulti(ifc, argv, argc); 
1998/0330    
	else if(strcmp(argv[0], "mtu") == 0) 
		return ipifcsetmtu(ifc, argv, argc); 
1998/0314    
	else if(strcmp(argv[0], "iprouting") == 0){ 
		i = 1; 
		if(argc > 1) 


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