Lines Matching refs:socknum

692 process_message(u_int socknum)  in process_message()  argument
700 if (socknum >= sockets_alloc) { in process_message()
702 __func__, socknum, sockets_alloc); in process_message()
704 e = &sockets[socknum]; in process_message()
712 __func__, socknum, e->fd, msg_len, AGENT_MAX_LEN); in process_message()
730 debug("%s: socket %u (fd=%d) type %d", __func__, socknum, e->fd, type); in process_message()
834 handle_socket_read(u_int socknum) in handle_socket_read() argument
843 fd = accept(sockets[socknum].fd, (struct sockaddr *)&sunaddr, &slen); in handle_socket_read()
864 handle_conn_read(u_int socknum) in handle_conn_read() argument
870 if ((len = read(sockets[socknum].fd, buf, sizeof(buf))) <= 0) { in handle_conn_read()
875 __func__, socknum, sockets[socknum].fd, in handle_conn_read()
880 if ((r = sshbuf_put(sockets[socknum].input, buf, len)) != 0) in handle_conn_read()
883 process_message(socknum); in handle_conn_read()
888 handle_conn_write(u_int socknum) in handle_conn_write() argument
893 if (sshbuf_len(sockets[socknum].output) == 0) in handle_conn_write()
895 if ((len = write(sockets[socknum].fd, in handle_conn_write()
896 sshbuf_ptr(sockets[socknum].output), in handle_conn_write()
897 sshbuf_len(sockets[socknum].output))) <= 0) { in handle_conn_write()
902 __func__, socknum, sockets[socknum].fd, in handle_conn_write()
907 if ((r = sshbuf_consume(sockets[socknum].output, len)) != 0) in handle_conn_write()
916 u_int socknum, activefds = npfd; in after_poll() local
922 for (socknum = 0; socknum < sockets_alloc; socknum++) { in after_poll()
923 if (sockets[socknum].type != AUTH_SOCKET && in after_poll()
924 sockets[socknum].type != AUTH_CONNECTION) in after_poll()
926 if (pfd[i].fd == sockets[socknum].fd) in after_poll()
929 if (socknum >= sockets_alloc) { in after_poll()
934 switch (sockets[socknum].type) { in after_poll()
943 if (handle_socket_read(socknum) == 0) in after_poll()
948 handle_conn_read(socknum) != 0) { in after_poll()
952 handle_conn_write(socknum) != 0) { in after_poll()
956 close_socket(&sockets[socknum]); in after_poll()