Re: how to get IP address of current machine from C++ code?

2000-11-03 Thread David Ford
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, ) > > with the interface name set in the appropriate

how to get IP address of current machine from C++ code?

2000-11-03 Thread Christopher Friesen
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, ) with the interface name set in the appropriate field in ifr, but I'm not sure how I

how to get IP address of current machine from C++ code?

2000-11-03 Thread Christopher Friesen
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

Re: how to get IP address of current machine from C++ code?

2000-11-03 Thread David Ford
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