Home
last modified time | relevance | path

Searched refs:ifr (Results 1 – 5 of 5) sorted by relevance

/net-tools-2.7.6/
Dthroughput-client.c228 struct ifreq ifr; in get_ifindex() local
238 memset(&ifr, 0, sizeof(ifr)); in get_ifindex()
239 strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1); in get_ifindex()
241 err = ioctl(sk, SIOCGIFINDEX, &ifr); in get_ifindex()
248 return ifr.ifr_ifindex; in get_ifindex()
439 struct ifreq ifr; in main() local
442 memset(&ifr, 0, sizeof(ifr)); in main()
443 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", interface); in main()
446 (void *)&ifr, sizeof(ifr)) < 0) { in main()
Decho-client.c278 struct ifreq ifr; in get_ifindex() local
288 memset(&ifr, 0, sizeof(ifr)); in get_ifindex()
289 strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1); in get_ifindex()
291 err = ioctl(sk, SIOCGIFINDEX, &ifr); in get_ifindex()
298 return ifr.ifr_ifindex; in get_ifindex()
511 struct ifreq ifr; in main() local
514 memset(&ifr, 0, sizeof(ifr)); in main()
515 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", interface); in main()
518 (void *)&ifr, sizeof(ifr)) < 0) { in main()
Decho-server.c56 struct ifreq ifr; in get_ifindex() local
66 memset(&ifr, 0, sizeof(ifr)); in get_ifindex()
67 strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1); in get_ifindex()
69 err = ioctl(sk, SIOCGIFINDEX, &ifr); in get_ifindex()
76 return ifr.ifr_ifindex; in get_ifindex()
95 struct ifreq ifr; in bind_device() local
98 memset(&ifr, 0, sizeof(ifr)); in bind_device()
99 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", interface); in bind_device()
102 (void *)&ifr, sizeof(ifr)) < 0) { in bind_device()
Dtunslip6.c722 struct ifreq ifr; in tun_alloc() local
732 memset(&ifr, 0, sizeof(ifr)); in tun_alloc()
739 ifr.ifr_flags = (tap ? IFF_TAP : IFF_TUN) | IFF_NO_PI; in tun_alloc()
741 strncpy(ifr.ifr_name, dev, IFNAMSIZ); in tun_alloc()
743 if((err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ) { in tun_alloc()
747 strcpy(dev, ifr.ifr_name); in tun_alloc()
Dcoap-client.c389 struct ifreq ifr; in get_ifindex() local
399 memset(&ifr, 0, sizeof(ifr)); in get_ifindex()
400 strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1); in get_ifindex()
402 err = ioctl(sk, SIOCGIFINDEX, &ifr); in get_ifindex()
409 return ifr.ifr_ifindex; in get_ifindex()
1677 struct ifreq ifr; local
1680 memset(&ifr, 0, sizeof(ifr));
1681 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", interface);
1684 (void *)&ifr, sizeof(ifr)) < 0) {