Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/libip/testreadipifc.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
#include <ip.h>
4
 
5
void
6
main(void)
7
{
8
	Ipifc *ifc, *list;
9
	Iplifc *lifc;
10
	int i;
11
 
12
	fmtinstall('I', eipfmt);
13
	fmtinstall('M', eipfmt);
14
 
15
	list = readipifc("/net", nil, -1);
16
	for(ifc = list; ifc; ifc = ifc->next){
17
		print("ipifc %s %d\n", ifc->dev, ifc->mtu);
18
		for(lifc = ifc->lifc; lifc; lifc = lifc->next)
19
			print("\t%I %M %I\n", lifc->ip, lifc->mask, lifc->net);
20
	}
21
}