Ooops, correction: silly me, I'm using an variable named "socket" while
the function call is also "socket" yeesh.
Revised skeleton:
------
#include .....
struct ifreq ifr;
int fd; /* socket */
.
.
fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
iresult = ioctl(fd, SIOCGIFADDR, &ifr);
/*
* at this point, ifr.ifr_addr contains the address. It's of type struct
* sockaddr.
*/
----------------------------------------------------------------
Gerard Paul R. Java
System Administrator, Mosaic Communications Cebu
primary: [EMAIL PROTECTED]
secondary: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]