Home
last modified time | relevance | path

Searched refs:ifa (Results 1 – 25 of 70) sorted by relevance

123

/openbmc/linux/net/ipv4/
H A Ddevinet.c131 static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa) in inet_hash_insert() argument
133 u32 hash = inet_addr_hash(net, ifa->ifa_local); in inet_hash_insert()
136 hlist_add_head_rcu(&ifa->hash, &inet_addr_lst[hash]); in inet_hash_insert()
139 static void inet_hash_remove(struct in_ifaddr *ifa) in inet_hash_remove() argument
142 hlist_del_init_rcu(&ifa->hash); in inet_hash_remove()
156 struct in_ifaddr *ifa; in __ip_dev_find() local
159 ifa = inet_lookup_ifaddr_rcu(net, addr); in __ip_dev_find()
160 if (!ifa) { in __ip_dev_find()
174 result = ifa->ifa_dev->dev; in __ip_dev_find()
187 struct in_ifaddr *ifa; in inet_lookup_ifaddr_rcu() local
[all …]
H A Dfib_frontend.c545 const struct in_ifaddr *ifa; in rtentry_to_fib_config() local
555 in_dev_for_each_ifa_rcu(ifa, in_dev) { in rtentry_to_fib_config()
556 if (strcmp(ifa->ifa_label, devname) == 0) in rtentry_to_fib_config()
561 if (!ifa) in rtentry_to_fib_config()
563 cfg->fc_prefsrc = ifa->ifa_local; in rtentry_to_fib_config()
1070 struct in_ifaddr *ifa, u32 rt_priority) in fib_magic() argument
1072 struct net *net = dev_net(ifa->ifa_dev->dev); in fib_magic()
1073 u32 tb_id = l3mdev_fib_table(ifa->ifa_dev->dev); in fib_magic()
1081 .fc_prefsrc = ifa->ifa_local, in fib_magic()
1082 .fc_oif = ifa->ifa_dev->dev->ifindex, in fib_magic()
[all …]
/openbmc/linux/net/netfilter/
H A Dnf_nat_redirect.c66 const struct in_ifaddr *ifa; in nf_nat_redirect_ipv4() local
68 ifa = rcu_dereference(indev->ifa_list); in nf_nat_redirect_ipv4()
69 if (ifa) in nf_nat_redirect_ipv4()
70 newdst.ip = ifa->ifa_local; in nf_nat_redirect_ipv4()
83 static bool nf_nat_redirect_ipv6_usable(const struct inet6_ifaddr *ifa, unsigned int scope) in nf_nat_redirect_ipv6_usable() argument
85 unsigned int ifa_addr_type = ipv6_addr_type(&ifa->addr); in nf_nat_redirect_ipv6_usable()
90 if ((ifa->flags & IFA_F_TENTATIVE) && (!(ifa->flags & IFA_F_OPTIMISTIC))) in nf_nat_redirect_ipv6_usable()
118 const struct inet6_ifaddr *ifa; in nf_nat_redirect_ipv6() local
121 list_for_each_entry(ifa, &idev->addr_list, if_list) { in nf_nat_redirect_ipv6()
122 if (!nf_nat_redirect_ipv6_usable(ifa, scope)) in nf_nat_redirect_ipv6()
[all …]
H A Dnf_conntrack_broadcast.c41 const struct in_ifaddr *ifa; in nf_conntrack_broadcast_help() local
43 in_dev_for_each_ifa_rcu(ifa, in_dev) { in nf_conntrack_broadcast_help()
44 if (ifa->ifa_flags & IFA_F_SECONDARY) in nf_conntrack_broadcast_help()
47 if (ifa->ifa_broadcast == iph->daddr) { in nf_conntrack_broadcast_help()
48 mask = ifa->ifa_mask; in nf_conntrack_broadcast_help()
H A Dnf_nat_masquerade.c186 const struct in_ifaddr *ifa = ptr; in masq_inet_event() local
199 idev = ifa->ifa_dev; in masq_inet_event()
205 addr.ip = ifa->ifa_address; in masq_inet_event()
282 struct inet6_ifaddr *ifa = ptr; in masq_inet6_event() local
289 dev = ifa->idev->dev; in masq_inet6_event()
293 addr.in6 = ifa->addr; in masq_inet6_event()
/openbmc/linux/arch/ia64/kernel/
H A Dunaligned.c673 emulate_load_updates (update_t type, load_store_t ld, struct pt_regs *regs, unsigned long ifa) in emulate_load_updates() argument
713 ifa += imm; in emulate_load_updates()
715 setreg(ld.r3, ifa, 0, regs); in emulate_load_updates()
717 DPRINT("ld.x=%d ld.m=%d imm=%ld r3=0x%lx\n", ld.x, ld.m, imm, ifa); in emulate_load_updates()
741 ifa += r2; in emulate_load_updates()
746 setreg(ld.r3, ifa, nat_r2, regs); in emulate_load_updates()
748 DPRINT("imm=%d r2=%ld r3=0x%lx nat_r2=%d\n",ld.imm, r2, ifa, nat_r2); in emulate_load_updates()
752 static int emulate_store(unsigned long ifa, void *val, int len, bool kernel_mode) in emulate_store() argument
755 return copy_to_kernel_nofault((void *)ifa, val, len); in emulate_store()
757 return copy_to_user((void __user *)ifa, val, len); in emulate_store()
[all …]
H A Dtraps.c416 ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa, in ia64_fault() argument
477 addr = (void __user *) ifa; in ia64_fault()
535 ifa = regs.cr_iip; in ia64_fault()
538 case 35: si_code = TRAP_BRANCH; ifa = 0; break; in ia64_fault()
539 case 36: si_code = TRAP_TRACE; ifa = 0; break; in ia64_fault()
544 force_sig_fault(SIGTRAP, si_code, (void __user *) ifa, in ia64_fault()
591 iip, ifa, isr); in ia64_fault()
598 iip, ifa, isr, iim); in ia64_fault()
/openbmc/phosphor-networkd/test/
H A Dtest_rtnetlink.cpp72 alignas(NLMSG_ALIGNTO) ifaddrmsg ifa = {}; in TEST()
82 alignas(NLMSG_ALIGNTO) ifaddrmsg ifa; in TEST()
86 msg.ifa.ifa_family = AF_INET; in TEST()
87 msg.ifa.ifa_prefixlen = 28; in TEST()
88 msg.ifa.ifa_flags = 4; in TEST()
89 msg.ifa.ifa_scope = 3; in TEST()
90 msg.ifa.ifa_index = 10; in TEST()
95 EXPECT_EQ(msg.ifa.ifa_flags, ret.flags); in TEST()
96 EXPECT_EQ(msg.ifa.ifa_scope, ret.scope); in TEST()
97 EXPECT_EQ(msg.ifa.ifa_index, ret.ifidx); in TEST()
[all …]
/openbmc/linux/net/ipv6/
H A Daddrconf.c174 static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
175 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
815 struct inet6_ifaddr *ifa; in dev_forward_change() local
836 list_for_each_entry(ifa, &idev->addr_list, if_list) { in dev_forward_change()
837 if (ifa->flags&IFA_F_TENTATIVE) in dev_forward_change()
839 list_add_tail(&ifa->if_list_aux, &tmp_addr_list); in dev_forward_change()
844 ifa = list_first_entry(&tmp_addr_list, in dev_forward_change()
846 list_del(&ifa->if_list_aux); in dev_forward_change()
848 addrconf_join_anycast(ifa); in dev_forward_change()
850 addrconf_leave_anycast(ifa); in dev_forward_change()
[all …]
/openbmc/linux/include/linux/
H A Dinetdevice.h203 static inline bool inet_ifa_match(__be32 addr, const struct in_ifaddr *ifa) in inet_ifa_match() argument
205 return !((addr^ifa->ifa_address)&ifa->ifa_mask); in inet_ifa_match()
223 #define in_dev_for_each_ifa_rtnl(ifa, in_dev) \ argument
224 for (ifa = rtnl_dereference((in_dev)->ifa_list); ifa; \
225 ifa = rtnl_dereference(ifa->ifa_next))
227 #define in_dev_for_each_ifa_rcu(ifa, in_dev) \ argument
228 for (ifa = rcu_dereference((in_dev)->ifa_list); ifa; \
229 ifa = rcu_dereference(ifa->ifa_next))
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-extended/rarpd/rarpd/
H A D0003-rarpd.c-bug-fix.patch84 - struct ifaddr *ifa;
86 + struct rarpifaddr *ifa;
108 if (ifa == NULL) {
111 - ifa = (struct ifaddr*)malloc(sizeof(*ifa));
112 + ifa = (struct rarpifaddr*)malloc(sizeof(*ifa));
113 memset(ifa, 0, sizeof(*ifa));
114 ifa->local = addr;
115 ifa->prefix = prefix;
144 - struct ifaddr *ifa;
146 + struct rarpifaddr *ifa;
[all …]
/openbmc/ipmitool/src/plugins/
H A Dipmi_intf.c412 struct ifaddrs *ifa = NULL; in ipmi_intf_socket_connect() local
420 for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { in ipmi_intf_socket_connect()
421 if (ifa->ifa_addr == NULL) { in ipmi_intf_socket_connect()
425 if (ifa->ifa_addr->sa_family == AF_INET6) { in ipmi_intf_socket_connect()
426 struct sockaddr_in6 *tmp6 = (struct sockaddr_in6 *)ifa->ifa_addr; in ipmi_intf_socket_connect()
438 ifa->ifa_name != NULL ? ifa->ifa_name : "???", in ipmi_intf_socket_connect()
463 …lprintf(LOG_DEBUG, "Successful connected on %s interface with scope id %d", ifa->ifa_name, tmp6->s… in ipmi_intf_socket_connect()
/openbmc/qemu/qga/
H A Dcommands-posix.c970 bool guest_get_hw_addr(struct ifaddrs *ifa, unsigned char *buf, in guest_get_hw_addr() argument
986 pstrcpy(ifr.ifr_name, IF_NAMESIZE, ifa->ifa_name); in guest_get_hw_addr()
995 ifa->ifa_name, strerror(errno)); in guest_get_hw_addr()
998 ifa->ifa_name, strerror(errno)); in guest_get_hw_addr()
1019 struct ifaddrs *ifap, *ifa; in qmp_guest_network_get_interfaces() local
1026 for (ifa = ifap; ifa; ifa = ifa->ifa_next) { in qmp_guest_network_get_interfaces()
1037 g_debug("Processing %s interface", ifa->ifa_name); in qmp_guest_network_get_interfaces()
1039 info = guest_find_interface(head, ifa->ifa_name); in qmp_guest_network_get_interfaces()
1043 info->name = g_strdup(ifa->ifa_name); in qmp_guest_network_get_interfaces()
1049 if (!guest_get_hw_addr(ifa, mac_addr, &obtained, errp)) { in qmp_guest_network_get_interfaces()
[all …]
H A Dcommands-bsd.c161 bool guest_get_hw_addr(struct ifaddrs *ifa, unsigned char *buf, in guest_get_hw_addr() argument
168 if (ifa->ifa_addr->sa_family != AF_LINK) { in guest_get_hw_addr()
170 g_debug("failed to get MAC address of %s", ifa->ifa_name); in guest_get_hw_addr()
174 sdp = (struct sockaddr_dl *)ifa->ifa_addr; in guest_get_hw_addr()
/openbmc/phosphor-networkd/src/
H A Drtnetlink.cpp136 const auto& ifa = extractRtData<ifaddrmsg>(msg); in addrFromRtm() local
138 uint32_t flags = ifa.ifa_flags; in addrFromRtm()
145 addr.emplace(addrFromBuf(ifa.ifa_family, data)); in addrFromRtm()
156 return AddressInfo{.ifidx = ifa.ifa_index, in addrFromRtm()
157 .ifaddr = stdplus::SubnetAny{*addr, ifa.ifa_prefixlen}, in addrFromRtm()
158 .scope = ifa.ifa_scope, in addrFromRtm()
/openbmc/linux/net/ipv4/netfilter/
H A Dnf_tproxy_ipv4.c52 const struct in_ifaddr *ifa; in nf_tproxy_laddr4() local
64 in_dev_for_each_ifa_rcu(ifa, indev) { in nf_tproxy_laddr4()
65 if (ifa->ifa_flags & IFA_F_SECONDARY) in nf_tproxy_laddr4()
68 laddr = ifa->ifa_local; in nf_tproxy_laddr4()
/openbmc/linux/arch/ia64/mm/
H A Dtlb.c432 tr_end = p->ifa + (1<<tr_log_size) - 1; in is_tr_overlap()
434 if (va > tr_end || p->ifa > va_end) in is_tr_overlap()
528 p->ifa = va; in ia64_itr_entry()
537 p->ifa = va; in ia64_itr_entry()
568 if ((p->pte&0x1) && is_tr_overlap(p, p->ifa, p->itir>>2)) { in ia64_ptr_entry()
570 ia64_ptr(0x1, p->ifa, p->itir>>2); in ia64_ptr_entry()
577 if ((p->pte & 0x1) && is_tr_overlap(p, p->ifa, p->itir>>2)) { in ia64_ptr_entry()
579 ia64_ptr(0x2, p->ifa, p->itir>>2); in ia64_ptr_entry()
/openbmc/linux/net/ipv6/netfilter/
H A Dnf_tproxy_ipv6.c14 struct inet6_ifaddr *ifa; in nf_tproxy_laddr6() local
24 list_for_each_entry(ifa, &indev->addr_list, if_list) { in nf_tproxy_laddr6()
25 if (ifa->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED)) in nf_tproxy_laddr6()
28 laddr = &ifa->addr; in nf_tproxy_laddr6()
/openbmc/slpd-lite/
H A Dslp_message_handler.cpp296 for (ifaddrs* ifa = ifaddrPtr.get(); ifa != nullptr; ifa = ifa->ifa_next) in getIntfAddrs() local
299 if (ifa->ifa_addr == nullptr) in getIntfAddrs()
305 if (ifa->ifa_addr->sa_family == AF_INET) in getIntfAddrs()
308 if ((ifa->ifa_flags & IFF_LOOPBACK) || in getIntfAddrs()
309 !(ifa->ifa_flags & IFF_RUNNING)) in getIntfAddrs()
317 &(((struct sockaddr_in*)(ifa->ifa_addr))->sin_addr), tmp, in getIntfAddrs()
/openbmc/linux/net/smc/
H A Dsmc_clc.c517 const struct in_ifaddr *ifa; in smc_clc_prfx_set4_rcu() local
522 in_dev_for_each_ifa_rcu(ifa, in_dev) { in smc_clc_prfx_set4_rcu()
523 if (!inet_ifa_match(ipv4, ifa)) in smc_clc_prfx_set4_rcu()
525 prop->prefix_len = inet_mask_len(ifa->ifa_mask); in smc_clc_prfx_set4_rcu()
526 prop->outgoing_subnet = ifa->ifa_address & ifa->ifa_mask; in smc_clc_prfx_set4_rcu()
540 struct inet6_ifaddr *ifa; in smc_clc_prfx_set6_rcu() local
546 list_for_each_entry(ifa, &in6_dev->addr_list, if_list) { in smc_clc_prfx_set6_rcu()
547 if (ipv6_addr_type(&ifa->addr) & IPV6_ADDR_LINKLOCAL) in smc_clc_prfx_set6_rcu()
550 &ifa->addr, ifa->prefix_len); in smc_clc_prfx_set6_rcu()
551 ipv6_prfx[cnt].prefix_len = ifa->prefix_len; in smc_clc_prfx_set6_rcu()
[all …]
/openbmc/linux/fs/lockd/
H A Dsvc.c269 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; in lockd_inetaddr_event() local
277 &ifa->ifa_local); in lockd_inetaddr_event()
279 sin.sin_addr.s_addr = ifa->ifa_local; in lockd_inetaddr_event()
295 struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; in lockd_inet6addr_event() local
302 dprintk("lockd_inet6addr_event: removed %pI6\n", &ifa->addr); in lockd_inet6addr_event()
304 sin6.sin6_addr = ifa->addr; in lockd_inet6addr_event()
306 sin6.sin6_scope_id = ifa->idev->dev->ifindex; in lockd_inet6addr_event()
/openbmc/linux/drivers/infiniband/hw/usnic/
H A Dusnic_ib_main.c248 struct in_ifaddr *ifa = ptr; in usnic_ib_handle_inet_event() local
265 usnic_fwd_add_ipaddr(us_ibdev->ufdev, ifa->ifa_address); in usnic_ib_handle_inet_event()
288 struct in_ifaddr *ifa = ptr; in usnic_ib_inetaddr_event() local
289 struct net_device *netdev = ifa->ifa_dev->dev; in usnic_ib_inetaddr_event()
421 const struct in_ifaddr *ifa; in usnic_ib_device_add() local
423 ifa = rcu_dereference(ind->ifa_list); in usnic_ib_device_add()
424 if (ifa) in usnic_ib_device_add()
425 usnic_fwd_add_ipaddr(us_ibdev->ufdev, ifa->ifa_address); in usnic_ib_device_add()
/openbmc/linux/drivers/net/wan/
H A Dhdlc_cisco.c185 const struct in_ifaddr *ifa; in cisco_rx() local
187 in_dev_for_each_ifa_rcu(ifa, in_dev) { in cisco_rx()
189 ifa->ifa_label) == 0) { in cisco_rx()
190 addr = ifa->ifa_local; in cisco_rx()
191 mask = ifa->ifa_mask; in cisco_rx()
/openbmc/qemu/linux-user/
H A Dfd-trans.c1237 struct ifaddrmsg *ifa; in host_to_target_data_route() local
1258 if (nlh->nlmsg_len >= NLMSG_LENGTH(sizeof(*ifa))) { in host_to_target_data_route()
1259 ifa = NLMSG_DATA(nlh); in host_to_target_data_route()
1260 ifa->ifa_index = tswap32(ifa->ifa_index); in host_to_target_data_route()
1261 host_to_target_addr_rtattr(IFA_RTA(ifa), in host_to_target_data_route()
1262 nlmsg_len - NLMSG_LENGTH(sizeof(*ifa))); in host_to_target_data_route()
1460 struct ifaddrmsg *ifa; in target_to_host_data_route() local
1481 if (nlh->nlmsg_len >= NLMSG_LENGTH(sizeof(*ifa))) { in target_to_host_data_route()
1482 ifa = NLMSG_DATA(nlh); in target_to_host_data_route()
1483 ifa->ifa_index = tswap32(ifa->ifa_index); in target_to_host_data_route()
[all …]
/openbmc/linux/fs/nfsd/
H A Dnfssvc.c478 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; in nfsd_inetaddr_event() local
479 struct net_device *dev = ifa->ifa_dev->dev; in nfsd_inetaddr_event()
489 dprintk("nfsd_inetaddr_event: removed %pI4\n", &ifa->ifa_local); in nfsd_inetaddr_event()
491 sin.sin_addr.s_addr = ifa->ifa_local; in nfsd_inetaddr_event()
508 struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; in nfsd_inet6addr_event() local
509 struct net_device *dev = ifa->idev->dev; in nfsd_inet6addr_event()
519 dprintk("nfsd_inet6addr_event: removed %pI6\n", &ifa->addr); in nfsd_inet6addr_event()
521 sin6.sin6_addr = ifa->addr; in nfsd_inet6addr_event()
523 sin6.sin6_scope_id = ifa->idev->dev->ifindex; in nfsd_inet6addr_event()

123