/linux-6.12.1/net/core/ |
D | dev_ioctl.c | 27 static int dev_ifname(struct net *net, struct ifreq *ifr) in dev_ifname() argument 29 ifr->ifr_name[IFNAMSIZ-1] = 0; in dev_ifname() 30 return netdev_get_name(net, ifr->ifr_name, ifr->ifr_ifindex); in dev_ifname() 85 static int dev_getifmap(struct net_device *dev, struct ifreq *ifr) in dev_getifmap() argument 87 struct ifmap *ifmap = &ifr->ifr_map; in dev_getifmap() 112 static int dev_setifmap(struct net_device *dev, struct ifreq *ifr) in dev_setifmap() argument 114 struct compat_ifmap *cifmap = (struct compat_ifmap *)&ifr->ifr_map; in dev_setifmap() 132 return dev->netdev_ops->ndo_set_config(dev, &ifr->ifr_map); in dev_setifmap() 138 static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cmd) in dev_ifsioc_locked() argument 141 struct net_device *dev = dev_get_by_name_rcu(net, ifr->ifr_name); in dev_ifsioc_locked() [all …]
|
/linux-6.12.1/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 | hwtstamp_config.c | 90 struct ifreq ifr; in main() local 116 strcpy(ifr.ifr_name, argv[1]); in main() 117 ifr.ifr_data = (caddr_t)&config; in main() 119 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.12.1/tools/virtio/ |
D | vhost_net_test.c | 62 struct ifreq ifr; in tun_alloc() local 72 memset(&ifr, 0, sizeof(ifr)); in tun_alloc() 74 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR; in tun_alloc() 75 strncpy(ifr.ifr_name, tun_name, IFNAMSIZ); in tun_alloc() 77 e = ioctl(fd, TUNSETIFF, &ifr); in tun_alloc() 91 e = ioctl(fd, SIOCGIFHWADDR, &ifr); in tun_alloc() 98 memcpy(dev->mac, &ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); in tun_alloc() 104 struct ifreq ifr; in vdev_create_socket() local 109 strncpy(ifr.ifr_name, tun_name, IFNAMSIZ); in vdev_create_socket() 110 assert(ioctl(dev->sock, SIOCGIFINDEX, &ifr) >= 0); in vdev_create_socket() [all …]
|
/linux-6.12.1/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.12.1/tools/testing/selftests/bpf/prog_tests/ |
D | lwt_helpers.h | 43 struct ifreq ifr; in open_tuntap() local 49 ifr.ifr_flags = IFF_NO_PI | (need_mac ? IFF_TAP : IFF_TUN); in open_tuntap() 50 strncpy(ifr.ifr_name, dev_name, IFNAMSIZ - 1); in open_tuntap() 51 ifr.ifr_name[IFNAMSIZ - 1] = '\0'; in open_tuntap() 53 err = ioctl(fd, TUNSETIFF, &ifr); in open_tuntap()
|
D | flow_dissector.c | 451 struct ifreq ifr = { in create_tap() local 456 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in create_tap() 462 ret = ioctl(fd, TUNSETIFF, &ifr); in create_tap() 482 struct ifreq ifr = {}; in ifup() local 485 strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in ifup() 491 ret = ioctl(sk, SIOCGIFFLAGS, &ifr); in ifup() 497 ifr.ifr_flags |= IFF_UP; in ifup() 498 ret = ioctl(sk, SIOCSIFFLAGS, &ifr); in ifup()
|
/linux-6.12.1/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 strscpy(ifr.ifr_name, pri->dev_name); in tuntap_open() 150 if (ioctl(pri->fd, TUNSETIFF, &ifr) < 0) { in tuntap_open()
|
/linux-6.12.1/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.12.1/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.12.1/drivers/net/ |
D | tun.c | 216 struct ifreq *ifr; member 978 struct ifreq *ifr = tun->ifr; in tun_net_init() local 1000 (ifr->ifr_flags & TUN_FEATURES); in tun_net_init() 1003 err = tun_attach(tun, tun->file, false, ifr->ifr_flags & IFF_NAPI, in tun_net_init() 1004 ifr->ifr_flags & IFF_NAPI_FRAGS, false); in tun_net_init() 2747 static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) in tun_set_iff() argument 2757 if ((ifr->ifr_flags & IFF_NAPI_FRAGS)) { in tun_set_iff() 2761 if (!(ifr->ifr_flags & IFF_NAPI) || in tun_set_iff() 2762 (ifr->ifr_flags & TUN_TYPE_MASK) != IFF_TAP) in tun_set_iff() 2766 dev = __dev_get_by_name(net, ifr->ifr_name); in tun_set_iff() [all …]
|
/linux-6.12.1/drivers/net/ethernet/aquantia/atlantic/ |
D | aq_main.c | 296 static int aq_ndev_hwtstamp_set(struct aq_nic_s *aq_nic, struct ifreq *ifr) in aq_ndev_hwtstamp_set() argument 306 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in aq_ndev_hwtstamp_set() 314 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in aq_ndev_hwtstamp_set() 319 static int aq_ndev_hwtstamp_get(struct aq_nic_s *aq_nic, struct ifreq *ifr) in aq_ndev_hwtstamp_get() argument 327 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in aq_ndev_hwtstamp_get() 332 static int aq_ndev_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in aq_ndev_ioctl() argument 338 return aq_ndev_hwtstamp_set(aq_nic, ifr); in aq_ndev_ioctl() 342 return aq_ndev_hwtstamp_get(aq_nic, ifr); in aq_ndev_ioctl()
|
/linux-6.12.1/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()
|
D | network_helpers.c | 576 struct ifreq ifr = {0}; in get_hw_ring_size() local 583 memcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in get_hw_ring_size() 586 ifr.ifr_data = (char *)ring_param; in get_hw_ring_size() 588 if (ioctl(sockfd, SIOCETHTOOL, &ifr) < 0) { in get_hw_ring_size() 600 struct ifreq ifr = {0}; in set_hw_ring_size() local 607 memcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in set_hw_ring_size() 610 ifr.ifr_data = (char *)ring_param; in set_hw_ring_size() 612 if (ioctl(sockfd, SIOCETHTOOL, &ifr) < 0) { in set_hw_ring_size()
|
/linux-6.12.1/arch/um/drivers/ |
D | vector_user.c | 136 struct ifreq ifr; in create_tap_fd() local 145 memset(&ifr, 0, sizeof(ifr)); in create_tap_fd() 146 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR; in create_tap_fd() 147 strscpy(ifr.ifr_name, iface); in create_tap_fd() 149 err = ioctl(fd, TUNSETIFF, (void *) &ifr); in create_tap_fd() 166 struct ifreq ifr; in create_raw_fd() local 176 memset(&ifr, 0, sizeof(ifr)); in create_raw_fd() 177 strscpy(ifr.ifr_name, iface); in create_raw_fd() 178 if (ioctl(fd, SIOCGIFINDEX, (void *) &ifr) < 0) { in create_raw_fd() 185 sock.sll_ifindex = ifr.ifr_ifindex; in create_raw_fd()
|
/linux-6.12.1/drivers/net/ethernet/intel/ice/ |
D | ice_ptp.h | 317 int ice_ptp_set_ts_config(struct ice_pf *pf, struct ifreq *ifr); 318 int ice_ptp_get_ts_config(struct ice_pf *pf, struct ifreq *ifr); 336 static inline int ice_ptp_set_ts_config(struct ice_pf *pf, struct ifreq *ifr) in ice_ptp_set_ts_config() argument 341 static inline int ice_ptp_get_ts_config(struct ice_pf *pf, struct ifreq *ifr) in ice_ptp_get_ts_config() argument
|
/linux-6.12.1/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.12.1/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.12.1/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.12.1/drivers/net/dsa/microchip/ |
D | ksz_ptp.h | 42 int ksz_hwtstamp_get(struct dsa_switch *ds, int port, struct ifreq *ifr); 43 int ksz_hwtstamp_set(struct dsa_switch *ds, int port, struct ifreq *ifr);
|
/linux-6.12.1/net/ |
D | socket.c | 1177 unsigned int cmd, struct ifreq *ifr, 1181 unsigned int cmd, struct ifreq *ifr, in brioctl_set() argument 1191 struct ifreq *ifr, void __user *uarg) in br_ioctl_call() argument 1200 err = br_ioctl_hook(net, br, cmd, ifr, uarg); in br_ioctl_call() 1221 struct ifreq ifr; in sock_do_ioctl() local 1239 if (get_user_ifreq(&ifr, &data, argp)) in sock_do_ioctl() 1241 err = dev_ioctl(net, cmd, &ifr, data, &need_copyout); in sock_do_ioctl() 1243 if (put_user_ifreq(&ifr, argp)) in sock_do_ioctl() 1268 struct ifreq ifr; in sock_ioctl() local 1271 if (get_user_ifreq(&ifr, &data, argp)) in sock_ioctl() [all …]
|
/linux-6.12.1/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.12.1/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
D | hclge_ptp.h | 136 int hclge_ptp_get_cfg(struct hclge_dev *hdev, struct ifreq *ifr); 137 int hclge_ptp_set_cfg(struct hclge_dev *hdev, struct ifreq *ifr);
|