Lines Matching refs:sunaddr
200 static int unix_mkname(struct sockaddr_un *sunaddr, int len, unsigned *hashp)
202 if (len <= sizeof(short) || len > sizeof(*sunaddr))
204 if (!sunaddr || sunaddr->sun_family != AF_UNIX)
206 if (sunaddr->sun_path[0]) {
214 ((char *)sunaddr)[len] = 0;
215 len = strlen(sunaddr->sun_path)+1+sizeof(short);
219 *hashp = unix_hash_fold(csum_partial(sunaddr, len, 0));
797 struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr;
806 if (sunaddr->sun_family != AF_UNIX)
814 err = unix_mkname(sunaddr, addr_len, &hash);
830 memcpy(addr->name, sunaddr, addr_len);
835 if (sunaddr->sun_path[0]) {
842 err = path_lookup(sunaddr->sun_path, LOOKUP_PARENT, &nd);
876 if (!sunaddr->sun_path[0]) {
878 if (__unix_find_socket_byname(net, sunaddr, addr_len,
945 struct sockaddr_un *sunaddr = (struct sockaddr_un *)addr;
951 err = unix_mkname(sunaddr, alen, &hash);
961 other = unix_find_other(net, sunaddr, alen, sock->type, hash, &err);
1038 struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr;
1050 err = unix_mkname(sunaddr, addr_len, &hash);
1080 other = unix_find_other(net, sunaddr, addr_len, sk->sk_type, hash, &err);
1278 DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, uaddr);
1295 sunaddr->sun_family = AF_UNIX;
1296 sunaddr->sun_path[0] = 0;
1302 memcpy(sunaddr, addr->name, *uaddr_len);
1396 struct sockaddr_un *sunaddr = msg->msg_name;
1418 err = unix_mkname(sunaddr, msg->msg_namelen, &hash);
1423 sunaddr = NULL;
1458 if (sunaddr == NULL)
1461 other = unix_find_other(net, sunaddr, namelen, sk->sk_type,
1551 struct sockaddr_un *sunaddr = msg->msg_name;
1574 sunaddr = NULL;
1821 struct sockaddr_un *sunaddr = msg->msg_name;
1907 if (sunaddr) {
1909 sunaddr = NULL;