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

1999/1029/ip/ipifc.c (diff list | history)

1999/0909/sys/src/9/ip/ipifc.c:475,4891999/1029/sys/src/9/ip/ipifc.c:475,501 (short | long | prev | next)
1998/0717    
	if(dolock) 
1998/0306    
		wlock(ifc); 
 
	/* find address on this interface and remove from chain */ 
	lifc = nil; 
	for(l = &ifc->lifc; *l; l = &(*l)->next) 
		if(memcmp(ip, (*l)->local, IPaddrlen) == 0) 
		if(memcmp(mask, (*l)->mask, IPaddrlen) == 0){ 
			lifc = *l; 
1999/1029    
	/* Are we point to point */ 
	type = 0; 
	if(ipcmp(mask, IPallbits) == 0) 
		type = Rptpt; 
 
	/* 
	 *  find address on this interface and remove from chain. 
	 *  for pt to pt we actually specify the remote address at the 
	 *  addresss to remove. 
	 */ 
	l = &ifc->lifc; 
	for(lifc = *l; lifc != nil; lifc = lifc->next) { 
		addr = lifc->local; 
		if(type == Rptpt) 
			addr = lifc->remote; 
		if(memcmp(ip, addr, IPaddrlen) == 0 && memcmp(mask, lifc->mask, IPaddrlen) == 0) { 
1998/0306    
			*l = lifc->next; 
			break; 
		} 
1999/1029    
		l = &lifc->next; 
	} 
1998/0306    
 
1998/0717    
	if(lifc == nil){ 
		if(dolock) 


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