Lines Matching refs:sap
55 const struct sockaddr *sap; /* address to search for */ member
74 static unsigned int __nlm_hash_addr4(const struct sockaddr *sap) in __nlm_hash_addr4() argument
76 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in __nlm_hash_addr4()
80 static unsigned int __nlm_hash_addr6(const struct sockaddr *sap) in __nlm_hash_addr6() argument
82 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in __nlm_hash_addr6()
90 static unsigned int nlm_hash_address(const struct sockaddr *sap) in nlm_hash_address() argument
94 switch (sap->sa_family) { in nlm_hash_address()
96 hash = __nlm_hash_addr4(sap); in nlm_hash_address()
99 hash = __nlm_hash_addr6(sap); in nlm_hash_address()
120 nsm = nsm_get_handle(ni->net, ni->sap, ni->salen, in nlm_alloc_host()
136 memcpy(nlm_addr(host), ni->sap, ni->salen); in nlm_alloc_host()
211 struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, in nlmclnt_lookup_host() argument
221 .sap = sap, in nlmclnt_lookup_host()
241 chain = &nlm_client_hosts[nlm_hash_address(sap)]; in nlmclnt_lookup_host()
245 if (!rpc_cmp_addr(nlm_addr(host), sap)) in nlmclnt_lookup_host()
334 .sap = svc_addr(rqstp), in nlmsvc_lookup_host()
353 chain = &nlm_server_hosts[nlm_hash_address(ni.sap)]; in nlmsvc_lookup_host()
357 if (!rpc_cmp_addr(nlm_addr(host), ni.sap)) in nlmsvc_lookup_host()