/Linux-v4.19/net/core/ |
D | dev_ioctl.c | 21 static int dev_ifname(struct net *net, struct ifreq *ifr) in dev_ifname() argument 23 ifr->ifr_name[IFNAMSIZ-1] = 0; in dev_ifname() 24 return netdev_get_name(net, ifr->ifr_name, ifr->ifr_ifindex); in dev_ifname() 103 static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cmd) in dev_ifsioc_locked() argument 106 struct net_device *dev = dev_get_by_name_rcu(net, ifr->ifr_name); in dev_ifsioc_locked() 113 ifr->ifr_flags = (short) dev_get_flags(dev); in dev_ifsioc_locked() 118 ifr->ifr_metric = 0; in dev_ifsioc_locked() 122 ifr->ifr_mtu = dev->mtu; in dev_ifsioc_locked() 127 memset(ifr->ifr_hwaddr.sa_data, 0, in dev_ifsioc_locked() 128 sizeof(ifr->ifr_hwaddr.sa_data)); in dev_ifsioc_locked() [all …]
|
/Linux-v4.19/arch/um/drivers/ |
D | vector_user.c | 120 struct ifreq ifr; in user_init_tap_fds() local 151 memset(&ifr, 0, sizeof(ifr)); in user_init_tap_fds() 152 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR; in user_init_tap_fds() 153 strncpy((char *)&ifr.ifr_name, iface, sizeof(ifr.ifr_name) - 1); in user_init_tap_fds() 155 err = ioctl(fd, TUNSETIFF, (void *) &ifr); in user_init_tap_fds() 173 memset(&ifr, 0, sizeof(ifr)); in user_init_tap_fds() 174 strncpy((char *)&ifr.ifr_name, iface, sizeof(ifr.ifr_name) - 1); in user_init_tap_fds() 175 if (ioctl(fd, SIOCGIFINDEX, (void *) &ifr) < 0) { in user_init_tap_fds() 183 sock.sll_ifindex = ifr.ifr_ifindex; in user_init_tap_fds() 208 struct ifreq ifr; in user_init_raw_fds() local [all …]
|
/Linux-v4.19/drivers/net/wan/ |
D | hdlc_raw.c | 25 static int raw_ioctl(struct net_device *dev, struct ifreq *ifr); 39 static int raw_ioctl(struct net_device *dev, struct ifreq *ifr) in raw_ioctl() argument 41 raw_hdlc_proto __user *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc; in raw_ioctl() 47 switch (ifr->ifr_settings.type) { in raw_ioctl() 51 ifr->ifr_settings.type = IF_PROTO_HDLC; in raw_ioctl() 52 if (ifr->ifr_settings.size < size) { in raw_ioctl() 53 ifr->ifr_settings.size = size; /* data size wanted */ in raw_ioctl()
|
D | hdlc_raw_eth.c | 26 static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr); 54 static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr) in raw_eth_ioctl() argument 56 raw_hdlc_proto __user *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc; in raw_eth_ioctl() 63 switch (ifr->ifr_settings.type) { in raw_eth_ioctl() 67 ifr->ifr_settings.type = IF_PROTO_HDLC_ETH; in raw_eth_ioctl() 68 if (ifr->ifr_settings.size < size) { in raw_eth_ioctl() 69 ifr->ifr_settings.size = size; /* data size wanted */ in raw_eth_ioctl()
|
D | pc300too.c | 194 static int pc300_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in pc300_ioctl() argument 198 sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync; in pc300_ioctl() 209 return hdlc_ioctl(dev, ifr, cmd); in pc300_ioctl() 211 if (ifr->ifr_settings.type == IF_GET_IFACE) { in pc300_ioctl() 212 ifr->ifr_settings.type = port->iface; in pc300_ioctl() 213 if (ifr->ifr_settings.size < size) { in pc300_ioctl() 214 ifr->ifr_settings.size = size; /* data size wanted */ in pc300_ioctl() 224 (ifr->ifr_settings.type == IF_IFACE_SYNC_SERIAL || in pc300_ioctl() 225 ifr->ifr_settings.type == IF_IFACE_X21)) in pc300_ioctl() 229 (ifr->ifr_settings.type == IF_IFACE_SYNC_SERIAL || in pc300_ioctl() [all …]
|
D | c101.c | 226 static int c101_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in c101_ioctl() argument 230 sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync; in c101_ioctl() 245 return hdlc_ioctl(dev, ifr, cmd); in c101_ioctl() 247 switch(ifr->ifr_settings.type) { in c101_ioctl() 249 ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL; in c101_ioctl() 250 if (ifr->ifr_settings.size < size) { in c101_ioctl() 251 ifr->ifr_settings.size = size; /* data size wanted */ in c101_ioctl() 279 return hdlc_ioctl(dev, ifr, cmd); in c101_ioctl()
|
D | pci200syn.c | 186 static int pci200_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in pci200_ioctl() argument 190 sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync; in pci200_ioctl() 200 return hdlc_ioctl(dev, ifr, cmd); in pci200_ioctl() 202 switch(ifr->ifr_settings.type) { in pci200_ioctl() 204 ifr->ifr_settings.type = IF_IFACE_V35; in pci200_ioctl() 205 if (ifr->ifr_settings.size < size) { in pci200_ioctl() 206 ifr->ifr_settings.size = size; /* data size wanted */ in pci200_ioctl() 236 return hdlc_ioctl(dev, ifr, cmd); in pci200_ioctl()
|
D | hdlc_cisco.c | 66 static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr); 330 static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr) in cisco_ioctl() argument 332 cisco_proto __user *cisco_s = ifr->ifr_settings.ifs_ifsu.cisco; in cisco_ioctl() 338 switch (ifr->ifr_settings.type) { in cisco_ioctl() 342 ifr->ifr_settings.type = IF_PROTO_CISCO; in cisco_ioctl() 343 if (ifr->ifr_settings.size < size) { in cisco_ioctl() 344 ifr->ifr_settings.size = size; /* data size wanted */ in cisco_ioctl()
|
D | hdlc_x25.c | 27 static int x25_ioctl(struct net_device *dev, struct ifreq *ifr); 190 static int x25_ioctl(struct net_device *dev, struct ifreq *ifr) in x25_ioctl() argument 195 switch (ifr->ifr_settings.type) { in x25_ioctl() 199 ifr->ifr_settings.type = IF_PROTO_X25; in x25_ioctl()
|
D | hdlc_fr.c | 156 static int fr_ioctl(struct net_device *dev, struct ifreq *ifr); 384 static int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in pvc_ioctl() argument 389 if (ifr->ifr_settings.type == IF_GET_PROTO) { in pvc_ioctl() 391 ifr->ifr_settings.type = IF_PROTO_FR_ETH_PVC; in pvc_ioctl() 393 ifr->ifr_settings.type = IF_PROTO_FR_PVC; in pvc_ioctl() 395 if (ifr->ifr_settings.size < sizeof(info)) { in pvc_ioctl() 397 ifr->ifr_settings.size = sizeof(info); in pvc_ioctl() 403 if (copy_to_user(ifr->ifr_settings.ifs_ifsu.fr_pvc_info, in pvc_ioctl() 1180 static int fr_ioctl(struct net_device *dev, struct ifreq *ifr) in fr_ioctl() argument 1182 fr_proto __user *fr_s = ifr->ifr_settings.ifs_ifsu.fr; in fr_ioctl() [all …]
|
D | farsync.c | 1853 struct ifreq *ifr) in fst_set_iface() argument 1858 if (ifr->ifr_settings.size != sizeof (sync)) { in fst_set_iface() 1863 (&sync, ifr->ifr_settings.ifs_ifsu.sync, sizeof (sync))) { in fst_set_iface() 1872 switch (ifr->ifr_settings.type) { in fst_set_iface() 1928 struct ifreq *ifr) in fst_get_iface() argument 1939 ifr->ifr_settings.type = IF_IFACE_E1; in fst_get_iface() 1942 ifr->ifr_settings.type = IF_IFACE_T1; in fst_get_iface() 1945 ifr->ifr_settings.type = IF_IFACE_V35; in fst_get_iface() 1948 ifr->ifr_settings.type = IF_IFACE_V24; in fst_get_iface() 1951 ifr->ifr_settings.type = IF_IFACE_X21D; in fst_get_iface() [all …]
|
D | n2.c | 249 static int n2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in n2_ioctl() argument 253 sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync; in n2_ioctl() 263 return hdlc_ioctl(dev, ifr, cmd); in n2_ioctl() 265 switch(ifr->ifr_settings.type) { in n2_ioctl() 267 ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL; in n2_ioctl() 268 if (ifr->ifr_settings.size < size) { in n2_ioctl() 269 ifr->ifr_settings.size = size; /* data size wanted */ in n2_ioctl() 297 return hdlc_ioctl(dev, ifr, cmd); in n2_ioctl()
|
D | wanxl.c | 342 static int wanxl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in wanxl_ioctl() argument 349 return hdlc_ioctl(dev, ifr, cmd); in wanxl_ioctl() 351 switch (ifr->ifr_settings.type) { in wanxl_ioctl() 353 ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL; in wanxl_ioctl() 354 if (ifr->ifr_settings.size < size) { in wanxl_ioctl() 355 ifr->ifr_settings.size = size; /* data size wanted */ in wanxl_ioctl() 363 if (copy_to_user(ifr->ifr_settings.ifs_ifsu.sync, &line, size)) in wanxl_ioctl() 373 if (copy_from_user(&line, ifr->ifr_settings.ifs_ifsu.sync, in wanxl_ioctl() 388 return hdlc_ioctl(dev, ifr, cmd); in wanxl_ioctl()
|
/Linux-v4.19/drivers/mtd/spi-nor/ |
D | atmel-quadspi.c | 220 u32 ifr) in atmel_qspi_debug_command() argument 238 switch (ifr & QSPI_IFR_WIDTH_MASK) { in atmel_qspi_debug_command() 272 #define atmel_qspi_debug_command(aq, cmd, ifr) argument 279 u32 iar, icr, ifr, sr; in atmel_qspi_run_command() local 284 ifr = ifr_tfrtyp; in atmel_qspi_run_command() 289 ifr |= QSPI_IFR_WIDTH_SINGLE_BIT_SPI; in atmel_qspi_run_command() 293 ifr |= QSPI_IFR_WIDTH_DUAL_OUTPUT; in atmel_qspi_run_command() 297 ifr |= QSPI_IFR_WIDTH_QUAD_OUTPUT; in atmel_qspi_run_command() 301 ifr |= QSPI_IFR_WIDTH_DUAL_IO; in atmel_qspi_run_command() 305 ifr |= QSPI_IFR_WIDTH_QUAD_IO; in atmel_qspi_run_command() [all …]
|
/Linux-v4.19/Documentation/networking/ |
D | tuntap.txt | 77 struct ifreq ifr; 83 memset(&ifr, 0, sizeof(ifr)); 90 ifr.ifr_flags = IFF_TUN; 92 strncpy(ifr.ifr_name, dev, IFNAMSIZ); 94 if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){ 98 strcpy(dev, ifr.ifr_name); 126 struct ifreq ifr; 132 memset(&ifr, 0, sizeof(ifr)); 139 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_MULTI_QUEUE; 140 strcpy(ifr.ifr_name, dev); [all …]
|
/Linux-v4.19/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-v4.19/drivers/net/dsa/mv88e6xxx/ |
D | hwtstamp.h | 118 struct ifreq *ifr); 120 struct ifreq *ifr); 140 int port, struct ifreq *ifr) in mv88e6xxx_port_hwtstamp_set() argument 146 int port, struct ifreq *ifr) in mv88e6xxx_port_hwtstamp_get() argument
|
/Linux-v4.19/tools/testing/selftests/net/ |
D | udpgso.c | 288 struct ifreq ifr; in get_device_mtu() local 290 memset(&ifr, 0, sizeof(ifr)); in get_device_mtu() 292 strcpy(ifr.ifr_name, ifname); in get_device_mtu() 294 if (ioctl(fd, SIOCGIFMTU, &ifr)) in get_device_mtu() 297 return ifr.ifr_mtu; in get_device_mtu() 302 struct ifreq ifr; in __set_device_mtu() local 304 memset(&ifr, 0, sizeof(ifr)); in __set_device_mtu() 306 ifr.ifr_mtu = mtu; in __set_device_mtu() 307 strcpy(ifr.ifr_name, ifname); in __set_device_mtu() 309 if (ioctl(fd, SIOCSIFMTU, &ifr)) in __set_device_mtu()
|
/Linux-v4.19/drivers/staging/rtl8188eu/os_dep/ |
D | rtw_android.c | 136 int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) in rtw_android_priv_cmd() argument 144 if (!ifr->ifr_data) in rtw_android_priv_cmd() 146 if (copy_from_user(&priv_cmd, ifr->ifr_data, sizeof(priv_cmd))) in rtw_android_priv_cmd() 155 __func__, command, ifr->ifr_name); in rtw_android_priv_cmd() 165 __func__, command, ifr->ifr_name); in rtw_android_priv_cmd()
|
/Linux-v4.19/tools/testing/selftests/networking/timestamping/ |
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-v4.19/drivers/net/ |
D | tun.c | 2497 static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) in tun_set_iff() argument 2507 if ((ifr->ifr_flags & IFF_NAPI_FRAGS)) { in tun_set_iff() 2511 if (!(ifr->ifr_flags & IFF_NAPI) || in tun_set_iff() 2512 (ifr->ifr_flags & TUN_TYPE_MASK) != IFF_TAP) in tun_set_iff() 2516 dev = __dev_get_by_name(net, ifr->ifr_name); in tun_set_iff() 2518 if (ifr->ifr_flags & IFF_TUN_EXCL) in tun_set_iff() 2520 if ((ifr->ifr_flags & IFF_TUN) && dev->netdev_ops == &tun_netdev_ops) in tun_set_iff() 2522 else if ((ifr->ifr_flags & IFF_TAP) && dev->netdev_ops == &tap_netdev_ops) in tun_set_iff() 2527 if (!!(ifr->ifr_flags & IFF_MULTI_QUEUE) != in tun_set_iff() 2537 err = tun_attach(tun, file, ifr->ifr_flags & IFF_NOFILTER, in tun_set_iff() [all …]
|
D | eql.c | 134 static int eql_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); 271 static int eql_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in eql_ioctl() argument 279 return eql_enslave(dev, ifr->ifr_data); in eql_ioctl() 281 return eql_emancipate(dev, ifr->ifr_data); in eql_ioctl() 283 return eql_g_slave_cfg(dev, ifr->ifr_data); in eql_ioctl() 285 return eql_s_slave_cfg(dev, ifr->ifr_data); in eql_ioctl() 287 return eql_g_master_cfg(dev, ifr->ifr_data); in eql_ioctl() 289 return eql_s_master_cfg(dev, ifr->ifr_data); in eql_ioctl()
|
/Linux-v4.19/net/ |
D | socket.c | 969 struct ifreq ifr; in sock_do_ioctl() local 971 if (copy_from_user(&ifr, argp, ifreq_size)) in sock_do_ioctl() 973 err = dev_ioctl(net, cmd, &ifr, &need_copyout); in sock_do_ioctl() 975 if (copy_to_user(argp, &ifr, ifreq_size)) in sock_do_ioctl() 1004 struct ifreq ifr; in sock_ioctl() local 1006 if (copy_from_user(&ifr, argp, sizeof(struct ifreq))) in sock_ioctl() 1008 err = dev_ioctl(net, cmd, &ifr, &need_copyout); in sock_ioctl() 1010 if (copy_to_user(argp, &ifr, sizeof(struct ifreq))) in sock_ioctl() 2812 struct ifreq ifr; in ethtool_ioctl() local 2853 if (copy_from_user(&ifr.ifr_name, &ifr32->ifr_name, IFNAMSIZ)) in ethtool_ioctl() [all …]
|
/Linux-v4.19/arch/xtensa/platforms/iss/ |
D | network.c | 167 struct ifreq ifr; in tuntap_open() local 179 memset(&ifr, 0, sizeof(ifr)); in tuntap_open() 180 ifr.ifr_flags = IFF_TAP | IFF_NO_PI; in tuntap_open() 181 strlcpy(ifr.ifr_name, dev_name, sizeof(ifr.ifr_name)); in tuntap_open() 183 err = simc_ioctl(fd, TUNSETIFF, &ifr); in tuntap_open()
|
/Linux-v4.19/drivers/net/hamradio/ |
D | baycom_par.c | 399 static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr, 427 static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr, in baycom_ioctl() argument 447 if (copy_to_user(ifr->ifr_data, hi, sizeof(struct hdlcdrv_ioctl))) in baycom_ioctl() 459 if (copy_to_user(ifr->ifr_data, hi, sizeof(struct hdlcdrv_ioctl))) in baycom_ioctl() 468 if (copy_from_user(&bi, ifr->ifr_data, sizeof(bi))) in baycom_ioctl() 483 if (copy_to_user(ifr->ifr_data, &bi, sizeof(bi))) in baycom_ioctl()
|