Home
last modified time | relevance | path

Searched refs:addr (Results 1 – 25 of 363) 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, sizeof(addr->a), in sctp_bind_addr_dup()
135 struct sctp_sockaddr_entry *addr, *temp; in sctp_bind_addr_clean() local
138 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 = kmalloc(sizeof(struct sctp_sockaddr_entry), 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_port = 0; in sctp_inet6addr_event()
104 addr->a.v6.sin6_addr = ifa->addr; in sctp_inet6addr_event()
105 addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex; in sctp_inet6addr_event()
106 addr->valid = 1; in sctp_inet6addr_event()
108 list_add_tail_rcu(&addr->list, &net->sctp.local_addr_list); 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_port = 0; in sctp_v4_copy_addrlist()
155 addr->a.v4.sin_addr.s_addr = ifa->ifa_local; in sctp_v4_copy_addrlist()
156 addr->valid = 1; in sctp_v4_copy_addrlist()
157 INIT_LIST_HEAD(&addr->list); in sctp_v4_copy_addrlist()
158 list_add_tail(&addr->list, addrlist); in sctp_v4_copy_addrlist()
187 struct sctp_sockaddr_entry *addr; in sctp_free_local_addr_list() local
[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 …]
Dudp_media.c76 struct udp_media_addr addr; member
96 static int tipc_udp_is_mcast_addr(struct udp_media_addr *addr) in tipc_udp_is_mcast_addr() argument
98 if (ntohs(addr->proto) == ETH_P_IP) in tipc_udp_is_mcast_addr()
99 return ipv4_is_multicast(addr->ipv4.s_addr); in tipc_udp_is_mcast_addr()
102 return ipv6_addr_is_multicast(&addr->ipv6); in tipc_udp_is_mcast_addr()
108 static void tipc_udp_media_addr_set(struct tipc_media_addr *addr, in tipc_udp_media_addr_set() argument
111 memset(addr, 0, sizeof(struct tipc_media_addr)); in tipc_udp_media_addr_set()
112 addr->media_id = TIPC_MEDIA_TYPE_UDP; in tipc_udp_media_addr_set()
113 memcpy(addr->value, ua, sizeof(struct udp_media_addr)); in tipc_udp_media_addr_set()
116 addr->broadcast = 1; in tipc_udp_media_addr_set()
[all …]
Daddr.h53 static inline u32 tipc_zone_mask(u32 addr) in tipc_zone_mask() argument
55 return addr & TIPC_ZONE_MASK; in tipc_zone_mask()
58 static inline u32 tipc_cluster_mask(u32 addr) in tipc_cluster_mask() argument
60 return addr & TIPC_ZONE_CLUSTER_MASK; in tipc_cluster_mask()
64 int in_own_cluster(struct net *net, u32 addr);
65 int in_own_cluster_exact(struct net *net, u32 addr);
66 int in_own_node(struct net *net, u32 addr);
69 int tipc_addr_node_valid(u32 addr);
70 int tipc_in_scope(u32 domain, u32 addr);
72 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()
Dmonitor.c76 u32 addr; member
153 static struct tipc_peer *get_peer(struct tipc_monitor *mon, u32 addr) in get_peer() argument
156 unsigned int thash = tipc_hashfn(addr); in get_peer()
159 if (peer->addr == addr) in get_peer()
220 u32 addr; in mon_apply_domain() local
230 addr = dom->members[i]; in mon_apply_domain()
231 if (addr != member->addr) in mon_apply_domain()
260 diff |= dom->members[i] != peer->addr; in mon_update_local_domain()
261 dom->members[i] = peer->addr; in mon_update_local_domain()
263 cache->members[i] = htonl(peer->addr); in mon_update_local_domain()
[all …]
/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
60 if (!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()
145 ether_addr_copy(fdb.addr, f->addr.addr); in fdb_del_external_learn()
152 fdb_del_hw_addr(br, f->addr.addr); in fdb_delete()
167 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.c233 void br_stp_change_bridge_id(struct net_bridge *br, const unsigned char *addr) in br_stp_change_bridge_id() argument
243 br_fdb_change_mac_address(br, addr); in br_stp_change_bridge_id()
245 memcpy(oldaddr, br->bridge_id.addr, ETH_ALEN); in br_stp_change_bridge_id()
246 memcpy(br->bridge_id.addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
247 memcpy(br->dev->dev_addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
250 if (ether_addr_equal(p->designated_bridge.addr, oldaddr)) in br_stp_change_bridge_id()
251 memcpy(p->designated_bridge.addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
253 if (ether_addr_equal(p->designated_root.addr, oldaddr)) in br_stp_change_bridge_id()
254 memcpy(p->designated_root.addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
271 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 || addr->sllc_xid) in llc_ui_header_len()
261 static int llc_ui_autobind(struct socket *sock, struct sockaddr_llc *addr) in llc_ui_autobind() argument
273 if (llc->dev && addr->sllc_arphrd != llc->dev->type) { in llc_ui_autobind()
278 llc->dev = dev_getfirstbyhwtype(&init_net, addr->sllc_arphrd); in llc_ui_autobind()
290 memcpy(&llc->addr, addr, sizeof(llc->addr)); in llc_ui_autobind()
315 struct sockaddr_llc *addr = (struct sockaddr_llc *)uaddr; in llc_ui_bind() local
321 dprintk("%s: binding %02X\n", __func__, addr->sllc_sap); in llc_ui_bind()
[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 …]
/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
408 static void copy_to_bdaddr(struct in6_addr *ip6_daddr, bdaddr_t *addr) in copy_to_bdaddr() argument
412 addr->b[0] = eui64[7]; in copy_to_bdaddr()
413 addr->b[1] = eui64[6]; in copy_to_bdaddr()
414 addr->b[2] = eui64[5]; in copy_to_bdaddr()
415 addr->b[3] = eui64[2]; in copy_to_bdaddr()
416 addr->b[4] = eui64[1]; in copy_to_bdaddr()
417 addr->b[5] = eui64[0]; in copy_to_bdaddr()
421 bdaddr_t *addr, u8 *addr_type) in convert_dest_bdaddr() argument
423 copy_to_bdaddr(ip6_daddr, addr); in convert_dest_bdaddr()
[all …]
Dmgmt.c2187 if (key->addr.type != BDADDR_BREDR || key->type > 0x08) in load_link_keys()
2215 hci_add_link_key(hdev, NULL, &key->addr.bdaddr, key->val, in load_link_keys()
2231 bacpy(&ev.addr.bdaddr, bdaddr); in device_unpaired()
2232 ev.addr.type = addr_type; in device_unpaired()
2250 bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr); in unpair_device()
2251 rp.addr.type = cp->addr.type; in unpair_device()
2253 if (!bdaddr_type_is_valid(cp->addr.type)) in unpair_device()
2272 if (cp->addr.type == BDADDR_BREDR) { in unpair_device()
2282 &cp->addr.bdaddr); in unpair_device()
2286 err = hci_remove_link_key(hdev, &cp->addr.bdaddr); in unpair_device()
[all …]
/net/batman-adv/
Dtranslation-table.h31 bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
34 const u8 *addr, unsigned short vid,
44 const u8 *addr, unsigned short vid);
46 const u8 *src, const u8 *addr,
49 bool batadv_is_my_client(struct batadv_priv *bat_priv, const u8 *addr,
55 u8 *addr, unsigned short vid);
57 u8 *addr, unsigned short vid);
61 const unsigned char *addr,
64 const u8 *addr, unsigned short vid);

12345678910>>...15