Christopher Friesen wrote: > I would like to get the IP address of one of the interfaces of the > machine that I'm currently on from within some C++ code. It looks like > I should be able to do this by doing an > > ioctl(atoi(fd, SIOCGIFADDR, &ifr) > > with the interface name set in the appropriate field in ifr, but I'm not > sure how I should be getting the proper value for fd. I would > appreciate some help on this, or if there is a better way then I'd love > to hear it. This isn't c++, it's plain c, but it's easy to grok. Called as: gi [interface] -d -- "The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'."