Lines Matching refs:sap
55 const struct sockaddr *sap; /* address to search for */ member
75 static unsigned int __nlm_hash_addr4(const struct sockaddr *sap) in __nlm_hash_addr4() argument
77 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in __nlm_hash_addr4()
81 static unsigned int __nlm_hash_addr6(const struct sockaddr *sap) in __nlm_hash_addr6() argument
83 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in __nlm_hash_addr6()
91 static unsigned int nlm_hash_address(const struct sockaddr *sap) in nlm_hash_address() argument
95 switch (sap->sa_family) { in nlm_hash_address()
97 hash = __nlm_hash_addr4(sap); in nlm_hash_address()
100 hash = __nlm_hash_addr6(sap); in nlm_hash_address()
121 nsm = nsm_get_handle(ni->net, ni->sap, ni->salen, in nlm_alloc_host()
137 memcpy(nlm_addr(host), ni->sap, ni->salen); in nlm_alloc_host()
216 struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, in nlmclnt_lookup_host() argument
227 .sap = sap, in nlmclnt_lookup_host()
248 chain = &nlm_client_hosts[nlm_hash_address(sap)]; in nlmclnt_lookup_host()
252 if (!rpc_cmp_addr(nlm_addr(host), sap)) in nlmclnt_lookup_host()
340 .sap = svc_addr(rqstp), in nlmsvc_lookup_host()
359 chain = &nlm_server_hosts[nlm_hash_address(ni.sap)]; in nlmsvc_lookup_host()
363 if (!rpc_cmp_addr(nlm_addr(host), ni.sap)) in nlmsvc_lookup_host()