/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() 130 ifr->ifr_map.mem_start = dev->mem_start; in dev_ifsioc_locked() 131 ifr->ifr_map.mem_end = dev->mem_end; in dev_ifsioc_locked() [all …]
|
D | ethtool.c | 2563 int dev_ethtool(struct net *net, struct ifreq *ifr) in dev_ethtool() argument 2565 struct net_device *dev = __dev_get_by_name(net, ifr->ifr_name); in dev_ethtool() 2566 void __user *useraddr = ifr->ifr_data; in dev_ethtool()
|
/net/ |
D | socket.c | 1077 struct ifreq ifr; in sock_do_ioctl() local 1079 if (copy_from_user(&ifr, argp, sizeof(struct ifreq))) in sock_do_ioctl() 1081 err = dev_ioctl(net, cmd, &ifr, &need_copyout); in sock_do_ioctl() 1083 if (copy_to_user(argp, &ifr, sizeof(struct ifreq))) in sock_do_ioctl() 1108 struct ifreq ifr; in sock_ioctl() local 1110 if (copy_from_user(&ifr, argp, sizeof(struct ifreq))) in sock_ioctl() 1112 err = dev_ioctl(net, cmd, &ifr, &need_copyout); in sock_ioctl() 1114 if (copy_to_user(argp, &ifr, sizeof(struct ifreq))) in sock_ioctl() 3105 struct ifreq ifr; in ethtool_ioctl() local 3146 if (copy_from_user(&ifr.ifr_name, &ifr32->ifr_name, IFNAMSIZ)) in ethtool_ioctl() [all …]
|
/net/ipv4/ |
D | devinet.c | 1009 int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *ifr) in devinet_ioctl() argument 1012 struct sockaddr_in *sin = (struct sockaddr_in *)&ifr->ifr_addr; in devinet_ioctl() 1021 ifr->ifr_name[IFNAMSIZ - 1] = 0; in devinet_ioctl() 1026 colon = strchr(ifr->ifr_name, ':'); in devinet_ioctl() 1030 dev_load(net, ifr->ifr_name); in devinet_ioctl() 1070 dev = __dev_get_by_name(net, ifr->ifr_name); in devinet_ioctl() 1089 if (!strcmp(ifr->ifr_name, ifa->ifa_label) && in devinet_ioctl() 1103 if (!strcmp(ifr->ifr_name, ifa->ifa_label)) in devinet_ioctl() 1139 if (!(ifr->ifr_flags & IFF_UP)) in devinet_ioctl() 1143 ret = dev_change_flags(dev, ifr->ifr_flags, NULL); in devinet_ioctl() [all …]
|
D | ipip.c | 330 ipip_tunnel_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in ipip_tunnel_ioctl() argument 335 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in ipip_tunnel_ioctl() 351 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) in ipip_tunnel_ioctl()
|
D | ip_vti.c | 402 vti_tunnel_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in vti_tunnel_ioctl() argument 407 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in vti_tunnel_ioctl() 432 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) in vti_tunnel_ioctl()
|
D | af_inet.c | 923 struct ifreq ifr; in inet_ioctl() local 946 if (copy_from_user(&ifr, p, sizeof(struct ifreq))) in inet_ioctl() 948 err = devinet_ioctl(net, cmd, &ifr); in inet_ioctl() 949 if (!err && copy_to_user(p, &ifr, sizeof(struct ifreq))) in inet_ioctl() 959 if (copy_from_user(&ifr, p, sizeof(struct ifreq))) in inet_ioctl() 961 err = devinet_ioctl(net, cmd, &ifr); in inet_ioctl()
|
D | ipmr.c | 431 struct ifreq ifr; in ipmr_del_tunnel() local 441 ifr.ifr_ifru.ifru_data = (__force void __user *)&p; in ipmr_del_tunnel() 447 ops->ndo_do_ioctl(dev, &ifr, SIOCDELTUNNEL); in ipmr_del_tunnel() 479 struct ifreq ifr; in ipmr_new_tunnel() local 489 ifr.ifr_ifru.ifru_data = (__force void __user *)&p; in ipmr_new_tunnel() 495 err = ops->ndo_do_ioctl(dev, &ifr, SIOCADDTUNNEL); in ipmr_new_tunnel()
|
D | ip_gre.c | 786 struct ifreq *ifr, int cmd) in ipgre_tunnel_ioctl() argument 791 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in ipgre_tunnel_ioctl() 821 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) in ipgre_tunnel_ioctl()
|
/net/ieee802154/ |
D | socket.c | 128 struct ifreq ifr; in ieee802154_dev_ioctl() local 132 if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) in ieee802154_dev_ioctl() 135 ifr.ifr_name[IFNAMSIZ-1] = 0; in ieee802154_dev_ioctl() 137 dev_load(sock_net(sk), ifr.ifr_name); in ieee802154_dev_ioctl() 138 dev = dev_get_by_name(sock_net(sk), ifr.ifr_name); in ieee802154_dev_ioctl() 144 ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, cmd); in ieee802154_dev_ioctl() 146 if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq))) in ieee802154_dev_ioctl()
|
/net/qrtr/ |
D | qrtr.c | 949 struct ifreq ifr; in qrtr_ioctl() local 969 if (copy_from_user(&ifr, argp, sizeof(ifr))) { in qrtr_ioctl() 974 sq = (struct sockaddr_qrtr *)&ifr.ifr_addr; in qrtr_ioctl() 976 if (copy_to_user(argp, &ifr, sizeof(ifr))) { in qrtr_ioctl()
|
/net/ipv6/ |
D | sit.c | 1166 ipip6_tunnel_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in ipip6_tunnel_ioctl() argument 1184 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) { in ipip6_tunnel_ioctl() 1196 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, in ipip6_tunnel_ioctl() 1205 if (copy_to_user(ifr->ifr_ifru.ifru_data, &ip6rd, in ipip6_tunnel_ioctl() 1220 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in ipip6_tunnel_ioctl() 1254 if (copy_to_user(ifr->ifr_ifru.ifru_data, &t->parms, sizeof(p))) in ipip6_tunnel_ioctl() 1267 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in ipip6_tunnel_ioctl() 1286 err = ipip6_tunnel_get_prl(t, ifr->ifr_ifru.ifru_data); in ipip6_tunnel_ioctl() 1299 if (copy_from_user(&prl, ifr->ifr_ifru.ifru_data, sizeof(prl))) in ipip6_tunnel_ioctl() 1324 if (copy_from_user(&ip6rd, ifr->ifr_ifru.ifru_data, in ipip6_tunnel_ioctl()
|
D | ip6_vti.c | 789 vti6_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in vti6_ioctl() argument 803 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) { in vti6_ioctl() 815 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) in vti6_ioctl() 824 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in vti6_ioctl() 845 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) in vti6_ioctl() 858 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in vti6_ioctl()
|
D | ip6_tunnel.c | 1593 ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in ip6_tnl_ioctl() argument 1607 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) { in ip6_tnl_ioctl() 1619 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) { in ip6_tnl_ioctl() 1629 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in ip6_tnl_ioctl() 1653 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) in ip6_tnl_ioctl() 1667 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in ip6_tnl_ioctl()
|
D | ip6_gre.c | 1256 struct ifreq *ifr, int cmd) in ip6gre_tunnel_ioctl() argument 1270 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) { in ip6gre_tunnel_ioctl() 1281 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) in ip6gre_tunnel_ioctl() 1292 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in ip6gre_tunnel_ioctl() 1329 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) in ip6gre_tunnel_ioctl() 1342 if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) in ip6gre_tunnel_ioctl()
|
D | addrconf.c | 2886 struct ifreq ifr; in addrconf_set_dstaddr() local 2900 ifr.ifr_ifru.ifru_data = (__force void __user *)&p; in addrconf_set_dstaddr() 2906 err = ops->ndo_do_ioctl(dev, &ifr, SIOCADDTUNNEL); in addrconf_set_dstaddr()
|
/net/8021q/ |
D | vlan_dev.c | 357 static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in vlan_dev_ioctl() argument 365 ifrr.ifr_ifru = ifr->ifr_ifru; in vlan_dev_ioctl() 382 ifr->ifr_ifru = ifrr.ifr_ifru; in vlan_dev_ioctl()
|
/net/mac802154/ |
D | iface.c | 49 mac802154_wpan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in mac802154_wpan_ioctl() argument 54 (struct sockaddr_ieee802154 *)&ifr->ifr_addr; in mac802154_wpan_ioctl()
|
/net/dsa/ |
D | slave.c | 254 static int dsa_slave_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in dsa_slave_ioctl() argument 264 return ds->ops->port_hwtstamp_get(ds, port, ifr); in dsa_slave_ioctl() 268 return ds->ops->port_hwtstamp_set(ds, port, ifr); in dsa_slave_ioctl() 272 return phylink_mii_ioctl(p->dp->pl, ifr, cmd); in dsa_slave_ioctl()
|