9fans archive / 1996 / 04 / 63 /    prev next

From: Scott Schwartz schwartz@gal...
Subject: ioctl
Date: Mon, 15 Apr 1996 13:41:46 -0400

Min Huang <mhuang@CS.Cornell.EDU> writes:
| I am porting a system built on the top of Unix to Plan9.
| Because the system use ioctle to get network address, network configuration,
| I find that plan9 doesn't support SIOCGIFADDR and SIOCFIFCONF.
| Could you please tell me how I can modify the plan9 to make it support them.

% cat '#P/ipifc'

The mechanism in libc, reading /net/tcp/0/local doesn't work very well
for multihomed hosts, since it returns just one number.  Moreover, all
the */local files return the address of the first interface, rather
than the one the connection is actually on.  That makes e.g. icmpfs do
the wrong thing if one of the interfaces doesn't have an advertised
route.