David Dillon writes: > I was wondering if anyone has had to plumb, set an address, and mark an > interface up from within a program. > > I have tried googling for examples with no luck. I was looking at the code > for ifconfig but was hoping someone might have a reference with some clearer > examples.
There's also if_tcp(7P) and (if you get desperate) the sys-solaris.c code inside the open source pppd code. The short answer is that to plumb an interface, you push the "ip" STREAMS module on top and use SIOCSLIFNAME ioctl on the stream. To set an address, use SIOCSLIFADDR, and then mark the interface IFF_UP with SIOCSLIFFLAGS. -- James Carlson, Solaris Networking <[EMAIL PROTECTED]> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
