Peter Taps wrote: > Folks, > > I need to develop a custom Web UI to configure a few things including ip > addresses for a server box. Are there programming APIs availble under > OpenSolaris to get current information about ethernet cards and modify the > values? Would appreciate if there is sample code out there.
What about the socket ioctls, SIOCGIF* and SIOCSIF*, that are available on OpenSolaris, Linux, BSD, and many other systems? There are also variants (SIOCGLIF* and SIOCSLIF*; note the extra "L") that provide Solaris-specific extensions to the older BSD-derived interfaces (at least extensions over what was originally implemented in SunOS 4.x). If you're looking to enumerate not-yet-configured Ethernet interfaces, things get a little murkier. The approach taken by NWAM (Network Automagic) in OpenSolaris is to do an "/sbin/ifconfig -a plumb", and let ifconfig do the device exploration. Then it just comes down to the fairly simple ioctls above. For what it's worth, your question might be a little more at home on networking-disc...@opensolaris.org rather than on opensolaris-code. You'll find more networking people there. -- James Carlson 42.703N 71.076W <carls...@workingcode.com> _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code