Home
last modified time | relevance | path

Searched refs:addr (Results 1 – 25 of 354) sorted by relevance

12345678910>>...15

/net/sctp/
Dbind_addr.c63 struct sctp_sockaddr_entry *addr; in sctp_bind_addr_copy() local
70 list_for_each_entry(addr, &src->address_list, list) { in sctp_bind_addr_copy()
71 error = sctp_copy_one_addr(net, dest, &addr->a, scope, in sctp_bind_addr_copy()
82 list_for_each_entry(addr, &src->address_list, list) { in sctp_bind_addr_copy()
83 error = sctp_copy_one_addr(net, dest, &addr->a, in sctp_bind_addr_copy()
107 struct sctp_sockaddr_entry *addr; in sctp_bind_addr_dup() local
113 list_for_each_entry(addr, &src->address_list, list) { in sctp_bind_addr_dup()
114 error = sctp_add_bind_addr(dest, &addr->a, 1, gfp); in sctp_bind_addr_dup()
134 struct sctp_sockaddr_entry *addr, *temp; in sctp_bind_addr_clean() local
137 list_for_each_entry_safe(addr, temp, &bp->address_list, list) { in sctp_bind_addr_clean()
[all …]
Dipv6.c78 static void sctp_v6_to_addr(union sctp_addr *addr, struct in6_addr *saddr,
93 struct sctp_sockaddr_entry *addr = NULL; in sctp_inet6addr_event() local
100 addr = kzalloc(sizeof(*addr), GFP_ATOMIC); in sctp_inet6addr_event()
101 if (addr) { in sctp_inet6addr_event()
102 addr->a.v6.sin6_family = AF_INET6; in sctp_inet6addr_event()
103 addr->a.v6.sin6_addr = ifa->addr; in sctp_inet6addr_event()
104 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex; in sctp_inet6addr_event()
105 addr->valid = 1; in sctp_inet6addr_event()
107 list_add_tail_rcu(&addr->list, &net->sctp.local_addr_list); in sctp_inet6addr_event()
108 sctp_addr_wq_mgmt(net, addr, SCTP_ADDR_NEW); in sctp_inet6addr_event()
[all …]
Dprotocol.c141 struct sctp_sockaddr_entry *addr; in sctp_v4_copy_addrlist() local
151 addr = kzalloc(sizeof(*addr), GFP_ATOMIC); in sctp_v4_copy_addrlist()
152 if (addr) { in sctp_v4_copy_addrlist()
153 addr->a.v4.sin_family = AF_INET; in sctp_v4_copy_addrlist()
154 addr->a.v4.sin_addr.s_addr = ifa->ifa_local; in sctp_v4_copy_addrlist()
155 addr->valid = 1; in sctp_v4_copy_addrlist()
156 INIT_LIST_HEAD(&addr->list); in sctp_v4_copy_addrlist()
157 list_add_tail(&addr->list, addrlist); in sctp_v4_copy_addrlist()
186 struct sctp_sockaddr_entry *addr; in sctp_free_local_addr_list() local
190 addr = list_entry(pos, struct sctp_sockaddr_entry, list); in sctp_free_local_addr_list()
[all …]
/net/tipc/
Daddr.c44 int in_own_cluster(struct net *net, u32 addr) in in_own_cluster() argument
46 return in_own_cluster_exact(net, addr) || !addr; in in_own_cluster()
49 int in_own_cluster_exact(struct net *net, u32 addr) in in_own_cluster_exact() argument
53 return !((addr ^ tn->own_addr) >> 12); in in_own_cluster_exact()
59 int in_own_node(struct net *net, u32 addr) in in_own_node() argument
63 return (addr == tn->own_addr) || !addr; in in_own_node()
91 int tipc_addr_domain_valid(u32 addr) in tipc_addr_domain_valid() argument
93 u32 n = tipc_node(addr); in tipc_addr_domain_valid()
94 u32 c = tipc_cluster(addr); in tipc_addr_domain_valid()
95 u32 z = tipc_zone(addr); in tipc_addr_domain_valid()
[all …]
Deth_media.c41 static int tipc_eth_addr2str(struct tipc_media_addr *addr, in tipc_eth_addr2str() argument
47 sprintf(strbuf, "%pM", addr->value); in tipc_eth_addr2str()
52 static int tipc_eth_addr2msg(char *msg, struct tipc_media_addr *addr) in tipc_eth_addr2msg() argument
56 memcpy(msg + TIPC_MEDIA_ADDR_OFFSET, addr->value, ETH_ALEN); in tipc_eth_addr2msg()
62 struct tipc_media_addr *addr, in tipc_eth_raw2addr() argument
67 memset(addr, 0, sizeof(*addr)); in tipc_eth_raw2addr()
68 ether_addr_copy(addr->value, msg); in tipc_eth_raw2addr()
69 addr->media_id = TIPC_MEDIA_TYPE_ETH; in tipc_eth_raw2addr()
70 addr->broadcast = !memcmp(addr->value, bcast_mac, ETH_ALEN); in tipc_eth_raw2addr()
76 struct tipc_media_addr *addr, in tipc_eth_msg2addr() argument
[all …]
Daddr.h56 static inline u32 tipc_zone_mask(u32 addr) in tipc_zone_mask() argument
58 return addr & TIPC_ZONE_MASK; in tipc_zone_mask()
61 static inline u32 tipc_cluster_mask(u32 addr) in tipc_cluster_mask() argument
63 return addr & TIPC_CLUSTER_MASK; in tipc_cluster_mask()
67 int in_own_cluster(struct net *net, u32 addr);
68 int in_own_cluster_exact(struct net *net, u32 addr);
69 int in_own_node(struct net *net, u32 addr);
72 int tipc_addr_node_valid(u32 addr);
73 int tipc_in_scope(u32 domain, u32 addr);
75 char *tipc_addr_string_fill(char *string, u32 addr);
Dib_media.c58 static int tipc_ib_addr2msg(char *msg, struct tipc_media_addr *addr) in tipc_ib_addr2msg() argument
61 memcpy(msg, addr->value, INFINIBAND_ALEN); in tipc_ib_addr2msg()
67 struct tipc_media_addr *addr, in tipc_ib_raw2addr() argument
70 memset(addr, 0, sizeof(*addr)); in tipc_ib_raw2addr()
71 memcpy(addr->value, msg, INFINIBAND_ALEN); in tipc_ib_raw2addr()
72 addr->media_id = TIPC_MEDIA_TYPE_IB; in tipc_ib_raw2addr()
73 addr->broadcast = !memcmp(msg, b->bcast_addr.value, in tipc_ib_raw2addr()
80 struct tipc_media_addr *addr, in tipc_ib_msg2addr() argument
83 return tipc_ib_raw2addr(b, addr, msg); in tipc_ib_msg2addr()
/net/vmw_vsock/
Dvsock_addr.c22 void vsock_addr_init(struct sockaddr_vm *addr, u32 cid, u32 port) in vsock_addr_init() argument
24 memset(addr, 0, sizeof(*addr)); in vsock_addr_init()
25 addr->svm_family = AF_VSOCK; in vsock_addr_init()
26 addr->svm_cid = cid; in vsock_addr_init()
27 addr->svm_port = port; in vsock_addr_init()
31 int vsock_addr_validate(const struct sockaddr_vm *addr) in vsock_addr_validate() argument
33 if (!addr) in vsock_addr_validate()
36 if (addr->svm_family != AF_VSOCK) in vsock_addr_validate()
39 if (addr->svm_zero[0] != 0) in vsock_addr_validate()
46 bool vsock_addr_bound(const struct sockaddr_vm *addr) in vsock_addr_bound() argument
[all …]
/net/core/
Ddev_addr_lists.c24 const unsigned char *addr, int addr_len, in __hw_addr_create_ex() argument
37 memcpy(ha->addr, addr, addr_len); in __hw_addr_create_ex()
50 const unsigned char *addr, int addr_len, in __hw_addr_add_ex() argument
61 !memcmp(ha->addr, addr, addr_len)) { in __hw_addr_add_ex()
80 return __hw_addr_create_ex(list, addr, addr_len, addr_type, global, in __hw_addr_add_ex()
85 const unsigned char *addr, int addr_len, in __hw_addr_add() argument
88 return __hw_addr_add_ex(list, addr, addr_len, addr_type, false, false, in __hw_addr_add()
117 const unsigned char *addr, int addr_len, in __hw_addr_del_ex() argument
123 if (!memcmp(ha->addr, addr, addr_len) && in __hw_addr_del_ex()
131 const unsigned char *addr, int addr_len, in __hw_addr_del() argument
[all …]
/net/bridge/
Dbr_fdb.c32 const unsigned char *addr,
35 const unsigned char *addr, u16 vid);
94 static void fdb_add_hw_addr(struct net_bridge *br, const unsigned char *addr) in fdb_add_hw_addr() argument
103 err = dev_uc_add(p->dev, addr); in fdb_add_hw_addr()
113 dev_uc_del(p->dev, addr); in fdb_add_hw_addr()
122 static void fdb_del_hw_addr(struct net_bridge *br, const unsigned char *addr) in fdb_del_hw_addr() argument
130 dev_uc_del(p->dev, addr); in fdb_del_hw_addr()
144 ether_addr_copy(fdb.addr, f->addr.addr); in fdb_del_external_learn()
151 fdb_del_hw_addr(br, f->addr.addr); in fdb_delete()
166 const unsigned char *addr = f->addr.addr; in fdb_delete_local() local
[all …]
Dbr_stp_bpdu.c98 buf[7] = bpdu->root.addr[0]; in br_send_config_bpdu()
99 buf[8] = bpdu->root.addr[1]; in br_send_config_bpdu()
100 buf[9] = bpdu->root.addr[2]; in br_send_config_bpdu()
101 buf[10] = bpdu->root.addr[3]; in br_send_config_bpdu()
102 buf[11] = bpdu->root.addr[4]; in br_send_config_bpdu()
103 buf[12] = bpdu->root.addr[5]; in br_send_config_bpdu()
110 buf[19] = bpdu->bridge_id.addr[0]; in br_send_config_bpdu()
111 buf[20] = bpdu->bridge_id.addr[1]; in br_send_config_bpdu()
112 buf[21] = bpdu->bridge_id.addr[2]; in br_send_config_bpdu()
113 buf[22] = bpdu->bridge_id.addr[3]; in br_send_config_bpdu()
[all …]
Dbr_stp_if.c215 void br_stp_change_bridge_id(struct net_bridge *br, const unsigned char *addr) in br_stp_change_bridge_id() argument
225 br_fdb_change_mac_address(br, addr); in br_stp_change_bridge_id()
227 memcpy(oldaddr, br->bridge_id.addr, ETH_ALEN); in br_stp_change_bridge_id()
228 memcpy(br->bridge_id.addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
229 memcpy(br->dev->dev_addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
232 if (ether_addr_equal(p->designated_bridge.addr, oldaddr)) in br_stp_change_bridge_id()
233 memcpy(p->designated_bridge.addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
235 if (ether_addr_equal(p->designated_root.addr, oldaddr)) in br_stp_change_bridge_id()
236 memcpy(p->designated_root.addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
253 const unsigned char *addr = br_mac_zero; in br_stp_recalculate_bridge_id() local
[all …]
/net/netlabel/
Dnetlabel_addrlist.c60 struct netlbl_af4list *netlbl_af4list_search(__be32 addr, in netlbl_af4list_search() argument
66 if (iter->valid && (addr & iter->mask) == iter->addr) in netlbl_af4list_search()
84 struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr, in netlbl_af4list_search_exact() argument
91 if (iter->valid && iter->addr == addr && iter->mask == mask) in netlbl_af4list_search_exact()
110 struct netlbl_af6list *netlbl_af6list_search(const struct in6_addr *addr, in netlbl_af6list_search() argument
117 ipv6_masked_addr_cmp(&iter->addr, &iter->mask, addr) == 0) in netlbl_af6list_search()
135 struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr, in netlbl_af6list_search_exact() argument
143 ipv6_addr_equal(&iter->addr, addr) && in netlbl_af6list_search_exact()
166 iter = netlbl_af4list_search(entry->addr, head); in netlbl_af4list_add()
168 iter->addr == entry->addr && iter->mask == entry->mask) in netlbl_af4list_add()
[all …]
/net/llc/
Daf_llc.c81 static inline u8 llc_ui_addr_null(struct sockaddr_llc *addr) in llc_ui_addr_null() argument
83 return !memcmp(addr, &llc_ui_addrnull, sizeof(*addr)); in llc_ui_addr_null()
95 static inline u8 llc_ui_header_len(struct sock *sk, struct sockaddr_llc *addr) in llc_ui_header_len() argument
99 if (addr->sllc_test) in llc_ui_header_len()
101 else if (addr->sllc_xid) in llc_ui_header_len()
273 static int llc_ui_autobind(struct socket *sock, struct sockaddr_llc *addr) in llc_ui_autobind() argument
282 if (!addr->sllc_arphrd) in llc_ui_autobind()
283 addr->sllc_arphrd = ARPHRD_ETHER; in llc_ui_autobind()
284 if (addr->sllc_arphrd != ARPHRD_ETHER) in llc_ui_autobind()
289 if (llc->dev && addr->sllc_arphrd != llc->dev->type) { in llc_ui_autobind()
[all …]
/net/netfilter/
Dxt_connlimit.c49 union nf_inet_addr addr; member
55 union nf_inet_addr addr; /* search key */ member
69 static inline unsigned int connlimit_iphash(__be32 addr) in connlimit_iphash() argument
71 return jhash_1word((__force __u32)addr, in connlimit_iphash()
76 connlimit_iphash6(const union nf_inet_addr *addr, in connlimit_iphash6() argument
82 for (i = 0; i < ARRAY_SIZE(addr->ip6); ++i) in connlimit_iphash6()
83 res.ip6[i] = addr->ip6[i] & mask->ip6[i]; in connlimit_iphash6()
99 same_source_net(const union nf_inet_addr *addr, in same_source_net() argument
104 return ntohl(addr->ip & mask->ip) - in same_source_net()
110 for (i = 0; i < ARRAY_SIZE(addr->ip6); ++i) { in same_source_net()
[all …]
Dnf_nat_sip.c69 const union nf_inet_addr *addr, bool delim) in sip_sprintf_addr() argument
72 return sprintf(buffer, "%pI4", &addr->ip); in sip_sprintf_addr()
75 return sprintf(buffer, "[%pI6c]", &addr->ip6); in sip_sprintf_addr()
77 return sprintf(buffer, "%pI6c", &addr->ip6); in sip_sprintf_addr()
82 const union nf_inet_addr *addr, u16 port) in sip_sprintf_addr_port() argument
85 return sprintf(buffer, "%pI4:%u", &addr->ip, port); in sip_sprintf_addr_port()
87 return sprintf(buffer, "[%pI6c]:%u", &addr->ip6, port); in sip_sprintf_addr_port()
94 union nf_inet_addr *addr, __be16 port) in map_addr() argument
105 if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.src.u3, addr) && in map_addr()
109 } else if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.dst.u3, addr) && in map_addr()
[all …]
Dxt_recent.c72 union nf_inet_addr addr; member
115 static inline unsigned int recent_entry_hash4(const union nf_inet_addr *addr) in recent_entry_hash4() argument
117 return jhash_1word((__force u32)addr->ip, hash_rnd) & in recent_entry_hash4()
121 static inline unsigned int recent_entry_hash6(const union nf_inet_addr *addr) in recent_entry_hash6() argument
123 return jhash2((u32 *)addr->ip6, ARRAY_SIZE(addr->ip6), hash_rnd) & in recent_entry_hash6()
142 memcmp(&e->addr, addrp, sizeof(e->addr)) == 0 && in recent_entry_lookup()
183 recent_entry_init(struct recent_table *t, const union nf_inet_addr *addr, in recent_entry_init() argument
199 memcpy(&e->addr, addr, sizeof(e->addr)); in recent_entry_init()
206 list_add_tail(&e->list, &t->iphash[recent_entry_hash4(addr)]); in recent_entry_init()
208 list_add_tail(&e->list, &t->iphash[recent_entry_hash6(addr)]); in recent_entry_init()
[all …]
/net/atm/
Dpvc.c30 struct sockaddr_atmpvc *addr; in pvc_bind() local
36 addr = (struct sockaddr_atmpvc *)sockaddr; in pvc_bind()
37 if (addr->sap_family != AF_ATMPVC) in pvc_bind()
47 addr->sap_addr.vpi = vcc->vpi; in pvc_bind()
49 addr->sap_addr.vci = vcc->vci; in pvc_bind()
51 error = vcc_connect(sock, addr->sap_addr.itf, addr->sap_addr.vpi, in pvc_bind()
52 addr->sap_addr.vci); in pvc_bind()
91 struct sockaddr_atmpvc *addr; in pvc_getname() local
97 addr = (struct sockaddr_atmpvc *)sockaddr; in pvc_getname()
98 memset(addr, 0, sizeof(*addr)); in pvc_getname()
[all …]
Daddr.c13 static int check_addr(const struct sockaddr_atmsvc *addr) in check_addr() argument
17 if (addr->sas_family != AF_ATMSVC) in check_addr()
19 if (!*addr->sas_addr.pub) in check_addr()
20 return *addr->sas_addr.prv ? 0 : -EINVAL; in check_addr()
22 if (!addr->sas_addr.pub[i]) in check_addr()
67 int atm_add_addr(struct atm_dev *dev, const struct sockaddr_atmsvc *addr, in atm_add_addr() argument
75 error = check_addr(addr); in atm_add_addr()
84 if (identical(&this->addr, addr)) { in atm_add_addr()
94 this->addr = *addr; in atm_add_addr()
102 int atm_del_addr(struct atm_dev *dev, const struct sockaddr_atmsvc *addr, in atm_del_addr() argument
[all …]
/net/mac80211/
Daes_cmac.c39 const u8 *addr[], const size_t *len, u8 *mac, in aes_cmac_vector() argument
54 pos = addr[0]; in aes_cmac_vector()
62 pos = addr[e]; in aes_cmac_vector()
80 pos = addr[e]; in aes_cmac_vector()
98 const u8 *addr[3]; in ieee80211_aes_cmac() local
103 addr[0] = aad; in ieee80211_aes_cmac()
105 addr[1] = data; in ieee80211_aes_cmac()
107 addr[2] = zero; in ieee80211_aes_cmac()
110 aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN); in ieee80211_aes_cmac()
116 const u8 *addr[3]; in ieee80211_aes_cmac_256() local
[all …]
/net/ipv6/
Danycast.c47 static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr);
53 int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr) in ipv6_sock_ac_join() argument
67 if (ipv6_addr_is_multicast(addr)) in ipv6_sock_ac_join()
69 if (ipv6_chk_addr(net, addr, NULL, 0)) in ipv6_sock_ac_join()
76 pac->acl_addr = *addr; in ipv6_sock_ac_join()
81 rt = rt6_lookup(net, addr, NULL, 0, 0); in ipv6_sock_ac_join()
119 if (!ipv6_chk_prefix(addr, dev)) { in ipv6_sock_ac_join()
126 err = __ipv6_dev_ac_inc(idev, addr); 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
154 ipv6_addr_equal(&pac->acl_addr, addr)) in ipv6_sock_ac_drop()
[all …]
/net/bluetooth/
D6lowpan.c38 struct in6_addr addr; member
412 static void copy_to_bdaddr(struct in6_addr *ip6_daddr, bdaddr_t *addr) in copy_to_bdaddr() argument
416 addr->b[0] = eui64[7]; in copy_to_bdaddr()
417 addr->b[1] = eui64[6]; in copy_to_bdaddr()
418 addr->b[2] = eui64[5]; in copy_to_bdaddr()
419 addr->b[3] = eui64[2]; in copy_to_bdaddr()
420 addr->b[4] = eui64[1]; in copy_to_bdaddr()
421 addr->b[5] = eui64[0]; in copy_to_bdaddr()
425 bdaddr_t *addr, u8 *addr_type) in convert_dest_bdaddr() argument
427 copy_to_bdaddr(ip6_daddr, addr); in convert_dest_bdaddr()
[all …]
/net/batman-adv/
Dtranslation-table.h29 bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
32 const u8 *addr, unsigned short vid,
40 const u8 *addr, unsigned short vid);
42 const u8 *src, const u8 *addr,
45 bool batadv_is_my_client(struct batadv_priv *bat_priv, const u8 *addr,
51 u8 *addr, unsigned short vid);
53 u8 *addr, unsigned short vid);
57 const unsigned char *addr,
60 const u8 *addr, unsigned short vid);
/net/netfilter/ipvs/
Dip_vs_sh.c89 ip_vs_sh_hashkey(int af, const union nf_inet_addr *addr, in ip_vs_sh_hashkey() argument
92 __be32 addr_fold = addr->ip; in ip_vs_sh_hashkey()
96 addr_fold = addr->ip6[0]^addr->ip6[1]^ in ip_vs_sh_hashkey()
97 addr->ip6[2]^addr->ip6[3]; in ip_vs_sh_hashkey()
109 const union nf_inet_addr *addr, __be16 port) in ip_vs_sh_get() argument
111 unsigned int hash = ip_vs_sh_hashkey(svc->af, addr, port, 0); in ip_vs_sh_get()
126 const union nf_inet_addr *addr, __be16 port) in ip_vs_sh_get_fallback() argument
133 ihash = ip_vs_sh_hashkey(svc->af, addr, port, 0); in ip_vs_sh_get_fallback()
141 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port)); in ip_vs_sh_get_fallback()
148 hash = ip_vs_sh_hashkey(svc->af, addr, port, roffset); in ip_vs_sh_get_fallback()
[all …]
/net/rds/
Dinfo.c66 void *addr; member
106 if (iter->addr) { in rds_info_iter_unmap()
107 kunmap_atomic(iter->addr); in rds_info_iter_unmap()
108 iter->addr = NULL; in rds_info_iter_unmap()
121 if (!iter->addr) in rds_info_copy()
122 iter->addr = kmap_atomic(*iter->pages); in rds_info_copy()
127 "bytes %lu\n", *iter->pages, iter->addr, in rds_info_copy()
130 memcpy(iter->addr + iter->offset, data, this); in rds_info_copy()
137 kunmap_atomic(iter->addr); in rds_info_copy()
138 iter->addr = NULL; in rds_info_copy()
[all …]

12345678910>>...15