Lines Matching refs:sock
93 int sock, oerrno; in ssh_get_authentication_socket_path() local
101 if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) in ssh_get_authentication_socket_path()
105 if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1 || in ssh_get_authentication_socket_path()
106 connect(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) { in ssh_get_authentication_socket_path()
108 close(sock); in ssh_get_authentication_socket_path()
113 *fdp = sock; in ssh_get_authentication_socket_path()
115 close(sock); in ssh_get_authentication_socket_path()
140 ssh_request_reply(int sock, struct sshbuf *request, struct sshbuf *reply) in ssh_request_reply() argument
151 if (atomicio(vwrite, sock, buf, 4) != 4 || in ssh_request_reply()
152 atomicio(vwrite, sock, sshbuf_mutable_ptr(request), in ssh_request_reply()
159 if (atomicio(read, sock, buf, 4) != 4) in ssh_request_reply()
173 if (atomicio(read, sock, buf, l) != l) in ssh_request_reply()
184 ssh_request_reply_decode(int sock, struct sshbuf *request) in ssh_request_reply_decode() argument
192 if ((r = ssh_request_reply(sock, request, reply)) != 0 || in ssh_request_reply_decode()
209 ssh_close_authentication_socket(int sock) in ssh_close_authentication_socket() argument
212 close(sock); in ssh_close_authentication_socket()
217 ssh_lock_agent(int sock, int lock, const char *password) in ssh_lock_agent() argument
227 (r = ssh_request_reply_decode(sock, msg)) != 0) in ssh_lock_agent()
264 ssh_fetch_identitylist(int sock, struct ssh_identitylist **idlp) in ssh_fetch_identitylist() argument
281 if ((r = ssh_request_reply(sock, msg, msg)) != 0) in ssh_fetch_identitylist()
360 ssh_agent_has_key(int sock, const struct sshkey *key) in ssh_agent_has_key() argument
366 if ((r = ssh_fetch_identitylist(sock, &idlist)) != 0) { in ssh_agent_has_key()
406 ssh_agent_sign(int sock, const struct sshkey *key, in ssh_agent_sign() argument
429 if ((r = ssh_request_reply(sock, msg, msg)) != 0) in ssh_agent_sign()
589 ssh_add_identity_constrained(int sock, struct sshkey *key, in ssh_add_identity_constrained() argument
636 if ((r = ssh_request_reply_decode(sock, msg)) != 0) in ssh_add_identity_constrained()
650 ssh_remove_identity(int sock, const struct sshkey *key) in ssh_remove_identity() argument
671 if ((r = ssh_request_reply_decode(sock, msg)) != 0) in ssh_remove_identity()
687 ssh_update_card(int sock, int add, const char *reader_id, const char *pin, in ssh_update_card() argument
714 if ((r = ssh_request_reply_decode(sock, msg)) != 0) in ssh_update_card()
732 ssh_remove_all_identities(int sock, int version) in ssh_remove_all_identities() argument
744 if ((r = ssh_request_reply_decode(sock, msg)) != 0) in ssh_remove_all_identities()
755 ssh_agent_bind_hostkey(int sock, const struct sshkey *key, in ssh_agent_bind_hostkey() argument
773 if ((r = ssh_request_reply_decode(sock, msg)) != 0) in ssh_agent_bind_hostkey()