Home | History | Annotate | Download | only in ip

Lines Matching defs:ifr

882 	struct ifreq ifr;
886 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
890 err = ioctl(fd, SIOCGIFFLAGS, &ifr);
896 if ((ifr.ifr_flags^flags)&mask) {
897 ifr.ifr_flags &= ~mask;
898 ifr.ifr_flags |= mask&flags;
899 err = ioctl(fd, SIOCSIFFLAGS, &ifr);
909 struct ifreq ifr;
913 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
914 strncpy(ifr.ifr_newname, newdev, IFNAMSIZ);
918 err = ioctl(fd, SIOCSIFNAME, &ifr);
930 struct ifreq ifr;
937 memset(&ifr, 0, sizeof(ifr));
938 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
939 ifr.ifr_qlen = qlen;
940 if (ioctl(s, SIOCSIFTXQLEN, &ifr) < 0) {
952 struct ifreq ifr;
959 memset(&ifr, 0, sizeof(ifr));
960 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
961 ifr.ifr_mtu = mtu;
962 if (ioctl(s, SIOCSIFMTU, &ifr) < 0) {
974 struct ifreq ifr;
985 memset(&ifr, 0, sizeof(ifr));
986 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
987 if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
995 me.sll_ifindex = ifr.ifr_ifindex;
1015 char *lla, struct ifreq *ifr)
1019 memset(ifr, 0, sizeof(*ifr));
1020 strncpy(ifr->ifr_name, dev, IFNAMSIZ);
1021 ifr->ifr_hwaddr.sa_family = hatype;
1022 alen = ll_addr_a2n(ifr->ifr_hwaddr.sa_data, 14, lla);
1032 static int set_address(struct ifreq *ifr, int brd)
1039 if (ioctl(s, brd?SIOCSIFHWBROADCAST:SIOCSIFHWADDR, ifr) < 0) {