Home
last modified time | relevance | path

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

/linux-4.1.27/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.c4356 static int selinux_inet_sys_rcv_skb(struct net *ns, int ifindex, in selinux_inet_sys_rcv_skb() argument
4364 err = sel_netif_sid(ns, ifindex, &if_sid); in selinux_inet_sys_rcv_skb()
4819 ad.u.net->netif = indev->ifindex; in selinux_ip_forward()
4825 err = selinux_inet_sys_rcv_skb(dev_net(indev), indev->ifindex, in selinux_ip_forward()
4915 int ifindex, in selinux_ip_postroute_compat() argument
4931 ad.u.net->netif = ifindex; in selinux_ip_postroute_compat()
4953 int ifindex = outdev->ifindex; in selinux_ip_postroute() local
4966 return selinux_ip_postroute_compat(skb, ifindex, family); in selinux_ip_postroute()
5052 ad.u.net->netif = ifindex; in selinux_ip_postroute()
5066 if (sel_netif_sid(dev_net(outdev), ifindex, &if_sid)) in selinux_ip_postroute()
/linux-4.1.27/net/can/
Dbcm.c95 int ifindex; member
120 int ifindex; member
141 static char *bcm_proc_getifname(char *result, int ifindex) in bcm_proc_getifname() argument
145 if (!ifindex) in bcm_proc_getifname()
149 dev = dev_get_by_index_rcu(&init_net, ifindex); in bcm_proc_getifname()
170 seq_printf(m, " / bound %s", bcm_proc_getifname(ifname, bo->ifindex)); in bcm_proc_show()
182 op->can_id, bcm_proc_getifname(ifname, op->ifindex)); in bcm_proc_show()
208 bcm_proc_getifname(ifname, op->ifindex), in bcm_proc_show()
249 if (!op->ifindex) in bcm_can_tx()
252 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.c385 can_skb_prv(skb)->ifindex == gwj->dst.dev->ifindex) in can_can_gw_rcv()
/linux-4.1.27/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.c483 static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex, in inet6_netconf_fill_devconf() argument
499 if (nla_put_s32(skb, NETCONFA_IFINDEX, ifindex) < 0) in inet6_netconf_fill_devconf()
524 void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, in inet6_netconf_notify_devconf() argument
534 err = inet6_netconf_fill_devconf(skb, ifindex, devconf, 0, 0, in inet6_netconf_notify_devconf()
564 int ifindex; in inet6_netconf_get_devconf() local
576 ifindex = nla_get_s32(tb[NETCONFA_IFINDEX]); in inet6_netconf_get_devconf()
577 switch (ifindex) { in inet6_netconf_get_devconf()
585 dev = __dev_get_by_index(net, ifindex); in inet6_netconf_get_devconf()
600 err = inet6_netconf_fill_devconf(skb, ifindex, devconf, in inet6_netconf_get_devconf()
641 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 …]
Droute.c100 const struct in6_addr *gwaddr, int ifindex,
104 const struct in6_addr *gwaddr, int ifindex);
453 if (dev->ifindex == oif) in rt6_device_match()
457 sprt->rt6i_idev->dev->ifindex != oif) { in rt6_device_match()
461 local->rt6i_idev->dev->ifindex == oif)) in rt6_device_match()
561 if (!oif || dev->ifindex == oif) in rt6_check_dev()
564 rt->rt6i_idev && rt->rt6i_idev->dev->ifindex == oif) in rt6_check_dev()
747 gwaddr, dev->ifindex); in rt6_route_rcv()
755 rt = rt6_add_route_info(net, prefix, rinfo->prefix_len, gwaddr, dev->ifindex, in rt6_route_rcv()
1016 .flowi6_iif = skb->dev->ifindex, in ip6_route_input()
[all …]
Dip6_input.c101 IP6CB(skb)->iif = skb_dst(skb) ? ip6_dst_idev(skb_dst(skb))->dev->ifindex : dev->ifindex; in ipv6_rcv()
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.c631 .flowi6_iif = skb->dev->ifindex, in pim6_rcv()
700 .flowi6_oif = dev->ifindex, in reg_vif_xmit()
825 dev->ifindex, &in6_dev->cnf); in mif6_delete()
983 dev->ifindex, &in6_dev->cnf); in mif6_add()
998 v->link = dev->ifindex; in mif6_add()
1645 .flowi6_oif = skb->dev->ifindex, in mroute6_socket()
2188 .flowi6_iif = skb->dev->ifindex, in ip6_mr_input()
2250 nla_put_u32(skb, RTA_IIF, mrt->vif6_table[c->mf6c_parent].dev->ifindex) < 0) in __ip6mr_fill_mroute()
2266 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()
Dicmp.c96 ip6_redirect(skb, net, skb->dev->ifindex, 0); in icmpv6_err()
446 iif = skb->dev->ifindex; in icmp6_send()
578 fl6.flowi6_oif = skb->dev->ifindex; in icmpv6_echo_reply()
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()
558 skb->dev ? skb->dev->ifindex : 0, ip6_frag_ecn(hdr)); in ipv6_frag_rcv()
Dndisc.c445 icmpv6_flow_init(sk, &fl6, type, saddr, daddr, skb->dev->ifindex); in ndisc_send_skb()
1046 ndmsg->nduseropt_ifindex = ra->dev->ifindex; in ndisc_ra_useropt()
1432 skb->dev->ifindex, 0); in ndisc_redirect_rcv()
1489 &saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex); in ndisc_send_redirect()
Dxfrm6_policy.c145 oif = skb_dst(skb)->dev->ifindex; in _decode_session6()
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.c255 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.c444 ip6_redirect(skb, net, skb->dev->ifindex, 0); in esp6_err()
Dah6.c663 ip6_redirect(skb, net, skb->dev->ifindex, 0); in ah6_err()
Dip6_output.c249 sk->sk_bound_dev_if == skb->dev->ifindex)) { in ip6_call_ra_chain()
873 (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.c339 skb->dev->ifindex); in tcp_v6_err()
/linux-4.1.27/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.c416 int result, ifindex; in wimax_gnl_doit_rfkill() local
427 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_IFIDX]); in wimax_gnl_doit_rfkill()
428 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.1.27/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()
143 bpm->ifindex = dev->ifindex; in br_mdb_dump()
180 bpm->ifindex = dev->ifindex; in nlmsg_populate_mdb_fill()
238 entry.ifindex = port->dev->ifindex; in br_mdb_notify()
249 if (entry->ifindex == 0) in is_valid_mdb_entry()
285 if (bpm->ifindex == 0) { in br_mdb_parse()
290 dev = __dev_get_by_index(net, bpm->ifindex); in br_mdb_parse()
365 dev = __dev_get_by_index(net, entry->ifindex); in __br_mdb_add()
446 if (!p->port || p->port->dev->ifindex != entry->ifindex) in __br_mdb_del()
Dbr_ioctl.c34 indices[i++] = dev->ifindex; in get_bridge_ifindices()
47 ifindices[p->port_no] = p->dev->ifindex; in get_port_ifindices()
86 static int add_del_if(struct net_bridge *br, int ifindex, int isadd) in add_del_if() argument
95 dev = __dev_get_by_index(net, ifindex); in add_del_if()
Dbr_netlink.c300 hdr->ifi_index = dev->ifindex; in br_fill_ifinfo()
305 nla_put_u32(skb, IFLA_MASTER, br->dev->ifindex) || in br_fill_ifinfo()
310 (dev->ifindex != dev_get_iflink(dev) && in br_fill_ifinfo()
Dbr_fdb.c619 ndm->ndm_ifindex = fdb->dst ? fdb->dst->dev->ifindex : br->dev->ifindex; in fdb_fill_info()
624 if (nla_put_u32(skb, NDA_MASTER, br->dev->ifindex)) in fdb_fill_info()
/linux-4.1.27/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.1.27/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.1.27/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()
607 skb->dev ? skb->dev->ifindex : 0, ip6_frag_ecn(hdr)); in nf_ct_frag6_gather()
/linux-4.1.27/drivers/net/bonding/
Dbond_netlink.c161 int ifindex = nla_get_u32(data[IFLA_BOND_ACTIVE_SLAVE]); in bond_changelink() local
165 if (ifindex != 0) { in bond_changelink()
167 ifindex); in bond_changelink()
270 int ifindex = nla_get_u32(data[IFLA_BOND_PRIMARY]); in bond_changelink() local
274 dev = __dev_get_by_index(dev_net(bond_dev), ifindex); in bond_changelink()
435 int ifindex; in bond_option_active_slave_get_ifindex() local
439 ifindex = slave ? slave->ifindex : 0; in bond_option_active_slave_get_ifindex()
441 return ifindex; in bond_option_active_slave_get_ifindex()
449 int ifindex, i, targets_added; in bond_fill_info() local
456 ifindex = bond_option_active_slave_get_ifindex(bond); in bond_fill_info()
[all …]
/linux-4.1.27/include/net/
Daddrconf.h123 int type, int ifindex);
128 int ipv6_sock_mc_join(struct sock *sk, int ifindex,
130 int ipv6_sock_mc_drop(struct sock *sk, int ifindex,
156 int (*ipv6_sock_mc_join)(struct sock *sk, int ifindex,
158 int (*ipv6_sock_mc_drop)(struct sock *sk, int ifindex,
202 int ipv6_sock_ac_join(struct sock *sk, int ifindex,
204 int ipv6_sock_ac_drop(struct sock *sk, int ifindex,
221 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.h79 int ifindex; member
Dipv6.h963 int ipv6_sock_mc_join(struct sock *sk, int ifindex,
965 int ipv6_sock_mc_drop(struct sock *sk, int ifindex,
/linux-4.1.27/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.1.27/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.1.27/drivers/net/ethernet/chelsio/cxgb4/
Dl2t.c95 static inline unsigned int arp_hash(const u32 *key, int ifindex) in arp_hash() argument
97 return jhash_2words(*key, ifindex, 0) & L2T_HASH_MASK; in arp_hash()
100 static inline unsigned int ipv6_hash(const u32 *key, int ifindex) in ipv6_hash() argument
104 return L2T_SZ_HALF + (jhash_2words(xor, ifindex, 0) & L2T_HASH_MASK); in ipv6_hash()
107 static unsigned int addr_hash(const u32 *addr, int addr_len, int ifindex) in addr_hash() argument
109 return addr_len == 4 ? arp_hash(addr, ifindex) : in addr_hash()
110 ipv6_hash(addr, ifindex); in addr_hash()
370 int ifidx = neigh->dev->ifindex; in cxgb4_l2t_get()
385 if (!addreq(e, addr) && e->ifindex == ifidx && in cxgb4_l2t_get()
401 e->ifindex = ifidx; in cxgb4_l2t_get()
[all …]
Dl2t.h61 int ifindex; /* neighbor's net_device's ifindex */ member
/linux-4.1.27/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.1.27/net/sched/
Dact_mirred.c72 if (parm->ifindex) { in tcf_mirred_init()
73 dev = __dev_get_by_index(net, parm->ifindex); in tcf_mirred_init()
112 m->tcfm_ifindex = parm->ifindex; in tcf_mirred_init()
167 skb2->skb_iif = skb->dev->ifindex; in tcf_mirred()
196 .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.c1351 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tc_fill_qdisc()
1670 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tc_fill_tclass()
/linux-4.1.27/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.1.27/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.c754 int ifindex, headroom, tailroom; in caif_connect() local
827 cf_sk->conn_req.ifindex = cf_sk->sk.sk_bound_dev_if; in caif_connect()
832 &cf_sk->layer, &ifindex, &headroom, &tailroom); in caif_connect()
842 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.1.27/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.1.27/net/netfilter/
Dnfnetlink_queue_core.c384 if (nla_put_be32(skb, NFQA_IFINDEX_INDEV, htonl(indev->ifindex))) in nfqnl_build_packet_message()
392 htonl(indev->ifindex)) || in nfqnl_build_packet_message()
396 htonl(br_port_get_rcu(indev)->br->dev->ifindex))) in nfqnl_build_packet_message()
404 htonl(indev->ifindex))) in nfqnl_build_packet_message()
418 if (nla_put_be32(skb, NFQA_IFINDEX_OUTDEV, htonl(outdev->ifindex))) in nfqnl_build_packet_message()
426 htonl(outdev->ifindex)) || in nfqnl_build_packet_message()
430 htonl(br_port_get_rcu(outdev)->br->dev->ifindex))) in nfqnl_build_packet_message()
438 htonl(outdev->ifindex))) in nfqnl_build_packet_message()
766 dev_cmp(struct nf_queue_entry *entry, unsigned long ifindex) in dev_cmp() argument
769 if (entry->state.in->ifindex == ifindex) in dev_cmp()
[all …]
Dxt_TEE.c210 priv->oif = dev->ifindex; in tee_netdev_event()
213 if (dev->ifindex == priv->oif) in tee_netdev_event()
218 priv->oif = dev->ifindex; in tee_netdev_event()
219 else if (dev->ifindex == priv->oif) in tee_netdev_event()
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.c437 htonl(indev->ifindex))) in __build_packet_message()
445 htonl(indev->ifindex)) || in __build_packet_message()
449 htonl(br_port_get_rcu(indev)->br->dev->ifindex))) in __build_packet_message()
457 htonl(indev->ifindex))) in __build_packet_message()
463 htonl(physindev->ifindex))) in __build_packet_message()
472 htonl(outdev->ifindex))) in __build_packet_message()
480 htonl(outdev->ifindex)) || in __build_packet_message()
484 htonl(br_port_get_rcu(outdev)->br->dev->ifindex))) in __build_packet_message()
492 htonl(outdev->ifindex))) in __build_packet_message()
498 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()
324 in->ifindex); in xt_socket_get_sock_v6()
327 in->ifindex); in xt_socket_get_sock_v6()
Dnft_meta.c59 *dest = in->ifindex; in nft_meta_get_eval()
64 *dest = out->ifindex; in nft_meta_get_eval()
Dxt_addrtype.c48 flow.flowi6_oif = dev->ifindex; in match_lookup_rt6()
/linux-4.1.27/include/net/caif/
Dcaif_dev.h44 int ifindex; member
69 struct cflayer *client_layer, int *ifindex,
/linux-4.1.27/net/tipc/
Dudp_media.c89 u32 ifindex; member
193 .flowi6_oif = ub->ifindex, in tipc_udp_send_msg()
256 mreqn.imr_ifindex = ub->ifindex; in enable_mcast()
262 err = ipv6_stub->ipv6_sock_mc_join(sk, ub->ifindex, in enable_mcast()
319 ub->ifindex = ip6->sin6_scope_id; in parse_options()
376 ub->ifindex = dev->ifindex; in tipc_udp_enable()
/linux-4.1.27/include/linux/
Dnetfilter_bridge.h48 return nf_bridge->physindev ? nf_bridge->physindev->ifindex : 0; in nf_bridge_get_physinif()
59 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.h118 struct ip_mreq_source *mreqs, int ifindex);
119 extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex);
Dinetdevice.h153 void inet_netconf_notify_devconf(struct net *net, int type, int ifindex,
Dnetdevice.h1552 int ifindex; member
2201 struct net_device *dev_get_by_index(struct net *net, int ifindex);
2202 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
2203 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
2204 int netdev_get_name(struct net *net, char *name, int ifindex);
/linux-4.1.27/net/dcb/
Ddcbnl.c1113 if (itr->ifindex == netdev->ifindex) { in dcbnl_ieee_fill()
1271 if (itr->ifindex == netdev->ifindex) { in dcbnl_cee_fill()
1761 int ifindex, int prio) in dcb_app_lookup() argument
1768 itr->ifindex == ifindex && in dcb_app_lookup()
1776 static int dcb_app_add(const struct dcb_app *app, int ifindex) in dcb_app_add() argument
1785 entry->ifindex = ifindex; in dcb_app_add()
1804 if ((itr = dcb_app_lookup(app, dev->ifindex, 0))) in dcb_getapp()
1825 event.ifindex = dev->ifindex; in dcb_setapp()
1832 if ((itr = dcb_app_lookup(new, dev->ifindex, 0))) { in dcb_setapp()
1843 err = dcb_app_add(new, dev->ifindex); in dcb_setapp()
[all …]
/linux-4.1.27/net/packet/
Dinternal.h6 int ifindex; member
105 int ifindex; /* bound device */ member
Daf_packet.c568 dev = __dev_get_by_index(sock_net(&po->sk), po->ifindex); in prb_calc_retire_blk_tmo()
1825 sll->sll_ifindex = orig_dev->ifindex; in packet_rcv()
1827 sll->sll_ifindex = dev->ifindex; in packet_rcv()
2050 sll->sll_ifindex = orig_dev->ifindex; in tpacket_rcv()
2052 sll->sll_ifindex = dev->ifindex; in tpacket_rcv()
2691 static int packet_do_bind(struct sock *sk, const char *name, int ifindex, in packet_do_bind() argument
2715 } else if (ifindex) { in packet_do_bind()
2716 dev = dev_get_by_index_rcu(sock_net(sk), ifindex); in packet_do_bind()
2739 dev->ifindex); in packet_do_bind()
2748 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.1.27/include/uapi/linux/
Dif_bridge.h177 __u32 ifindex; member
181 __u32 ifindex; member
Dxfrm.h59 int ifindex; member
/linux-4.1.27/net/ipv4/
Ddevinet.c523 struct in_device *inetdev_by_index(struct net *net, int ifindex) in inetdev_by_index() argument
529 dev = dev_get_by_index_rcu(net, ifindex); in inetdev_by_index()
555 .imr_ifindex = ifa->ifa_dev->dev->ifindex, in ip_mc_config()
1520 ifm->ifa_index = ifa->ifa_dev->dev->ifindex; in inet_fill_ifaddr()
1747 static int inet_netconf_fill_devconf(struct sk_buff *skb, int ifindex, in inet_netconf_fill_devconf() argument
1763 if (nla_put_s32(skb, NETCONFA_IFINDEX, ifindex) < 0) in inet_netconf_fill_devconf()
1792 void inet_netconf_notify_devconf(struct net *net, int type, int ifindex, in inet_netconf_notify_devconf() argument
1802 err = inet_netconf_fill_devconf(skb, ifindex, devconf, 0, 0, in inet_netconf_notify_devconf()
1834 int ifindex; in inet_netconf_get_devconf() local
1846 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()
775 int ifindex; in do_ip_setsockopt() local
780 ifindex = (__force int)ntohl((__force __be32)val); in do_ip_setsockopt()
781 if (ifindex == 0) { in do_ip_setsockopt()
787 dev = dev_get_by_index(sock_net(sk), ifindex); in do_ip_setsockopt()
797 inet->uc_index = ifindex; in do_ip_setsockopt()
841 mreq.imr_ifindex = dev->ifindex; in do_ip_setsockopt()
1047 int msize, i, ifindex; in do_ip_setsockopt() local
1080 ifindex = gsf->gf_interface; in do_ip_setsockopt()
1101 err = ip_mc_msfilter(sk, msf, ifindex); in do_ip_setsockopt()
Digmp.c347 IPPROTO_IGMP, 0, dev->ifindex); in igmpv3_newpack()
688 IPPROTO_IGMP, 0, dev->ifindex); in igmp_send_report()
1532 imr->imr_ifindex = dev->ifindex; in ip_mc_find_dev()
1863 int ifindex; in ip_mc_join_group() local
1880 ifindex = imr->imr_ifindex; in ip_mc_join_group()
1883 i->multi.imr_ifindex == ifindex) in ip_mc_join_group()
1934 u32 ifindex; in ip_mc_leave_group() local
1944 ifindex = imr->imr_ifindex; in ip_mc_leave_group()
1950 if (ifindex) { in ip_mc_leave_group()
1951 if (iml->multi.imr_ifindex != ifindex) in ip_mc_leave_group()
[all …]
Dgre_demux.c230 skb->dev->ifindex, 0, IPPROTO_GRE, 0); in gre_cisco_err()
234 ipv4_redirect(skb, dev_net(skb->dev), skb->dev->ifindex, 0, in gre_cisco_err()
Dxfrm4_state.c39 sel->ifindex = fl4->flowi4_oif; in __xfrm4_init_tempsel()
Dfib_frontend.c328 (dev->ifindex != oif || !IN_DEV_TX_REDIRECTS(idev))) in __fib_validate_source()
354 fl4.flowi4_oif = dev->ifindex; in __fib_validate_source()
384 (dev->ifindex != oif || !IN_DEV_TX_REDIRECTS(idev))) { in fib_validate_source()
479 cfg->fc_oif = dev->ifindex; in rtentry_to_fib_config()
770 .fc_oif = ifa->ifa_dev->dev->ifindex, in fib_magic()
Droute.c525 int oif = skb->dev->ifindex; in build_skb_flow_key()
788 int oif = skb->dev->ifindex; in ip_do_redirect()
1187 fl4.flowi4_oif = rt->dst.dev->ifindex; in ip_rt_get_source()
1188 fl4.flowi4_iif = skb->dev->ifindex; in ip_rt_get_source()
1755 fl4.flowi4_iif = dev->ifindex; in ip_route_input_slow()
2126 fl4->flowi4_oif = dev_out->ifindex; in __ip_route_output_key()
2217 fl4->flowi4_oif = dev_out->ifindex; in __ip_route_output_key()
2236 fl4->flowi4_oif = dev_out->ifindex; in __ip_route_output_key()
2381 nla_put_u32(skb, RTA_OIF, rt->dst.dev->ifindex)) in rt_fill_info()
2439 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()
Dip_gre.c182 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in ipgre_err()
216 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in ipgre_rcv()
428 t->mlink = dev->ifindex; in ipgre_open()
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()
Dfib_semantics.c340 hash = fib_devindex_hashfn(dev->ifindex); in ip_fib_check_default()
971 hash = fib_devindex_hashfn(nexthop_nh->nh_dev->ifindex); in fib_create_info()
1115 unsigned int hash = fib_devindex_hashfn(dev->ifindex); in fib_sync_down_dev()
1235 hash = fib_devindex_hashfn(dev->ifindex); in fib_sync_up()
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.c460 .flowi4_oif = dev->ifindex, in reg_vif_xmit()
603 dev->ifindex, &in_dev->cnf); in vif_delete()
795 inet_netconf_notify_devconf(net, NETCONFA_MC_FORWARDING, dev->ifindex, in vif_add()
812 v->link = dev->ifindex; in vif_add()
1940 skb->dev->ifindex : 0), in ipmr_rt_fib_lookup()
1943 skb->dev->ifindex), in ipmr_rt_fib_lookup()
2167 nla_put_u32(skb, RTA_IIF, mrt->vif_table[c->mfc_parent].dev->ifindex) < 0) in __ipmr_fill_mroute()
2182 nhp->rtnh_ifindex = mrt->vif_table[ct].dev->ifindex; in __ipmr_fill_mroute()
Dip_input.c168 sk->sk_bound_dev_if == dev->ifindex) && in ip_call_ra_chain()
Dxfrm4_policy.c110 oif = skb_dst(skb)->dev->ifindex; in _decode_session4()
Dudp.c635 iph->saddr, uh->source, skb->dev->ifindex, udptable); in __udp4_lib_err()
1665 int dif = skb->dev->ifindex; in __udp4_lib_mcast_deliver()
1965 int dif = skb->dev->ifindex; in udp_v4_early_demux()
Dip_fragment.c467 qp->iif = dev->ifindex; in ip_frag_queue()
Dping.c177 int dif = skb->dev->ifindex; in ping_lookup()
/linux-4.1.27/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.1.27/net/mac802154/
Dtx.c128 skb->skb_iif = dev->ifindex; in ieee802154_monitor_start_xmit()
146 skb->skb_iif = dev->ifindex; in ieee802154_subif_start_xmit()
/linux-4.1.27/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.c2182 int ifindex; in team_nl_team_get() local
2189 ifindex = nla_get_u32(info->attrs[TEAM_ATTR_TEAM_IFINDEX]); in team_nl_team_get()
2190 dev = dev_get_by_index(net, ifindex); in team_nl_team_get()
2238 opt_inst_info->port->dev->ifindex)) in team_nl_fill_one_option_get()
2340 if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex)) in team_nl_send_options_get()
2499 opt_inst_info->port->dev->ifindex : 0; in team_nl_cmd_options_set()
2560 if (nla_put_u32(skb, TEAM_ATTR_PORT_IFINDEX, port->dev->ifindex)) in team_nl_fill_one_port_get()
2608 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.1.27/drivers/net/
Dvxlan.c333 ndm->ndm_ifindex = vxlan->dev->ifindex; in vxlan_fdb_info()
489 __u32 vni, __u32 ifindex) in vxlan_fdb_find_rdst() argument
497 rd->remote_ifindex == ifindex) in vxlan_fdb_find_rdst()
506 union vxlan_addr *ip, __be16 port, __u32 vni, __u32 ifindex) in vxlan_fdb_replace() argument
510 rd = vxlan_fdb_find_rdst(f, ip, port, vni, ifindex); in vxlan_fdb_replace()
520 rd->remote_ifindex = ifindex; in vxlan_fdb_replace()
527 __u32 ifindex, struct vxlan_rdst **rdp) in vxlan_fdb_append() argument
531 rd = vxlan_fdb_find_rdst(f, ip, port, vni, ifindex); in vxlan_fdb_append()
541 rd->remote_ifindex = ifindex; in vxlan_fdb_append()
705 __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()
397 if (ifmp && (dev->ifindex != 0)) in veth_newlink()
398 peer->ifindex = ifmp->ifi_index; in veth_newlink()
Dtun.c155 unsigned int ifindex; member
1641 dev->ifindex = tfile->ifindex; in tun_set_iff()
1841 unsigned int ifindex; in __tun_chr_ioctl() local
1883 if (copy_from_user(&ifindex, argp, sizeof(ifindex))) in __tun_chr_ioctl()
1887 tfile->ifindex = ifindex; in __tun_chr_ioctl()
2168 tfile->ifindex = 0; in tun_chr_open()
Dloopback.c207 BUG_ON(dev->ifindex != LOOPBACK_IFINDEX); in loopback_net_init()
Difb.c103 skb->skb_iif = _dev->ifindex; in ri_tasklet()
Dmacvtap.c1201 dev, "tap%d", dev->ifindex); in macvtap_device_event()
Dmacvlan.c1016 return vlan->lowerdev->ifindex; in macvlan_dev_get_iflink()
/linux-4.1.27/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.1.27/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()
Dfib_rules.c308 rule->iifindex = dev->ifindex; in fib_nl_newrule()
318 rule->oifindex = dev->ifindex; in fib_nl_newrule()
711 rule->iifindex = dev->ifindex; in attach_rules()
714 rule->oifindex = dev->ifindex; in attach_rules()
723 if (rule->iifindex == dev->ifindex) in detach_rules()
725 if (rule->oifindex == dev->ifindex) in detach_rules()
Ddev.c200 static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex) in dev_index_hash() argument
202 return &net->dev_index_head[ifindex & (NETDEV_HASHENTRIES - 1)]; in dev_index_hash()
230 dev_index_hash(net, dev->ifindex)); in list_netdevice()
675 return dev->ifindex; in dev_get_iflink()
766 struct net_device *__dev_get_by_index(struct net *net, int ifindex) in __dev_get_by_index() argument
769 struct hlist_head *head = dev_index_hash(net, ifindex); in __dev_get_by_index()
772 if (dev->ifindex == ifindex) in __dev_get_by_index()
790 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex) in dev_get_by_index_rcu() argument
793 struct hlist_head *head = dev_index_hash(net, ifindex); in dev_get_by_index_rcu()
796 if (dev->ifindex == ifindex) in dev_get_by_index_rcu()
[all …]
Drtnetlink.c1043 ifm->ifi_index = dev->ifindex; in rtnl_fill_ifinfo()
1059 (dev->ifindex != dev_get_iflink(dev) && in rtnl_fill_ifinfo()
1062 nla_put_u32(skb, IFLA_MASTER, upper_dev->ifindex)) || in rtnl_fill_ifinfo()
1531 static int do_set_master(struct net_device *dev, int ifindex) in do_set_master() argument
1538 if (upper_dev->ifindex == ifindex) in do_set_master()
1550 if (ifindex) { in do_set_master()
1551 upper_dev = __dev_get_by_index(dev_net(dev), ifindex); in do_set_master()
2231 dev->ifindex = ifm->ifi_index; in rtnl_newlink()
2452 ndm->ndm_ifindex = dev->ifindex; in nlmsg_populate_fdb_fill()
2815 if (brport_idx && (dev->ifindex != brport_idx)) in rtnl_fdb_dump()
[all …]
Dneighbour.c1412 struct net *net, int ifindex) in lookup_neigh_parms() argument
1417 if ((p->dev && p->dev->ifindex == ifindex && net_eq(neigh_parms_net(p), net)) || in lookup_neigh_parms()
1418 (!p->dev && !ifindex && net_eq(net, &init_net))) in lookup_neigh_parms()
1744 nla_put_u32(skb, NDTPA_IFINDEX, parms->dev->ifindex)) || in neightbl_fill_parms()
1973 int i, ifindex = 0; in neightbl_set() local
1981 ifindex = nla_get_u32(tbp[NDTPA_IFINDEX]); in neightbl_set()
1983 p = lookup_neigh_parms(tbl, net, ifindex); in neightbl_set()
2158 ndm->ndm_ifindex = neigh->dev->ifindex; in neigh_fill_info()
2210 ndm->ndm_ifindex = pn->dev ? pn->dev->ifindex : 0; in pneigh_fill_info()
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()
Dfilter.c228 BUILD_BUG_ON(FIELD_SIZEOF(struct net_device, ifindex) != 4); in convert_bpf_extensions()
240 offsetof(struct net_device, ifindex)); in convert_bpf_extensions()
Dnet-sysfs.c112 NETDEVICE_SHOW_RO(ifindex, fmt_dec);
1416 retval = add_uevent_var(env, "IFINDEX=%d", dev->ifindex); in netdev_uevent()
Dsock.c583 index = dev->ifindex; in sock_setbindtodevice()
/linux-4.1.27/include/uapi/linux/tc_act/
Dtc_mirred.h16 __u32 ifindex; /* ifindex of egress port */ member
/linux-4.1.27/include/linux/can/
Dskb.h34 int ifindex; member
/linux-4.1.27/net/batman-adv/
Dhard-interface.h43 bool batadv_is_wifi_iface(int ifindex);
Dtranslation-table.h23 unsigned short vid, int ifindex, uint32_t mark);
Dhard-interface.c87 dev_get_iflink(net_dev) == net_dev->ifindex) in batadv_is_on_batman_iface()
Dtranslation-table.c508 unsigned short vid, int ifindex, uint32_t mark) in batadv_tt_local_add() argument
522 if (ifindex != BATADV_NULL_IFINDEX) in batadv_tt_local_add()
523 in_dev = dev_get_by_index(&init_net, ifindex); in batadv_tt_local_add()
/linux-4.1.27/include/net/netfilter/
Dnf_nat.h73 nat->masq_index != out->ifindex; in nf_nat_oif_changed()
/linux-4.1.27/include/net/phonet/
Dpep.h38 int ifindex; member
/linux-4.1.27/net/mac80211/
Ddebugfs_key.c61 KEY_READ(ifindex, sdata->name, "%s\n");
62 KEY_OPS(ifindex);
336 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.1.27/net/ieee802154/
Dnl-mac.c68 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_start_confirm()
105 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_iface()
683 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_llsec_getparams()
931 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_key()
1067 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_dev()
1174 nla_put_u32(msg, IEEE802154_ATTR_DEV_INDEX, dev->ifindex) || in ieee802154_nl_fill_devkey()
1302 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()
460 (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex) || in nl802154_send_iface()
Dsocket.c236 sk->sk_bound_dev_if = dev->ifindex; in raw_bind()
384 sk->sk_bound_dev_if == dev->ifindex) { in ieee802154_raw_deliver()
/linux-4.1.27/net/decnet/netfilter/
Ddn_rtmsg.c57 rtm->nfdn_ifindex = rt_skb->dev->ifindex; in dnrmg_build_message()
/linux-4.1.27/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.1.27/net/decnet/
Ddn_route.c661 cb->iif = dev->ifindex; in dn_route_rcv()
1087 (neigh->dev->ifindex != oldflp->flowidn_oif)) || in dn_route_output_slow()
1141 fld.flowidn_oif = dev_out->ifindex; in dn_route_output_slow()
1156 fld.flowidn_oif = dev_out->ifindex; in dn_route_output_slow()
1178 fld.flowidn_oif = dev_out->ifindex; in dn_route_output_slow()
1324 .flowidn_iif = skb->dev->ifindex, in dn_route_input_slow()
1467 rt->fld.flowidn_iif = in_dev->ifindex; in dn_route_input_slow()
1586 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.1.27/drivers/net/ethernet/rocker/
Drocker.c164 int ifindex; /* key */ member
3681 rocker_internal_vlan_tbl_find(struct rocker *rocker, int ifindex) in rocker_internal_vlan_tbl_find() argument
3686 entry, ifindex) { in rocker_internal_vlan_tbl_find()
3687 if (found->ifindex == ifindex) in rocker_internal_vlan_tbl_find()
3695 int ifindex) in rocker_port_internal_vlan_id_get() argument
3707 entry->ifindex = ifindex; in rocker_port_internal_vlan_id_get()
3711 found = rocker_internal_vlan_tbl_find(rocker, ifindex); in rocker_port_internal_vlan_id_get()
3718 hash_add(rocker->internal_vlan_tbl, &found->entry, found->ifindex); in rocker_port_internal_vlan_id_get()
3737 int ifindex) in rocker_port_internal_vlan_id_put() argument
3746 found = rocker_internal_vlan_tbl_find(rocker, ifindex); in rocker_port_internal_vlan_id_put()
[all …]
/linux-4.1.27/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.1.27/Documentation/ABI/testing/
Dsysfs-class-net120 What: /sys/class/net/<iface>/ifindex
139 Physical interfaces have the same 'ifindex' and 'iflink' values.
Ddev-kmsg89 n8 - netdev ifindex
/linux-4.1.27/net/wireless/
Dnl80211.c107 wdev->netdev->ifindex == ifidx) { in __cfg80211_wdev_from_attrs()
168 int ifindex = nla_get_u32(attrs[NL80211_ATTR_IFINDEX]); in __cfg80211_rdev_from_attrs() local
169 netdev = __dev_get_by_index(netns, ifindex); in __cfg80211_rdev_from_attrs()
2100 int ifindex = nla_get_u32(info->attrs[NL80211_ATTR_IFINDEX]); in nl80211_set_wiphy() local
2102 netdev = __dev_get_by_index(genl_info_net(info), ifindex); in nl80211_set_wiphy()
2380 (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_send_iface()
2891 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_get_key()
3687 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_send_station()
4551 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_send_mpath()
5054 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || in nl80211_get_mesh_config()
[all …]
Dscan.c1160 cfg80211_get_dev_from_ifindex(struct net *net, int ifindex) in cfg80211_get_dev_from_ifindex() argument
1167 dev = dev_get_by_index(net, ifindex); in cfg80211_get_dev_from_ifindex()
1195 rdev = cfg80211_get_dev_from_ifindex(dev_net(dev), dev->ifindex); in cfg80211_wext_siwscan()
1661 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.1.27/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.1.27/net/sunrpc/
Daddr.c184 scope_id = dev->ifindex; in rpc_parse_scope_id()
/linux-4.1.27/net/netfilter/ipvs/
Dip_vs_sync.c1335 if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) in set_mcast_if()
1339 inet->mc_index = dev->ifindex; in set_mcast_if()
1403 if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) in join_mcast_group()
1406 mreq.imr_ifindex = dev->ifindex; in join_mcast_group()
/linux-4.1.27/net/openvswitch/
Ddatapath.c185 int ifindex; in get_dpifindex() local
191 ifindex = netdev_vport_priv(local)->dev->ifindex; in get_dpifindex()
193 ifindex = 0; in get_dpifindex()
197 return ifindex; in get_dpifindex()
/linux-4.1.27/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.c629 info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex; in llc_cmsg_rcv()
/linux-4.1.27/drivers/net/wireless/prism54/
Dislpci_mgt.c331 header->device_id = priv->ndev->ifindex; in islpci_mgt_receive()
/linux-4.1.27/net/sctp/
Dipv6.c105 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex; in sctp_inet6addr_event()
393 addr->a.v6.sin6_scope_id = dev->ifindex; in sctp_v6_copy_addrlist()
/linux-4.1.27/net/dsa/
Dslave.c62 return p->parent->dst->master_netdev->ifindex; in dsa_slave_get_iflink()
249 ndm->ndm_ifindex = dev->ifindex; in dsa_slave_fill_info()
/linux-4.1.27/arch/arm/net/
Dbpf_jit_32.c826 ifindex) != 4); in build_body()
827 off = offsetof(struct net_device, ifindex); in build_body()
/linux-4.1.27/Documentation/networking/
Doperstates.txt115 ifindex != iflink.
Dfilter.txt274 ifidx skb->dev->ifindex
/linux-4.1.27/drivers/infiniband/core/
Daddr.c119 dev_addr->bound_dev_if = dev->ifindex; in rdma_copy_addr()
Dcma.c3452 if ((dev_addr->bound_dev_if == ndev->ifindex) && in cma_netdev_change()
/linux-4.1.27/drivers/net/ipvlan/
Dipvlan_core.c382 .flowi6_iif = skb->dev->ifindex, in ipvlan_process_v6_outbound()
Dipvlan_main.c311 return ipvlan->phy_dev->ifindex; in ipvlan_get_iflink()
/linux-4.1.27/arch/mips/net/
Dbpf_jit.c1249 ifindex) != 4); in build_body()
1250 off = offsetof(struct net_device, ifindex); in build_body()
/linux-4.1.27/net/8021q/
Dvlan_dev.c739 return real_dev->ifindex; in vlan_dev_get_iflink()
/linux-4.1.27/drivers/infiniband/ulp/ipoib/
Dipoib_main.c858 return dev->ifindex; in ipoib_get_iflink()
861 return priv->parent->ifindex; in ipoib_get_iflink()
/linux-4.1.27/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.1.27/arch/sparc/net/
Dbpf_jit_comp.c585 emit_load32(r_A, struct net_device, ifindex, r_A); in bpf_jit_compile()
/linux-4.1.27/net/mpls/
Daf_mpls.c846 if (dev && nla_put_u32(skb, RTA_OIF, dev->ifindex)) in mpls_dump_route()
/linux-4.1.27/net/bluetooth/
D6lowpan.c870 netdev->ifindex, &chan->dst, chan->dst_type, in setup_netdev()
/linux-4.1.27/drivers/base/
Dcore.c2051 "DEVICE=n%u", net->ifindex); in create_syslog_header()
/linux-4.1.27/drivers/net/ethernet/sun/
Dsunvnet.c1284 fl4.flowi4_oif = dev->ifindex; in vnet_start_xmit()
/linux-4.1.27/drivers/scsi/fcoe/
Dfcoe.c1946 netdev = dev_get_by_index(&init_net, entry->ifindex); in fcoe_dcb_app_notification()
/linux-4.1.27/drivers/tty/
Dn_gsm.c2825 return net->ifindex; /* return network index */ in gsm_create_network()
/linux-4.1.27/net/iucv/
Daf_iucv.c748 sk->sk_bound_dev_if = dev->ifindex; in iucv_sock_bind()
/linux-4.1.27/lib/
Dtest_bpf.c1834 skb->dev->ifindex = SKB_DEV_IFINDEX; in populate_skb()