shithub: riscv

ref: 0196ca7536c295b42e1d27ab8187a3d8e1bda328
dir: /sys/src/libip/iplocalonifc.c/

View raw version
#include <u.h>
#include <libc.h>
#include <ctype.h>
#include <ip.h>

Iplifc*
iplocalonifc(Ipifc *ifc, uchar *ip)
{
	Iplifc *lifc;

	for(lifc = ifc->lifc; lifc != nil; lifc = lifc->next){
		if(ipcmp(ip, lifc->ip) == 0)
			return lifc;
	}
	return nil;
}