/linux-6.1.9/net/core/ |
D | dev_ioctl.c | 26 static int dev_ifname(struct net *net, struct ifreq *ifr) in dev_ifname() argument 28 ifr->ifr_name[IFNAMSIZ-1] = 0; in dev_ifname() 29 return netdev_get_name(net, ifr->ifr_name, ifr->ifr_ifindex); in dev_ifname() 84 static int dev_getifmap(struct net_device *dev, struct ifreq *ifr) in dev_getifmap() argument 86 struct ifmap *ifmap = &ifr->ifr_map; in dev_getifmap() 111 static int dev_setifmap(struct net_device *dev, struct ifreq *ifr) in dev_setifmap() argument 113 struct compat_ifmap *cifmap = (struct compat_ifmap *)&ifr->ifr_map; in dev_setifmap() 131 return dev->netdev_ops->ndo_set_config(dev, &ifr->ifr_map); in dev_setifmap() 137 static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cmd) in dev_ifsioc_locked() argument 140 struct net_device *dev = dev_get_by_name_rcu(net, ifr->ifr_name); in dev_ifsioc_locked() [all …]
|
/linux-6.1.9/tools/testing/selftests/net/ |
D | tun.c | 22 struct ifreq ifr; in tun_attach() local 24 memset(&ifr, 0, sizeof(ifr)); in tun_attach() 25 strcpy(ifr.ifr_name, dev); in tun_attach() 26 ifr.ifr_flags = IFF_ATTACH_QUEUE; in tun_attach() 28 return ioctl(fd, TUNSETQUEUE, (void *) &ifr); in tun_attach() 33 struct ifreq ifr; in tun_detach() local 35 memset(&ifr, 0, sizeof(ifr)); in tun_detach() 36 strcpy(ifr.ifr_name, dev); in tun_detach() 37 ifr.ifr_flags = IFF_DETACH_QUEUE; in tun_detach() 39 return ioctl(fd, TUNSETQUEUE, (void *) &ifr); in tun_detach() [all …]
|
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()
|
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()
|
D | tap.c | 198 struct ifreq ifr; in opentap() local 213 memset(&ifr, 0, sizeof(ifr)); in opentap() 214 strcpy(ifr.ifr_name, devname); in opentap() 215 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR | IFF_MULTI_QUEUE; in opentap() 216 if (ioctl(fd, TUNSETIFF, &ifr, sizeof(ifr)) < 0) in opentap()
|
/linux-6.1.9/Documentation/networking/ |
D | tuntap.rst | 95 struct ifreq ifr; 101 memset(&ifr, 0, sizeof(ifr)); 108 ifr.ifr_flags = IFF_TUN; 110 strscpy_pad(ifr.ifr_name, dev, IFNAMSIZ); 112 if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){ 116 strcpy(dev, ifr.ifr_name); 150 struct ifreq ifr; 156 memset(&ifr, 0, sizeof(ifr)); 163 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_MULTI_QUEUE; 164 strcpy(ifr.ifr_name, dev); [all …]
|
/linux-6.1.9/arch/um/os-Linux/drivers/ |
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-6.1.9/drivers/net/dsa/mv88e6xxx/ |
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
|
/linux-6.1.9/drivers/spi/ |
D | atmel-quadspi.c | 298 u32 iar, icr, ifr; in atmel_qspi_set_cfg() local 304 ifr = QSPI_IFR_INSTEN; in atmel_qspi_set_cfg() 309 ifr |= atmel_qspi_modes[mode].config; in atmel_qspi_set_cfg() 331 ifr |= QSPI_IFR_OPTEN | QSPI_IFR_OPTL_8BIT; in atmel_qspi_set_cfg() 336 ifr &= ~QSPI_IFR_INSTEN; in atmel_qspi_set_cfg() 337 ifr |= QSPI_IFR_ADDREN; in atmel_qspi_set_cfg() 341 ifr |= QSPI_IFR_ADDREN; in atmel_qspi_set_cfg() 347 ifr |= QSPI_IFR_ADDREN; in atmel_qspi_set_cfg() 351 ifr |= QSPI_IFR_ADDREN | QSPI_IFR_ADDRL; in atmel_qspi_set_cfg() 364 ifr |= QSPI_IFR_NBDUM(dummy_cycles); in atmel_qspi_set_cfg() [all …]
|
/linux-6.1.9/drivers/net/ |
D | tun.c | 214 struct ifreq *ifr; member 977 struct ifreq *ifr = tun->ifr; in tun_net_init() local 1003 (ifr->ifr_flags & TUN_FEATURES); in tun_net_init() 1006 err = tun_attach(tun, tun->file, false, ifr->ifr_flags & IFF_NAPI, in tun_net_init() 1007 ifr->ifr_flags & IFF_NAPI_FRAGS, false); in tun_net_init() 2716 static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) in tun_set_iff() argument 2726 if ((ifr->ifr_flags & IFF_NAPI_FRAGS)) { in tun_set_iff() 2730 if (!(ifr->ifr_flags & IFF_NAPI) || in tun_set_iff() 2731 (ifr->ifr_flags & TUN_TYPE_MASK) != IFF_TAP) in tun_set_iff() 2735 dev = __dev_get_by_name(net, ifr->ifr_name); in tun_set_iff() [all …]
|
/linux-6.1.9/arch/um/drivers/ |
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-6.1.9/drivers/net/ethernet/aquantia/atlantic/ |
D | aq_main.c | 295 static int aq_ndev_hwtstamp_set(struct aq_nic_s *aq_nic, struct ifreq *ifr) in aq_ndev_hwtstamp_set() argument 305 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in aq_ndev_hwtstamp_set() 313 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in aq_ndev_hwtstamp_set() 318 static int aq_ndev_hwtstamp_get(struct aq_nic_s *aq_nic, struct ifreq *ifr) in aq_ndev_hwtstamp_get() argument 326 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in aq_ndev_hwtstamp_get() 331 static int aq_ndev_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in aq_ndev_ioctl() argument 337 return aq_ndev_hwtstamp_set(aq_nic, ifr); in aq_ndev_ioctl() 341 return aq_ndev_hwtstamp_get(aq_nic, ifr); in aq_ndev_ioctl()
|
/linux-6.1.9/tools/testing/selftests/bpf/ |
D | xdp_redirect_multi.c | 48 struct ifreq ifr; in get_mac_addr() local 58 strcpy(ifr.ifr_name, ifname); in get_mac_addr() 60 if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) in get_mac_addr() 63 memcpy(mac_addr, ifr.ifr_hwaddr.sa_data, 6 * sizeof(char)); in get_mac_addr()
|
/linux-6.1.9/drivers/net/ethernet/intel/ice/ |
D | ice_ptp.h | 244 int ice_ptp_set_ts_config(struct ice_pf *pf, struct ifreq *ifr); 245 int ice_ptp_get_ts_config(struct ice_pf *pf, struct ifreq *ifr); 261 static inline int ice_ptp_set_ts_config(struct ice_pf *pf, struct ifreq *ifr) in ice_ptp_set_ts_config() argument 266 static inline int ice_ptp_get_ts_config(struct ice_pf *pf, struct ifreq *ifr) in ice_ptp_get_ts_config() argument
|
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/ |
D | flow_dissector.c | 428 struct ifreq ifr = { in create_tap() local 433 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in create_tap() 439 ret = ioctl(fd, TUNSETIFF, &ifr); in create_tap() 459 struct ifreq ifr = {}; in ifup() local 462 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in ifup() 468 ret = ioctl(sk, SIOCGIFFLAGS, &ifr); in ifup() 474 ifr.ifr_flags |= IFF_UP; in ifup() 475 ret = ioctl(sk, SIOCSIFFLAGS, &ifr); in ifup()
|
/linux-6.1.9/drivers/net/dsa/hirschmann/ |
D | hellcreek_hwtstamp.h | 41 struct ifreq *ifr); 43 struct ifreq *ifr);
|
D | hellcreek_hwtstamp.c | 113 struct ifreq *ifr) in hellcreek_port_hwtstamp_set() argument 122 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in hellcreek_port_hwtstamp_set() 132 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in hellcreek_port_hwtstamp_set() 137 struct ifreq *ifr) in hellcreek_port_hwtstamp_get() argument 146 return copy_to_user(ifr->ifr_data, config, sizeof(*config)) ? in hellcreek_port_hwtstamp_get()
|
/linux-6.1.9/arch/xtensa/platforms/iss/ |
D | network.c | 159 struct ifreq ifr; in tuntap_open() local 171 memset(&ifr, 0, sizeof(ifr)); in tuntap_open() 172 ifr.ifr_flags = IFF_TAP | IFF_NO_PI; in tuntap_open() 173 strscpy(ifr.ifr_name, dev_name, sizeof(ifr.ifr_name)); in tuntap_open() 175 err = simc_ioctl(fd, TUNSETIFF, &ifr); in tuntap_open()
|
/linux-6.1.9/drivers/net/ethernet/engleder/ |
D | tsnep_ptp.c | 22 int tsnep_ptp_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in tsnep_ptp_ioctl() argument 27 if (!ifr) in tsnep_ptp_ioctl() 31 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in tsnep_ptp_ioctl() 69 if (copy_to_user(ifr->ifr_data, &adapter->hwtstamp_config, in tsnep_ptp_ioctl()
|
/linux-6.1.9/drivers/net/ethernet/sfc/siena/ |
D | ptp.h | 18 int efx_siena_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr); 19 int efx_siena_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr);
|
/linux-6.1.9/drivers/net/ethernet/sfc/ |
D | ptp.h | 21 int efx_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr); 22 int efx_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr);
|
/linux-6.1.9/drivers/net/ethernet/microchip/sparx5/ |
D | sparx5_netdev.c | 213 static int sparx5_port_ioctl(struct net_device *dev, struct ifreq *ifr, in sparx5_port_ioctl() argument 222 return sparx5_ptp_hwtstamp_set(sparx5_port, ifr); in sparx5_port_ioctl() 224 return sparx5_ptp_hwtstamp_get(sparx5_port, ifr); in sparx5_port_ioctl() 228 return phy_mii_ioctl(dev->phydev, ifr, cmd); in sparx5_port_ioctl()
|
/linux-6.1.9/net/ |
D | socket.c | 1120 unsigned int cmd, struct ifreq *ifr, 1124 unsigned int cmd, struct ifreq *ifr, in brioctl_set() argument 1134 struct ifreq *ifr, void __user *uarg) in br_ioctl_call() argument 1143 err = br_ioctl_hook(net, br, cmd, ifr, uarg); in br_ioctl_call() 1163 struct ifreq ifr; in sock_do_ioctl() local 1181 if (get_user_ifreq(&ifr, &data, argp)) in sock_do_ioctl() 1183 err = dev_ioctl(net, cmd, &ifr, data, &need_copyout); in sock_do_ioctl() 1185 if (put_user_ifreq(&ifr, argp)) in sock_do_ioctl() 1208 struct ifreq ifr; in sock_ioctl() local 1211 if (get_user_ifreq(&ifr, &data, argp)) in sock_ioctl() [all …]
|
/linux-6.1.9/drivers/irqchip/ |
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-6.1.9/drivers/net/ethernet/pensando/ionic/ |
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
|