/linux/net/core/ |
A D | dev_ioctl.c | 26 ifr->ifr_name[IFNAMSIZ-1] = 0; in dev_ifname() 27 return netdev_get_name(net, ifr->ifr_name, ifr->ifr_ifindex); in dev_ifname() 150 ifr->ifr_metric = 0; in dev_ifsioc_locked() 154 ifr->ifr_mtu = dev->mtu; in dev_ifsioc_locked() 162 return dev_getifmap(dev, ifr); in dev_ifsioc_locked() 367 if (ifr->ifr_qlen < 0) in dev_ifsioc() 479 return dev_ifname(net, ifr); in dev_ioctl() 481 ifr->ifr_name[IFNAMSIZ-1] = 0; in dev_ioctl() 493 dev_load(net, ifr->ifr_name); in dev_ioctl() 494 ret = dev_get_mac_address(&ifr->ifr_hwaddr, net, ifr->ifr_name); in dev_ioctl() [all …]
|
/linux/Documentation/networking/ |
A D | tuntap.rst | 95 struct ifreq ifr; 101 memset(&ifr, 0, sizeof(ifr)); 108 ifr.ifr_flags = IFF_TUN; 116 strcpy(dev, ifr.ifr_name); 150 struct ifreq ifr; 156 memset(&ifr, 0, sizeof(ifr)); 164 strcpy(ifr.ifr_name, dev); 197 struct ifreq ifr; 199 memset(&ifr, 0, sizeof(ifr)); 202 ifr.ifr_flags = IFF_ATTACH_QUEUE; [all …]
|
/linux/arch/um/os-Linux/drivers/ |
A D | tuntap_user.c | 130 struct ifreq ifr; in tuntap_open() local 147 memset(&ifr, 0, sizeof(ifr)); in tuntap_open() 148 ifr.ifr_flags = IFF_TAP | IFF_NO_PI; in tuntap_open() 149 strlcpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name)); in tuntap_open() 150 if (ioctl(pri->fd, TUNSETIFF, &ifr) < 0) { in tuntap_open()
|
/linux/drivers/spi/ |
A D | atmel-quadspi.c | 300 u32 iar, icr, ifr; in atmel_qspi_set_cfg() local 306 ifr = QSPI_IFR_INSTEN; in atmel_qspi_set_cfg() 311 ifr |= atmel_qspi_modes[mode].config; in atmel_qspi_set_cfg() 338 ifr &= ~QSPI_IFR_INSTEN; in atmel_qspi_set_cfg() 339 ifr |= QSPI_IFR_ADDREN; in atmel_qspi_set_cfg() 343 ifr |= QSPI_IFR_ADDREN; in atmel_qspi_set_cfg() 349 ifr |= QSPI_IFR_ADDREN; in atmel_qspi_set_cfg() 366 ifr |= QSPI_IFR_NBDUM(dummy_cycles); in atmel_qspi_set_cfg() 370 ifr |= QSPI_IFR_DATAEN; in atmel_qspi_set_cfg() 373 ifr |= QSPI_IFR_TFRTYP_MEM; in atmel_qspi_set_cfg() [all …]
|
/linux/tools/testing/selftests/net/ |
A D | udpgso.c | 279 struct ifreq ifr; in get_device_mtu() local 281 memset(&ifr, 0, sizeof(ifr)); in get_device_mtu() 283 strcpy(ifr.ifr_name, ifname); in get_device_mtu() 285 if (ioctl(fd, SIOCGIFMTU, &ifr)) in get_device_mtu() 288 return ifr.ifr_mtu; in get_device_mtu() 293 struct ifreq ifr; in __set_device_mtu() local 295 memset(&ifr, 0, sizeof(ifr)); in __set_device_mtu() 297 ifr.ifr_mtu = mtu; in __set_device_mtu() 298 strcpy(ifr.ifr_name, ifname); in __set_device_mtu() 300 if (ioctl(fd, SIOCSIFMTU, &ifr)) in __set_device_mtu()
|
A D | hwtstamp_config.c | 88 struct ifreq ifr; in main() local 114 strcpy(ifr.ifr_name, argv[1]); in main() 115 ifr.ifr_data = (caddr_t)&config; in main() 117 if (ioctl(sock, (argc == 2) ? SIOCGHWTSTAMP : SIOCSHWTSTAMP, &ifr)) { in main()
|
/linux/drivers/net/dsa/mv88e6xxx/ |
A D | hwtstamp.h | 114 struct ifreq *ifr); 116 struct ifreq *ifr); 136 int port, struct ifreq *ifr) in mv88e6xxx_port_hwtstamp_set() argument 142 int port, struct ifreq *ifr) in mv88e6xxx_port_hwtstamp_get() argument
|
A D | hwtstamp.c | 176 struct ifreq *ifr) in mv88e6xxx_port_hwtstamp_set() argument 186 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in mv88e6xxx_port_hwtstamp_set() 196 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in mv88e6xxx_port_hwtstamp_set() 201 struct ifreq *ifr) in mv88e6xxx_port_hwtstamp_get() argument 210 return copy_to_user(ifr->ifr_data, config, sizeof(*config)) ? in mv88e6xxx_port_hwtstamp_get()
|
/linux/drivers/net/ethernet/aquantia/atlantic/ |
A D | aq_main.c | 267 static int aq_ndev_hwtstamp_set(struct aq_nic_s *aq_nic, struct ifreq *ifr) in aq_ndev_hwtstamp_set() argument 277 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in aq_ndev_hwtstamp_set() 285 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in aq_ndev_hwtstamp_set() 290 static int aq_ndev_hwtstamp_get(struct aq_nic_s *aq_nic, struct ifreq *ifr) in aq_ndev_hwtstamp_get() argument 298 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in aq_ndev_hwtstamp_get() 303 static int aq_ndev_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in aq_ndev_ioctl() argument 309 return aq_ndev_hwtstamp_set(aq_nic, ifr); in aq_ndev_ioctl() 313 return aq_ndev_hwtstamp_get(aq_nic, ifr); in aq_ndev_ioctl()
|
/linux/drivers/net/ |
A D | tun.c | 214 struct ifreq *ifr; member 965 struct ifreq *ifr = tun->ifr; in tun_net_init() local 2738 if (*ifr->ifr_name) in tun_set_iff() 2739 name = ifr->ifr_name; in tun_set_iff() 2765 tun->ifr = ifr; in tun_set_iff() 2988 struct ifreq ifr; in __tun_chr_ioctl() local 3002 memset(&ifr, 0, sizeof(ifr)); in __tun_chr_ioctl() 3062 tun_get_iff(tun, &ifr); in __tun_chr_ioctl() 3415 struct ifreq ifr; in tun_chr_show_fdinfo() local 3417 memset(&ifr, 0, sizeof(ifr)); in tun_chr_show_fdinfo() [all …]
|
/linux/arch/um/drivers/ |
A D | vector_user.c | 133 struct ifreq ifr; in create_tap_fd() local 142 memset(&ifr, 0, sizeof(ifr)); in create_tap_fd() 143 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR; in create_tap_fd() 144 strncpy((char *)&ifr.ifr_name, iface, sizeof(ifr.ifr_name) - 1); in create_tap_fd() 146 err = ioctl(fd, TUNSETIFF, (void *) &ifr); in create_tap_fd() 163 struct ifreq ifr; in create_raw_fd() local 173 memset(&ifr, 0, sizeof(ifr)); in create_raw_fd() 174 strncpy((char *)&ifr.ifr_name, iface, sizeof(ifr.ifr_name) - 1); in create_raw_fd() 175 if (ioctl(fd, SIOCGIFINDEX, (void *) &ifr) < 0) { in create_raw_fd() 182 sock.sll_ifindex = ifr.ifr_ifindex; in create_raw_fd()
|
/linux/drivers/net/ethernet/intel/ice/ |
A D | ice_ptp.h | 181 int ice_ptp_set_ts_config(struct ice_pf *pf, struct ifreq *ifr); 182 int ice_ptp_get_ts_config(struct ice_pf *pf, struct ifreq *ifr); 194 static inline int ice_ptp_set_ts_config(struct ice_pf *pf, struct ifreq *ifr) in ice_ptp_set_ts_config() argument 199 static inline int ice_ptp_get_ts_config(struct ice_pf *pf, struct ifreq *ifr) in ice_ptp_get_ts_config() argument
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | flow_dissector.c | 393 struct ifreq ifr = { in create_tap() local 398 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in create_tap() 404 ret = ioctl(fd, TUNSETIFF, &ifr); in create_tap() 424 struct ifreq ifr = {}; in ifup() local 427 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in ifup() 433 ret = ioctl(sk, SIOCGIFFLAGS, &ifr); in ifup() 439 ifr.ifr_flags |= IFF_UP; in ifup() 440 ret = ioctl(sk, SIOCSIFFLAGS, &ifr); in ifup()
|
A D | tc_redirect.c | 576 struct ifreq ifr; in tun_open() local 583 memset(&ifr, 0, sizeof(ifr)); in tun_open() 585 ifr.ifr_flags = IFF_TUN | IFF_NO_PI; in tun_open() 587 strncpy(ifr.ifr_name, name, IFNAMSIZ); in tun_open() 589 err = ioctl(fd, TUNSETIFF, &ifr); in tun_open()
|
/linux/tools/testing/selftests/bpf/ |
A D | xdp_redirect_multi.c | 49 struct ifreq ifr; in get_mac_addr() local 59 strcpy(ifr.ifr_name, ifname); in get_mac_addr() 61 if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) in get_mac_addr() 64 memcpy(mac_addr, ifr.ifr_hwaddr.sa_data, 6 * sizeof(char)); in get_mac_addr()
|
/linux/arch/xtensa/platforms/iss/ |
A D | network.c | 163 struct ifreq ifr; in tuntap_open() local 175 memset(&ifr, 0, sizeof(ifr)); in tuntap_open() 176 ifr.ifr_flags = IFF_TAP | IFF_NO_PI; in tuntap_open() 177 strlcpy(ifr.ifr_name, dev_name, sizeof(ifr.ifr_name)); in tuntap_open() 179 err = simc_ioctl(fd, TUNSETIFF, &ifr); in tuntap_open()
|
/linux/drivers/net/dsa/hirschmann/ |
A D | hellcreek_hwtstamp.h | 41 struct ifreq *ifr); 43 struct ifreq *ifr);
|
A D | hellcreek_hwtstamp.c | 117 struct ifreq *ifr) in hellcreek_port_hwtstamp_set() argument 126 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in hellcreek_port_hwtstamp_set() 136 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in hellcreek_port_hwtstamp_set() 141 struct ifreq *ifr) in hellcreek_port_hwtstamp_get() argument 150 return copy_to_user(ifr->ifr_data, config, sizeof(*config)) ? in hellcreek_port_hwtstamp_get()
|
/linux/net/ |
A D | socket.c | 1112 struct ifreq ifr; in sock_do_ioctl() local 1134 if (put_user_ifreq(&ifr, argp)) in sock_do_ioctl() 1157 struct ifreq ifr; in sock_ioctl() local 1164 if (put_user_ifreq(&ifr, argp)) in sock_ioctl() 3160 memset(ifr, 0, sizeof(*ifr)); in get_user_ifreq() 3170 if (copy_from_user(ifr, arg, sizeof(*ifr))) in get_user_ifreq() 3174 *ifrdata = ifr->ifr_data; in get_user_ifreq() 3182 size_t size = sizeof(*ifr); in put_user_ifreq() 3187 if (copy_to_user(arg, ifr, size)) in put_user_ifreq() 3198 struct ifreq ifr; in compat_siocwandev() local [all …]
|
/linux/drivers/net/ethernet/sfc/ |
A D | ptp.h | 20 int efx_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr); 21 int efx_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr);
|
/linux/drivers/net/ethernet/pensando/ionic/ |
A D | ionic_lif.h | 298 int ionic_lif_hwstamp_set(struct ionic_lif *lif, struct ifreq *ifr); 299 int ionic_lif_hwstamp_get(struct ionic_lif *lif, struct ifreq *ifr); 309 static inline int ionic_lif_hwstamp_set(struct ionic_lif *lif, struct ifreq *ifr) in ionic_lif_hwstamp_set() argument 314 static inline int ionic_lif_hwstamp_get(struct ionic_lif *lif, struct ifreq *ifr) in ionic_lif_hwstamp_get() argument
|
/linux/drivers/irqchip/ |
A D | irq-csky-apb-intc.c | 50 unsigned long ifr = ct->regs.mask - 8; in irq_ck_mask_set_bit() local 56 irq_reg_writel(gc, irq_reg_readl(gc, ifr) & ~mask, ifr); in irq_ck_mask_set_bit()
|
/linux/drivers/net/ethernet/freescale/ |
A D | fec_ptp.c | 467 int fec_ptp_set(struct net_device *ndev, struct ifreq *ifr) in fec_ptp_set() argument 473 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in fec_ptp_set() 502 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in fec_ptp_set() 506 int fec_ptp_get(struct net_device *ndev, struct ifreq *ifr) in fec_ptp_get() argument 516 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in fec_ptp_get()
|
/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
A D | hclge_ptp.h | 133 int hclge_ptp_get_cfg(struct hclge_dev *hdev, struct ifreq *ifr); 134 int hclge_ptp_set_cfg(struct hclge_dev *hdev, struct ifreq *ifr);
|
/linux/drivers/net/ethernet/broadcom/bnxt/ |
A D | bnxt_ptp.h | 136 int bnxt_hwtstamp_set(struct net_device *dev, struct ifreq *ifr); 137 int bnxt_hwtstamp_get(struct net_device *dev, struct ifreq *ifr);
|