/ Published in: C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
static int set_ip_using(const char *name, int c, unsigned long ip) { struct ifreq ifr; safe_strncpy(ifr.ifr_name, name, IFNAMSIZ); if (ioctl(skfd, c, &ifr) < 0) return -1; return 0; }
Comments
