Do you have a question? Post it now! No Registration Necessary
- Posted on
April 6, 2007, 4:21 pm
rate this thread
Re: getting IP addresses of network interfaces on Linux box
There are IOCTL's you can call on a socket fd, something like this, from
the top of my head:
strict ifreq ifr;
struct sockaddr_sin *sa;
fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
strcpy(ifr.ifr_name, ifname); /* Don't use strcpy */
ioctl(fd, SIOGCIFADDR, &ifr);
sa = (struct sockaddr_in *)(ifr.ifr_addr);
- » how to select whihc is better embedded Linux OS for MPC82xx processor?
- — Previous thread in » Embedded Linux
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
- » OT: "We can stay retarded longer than they can stay solvent.?
- — The site's Last Updated Thread. Posted in » Electronics Design