Lines Matching defs:socknum
1796 process_message(u_int socknum)
1804 if (socknum >= sockets_alloc)
1805 fatal_f("sock %u >= allocated %u", socknum, sockets_alloc);
1806 e = &sockets[socknum];
1814 socknum, e->fd, msg_len, AGENT_MAX_LEN);
1832 debug_f("socket %u (fd=%d) type %d", socknum, e->fd, type);
1934 handle_socket_read(u_int socknum)
1943 fd = accept(sockets[socknum].fd, (struct sockaddr *)&sunaddr, &slen);
1964 handle_conn_read(u_int socknum)
1970 if ((len = read(sockets[socknum].fd, buf, sizeof(buf))) <= 0) {
1975 socknum, sockets[socknum].fd, strerror(errno));
1979 if ((r = sshbuf_put(sockets[socknum].input, buf, len)) != 0)
1983 if ((r = process_message(socknum)) == -1)
1992 handle_conn_write(u_int socknum)
1997 if (sshbuf_len(sockets[socknum].output) == 0)
1999 if ((len = write(sockets[socknum].fd,
2000 sshbuf_ptr(sockets[socknum].output),
2001 sshbuf_len(sockets[socknum].output))) <= 0) {
2006 socknum, sockets[socknum].fd, strerror(errno));
2010 if ((r = sshbuf_consume(sockets[socknum].output, len)) != 0)
2019 u_int socknum, activefds = npfd;
2025 for (socknum = 0; socknum < sockets_alloc; socknum++) {
2026 if (sockets[socknum].type != AUTH_SOCKET &&
2027 sockets[socknum].type != AUTH_CONNECTION)
2029 if (pfd[i].fd == sockets[socknum].fd)
2032 if (socknum >= sockets_alloc) {
2037 switch (sockets[socknum].type) {
2046 if (handle_socket_read(socknum) == 0)
2051 handle_conn_read(socknum) != 0)
2054 handle_conn_write(socknum) != 0) {
2058 close_socket(&sockets[socknum]);