Lines Matching refs:fd
41 static int bindport(int fd);
42 static int send_msg_channel_open_x11(int fd, struct sockaddr_in* addr);
48 int fd; in x11req() local
61 fd = socket(PF_INET, SOCK_STREAM, 0); in x11req()
62 if (fd < 0) { in x11req()
67 chansess->x11port = bindport(fd); in x11req()
73 if (listen(fd, 20) < 0) { in x11req()
78 setnonblocking(fd); in x11req()
83 chansess->x11listener = new_listener( &fd, 1, 0, chansess, x11accept, NULL); in x11req()
94 close(fd); in x11req()
103 int fd; in x11accept() local
111 fd = accept(sock, (struct sockaddr*)&addr, &len); in x11accept()
112 if (fd < 0) { in x11accept()
121 ret = send_msg_channel_open_x11(fd, &addr); in x11accept()
123 close(fd); in x11accept()
190 static int send_msg_channel_open_x11(int fd, struct sockaddr_in* addr) { in send_msg_channel_open_x11() argument
194 if (send_msg_channel_open_init(fd, &chan_x11) == DROPBEAR_SUCCESS) { in send_msg_channel_open_x11()
209 static int bindport(int fd) { in bindport() argument
221 if (bind(fd, (struct sockaddr*)&addr, in bindport()