Home
last modified time | relevance | path

Searched refs:ifindex (Results 1 – 200 of 206) sorted by relevance

12

/linux-4.4.14/security/selinux/
Dnetif.c56 static inline u32 sel_netif_hashfn(const struct net *ns, int ifindex) in sel_netif_hashfn() argument
58 return (((uintptr_t)ns + ifindex) & (SEL_NETIF_HASH_SIZE - 1)); in sel_netif_hashfn()
72 int ifindex) in sel_netif_find() argument
74 int idx = sel_netif_hashfn(ns, ifindex); in sel_netif_find()
79 netif->nsec.ifindex == ifindex) in sel_netif_find()
101 idx = sel_netif_hashfn(netif->nsec.ns, netif->nsec.ifindex); in sel_netif_insert()
136 static int sel_netif_sid_slow(struct net *ns, int ifindex, u32 *sid) in sel_netif_sid_slow() argument
146 dev = dev_get_by_index(ns, ifindex); in sel_netif_sid_slow()
150 " invalid network interface (%d)\n", ifindex); in sel_netif_sid_slow()
155 netif = sel_netif_find(ns, ifindex); in sel_netif_sid_slow()
[all …]
Dhooks.c4372 static int selinux_inet_sys_rcv_skb(struct net *ns, int ifindex, in selinux_inet_sys_rcv_skb() argument
4380 err = sel_netif_sid(ns, ifindex, &if_sid); in selinux_inet_sys_rcv_skb()
4837 ad.u.net->netif = indev->ifindex; in selinux_ip_forward()
4843 err = selinux_inet_sys_rcv_skb(dev_net(indev), indev->ifindex, in selinux_ip_forward()
4933 int ifindex, in selinux_ip_postroute_compat() argument
4949 ad.u.net->netif = ifindex; in selinux_ip_postroute_compat()
4971 int ifindex = outdev->ifindex; in selinux_ip_postroute() local
4984 return selinux_ip_postroute_compat(skb, ifindex, family); in selinux_ip_postroute()
5072 ad.u.net->netif = ifindex; in selinux_ip_postroute()
5086 if (sel_netif_sid(dev_net(outdev), ifindex, &if_sid)) in selinux_ip_postroute()
/linux-4.4.14/include/net/
Dl3mdev.h45 int ifindex; in l3mdev_master_ifindex() local
48 ifindex = l3mdev_master_ifindex_rcu(dev); in l3mdev_master_ifindex()
51 return ifindex; in l3mdev_master_ifindex()
60 return l3mdev_master_ifindex_rcu(dev) ? : dev->ifindex; in l3mdev_fib_oif_rcu()
75 u32 l3mdev_fib_table_by_index(struct net *net, int ifindex);
96 static inline bool netif_index_is_l3_master(struct net *net, int ifindex) in netif_index_is_l3_master() argument
101 if (ifindex == 0) in netif_index_is_l3_master()
106 dev = dev_get_by_index_rcu(net, ifindex); in netif_index_is_l3_master()
115 static inline int l3mdev_get_saddr(struct net *net, int ifindex, in l3mdev_get_saddr() argument
121 if (ifindex) { in l3mdev_get_saddr()
[all …]
Daddrconf.h154 int type, int ifindex);
159 int ipv6_sock_mc_join(struct sock *sk, int ifindex,
161 int ipv6_sock_mc_drop(struct sock *sk, int ifindex,
188 int (*ipv6_sock_mc_join)(struct sock *sk, int ifindex,
190 int (*ipv6_sock_mc_drop)(struct sock *sk, int ifindex,
233 int ipv6_sock_ac_join(struct sock *sk, int ifindex,
235 int ipv6_sock_ac_drop(struct sock *sk, int ifindex,
252 void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex,
Dpkt_cls.h347 return dev->ifindex; in tcf_change_indev()
351 tcf_match_indev(struct sk_buff *skb, int ifindex) in tcf_match_indev() argument
353 if (!ifindex) in tcf_match_indev()
357 return ifindex == skb->skb_iif; in tcf_match_indev()
Dllc.h72 struct hlist_head *llc_sk_dev_hash(struct llc_sap *sap, int ifindex) in llc_sk_dev_hash() argument
74 return &sap->sk_dev_hash[ifindex % LLC_SK_DEV_HASH_ENTRIES]; in llc_sk_dev_hash()
Ddcbnl.h25 int ifindex; member
Dif_inet6.h93 int ifindex; member
Dnet_namespace.h82 int ifindex; member
Dipv6.h1003 int ipv6_sock_mc_join(struct sock *sk, int ifindex,
1005 int ipv6_sock_mc_drop(struct sock *sk, int ifindex,
/linux-4.4.14/net/l3mdev/
Dl3mdev.c22 int ifindex = 0; in l3mdev_master_ifindex_rcu() local
28 ifindex = dev->ifindex; in l3mdev_master_ifindex_rcu()
34 ifindex = master->ifindex; in l3mdev_master_ifindex_rcu()
37 return ifindex; in l3mdev_master_ifindex_rcu()
74 u32 l3mdev_fib_table_by_index(struct net *net, int ifindex) in l3mdev_fib_table_by_index() argument
79 if (!ifindex) in l3mdev_fib_table_by_index()
84 dev = dev_get_by_index_rcu(net, ifindex); in l3mdev_fib_table_by_index()
/linux-4.4.14/net/can/
Dbcm.c95 int ifindex; member
120 int ifindex; member
146 static char *bcm_proc_getifname(char *result, int ifindex) in bcm_proc_getifname() argument
150 if (!ifindex) in bcm_proc_getifname()
154 dev = dev_get_by_index_rcu(&init_net, ifindex); in bcm_proc_getifname()
175 seq_printf(m, " / bound %s", bcm_proc_getifname(ifname, bo->ifindex)); in bcm_proc_show()
187 op->can_id, bcm_proc_getifname(ifname, op->ifindex)); in bcm_proc_show()
213 bcm_proc_getifname(ifname, op->ifindex), in bcm_proc_show()
254 if (!op->ifindex) in bcm_can_tx()
257 dev = dev_get_by_index(&init_net, op->ifindex); in bcm_can_tx()
[all …]
Draw.c86 int ifindex; member
170 addr->can_ifindex = skb->dev->ifindex; in raw_rcv()
276 if (ro->ifindex != dev->ifindex) in raw_notifier()
290 ro->ifindex = 0; in raw_notifier()
315 ro->ifindex = 0; in raw_init()
358 if (ro->ifindex) { in raw_release()
361 dev = dev_get_by_index(&init_net, ro->ifindex); in raw_release()
373 ro->ifindex = 0; in raw_release()
392 int ifindex; in raw_bind() local
401 if (ro->bound && addr->can_ifindex == ro->ifindex) in raw_bind()
[all …]
Dgw.c386 can_skb_prv(skb)->ifindex == gwj->dst.dev->ifindex) in can_can_gw_rcv()
/linux-4.4.14/net/ipv6/
Daddrlabel.c35 int ifindex; member
153 int addrtype, int ifindex) in __ip6addrlbl_match() argument
157 if (p->ifindex && p->ifindex != ifindex) in __ip6addrlbl_match()
168 int type, int ifindex) in __ipv6_addr_label() argument
172 if (__ip6addrlbl_match(net, p, addr, type, ifindex)) in __ipv6_addr_label()
179 const struct in6_addr *addr, int type, int ifindex) in ipv6_addr_label() argument
187 p = __ipv6_addr_label(net, addr, type, ifindex); in ipv6_addr_label()
192 __func__, addr, type, ifindex, label); in ipv6_addr_label()
200 int prefixlen, int ifindex, in ip6addrlbl_alloc() argument
207 __func__, prefix, prefixlen, ifindex, (unsigned int)label); in ip6addrlbl_alloc()
[all …]
Danycast.c53 int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr) in ipv6_sock_ac_join() argument
78 if (ifindex == 0) { in ipv6_sock_ac_join()
94 dev = __dev_get_by_index(net, ifindex); in ipv6_sock_ac_join()
103 if (ifindex) in ipv6_sock_ac_join()
112 pac->acl_ifindex = dev->ifindex; in ipv6_sock_ac_join()
142 int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr) in ipv6_sock_ac_drop() argument
153 if ((ifindex == 0 || pac->acl_ifindex == ifindex) && in ipv6_sock_ac_drop()
517 state->dev->ifindex, state->dev->name, in ac6_seq_show()
Daddrconf.c491 static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex, in inet6_netconf_fill_devconf() argument
507 if (nla_put_s32(skb, NETCONFA_IFINDEX, ifindex) < 0) in inet6_netconf_fill_devconf()
537 void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, in inet6_netconf_notify_devconf() argument
547 err = inet6_netconf_fill_devconf(skb, ifindex, devconf, 0, 0, in inet6_netconf_notify_devconf()
578 int ifindex; in inet6_netconf_get_devconf() local
590 ifindex = nla_get_s32(tb[NETCONFA_IFINDEX]); in inet6_netconf_get_devconf()
591 switch (ifindex) { in inet6_netconf_get_devconf()
599 dev = __dev_get_by_index(net, ifindex); in inet6_netconf_get_devconf()
614 err = inet6_netconf_fill_devconf(skb, ifindex, devconf, in inet6_netconf_get_devconf()
655 if (inet6_netconf_fill_devconf(skb, dev->ifindex, in inet6_netconf_dump_devconf()
[all …]
Dmcast.c135 int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr) in ipv6_sock_mc_join() argument
150 if ((ifindex == 0 || mc_lst->ifindex == ifindex) && in ipv6_sock_mc_join()
166 if (ifindex == 0) { in ipv6_sock_mc_join()
174 dev = __dev_get_by_index(net, ifindex); in ipv6_sock_mc_join()
181 mc_lst->ifindex = dev->ifindex; in ipv6_sock_mc_join()
207 int ipv6_sock_mc_drop(struct sock *sk, int ifindex, const struct in6_addr *addr) in ipv6_sock_mc_drop() argument
222 if ((ifindex == 0 || mc_lst->ifindex == ifindex) && in ipv6_sock_mc_drop()
228 dev = __dev_get_by_index(net, mc_lst->ifindex); in ipv6_sock_mc_drop()
251 int ifindex) in ip6_mc_find_dev_rcu() argument
256 if (ifindex == 0) { in ip6_mc_find_dev_rcu()
[all …]
Dip6_input.c102 IP6CB(skb)->iif = skb_valid_dst(skb) ? ip6_dst_idev(skb_dst(skb))->dev->ifindex : dev->ifindex; in ipv6_rcv()
Droute.c104 const struct in6_addr *gwaddr, int ifindex,
108 const struct in6_addr *gwaddr, int ifindex);
481 if (dev->ifindex == oif) in rt6_device_match()
485 sprt->rt6i_idev->dev->ifindex != oif) { in rt6_device_match()
489 local->rt6i_idev->dev->ifindex == oif) in rt6_device_match()
589 if (!oif || dev->ifindex == oif) in rt6_check_dev()
592 rt->rt6i_idev && rt->rt6i_idev->dev->ifindex == oif) in rt6_check_dev()
804 gwaddr, dev->ifindex); in rt6_route_rcv()
812 rt = rt6_add_route_info(net, prefix, rinfo->prefix_len, gwaddr, dev->ifindex, in rt6_route_rcv()
1451 if (fl6->flowi6_oif != rt->dst.dev->ifindex) in __ip6_route_redirect()
[all …]
Dipv6_sockglue.c551 int ifindex; in do_ipv6_setsockopt() local
556 ifindex = (__force int)ntohl((__force __be32)val); in do_ipv6_setsockopt()
557 if (ifindex == 0) { in do_ipv6_setsockopt()
563 dev = dev_get_by_index(net, ifindex); in do_ipv6_setsockopt()
573 np->ucast_oif = ifindex; in do_ipv6_setsockopt()
Dxfrm6_state.c40 sel->ifindex = fl6->flowi6_oif; in __xfrm6_init_tempsel()
Dip6mr.c630 .flowi6_iif = skb->dev->ifindex, in pim6_rcv()
699 .flowi6_oif = dev->ifindex, in reg_vif_xmit()
820 dev->ifindex, &in6_dev->cnf); in mif6_delete()
978 dev->ifindex, &in6_dev->cnf); in mif6_add()
993 v->link = dev->ifindex; in mif6_add()
1640 .flowi6_oif = skb->dev->ifindex, in mroute6_socket()
2183 .flowi6_iif = skb->dev->ifindex, in ip6_mr_input()
2245 nla_put_u32(skb, RTA_IIF, mrt->vif6_table[c->mf6c_parent].dev->ifindex) < 0) in __ip6mr_fill_mroute()
2261 nhp->rtnh_ifindex = mrt->vif6_table[ct].dev->ifindex; in __ip6mr_fill_mroute()
Dipcomp6.c77 ip6_redirect(skb, net, skb->dev->ifindex, 0); in ipcomp6_err()
Dproc.c248 seq_printf(seq, "%-32s\t%u\n", "ifIndex", idev->dev->ifindex); in snmp6_dev_seq_show()
Dreassembly.c331 fq->iif = dev->ifindex; in ip6_frag_queue()
556 skb->dev ? skb->dev->ifindex : 0, ip6_frag_ecn(hdr)); in ipv6_frag_rcv()
Dndisc.c449 if (oif != skb->dev->ifindex) in ndisc_send_skb()
1060 ndmsg->nduseropt_ifindex = ra->dev->ifindex; in ndisc_ra_useropt()
1458 skb->dev->ifindex, 0); in ndisc_redirect_rcv()
1518 if (oif != skb->dev->ifindex) in ndisc_send_redirect()
Dicmp.c97 ip6_redirect(skb, net, skb->dev->ifindex, 0); in icmpv6_err()
447 iif = skb->dev->ifindex; in icmp6_send()
Ddatagram.c376 IP6CB(skb)->iif = skb->dev->ifindex; in ip6_datagram_support_cmsg()
378 PKTINFO_SKB_CB(skb)->ipi_ifindex = skb->dev->ifindex; in ip6_datagram_support_cmsg()
Dmip6.c253 sel.ifindex = fl6->flowi6_oif; in mip6_destopt_reject()
Dsit.c104 (!dev || !t->parms.link || dev->ifindex == t->parms.link) && in ipip6_tunnel_lookup()
110 (!dev || !t->parms.link || dev->ifindex == t->parms.link) && in ipip6_tunnel_lookup()
116 (!dev || !t->parms.link || dev->ifindex == t->parms.link) && in ipip6_tunnel_lookup()
Desp6.c477 ip6_redirect(skb, net, skb->dev->ifindex, 0); in esp6_err()
Dah6.c665 ip6_redirect(skb, net, skb->dev->ifindex, 0); in ah6_err()
Dip6_output.c261 sk->sk_bound_dev_if == skb->dev->ifindex)) { in ip6_call_ra_chain()
895 (fl6->flowi6_oif && fl6->flowi6_oif != dst->dev->ifindex))) { in ip6_sk_dst_check()
Dip6_vti.c600 ip6_redirect(skb, net, skb->dev->ifindex, 0); in vti6_err()
Dip6_gre.c119 int link = dev->ifindex; in ip6gre_tunnel_lookup()
Dtcp_ipv6.c337 skb->dev->ifindex); in tcp_v6_err()
/linux-4.4.14/net/wimax/
Did-table.c88 struct genl_info *info, int ifindex) in wimax_dev_get_by_genl_info() argument
92 d_fnstart(3, NULL, "(info %p ifindex %d)\n", info, ifindex); in wimax_dev_get_by_genl_info()
95 if (wimax_dev->net_dev->ifindex == ifindex) { in wimax_dev_get_by_genl_info()
102 ifindex); in wimax_dev_get_by_genl_info()
106 info, ifindex, wimax_dev); in wimax_dev_get_by_genl_info()
141 __func__, wimax_dev, wimax_dev->net_dev->ifindex); in wimax_id_table_release()
Dop-state-get.c46 int result, ifindex; in wimax_gnl_doit_state_get() local
55 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_STGET_IFIDX]); in wimax_gnl_doit_state_get()
56 wimax_dev = wimax_dev_get_by_genl_info(info, ifindex); in wimax_gnl_doit_state_get()
Dop-reset.c104 int result, ifindex; in wimax_gnl_doit_reset() local
113 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RESET_IFIDX]); in wimax_gnl_doit_reset()
114 wimax_dev = wimax_dev_get_by_genl_info(info, ifindex); in wimax_gnl_doit_reset()
Dop-msg.c145 wimax_dev->net_dev->ifindex); in wimax_msg_alloc()
334 int result, ifindex; in wimax_gnl_doit_msg_from_user() local
349 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]); in wimax_gnl_doit_msg_from_user()
350 wimax_dev = wimax_dev_get_by_genl_info(info, ifindex); in wimax_gnl_doit_msg_from_user()
Dop-rfkill.c415 int result, ifindex; in wimax_gnl_doit_rfkill() local
426 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_IFIDX]); in wimax_gnl_doit_rfkill()
427 wimax_dev = wimax_dev_get_by_genl_info(info, ifindex); in wimax_gnl_doit_rfkill()
Dstack.c139 wimax_dev->net_dev->ifindex); in wimax_gnl_re_state_change_alloc()
/linux-4.4.14/net/bridge/
Dbr_mdb.c32 if (p && nla_put_u32(skb, MDBA_ROUTER_PORT, p->dev->ifindex)) in br_rports_fill_info()
86 e.ifindex = port->dev->ifindex; in br_mdb_fill_info()
144 bpm->ifindex = dev->ifindex; in br_mdb_dump()
181 bpm->ifindex = dev->ifindex; in nlmsg_populate_mdb_fill()
239 entry.ifindex = port->dev->ifindex; in br_mdb_notify()
252 int ifindex, u32 pid, in nlmsg_populate_rtr_fill() argument
266 bpm->ifindex = dev->ifindex; in nlmsg_populate_rtr_fill()
271 if (nla_put_u32(skb, MDBA_ROUTER_PORT, ifindex)) in nlmsg_populate_rtr_fill()
297 int ifindex; in br_rtr_notify() local
299 ifindex = port ? port->dev->ifindex : 0; in br_rtr_notify()
[all …]
Dbr_ioctl.c34 indices[i++] = dev->ifindex; in get_bridge_ifindices()
48 ifindices[p->port_no] = p->dev->ifindex; in get_port_ifindices()
87 static int add_del_if(struct net_bridge *br, int ifindex, int isadd) in add_del_if() argument
96 dev = __dev_get_by_index(net, ifindex); in add_del_if()
Dbr_fdb.c649 ndm->ndm_ifindex = fdb->dst ? fdb->dst->dev->ifindex : br->dev->ifindex; in fdb_fill_info()
654 if (nla_put_u32(skb, NDA_MASTER, br->dev->ifindex)) in fdb_fill_info()
Dbr_netlink.c359 hdr->ifi_index = dev->ifindex; in br_fill_ifinfo()
364 nla_put_u32(skb, IFLA_MASTER, br->dev->ifindex) || in br_fill_ifinfo()
369 (dev->ifindex != dev_get_iflink(dev) && in br_fill_ifinfo()
/linux-4.4.14/net/netlabel/
Dnetlabel_unlabeled.c97 int ifindex; member
206 static u32 netlbl_unlhsh_hash(int ifindex) in netlbl_unlhsh_hash() argument
208 return ifindex & (netlbl_unlhsh_rcu_deref(netlbl_unlhsh)->size - 1); in netlbl_unlhsh_hash()
222 static struct netlbl_unlhsh_iface *netlbl_unlhsh_search_iface(int ifindex) in netlbl_unlhsh_search_iface() argument
228 bkt = netlbl_unlhsh_hash(ifindex); in netlbl_unlhsh_search_iface()
231 if (iter->valid && iter->ifindex == ifindex) in netlbl_unlhsh_search_iface()
331 static struct netlbl_unlhsh_iface *netlbl_unlhsh_add_iface(int ifindex) in netlbl_unlhsh_add_iface() argument
340 iface->ifindex = ifindex; in netlbl_unlhsh_add_iface()
346 if (ifindex > 0) { in netlbl_unlhsh_add_iface()
347 bkt = netlbl_unlhsh_hash(ifindex); in netlbl_unlhsh_add_iface()
[all …]
/linux-4.4.14/net/ipv4/netfilter/
Dnf_nat_masquerade_ipv4.c59 nat->masq_index = out->ifindex; in nf_nat_masquerade_ipv4()
75 static int device_cmp(struct nf_conn *i, void *ifindex) in device_cmp() argument
83 return nat->masq_index == (int)(long)ifindex; in device_cmp()
98 NF_CT_ASSERT(dev->ifindex != 0); in masq_device_event()
101 (void *)(long)dev->ifindex, 0, 0); in masq_device_event()
/linux-4.4.14/samples/bpf/
Dtcbpf1_kern.c70 return bpf_redirect(skb->ifindex + 1, 0); in _redirect_xmit()
75 return bpf_redirect(skb->ifindex + 1, 1); in _redirect_recv()
80 bpf_clone_redirect(skb, skb->ifindex + 1, 0); in _clone_redirect_xmit()
86 bpf_clone_redirect(skb, skb->ifindex + 1, 1); in _clone_redirect_recv()
Dbpf_helpers.h36 static int (*bpf_clone_redirect)(void *ctx, int ifindex, int flags) =
38 static int (*bpf_redirect)(int ifindex, int flags) =
/linux-4.4.14/net/ipv6/netfilter/
Dnf_nat_masquerade_ipv6.c41 nfct_nat(ct)->masq_index = out->ifindex; in nf_nat_masquerade_ipv6()
53 static int device_cmp(struct nf_conn *ct, void *ifindex) in device_cmp() argument
61 return nat->masq_index == (int)(long)ifindex; in device_cmp()
72 (void *)(long)dev->ifindex, 0, 0); in masq_device_event()
Dip6t_rpfilter.c52 fl6.flowi6_oif = dev->ifindex; in rpfilter_lookup_reverse6()
Dnf_conntrack_reasm.c344 fq->iif = skb->dev->ifindex; in nf_ct_frag6_queue()
605 skb->dev ? skb->dev->ifindex : 0, ip6_frag_ecn(hdr)); in nf_ct_frag6_gather()
/linux-4.4.14/drivers/net/bonding/
Dbond_netlink.c179 int ifindex = nla_get_u32(data[IFLA_BOND_ACTIVE_SLAVE]); in bond_changelink() local
183 if (ifindex != 0) { in bond_changelink()
185 ifindex); in bond_changelink()
288 int ifindex = nla_get_u32(data[IFLA_BOND_PRIMARY]); in bond_changelink() local
292 dev = __dev_get_by_index(dev_net(bond_dev), ifindex); in bond_changelink()
494 int ifindex; in bond_option_active_slave_get_ifindex() local
498 ifindex = slave ? slave->ifindex : 0; in bond_option_active_slave_get_ifindex()
500 return ifindex; in bond_option_active_slave_get_ifindex()
508 int ifindex, i, targets_added; in bond_fill_info() local
515 ifindex = bond_option_active_slave_get_ifindex(bond); in bond_fill_info()
[all …]
/linux-4.4.14/drivers/staging/gdm72xx/
Dnetlink_k.c53 int ifindex; in netlink_rcv_cb() local
65 memcpy(&ifindex, ND_NLMSG_IFIDX(nlh), ND_IFINDEX_LEN); in netlink_rcv_cb()
70 dev = dev_get_by_index(&init_net, ifindex); in netlink_rcv_cb()
77 ifindex); in netlink_rcv_cb()
/linux-4.4.14/drivers/staging/gdm724x/
Dnetlink_k.c50 int ifindex; in netlink_rcv_cb() local
70 memcpy(&ifindex, ND_NLMSG_IFIDX(nlh), ND_IFINDEX_LEN); in netlink_rcv_cb()
74 dev = dev_get_by_index(&init_net, ifindex); in netlink_rcv_cb()
79 pr_err("nl cb - dev (%d) not found\n", ifindex); in netlink_rcv_cb()
/linux-4.4.14/net/netfilter/
Dxt_TEE.c64 priv->oif = dev->ifindex; in tee_netdev_event()
67 if (dev->ifindex == priv->oif) in tee_netdev_event()
72 priv->oif = dev->ifindex; in tee_netdev_event()
73 else if (dev->ifindex == priv->oif) in tee_netdev_event()
Dnfnetlink_queue.c418 if (nla_put_be32(skb, NFQA_IFINDEX_INDEV, htonl(indev->ifindex))) in nfqnl_build_packet_message()
426 htonl(indev->ifindex)) || in nfqnl_build_packet_message()
430 htonl(br_port_get_rcu(indev)->br->dev->ifindex))) in nfqnl_build_packet_message()
438 htonl(indev->ifindex))) in nfqnl_build_packet_message()
452 if (nla_put_be32(skb, NFQA_IFINDEX_OUTDEV, htonl(outdev->ifindex))) in nfqnl_build_packet_message()
460 htonl(outdev->ifindex)) || in nfqnl_build_packet_message()
464 htonl(br_port_get_rcu(outdev)->br->dev->ifindex))) in nfqnl_build_packet_message()
472 htonl(outdev->ifindex))) in nfqnl_build_packet_message()
800 dev_cmp(struct nf_queue_entry *entry, unsigned long ifindex) in dev_cmp() argument
803 if (entry->state.in->ifindex == ifindex) in dev_cmp()
[all …]
Dxt_TPROXY.c123 in->ifindex); in nf_tproxy_get_sock_v4()
134 in->ifindex); in nf_tproxy_get_sock_v4()
142 in->ifindex); in nf_tproxy_get_sock_v4()
187 in->ifindex); in nf_tproxy_get_sock_v6()
198 in->ifindex); in nf_tproxy_get_sock_v6()
206 in->ifindex); in nf_tproxy_get_sock_v6()
Dnfnetlink_log.c440 htonl(indev->ifindex))) in __build_packet_message()
448 htonl(indev->ifindex)) || in __build_packet_message()
452 htonl(br_port_get_rcu(indev)->br->dev->ifindex))) in __build_packet_message()
460 htonl(indev->ifindex))) in __build_packet_message()
466 htonl(physindev->ifindex))) in __build_packet_message()
475 htonl(outdev->ifindex))) in __build_packet_message()
483 htonl(outdev->ifindex)) || in __build_packet_message()
487 htonl(br_port_get_rcu(outdev)->br->dev->ifindex))) in __build_packet_message()
495 htonl(outdev->ifindex))) in __build_packet_message()
501 htonl(physoutdev->ifindex))) in __build_packet_message()
Dxt_socket.c124 in->ifindex); in xt_socket_get_sock_v4()
127 in->ifindex); in xt_socket_get_sock_v4()
330 in->ifindex); in xt_socket_get_sock_v6()
333 in->ifindex); in xt_socket_get_sock_v6()
Dnf_tables_netdev.c190 if (dev->ifindex != basechain->ops[0].dev->ifindex) in nft_netdev_event()
Dnft_meta.c60 *dest = in->ifindex; in nft_meta_get_eval()
65 *dest = out->ifindex; in nft_meta_get_eval()
Dxt_addrtype.c48 flow.flowi6_oif = dev->ifindex; in match_lookup_rt6()
/linux-4.4.14/drivers/net/ethernet/chelsio/cxgb4/
Dl2t.c89 int ifindex) in arp_hash() argument
93 return jhash_2words(*key, ifindex, 0) % l2t_size_half; in arp_hash()
97 int ifindex) in ipv6_hash() argument
103 (jhash_2words(xor, ifindex, 0) % l2t_size_half)); in ipv6_hash()
107 int addr_len, int ifindex) in addr_hash() argument
109 return addr_len == 4 ? arp_hash(d, addr, ifindex) : in addr_hash()
110 ipv6_hash(d, addr, ifindex); in addr_hash()
373 int ifidx = neigh->dev->ifindex; in cxgb4_l2t_get()
388 if (!addreq(e, addr) && e->ifindex == ifidx && in cxgb4_l2t_get()
404 e->ifindex = ifidx; in cxgb4_l2t_get()
[all …]
Dl2t.h75 int ifindex; /* neighbor's net_device's ifindex */ member
/linux-4.4.14/drivers/net/ethernet/chelsio/cxgb3/
Dl2t.c68 static inline unsigned int arp_hash(u32 key, int ifindex, in arp_hash() argument
71 return jhash_2words(key, ifindex, 0) & (d->nentries - 1); in arp_hash()
240 int hash = arp_hash(e->addr, e->ifindex, d); in alloc_l2e()
319 ifidx = neigh->dev->ifindex; in t3_l2t_get()
334 if (e->addr == addr && e->ifindex == ifidx && in t3_l2t_get()
350 e->ifindex = ifidx; in t3_l2t_get()
404 int ifidx = neigh->dev->ifindex; in t3_l2t_update()
409 if (e->addr == addr && e->ifindex == ifidx) { in t3_l2t_update()
Dl2t.h61 int ifindex; /* neighbor's net_device's ifindex */ member
/linux-4.4.14/net/sched/
Dact_mirred.c78 if (parm->ifindex) { in tcf_mirred_init()
79 dev = __dev_get_by_index(net, parm->ifindex); in tcf_mirred_init()
121 m->tcfm_ifindex = parm->ifindex; in tcf_mirred_init()
180 skb2->skb_iif = skb->dev->ifindex; in tcf_mirred()
206 .ifindex = m->tcfm_ifindex, in tcf_mirred_dump()
Dcls_fw.c45 int ifindex; member
75 if (!tcf_match_indev(skb, f->ifindex)) in fw_classify()
216 f->ifindex = ret; in fw_change_attrs()
269 fnew->ifindex = f->ifindex; in fw_change()
387 if (f->ifindex) { in fw_dump()
389 dev = __dev_get_by_index(net, f->ifindex); in fw_dump()
Dcls_u32.c53 int ifindex; member
171 if (!tcf_match_indev(skb, n->ifindex)) { in u32_classify()
638 n->ifindex = ret; in u32_set_parms()
693 new->ifindex = n->ifindex; in u32_init_knode()
1007 if (n->ifindex) { in u32_dump()
1009 dev = __dev_get_by_index(net, n->ifindex); in u32_dump()
Dcls_api.c368 tcm->tcm_ifindex = qdisc_dev(tp->q)->ifindex; in tcf_fill_node()
Dem_meta.c147 dst->value = dev->ifindex; in int_dev()
Dsch_api.c1353 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tc_fill_qdisc()
1672 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tc_fill_tclass()
/linux-4.4.14/net/hsr/
Dhsr_netlink.c81 res = nla_put_u32(skb, IFLA_HSR_SLAVE1, port->dev->ifindex); in hsr_fill_info()
89 res = nla_put_u32(skb, IFLA_HSR_SLAVE2, port->dev->ifindex); in hsr_fill_info()
167 res = nla_put_u32(skb, HSR_A_IFINDEX, port->dev->ifindex); in hsr_nl_ringerror()
286 res = nla_put_u32(skb_out, HSR_A_IFINDEX, hsr_dev->ifindex); in hsr_get_node_status()
328 port->dev->ifindex); in hsr_get_node_status()
343 port->dev->ifindex); in hsr_get_node_status()
412 res = nla_put_u32(skb_out, HSR_A_IFINDEX, hsr_dev->ifindex); in hsr_get_node_list()
Dhsr_framereg.c482 *addr_b_ifindex = port->dev->ifindex; in hsr_get_node_data()
/linux-4.4.14/net/caif/
Dcfcnfg.c46 int ifindex; member
174 if (phy->ifindex == ifi && phy->up) in cfcnfg_get_id_from_ifi()
230 if (s->ifindex != 0) { in caif_connect_req_to_link_param()
231 res = cfcnfg_get_id_from_ifi(cnfg, s->ifindex); in caif_connect_req_to_link_param()
303 struct cflayer *adap_layer, int *ifindex, in caif_connect_client() argument
349 *ifindex = phy->ifindex; in caif_connect_client()
474 phyid = (dev->ifindex + i) & 0x7; in cfcnfg_add_phy_layer()
494 phyinfo->ifindex = dev->ifindex; in cfcnfg_add_phy_layer()
Dcaif_socket.c751 int ifindex, headroom, tailroom; in caif_connect() local
824 cf_sk->conn_req.ifindex = cf_sk->sk.sk_bound_dev_if; in caif_connect()
829 &cf_sk->layer, &ifindex, &headroom, &tailroom); in caif_connect()
839 dev = dev_get_by_index_rcu(sock_net(sk), ifindex); in caif_connect()
Dcaif_usb.c164 link_support = cfusbl_create(dev->ifindex, dev->dev_addr, in cfusbl_device_notify()
Dcaif_dev.c383 link_support = cfserl_create(dev->ifindex, in caif_device_notify()
Dchnl_net.c482 caifdev->conn_req.sockaddr.u.dgm.connection_id = dev->ifindex; in ipcaif_newlink()
/linux-4.4.14/drivers/net/ppp/
Dpppoe.c167 unsigned char *addr, int ifindex) in __get_item() argument
175 ret->pppoe_ifindex == ifindex) in __get_item()
205 char *addr, int ifindex) in __delete_item() argument
215 ret->pppoe_ifindex == ifindex) { in __delete_item()
231 unsigned char *addr, int ifindex) in get_item() argument
236 po = __get_item(pn, sid, addr, ifindex); in get_item()
251 int ifindex; in get_item_by_addr() local
256 ifindex = dev->ifindex; in get_item_by_addr()
259 sp->sa_addr.pppoe.remote, ifindex); in get_item_by_addr()
266 char *addr, int ifindex) in delete_item() argument
[all …]
/linux-4.4.14/include/net/caif/
Dcaif_dev.h44 int ifindex; member
69 struct cflayer *client_layer, int *ifindex,
/linux-4.4.14/net/tipc/
Dudp_media.c91 u32 ifindex; member
199 .flowi6_oif = ub->ifindex, in tipc_udp_send_msg()
263 mreqn.imr_ifindex = ub->ifindex; in enable_mcast()
269 err = ipv6_stub->ipv6_sock_mc_join(sk, ub->ifindex, in enable_mcast()
326 ub->ifindex = ip6->sin6_scope_id; in parse_options()
383 ub->ifindex = dev->ifindex; in tipc_udp_enable()
/linux-4.4.14/include/linux/
Dnetfilter_bridge.h38 return nf_bridge->physindev ? nf_bridge->physindev->ifindex : 0; in nf_bridge_get_physinif()
49 return nf_bridge->physoutdev ? nf_bridge->physoutdev->ifindex : 0; in nf_bridge_get_physoutif()
Dif_pppox.h32 int ifindex; /* ifindex of device associated with socket */ member
60 #define pppoe_ifindex proto.pppoe.ifindex
Digmp.h119 struct ip_mreq_source *mreqs, int ifindex);
120 extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex);
Dinetdevice.h156 void inet_netconf_notify_devconf(struct net *net, int type, int ifindex,
Dnetdevice.h1585 int ifindex; member
2258 struct net_device *dev_get_by_index(struct net *net, int ifindex);
2259 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
2260 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
2261 int netdev_get_name(struct net *net, char *name, int ifindex);
/linux-4.4.14/net/dcb/
Ddcbnl.c1110 if (itr->ifindex == netdev->ifindex) { in dcbnl_ieee_fill()
1268 if (itr->ifindex == netdev->ifindex) { in dcbnl_cee_fill()
1758 int ifindex, int prio) in dcb_app_lookup() argument
1765 itr->ifindex == ifindex && in dcb_app_lookup()
1773 static int dcb_app_add(const struct dcb_app *app, int ifindex) in dcb_app_add() argument
1782 entry->ifindex = ifindex; in dcb_app_add()
1801 if ((itr = dcb_app_lookup(app, dev->ifindex, 0))) in dcb_getapp()
1822 event.ifindex = dev->ifindex; in dcb_setapp()
1829 if ((itr = dcb_app_lookup(new, dev->ifindex, 0))) { in dcb_setapp()
1840 err = dcb_app_add(new, dev->ifindex); in dcb_setapp()
[all …]
/linux-4.4.14/net/ipv4/
Ddevinet.c527 struct in_device *inetdev_by_index(struct net *net, int ifindex) in inetdev_by_index() argument
533 dev = dev_get_by_index_rcu(net, ifindex); in inetdev_by_index()
559 .imr_ifindex = ifa->ifa_dev->dev->ifindex, in ip_mc_config()
1523 ifm->ifa_index = ifa->ifa_dev->dev->ifindex; in inet_fill_ifaddr()
1754 static int inet_netconf_fill_devconf(struct sk_buff *skb, int ifindex, in inet_netconf_fill_devconf() argument
1770 if (nla_put_s32(skb, NETCONFA_IFINDEX, ifindex) < 0) in inet_netconf_fill_devconf()
1803 void inet_netconf_notify_devconf(struct net *net, int type, int ifindex, in inet_netconf_notify_devconf() argument
1813 err = inet_netconf_fill_devconf(skb, ifindex, devconf, 0, 0, in inet_netconf_notify_devconf()
1846 int ifindex; in inet_netconf_get_devconf() local
1858 ifindex = nla_get_s32(tb[NETCONFA_IFINDEX]); in inet_netconf_get_devconf()
[all …]
Dip_sockglue.c473 info->ipi_ifindex = skb->dev->ifindex; in ipv4_datagram_support_cmsg()
779 int ifindex; in do_ip_setsockopt() local
784 ifindex = (__force int)ntohl((__force __be32)val); in do_ip_setsockopt()
785 if (ifindex == 0) { in do_ip_setsockopt()
791 dev = dev_get_by_index(sock_net(sk), ifindex); in do_ip_setsockopt()
801 inet->uc_index = ifindex; in do_ip_setsockopt()
845 mreq.imr_ifindex = dev->ifindex; in do_ip_setsockopt()
1051 int msize, i, ifindex; in do_ip_setsockopt() local
1084 ifindex = gsf->gf_interface; in do_ip_setsockopt()
1105 err = ip_mc_msfilter(sk, msf, ifindex); in do_ip_setsockopt()
Digmp.c350 IPPROTO_IGMP, 0, dev->ifindex); in igmpv3_newpack()
699 IPPROTO_IGMP, 0, dev->ifindex); in igmp_send_report()
1720 imr->imr_ifindex = dev->ifindex; in ip_mc_find_dev()
2051 int ifindex; in ip_mc_join_group() local
2068 ifindex = imr->imr_ifindex; in ip_mc_join_group()
2071 i->multi.imr_ifindex == ifindex) in ip_mc_join_group()
2122 u32 ifindex; in ip_mc_leave_group() local
2132 ifindex = imr->imr_ifindex; in ip_mc_leave_group()
2138 if (ifindex) { in ip_mc_leave_group()
2139 if (iml->multi.imr_ifindex != ifindex) in ip_mc_leave_group()
[all …]
Dfib_frontend.c356 (dev->ifindex != oif || !IN_DEV_TX_REDIRECTS(idev))) in __fib_validate_source()
368 } else if (l3mdev_master_ifindex_rcu(nh->nh_dev) == dev->ifindex) { in __fib_validate_source()
385 fl4.flowi4_oif = dev->ifindex; in __fib_validate_source()
415 (dev->ifindex != oif || !IN_DEV_TX_REDIRECTS(idev))) { in fib_validate_source()
510 cfg->fc_oif = dev->ifindex; in rtentry_to_fib_config()
813 .fc_oif = ifa->ifa_dev->dev->ifindex, in fib_magic()
Dxfrm4_state.c39 sel->ifindex = fl4->flowi4_oif; in __xfrm4_init_tempsel()
Dip_gre.c305 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in ipgre_err()
353 skb->dev->ifindex, 0, IPPROTO_GRE, 0); in gre_err()
357 ipv4_redirect(skb, dev_net(skb->dev), skb->dev->ifindex, 0, in gre_err()
398 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in ipgre_rcv()
788 t->mlink = dev->ifindex; in ipgre_open()
Droute.c527 int oif = skb->dev->ifindex; in build_skb_flow_key()
790 int oif = skb->dev->ifindex; in ip_do_redirect()
1192 fl4.flowi4_oif = rt->dst.dev->ifindex; in ip_rt_get_source()
1193 fl4.flowi4_iif = skb->dev->ifindex; in ip_rt_get_source()
2049 (orig_oif != dev_out->ifindex)) { in __mkroute_output()
2201 fl4->flowi4_oif = dev_out->ifindex; in __ip_route_output_key_hash()
2299 fl4->flowi4_oif = dev_out->ifindex; in __ip_route_output_key_hash()
2307 fl4->flowi4_oif = dev_out->ifindex; in __ip_route_output_key_hash()
2451 nla_put_u32(skb, RTA_OIF, rt->dst.dev->ifindex)) in rt_fill_info()
2509 if (nla_put_u32(skb, RTA_IIF, skb->dev->ifindex)) in rt_fill_info()
Dipip.c145 t = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in ipip_err()
194 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in ipip_rcv()
Draw.c183 skb->dev->ifindex); in raw_v4_input()
189 skb->dev->ifindex)) { in raw_v4_input()
198 skb->dev->ifindex); in raw_v4_input()
301 skb->dev->ifindex)) != NULL) { in raw_icmp_error()
Dip_vti.c61 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in vti_input()
259 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in vti4_err()
Dipmr.c455 .flowi4_oif = dev->ifindex, in reg_vif_xmit()
594 dev->ifindex, &in_dev->cnf); in vif_delete()
786 inet_netconf_notify_devconf(net, NETCONFA_MC_FORWARDING, dev->ifindex, in vif_add()
803 v->link = dev->ifindex; in vif_add()
1932 skb->dev->ifindex : 0), in ipmr_rt_fib_lookup()
1935 skb->dev->ifindex), in ipmr_rt_fib_lookup()
2159 nla_put_u32(skb, RTA_IIF, mrt->vif_table[c->mfc_parent].dev->ifindex) < 0) in __ipmr_fill_mroute()
2174 nhp->rtnh_ifindex = mrt->vif_table[ct].dev->ifindex; in __ipmr_fill_mroute()
Dfib_semantics.c342 hash = fib_devindex_hashfn(dev->ifindex); in ip_fib_check_default()
1196 hash = fib_devindex_hashfn(nexthop_nh->nh_dev->ifindex); in fib_create_info()
1366 unsigned int hash = fib_devindex_hashfn(dev->ifindex); in fib_sync_down_dev()
1523 hash = fib_devindex_hashfn(dev->ifindex); in fib_sync_up()
Dip_input.c170 sk->sk_bound_dev_if == dev->ifindex) && in ip_call_ra_chain()
Dudp.c638 iph->saddr, uh->source, skb->dev->ifindex, udptable); in __udp4_lib_err()
1676 int dif = skb->dev->ifindex; in __udp4_lib_mcast_deliver()
1976 int dif = skb->dev->ifindex; in udp_v4_early_demux()
Dip_fragment.c484 qp->iif = dev->ifindex; in ip_frag_queue()
Dping.c177 int dif = skb->dev->ifindex; in ping_lookup()
/linux-4.4.14/net/packet/
Dinternal.h6 int ifindex; member
118 int ifindex; /* bound device */ member
Daf_packet.c565 dev = __dev_get_by_index(sock_net(&po->sk), po->ifindex); in prb_calc_retire_blk_tmo()
2046 sll->sll_ifindex = orig_dev->ifindex; in packet_rcv()
2048 sll->sll_ifindex = dev->ifindex; in packet_rcv()
2271 sll->sll_ifindex = orig_dev->ifindex; in tpacket_rcv()
2273 sll->sll_ifindex = dev->ifindex; in tpacket_rcv()
2911 static int packet_do_bind(struct sock *sk, const char *name, int ifindex, in packet_do_bind() argument
2935 } else if (ifindex) { in packet_do_bind()
2936 dev = dev_get_by_index_rcu(sock_net(sk), ifindex); in packet_do_bind()
2959 dev->ifindex); in packet_do_bind()
2968 po->ifindex = -1; in packet_do_bind()
[all …]
Ddiag.c16 pinfo.pdi_index = po->ifindex; in pdiag_put_info()
57 dml->pdmc_index = ml->ifindex; in pdiag_put_mclist()
/linux-4.4.14/net/mac802154/
Dtx.c110 skb->skb_iif = dev->ifindex; in ieee802154_monitor_start_xmit()
132 skb->skb_iif = dev->ifindex; in ieee802154_subif_start_xmit()
/linux-4.4.14/net/phonet/
Dpep.c749 int ifindex = 0; in pep_sock_close() local
765 ifindex = pn->ifindex; in pep_sock_close()
766 pn->ifindex = 0; in pep_sock_close()
769 if (ifindex) in pep_sock_close()
872 newpn->ifindex = 0; in pep_sock_accept()
977 pn->ifindex = 0; in pep_init()
1007 if (!pn->ifindex == !val) in pep_setsockopt()
1017 pn->ifindex = err; in pep_setsockopt()
1021 pn->ifindex = 0; in pep_setsockopt()
1062 val = pn->ifindex ? PNPIPE_ENCAP_IP : PNPIPE_ENCAP_NONE; in pep_getsockopt()
[all …]
Dpn_netlink.c121 ifm->ifa_index = dev->ifindex; in fill_addr()
192 nla_put_u32(skb, RTA_OIF, dev->ifindex)) in fill_route()
Dpep-gprs.c304 return dev->ifindex; in gprs_attach()
/linux-4.4.14/drivers/net/team/
Dteam_mode_activebackup.c78 ctx->data.u32_val = active_port->dev->ifindex; in ab_active_port_get()
89 if (port->dev->ifindex == ctx->data.u32_val) { in ab_active_port_set()
Dteam.c2191 int ifindex; in team_nl_team_get() local
2198 ifindex = nla_get_u32(info->attrs[TEAM_ATTR_TEAM_IFINDEX]); in team_nl_team_get()
2199 dev = dev_get_by_index(net, ifindex); in team_nl_team_get()
2247 opt_inst_info->port->dev->ifindex)) in team_nl_fill_one_option_get()
2349 if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex)) in team_nl_send_options_get()
2508 opt_inst_info->port->dev->ifindex : 0; in team_nl_cmd_options_set()
2569 if (nla_put_u32(skb, TEAM_ATTR_PORT_IFINDEX, port->dev->ifindex)) in team_nl_fill_one_port_get()
2617 if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex)) in team_nl_send_port_list_get()
Dteam_mode_loadbalance.c352 ctx->data.u32_val = port ? port->dev->ifindex : 0; in lb_tx_hash_to_port_mapping_get()
364 if (ctx->data.u32_val == port->dev->ifindex && in lb_tx_hash_to_port_mapping_set()
/linux-4.4.14/include/uapi/linux/
Dif_bridge.h178 __u32 ifindex; member
182 __u32 ifindex; member
Dbpf.h289 __u32 ifindex; member
Dxfrm.h59 int ifindex; member
/linux-4.4.14/security/selinux/include/
Dnetif.h24 int sel_netif_sid(struct net *ns, int ifindex, u32 *sid);
Dobjsec.h83 int ifindex; /* device index */ member
/linux-4.4.14/drivers/net/
Dvxlan.c299 ndm->ndm_ifindex = vxlan->dev->ifindex; in vxlan_fdb_info()
455 __u32 vni, __u32 ifindex) in vxlan_fdb_find_rdst() argument
463 rd->remote_ifindex == ifindex) in vxlan_fdb_find_rdst()
472 union vxlan_addr *ip, __be16 port, __u32 vni, __u32 ifindex) in vxlan_fdb_replace() argument
476 rd = vxlan_fdb_find_rdst(f, ip, port, vni, ifindex); in vxlan_fdb_replace()
486 rd->remote_ifindex = ifindex; in vxlan_fdb_replace()
493 __u32 ifindex, struct vxlan_rdst **rdp) in vxlan_fdb_append() argument
497 rd = vxlan_fdb_find_rdst(f, ip, port, vni, ifindex); in vxlan_fdb_append()
507 rd->remote_ifindex = ifindex; in vxlan_fdb_append()
663 __be16 port, __u32 vni, __u32 ifindex, in vxlan_fdb_create() argument
[all …]
Dveth.c96 data[0] = peer ? peer->ifindex : 0; in veth_get_ethtool_stats()
268 iflink = peer ? peer->ifindex : 0; in veth_get_iflink()
399 if (ifmp && (dev->ifindex != 0)) in veth_newlink()
400 peer->ifindex = ifmp->ifi_index; in veth_newlink()
Dtun.c155 unsigned int ifindex; member
1686 dev->ifindex = tfile->ifindex; in tun_set_iff()
1887 unsigned int ifindex; in __tun_chr_ioctl() local
1929 if (copy_from_user(&ifindex, argp, sizeof(ifindex))) in __tun_chr_ioctl()
1933 tfile->ifindex = ifindex; in __tun_chr_ioctl()
2222 tfile->ifindex = 0; in tun_chr_open()
Dloopback.c206 BUG_ON(dev->ifindex != LOOPBACK_IFINDEX); in loopback_net_init()
Difb.c102 skb->skb_iif = txp->dev->ifindex; in ifb_ri_tasklet()
Dvrf.c229 .flowi6_oif = dev->ifindex, in vrf_process_v6_outbound()
299 .flowi4_oif = vrf_dev->ifindex, in vrf_process_v4_outbound()
Dmacvtap.c1299 dev, "tap%d", dev->ifindex); in macvtap_device_event()
Dmacvlan.c1018 return vlan->lowerdev->ifindex; in macvlan_dev_get_iflink()
/linux-4.4.14/net/core/
Dlink_watch.c43 return (dev->ifindex != dev_get_iflink(dev) ? in default_operstate()
92 if (dev->ifindex != dev_get_iflink(dev)) in linkwatch_urgent_event()
Dfilter.c227 BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, ifindex) != 4); in convert_bpf_extensions()
239 offsetof(struct net_device, ifindex)); in convert_bpf_extensions()
1410 static u64 bpf_clone_redirect(u64 r1, u64 ifindex, u64 flags, u64 r4, u64 r5) in bpf_clone_redirect() argument
1415 dev = dev_get_by_index_rcu(dev_net(skb->dev), ifindex); in bpf_clone_redirect()
1441 u32 ifindex; member
1446 static u64 bpf_redirect(u64 ifindex, u64 flags, u64 r3, u64 r4, u64 r5) in bpf_redirect() argument
1450 ri->ifindex = ifindex; in bpf_redirect()
1460 dev = dev_get_by_index_rcu(dev_net(skb->dev), ri->ifindex); in skb_do_redirect()
1461 ri->ifindex = 0; in skb_do_redirect()
1796 case offsetof(struct __sk_buff, ifindex): in bpf_net_convert_ctx_access()
[all …]
Dfib_rules.c311 rule->iifindex = dev->ifindex; in fib_nl_newrule()
321 rule->oifindex = dev->ifindex; in fib_nl_newrule()
727 rule->iifindex = dev->ifindex; in attach_rules()
730 rule->oifindex = dev->ifindex; in attach_rules()
739 if (rule->iifindex == dev->ifindex) in detach_rules()
741 if (rule->oifindex == dev->ifindex) in detach_rules()
Ddev.c202 static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex) in dev_index_hash() argument
204 return &net->dev_index_head[ifindex & (NETDEV_HASHENTRIES - 1)]; in dev_index_hash()
232 dev_index_hash(net, dev->ifindex)); in list_netdevice()
681 return dev->ifindex; in dev_get_iflink()
798 struct net_device *__dev_get_by_index(struct net *net, int ifindex) in __dev_get_by_index() argument
801 struct hlist_head *head = dev_index_hash(net, ifindex); in __dev_get_by_index()
804 if (dev->ifindex == ifindex) in __dev_get_by_index()
822 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex) in dev_get_by_index_rcu() argument
825 struct hlist_head *head = dev_index_hash(net, ifindex); in dev_get_by_index_rcu()
828 if (dev->ifindex == ifindex) in dev_get_by_index_rcu()
[all …]
Drtnetlink.c1213 ifm->ifi_index = dev->ifindex; in rtnl_fill_ifinfo()
1229 (dev->ifindex != dev_get_iflink(dev) && in rtnl_fill_ifinfo()
1232 nla_put_u32(skb, IFLA_MASTER, upper_dev->ifindex)) || in rtnl_fill_ifinfo()
1644 static int do_set_master(struct net_device *dev, int ifindex) in do_set_master() argument
1651 if (upper_dev->ifindex == ifindex) in do_set_master()
1663 if (ifindex) { in do_set_master()
1664 upper_dev = __dev_get_by_index(dev_net(dev), ifindex); in do_set_master()
2363 dev->ifindex = ifm->ifi_index; in rtnl_newlink()
2584 ndm->ndm_ifindex = dev->ifindex; in nlmsg_populate_fdb_fill()
2947 if (brport_idx && (dev->ifindex != brport_idx)) in rtnl_fdb_dump()
[all …]
Dneighbour.c1419 struct net *net, int ifindex) in lookup_neigh_parms() argument
1424 if ((p->dev && p->dev->ifindex == ifindex && net_eq(neigh_parms_net(p), net)) || in lookup_neigh_parms()
1425 (!p->dev && !ifindex && net_eq(net, &init_net))) in lookup_neigh_parms()
1751 nla_put_u32(skb, NDTPA_IFINDEX, parms->dev->ifindex)) || in neightbl_fill_parms()
1981 int i, ifindex = 0; in neightbl_set() local
1989 ifindex = nla_get_u32(tbp[NDTPA_IFINDEX]); in neightbl_set()
1991 p = lookup_neigh_parms(tbl, net, ifindex); in neightbl_set()
2166 ndm->ndm_ifindex = neigh->dev->ifindex; in neigh_fill_info()
2218 ndm->ndm_ifindex = pn->dev ? pn->dev->ifindex : 0; in pneigh_fill_info()
2246 if (!master || master->ifindex != master_idx) in neigh_master_filtered()
[all …]
Dnet-procfs.c367 seq_printf(seq, "%-4d %-15s %-5d %-5d ", dev->ifindex, in dev_mc_seq_show()
Ddev_ioctl.c168 ifr->ifr_ifindex = dev->ifindex; in dev_ifsioc_locked()
Dnet-sysfs.c111 NETDEVICE_SHOW_RO(ifindex, fmt_dec);
1433 retval = add_uevent_var(env, "IFINDEX=%d", dev->ifindex); in netdev_uevent()
/linux-4.4.14/include/uapi/linux/tc_act/
Dtc_mirred.h16 __u32 ifindex; /* ifindex of egress port */ member
/linux-4.4.14/include/linux/can/
Dskb.h34 int ifindex; member
/linux-4.4.14/net/batman-adv/
Dhard-interface.h54 bool batadv_is_wifi_iface(int ifindex);
Dtranslation-table.h30 unsigned short vid, int ifindex, u32 mark);
Dhard-interface.c101 dev_get_iflink(net_dev) == net_dev->ifindex) in batadv_is_on_batman_iface()
Dtranslation-table.c530 unsigned short vid, int ifindex, u32 mark) in batadv_tt_local_add() argument
545 if (ifindex != BATADV_NULL_IFINDEX) in batadv_tt_local_add()
546 in_dev = dev_get_by_index(&init_net, ifindex); in batadv_tt_local_add()
/linux-4.4.14/include/net/netfilter/
Dnf_nat.h73 nat->masq_index != out->ifindex; in nf_nat_oif_changed()
/linux-4.4.14/include/net/phonet/
Dpep.h38 int ifindex; member
/linux-4.4.14/include/rdma/
Dib_sa.h160 int ifindex; member
167 return rec->net ? dev_get_by_index(rec->net, rec->ifindex) : NULL; in ib_get_ndev_from_path()
/linux-4.4.14/net/mac80211/
Ddebugfs_key.c69 KEY_READ(ifindex, sdata->name, "%s\n");
70 KEY_OPS(ifindex);
366 DEBUGFS_ADD(ifindex); in ieee80211_debugfs_key_add()
Dmesh_pathtbl.c192 return jhash_2words(*(u32 *)(addr+2), sdata->dev->ifindex, in mesh_table_hash()
/linux-4.4.14/net/ieee802154/
Dnl-mac.c68 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_start_confirm()
107 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_iface()
682 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_llsec_getparams()
926 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_key()
1062 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_dev()
1169 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_devkey()
1297 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_seclevel()
Dnl802154.c90 wpan_dev->netdev->ifindex == ifidx) { in __cfg802154_wpan_dev_from_attrs()
153 int ifindex = nla_get_u32(attrs[NL802154_ATTR_IFINDEX]); in __cfg802154_rdev_from_attrs() local
155 netdev = __dev_get_by_index(netns, ifindex); in __cfg802154_rdev_from_attrs()
808 (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex) || in nl802154_send_iface()
1420 if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) in nl802154_send_key()
1604 if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) in nl802154_send_device()
1773 if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) in nl802154_send_devkey()
1941 if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) in nl802154_send_seclevel()
Dsocket.c229 sk->sk_bound_dev_if = dev->ifindex; in raw_bind()
376 sk->sk_bound_dev_if == dev->ifindex) { in ieee802154_raw_deliver()
/linux-4.4.14/net/decnet/netfilter/
Ddn_rtmsg.c57 rtm->nfdn_ifindex = rt_skb->dev->ifindex; in dnrmg_build_message()
/linux-4.4.14/drivers/net/can/
Ddev.c587 can_skb_prv(skb)->ifindex = dev->ifindex; in alloc_can_skb()
616 can_skb_prv(skb)->ifindex = dev->ifindex; in alloc_canfd_skb()
Dslcan.c216 can_skb_prv(skb)->ifindex = sl->dev->ifindex; in slc_bump()
/linux-4.4.14/net/decnet/
Ddn_route.c661 cb->iif = dev->ifindex; in dn_route_rcv()
1088 (neigh->dev->ifindex != oldflp->flowidn_oif)) || in dn_route_output_slow()
1144 fld.flowidn_oif = dev_out->ifindex; in dn_route_output_slow()
1161 fld.flowidn_oif = dev_out->ifindex; in dn_route_output_slow()
1183 fld.flowidn_oif = dev_out->ifindex; in dn_route_output_slow()
1329 .flowidn_iif = skb->dev->ifindex, in dn_route_input_slow()
1472 rt->fld.flowidn_iif = in_dev->ifindex; in dn_route_input_slow()
1591 nla_put_u32(skb, RTA_OIF, rt->dst.dev->ifindex) < 0) in dn_rt_fill_info()
Ddn_dev.c548 static struct dn_dev *dn_dev_by_index(int ifindex) in dn_dev_by_index() argument
553 dev = __dev_get_by_index(&init_net, ifindex); in dn_dev_by_index()
695 ifm->ifa_index = ifa->ifa_dev->dev->ifindex; in dn_nl_fill_ifaddr()
Ddn_fib.c574 .oif = ifa->ifa_dev->dev->ifindex, in fib_magic()
/linux-4.4.14/Documentation/networking/timestamping/
Dtxtimestamp.c157 static void print_pktinfo(int family, int ifindex, void *saddr, void *daddr) in print_pktinfo() argument
162 ifindex, in print_pktinfo()
/linux-4.4.14/net/netfilter/ipvs/
Dip_vs_sync.c1369 if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) in set_mcast_if()
1373 inet->mc_index = dev->ifindex; in set_mcast_if()
1380 np->mcast_oif = dev->ifindex; in set_mcast_if()
1408 if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) in join_mcast_group()
1411 mreq.imr_ifindex = dev->ifindex; in join_mcast_group()
1431 if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) in join_mcast_group6()
1435 ret = ipv6_sock_mc_join(sk, dev->ifindex, addr); in join_mcast_group6()
/linux-4.4.14/net/switchdev/
Dswitchdev.c1045 ndm->ndm_ifindex = dump->dev->ifindex; in switchdev_port_fdb_dump_cb()
1301 return dev->ifindex; in switchdev_port_fwd_mark_get()
1313 *reset_mark = lower_dev->ifindex; in switchdev_port_fwd_mark_reset()
1352 u32 mark = dev->ifindex; in switchdev_port_fwd_mark_set()
/linux-4.4.14/drivers/net/ethernet/rocker/
Drocker.c165 int ifindex; /* key */ member
3904 rocker_internal_vlan_tbl_find(const struct rocker *rocker, int ifindex) in rocker_internal_vlan_tbl_find() argument
3909 entry, ifindex) { in rocker_internal_vlan_tbl_find()
3910 if (found->ifindex == ifindex) in rocker_internal_vlan_tbl_find()
3918 int ifindex) in rocker_port_internal_vlan_id_get() argument
3930 entry->ifindex = ifindex; in rocker_port_internal_vlan_id_get()
3934 found = rocker_internal_vlan_tbl_find(rocker, ifindex); in rocker_port_internal_vlan_id_get()
3941 hash_add(rocker->internal_vlan_tbl, &found->entry, found->ifindex); in rocker_port_internal_vlan_id_get()
3961 int ifindex) in rocker_port_internal_vlan_id_put() argument
3970 found = rocker_internal_vlan_tbl_find(rocker, ifindex); in rocker_port_internal_vlan_id_put()
[all …]
/linux-4.4.14/drivers/infiniband/core/
Duverbs_marshall.c146 dst->ifindex = 0; in ib_copy_path_rec_from_user()
Dverbs.c1016 int ifindex; in ib_resolve_eth_dmac() local
1029 ifindex = sgid_attr.ndev->ifindex; in ib_resolve_eth_dmac()
1034 NULL, ifindex); in ib_resolve_eth_dmac()
Daddr.c119 dev_addr->bound_dev_if = dev->ifindex; in rdma_copy_addr()
Dcma.c1123 fl4.flowi4_iif = net_dev->ifindex; in validate_ipv4_net_dev()
1143 &src_addr->sin6_addr, net_dev->ifindex, in validate_ipv6_net_dev()
1282 addr->dev_addr.bound_dev_if == net_dev->ifindex); in cma_match_net_dev()
2325 route->path_rec->ifindex = addr->dev_addr.bound_dev_if; in cma_resolve_iboe_route()
3810 if ((dev_addr->bound_dev_if == ndev->ifindex) && in cma_netdev_change()
Dsa_query.c1159 rec.ifindex = 0; in ib_sa_path_rec_callback()
/linux-4.4.14/net/wireless/
Dnl80211.c108 wdev->netdev->ifindex == ifidx) { in __cfg80211_wdev_from_attrs()
169 int ifindex = nla_get_u32(attrs[NL80211_ATTR_IFINDEX]); in __cfg80211_rdev_from_attrs() local
170 netdev = __dev_get_by_index(netns, ifindex); in __cfg80211_rdev_from_attrs()
2114 int ifindex = nla_get_u32(info->attrs[NL80211_ATTR_IFINDEX]); in nl80211_set_wiphy() local
2116 netdev = __dev_get_by_index(genl_info_net(info), ifindex); in nl80211_set_wiphy()
2395 (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_send_iface()
2916 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_get_key()
3712 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_send_station()
4589 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_send_mpath()
5042 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_get_mesh_config()
[all …]
Dscan.c1161 cfg80211_get_dev_from_ifindex(struct net *net, int ifindex) in cfg80211_get_dev_from_ifindex() argument
1168 dev = dev_get_by_index(net, ifindex); in cfg80211_get_dev_from_ifindex()
1196 rdev = cfg80211_get_dev_from_ifindex(dev_net(dev), dev->ifindex); in cfg80211_wext_siwscan()
1662 rdev = cfg80211_get_dev_from_ifindex(dev_net(dev), dev->ifindex); in cfg80211_wext_giwscan()
Dtrace.h37 __field(int, ifindex)
41 (__entry->ifindex) = (netdev->ifindex); \
44 #define NETDEV_PR_ARG __entry->name, __entry->ifindex
Dwext-core.c431 r->ifi_index = dev->ifindex; in rtnetlink_ifinfo_prep()
/linux-4.4.14/drivers/net/ipvlan/
Dipvlan_core.c353 .flowi4_oif = dev->ifindex, in ipvlan_process_v4_outbound()
391 .flowi6_iif = dev->ifindex, in ipvlan_process_v6_outbound()
Dipvlan_main.c309 return ipvlan->phy_dev->ifindex; in ipvlan_get_iflink()
/linux-4.4.14/Documentation/ABI/testing/
Dsysfs-class-net139 What: /sys/class/net/<iface>/ifindex
158 Physical interfaces have the same 'ifindex' and 'iflink' values.
Ddev-kmsg89 n8 - netdev ifindex
/linux-4.4.14/arch/powerpc/net/
Dbpf_jit_comp.c346 ifindex) != 4); in bpf_jit_build_body()
362 offsetof(struct net_device, ifindex)); in bpf_jit_build_body()
/linux-4.4.14/drivers/infiniband/hw/ocrdma/
Docrdma_ah.c157 sgid_attr.ndev->ifindex); in ocrdma_create_ah()
/linux-4.4.14/net/sunrpc/
Daddr.c184 scope_id = dev->ifindex; in rpc_parse_scope_id()
/linux-4.4.14/net/openvswitch/
Ddatapath.c184 int ifindex; in get_dpifindex() local
190 ifindex = local->dev->ifindex; in get_dpifindex()
192 ifindex = 0; in get_dpifindex()
196 return ifindex; in get_dpifindex()
/linux-4.4.14/net/rds/
Dtcp.c376 dev->ifindex == LOOPBACK_IFINDEX) in rds_tcp_dev_event()
/linux-4.4.14/net/llc/
Dllc_sap.c397 struct hlist_head *dev_hb = llc_sk_dev_hash(sap, skb->dev->ifindex); in llc_sap_mcast()
Dllc_conn.c716 struct hlist_head *dev_hb = llc_sk_dev_hash(sap, llc->dev->ifindex); in llc_sap_add_socket()
Daf_llc.c630 info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex; in llc_cmsg_rcv()
/linux-4.4.14/drivers/net/wireless/prism54/
Dislpci_mgt.c331 header->device_id = priv->ndev->ifindex; in islpci_mgt_receive()
/linux-4.4.14/net/sctp/
Dipv6.c105 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex; in sctp_inet6addr_event()
400 addr->a.v6.sin6_scope_id = dev->ifindex; in sctp_v6_copy_addrlist()
Dprotocol.c519 if (!odev || odev->ifindex != fl4->flowi4_oif) { in sctp_v4_get_dst()
/linux-4.4.14/Documentation/networking/
Doperstates.txt115 ifindex != iflink.
Dswitchdev.txt294 a group ifindex.
/linux-4.4.14/arch/arm/net/
Dbpf_jit_32.c885 ifindex) != 4); in build_body()
890 off = offsetof(struct net_device, ifindex); in build_body()
/linux-4.4.14/arch/mips/net/
Dbpf_jit.c1125 ifindex) != 4); in build_body()
1126 off = offsetof(struct net_device, ifindex); in build_body()
/linux-4.4.14/net/mpls/
Daf_mpls.c1256 if (dev && nla_put_u32(skb, RTA_OIF, dev->ifindex)) in mpls_dump_route()
1273 rtnh->rtnh_ifindex = dev->ifindex; in mpls_dump_route()
/linux-4.4.14/net/8021q/
Dvlan_dev.c739 return real_dev->ifindex; in vlan_dev_get_iflink()
/linux-4.4.14/net/xfrm/
Dxfrm_policy.c72 (fl4->flowi4_oif == sel->ifindex || !sel->ifindex); in __xfrm4_selector_match()
85 (fl6->flowi6_oif == sel->ifindex || !sel->ifindex); in __xfrm6_selector_match()
/linux-4.4.14/arch/sparc/net/
Dbpf_jit_comp.c585 emit_load32(r_A, struct net_device, ifindex, r_A); in bpf_jit_compile()
/linux-4.4.14/drivers/infiniband/ulp/ipoib/
Dipoib_main.c1086 return dev->ifindex; in ipoib_get_iflink()
1089 return priv->parent->ifindex; in ipoib_get_iflink()
/linux-4.4.14/net/bluetooth/
D6lowpan.c846 netdev->ifindex, &chan->dst, chan->dst_type, in setup_netdev()
/linux-4.4.14/net/dsa/
Dslave.c63 return p->parent->dst->master_netdev->ifindex; in dsa_slave_get_iflink()
/linux-4.4.14/drivers/base/
Dcore.c2145 "DEVICE=n%u", net->ifindex); in create_syslog_header()
/linux-4.4.14/drivers/net/ethernet/sun/
Dsunvnet.c1284 fl4.flowi4_oif = dev->ifindex; in vnet_start_xmit()

12