search for: wfds

Displaying 19 results from an estimated 19 matches for "wfds".

Did you mean: ufds
2013 Feb 19
13
[PATCH] mini-os: implement poll(2)
...oll(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds) { @@ -983,6 +1007,71 @@ out: return ret; } +/* Wrap around select */ +int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout) +{ + int ret; + int i, fd; + struct timeval _timeo, *timeo = NULL; + fd_set rfds, wfds, efds; + int max_fd = -1; + + DEBUG("poll("); + dump_pollfds(_pfd, _nfds, _timeout); + DEBUG(")\n"); + + if (_timeout != -1) { + /* Timeout in poll is in millisecond. */ + _timeo.tv_sec = _timeout / 1000; + _timeo.tv_usec = (_timeout - _timeo...
2004 Aug 06
3
libnet: sock_connected insists on a timeout
While working on integrating nonblocking IO into libshout, I noticed that sock_connected cannot be called without blocking. If I read it right, a timeout of zero will cause the call to block until the socket is connected. So, my questions: 1. Am I reading this right? 2. How should I poll a pending connection? I'd prefer to have a zero timeout act as a poll, but I don't know if any other
2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...lose(sock); return -1; } - unset_nonblock(sockfd); - return 0; + monotime_tv(initiate); + FD_SET(sock, fds); + *nfds = MAXIMUM(*nfds, sock + 1); + return 1; +} + +static int +ssh_connect_happy_eyeballs_process(int *nfds, fd_set *fds, + struct addrinfo *fd_ai[], + int ready, fd_set *wfds) +{ + socklen_t optlen; + int sock, optval = 0; + char ntop[NI_MAXHOST], strport[NI_MAXSERV]; + for (sock = *nfds - 1; ready > 0 && sock >= 0; sock--) { + if (FD_ISSET(sock, wfds)) { + ready--; + optlen = sizeof(optval); + if (getsockopt(sock, SOL_SOCKET, SO_ERROR, +...
2004 Aug 06
0
Submission: Patch to libshout/sock.c for MacOSX
...of(sin)); server.sin_family = AF_INET; server.sin_port = htons(port); /* if we have a timeout, use select, if not, use connect straight. */ /* dunno if this is portable, and it sure is complicated for such a simple thing to want to do. damn BSD sockets! */ if (timeout > 0) { fd_set wfds; struct timeval tv; int retval; int val; socklen_t valsize = sizeof(int); FD_ZERO(&wfds); FD_SET(sockfd, &wfds); tv.tv_sec = timeout; tv.tv_usec = 0; sock_set_blocking(sockfd, SOCK_NONBLOCK); retval = connect(sockfd, (struct sockaddr *)&server, sizeof(server)); i...
2007 Jul 24
1
ssh client does not timeout if the network fails after ssh_connect but before ssh_exchange_identification, even with Alive options set
Hello, I am testing ssh with occasional network disconnection between server and client during these days. I found ssh sometimes hangs if the disconnection happens after the connection is established but before ssh_exchange_identification completes. The ssh configuration files show that both client and server alive options are set. In /etc/ssh/ssh_config: # Send keepalive messages to the server.
2006 Sep 06
7
[RFC PATCH] allow connecting to xenconsole from remote hosts
...x; + + struct queue console = { + .head = NULL, + .tail = NULL, + }; + + struct queue out = { + .head = NULL, + .tail = NULL, + }; + + struct queue discard_queue = { + .head = NULL, + .tail = NULL, + }; + + struct queue *discard = (noecho ? &discard_queue : NULL); + + do { + fd_set rfds, wfds; + + FD_ZERO(&rfds); + FD_SET(infd, &rfds); + FD_SET(conspty, &rfds); + + FD_ZERO(&wfds); + FD_SET(conspty, &wfds); + FD_SET(outfd, &wfds); + + max = (conspty | infd | outfd) + 1; + + ret = select(max, &rfds, &wfds, NULL, NULL); + if (ret == -1) { if (...
2004 Aug 06
0
Icecast drop in replacement for shoutcast
...`inet_nsap_addr' /usr/include/arpa/inet.h:89: syntax error before `u_char' /usr/include/arpa/inet.h:89: warning: data definition has no type or storage class /usr/include/arpa/inet.h:90: syntax error before `*' sock.c: In function `sock_connected': sock.c:389: syntax error before `wfds' sock.c:397: `wfds' undeclared (first use in this function) sock.c:397: (Each undeclared identifier is reported only once sock.c:397: for each function it appears in.) *** Error code 1 Stop in /home/booyeah/icecast-2.0-alpha-2/src/net (line 223 of Makefile). *** Error code 1 Stop in /home...
2009 Jan 26
1
ups emerson liebert GTX2 ESP-II serial protocol demo
...nore(int status) { fprintf(stderr,"Signaled\n"); } //calculate checksum unsigned char cksum(unsigned char *buf, int len) { unsigned char sum=0; while(len-->0) sum+=*buf++; return(sum); } int timedwrite(int fd, unsigned char *buf, int len, int msec) { fd_set wfds; struct timeval tv; int retval; int writ=0; while(writ<len) { // Watch fd to see when won't block output. FD_ZERO(&wfds); FD_SET(fd, &wfds); tv.tv_sec = msec/1000; tv.tv_usec = (msec%1000)*1000; retval = select(fd+1, NULL, &wfds,...
2014 Feb 13
3
Libguestfs (1.22.6) driver/changes for mingw/win32
Hi, I attached the changes I made to a vanilla libguestfs-1.22.6 in order to make it work in mingw/win32. Added is also the patch required to make QEMU compatible (add a command to QMP that lists the supported devices (the regilat way you do it print it to stderr, which is difficult to redirect in win32)). This is done on behalf of Intel Corp. Thanks, Or (oberon in irc)
2004 Aug 06
3
Icecast drop in replacement for shoutcast
On Fri, 2003-04-18 at 20:01, Travis Pinney wrote: > I tried the icecast-2.0-alpha-2-20030416.tar.gz file. I am using OpenBSD > 3.2 and it configured ok but it had a problem linking libxslt. I have it > installed > from the ports. Not sure what it is but I am going to check it out. > > Here is the last part of the log. > > checking for xsltParseStylesheetFile... no >
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...send, NULL, s); + qemu_set_fd_handler2(s->fd, tap_read_poll, tap_send, NULL, s); snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd); return s; } @@ -7717,6 +7736,8 @@ void main_loop_wait(int timeout) slirp_select_poll(&rfds, &wfds, &xfds); } #endif + virtio_net_poll(); + qemu_aio_poll(); if (vm_running) { -- 1.5.3.3
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...send, NULL, s); + qemu_set_fd_handler2(s->fd, tap_read_poll, tap_send, NULL, s); snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd); return s; } @@ -7717,6 +7736,8 @@ void main_loop_wait(int timeout) slirp_select_poll(&rfds, &wfds, &xfds); } #endif + virtio_net_poll(); + qemu_aio_poll(); if (vm_running) { -- 1.5.3.3
2004 Aug 06
2
building icecast2 on OpenBSD
...-lpthread" to "-pthread" in the configure.in for *) did the trick. now im in the same boat as you: gmake fails in src/net - syntax errors from a few headers included in sock.c (<arpa/inet.h> and <sys/socket.h>), and a fatal error in sock.c (sock_connected) at line 397 (wfds undeclared), after a syntax error on line 389. thanks for the help, and hopefully this points someone in the right direction. jeff --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to '...
2020 Mar 25
3
[PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
Now runs a complete set of tests, notably including the AIO test. File descriptors are passed in and out as plain ints (instead of *os.File) for a couple of reasons: (1) We have to pass the plain int to syscall.Select. (2) Turning an fd into an os.File causes golang to set the blocking flag which is deeply unhelpful. Rich.
2013 Mar 13
16
frequently ballooning results in qemu exit
...dle_ioreq (req=0x7f94fa464000) at /opt/new/tools/qemu-xen-dir/xen-all.c:793 #6 0x00007f94fa748abe in cpu_handle_ioreq (opaque=0x7f94fb39d3f0) at /opt/new/tools/qemu-xen-dir/xen-all.c:868 #7 0x00007f94fa5e3262 in qemu_iohandler_poll (readfds=0x7f94faeea7a0 <rfds>, writefds=0x7f94faeea820 <wfds>, xfds=<optimized out>, ret=<optimized out>) at iohandler.c:125 #8 0x00007f94fa5ec51d in main_loop_wait (nonblocking=<optimized out>) at main-loop.c:418 #9 0x00007f94fa6616dc in main_loop () at vl.c:1770 #10 main (argc=<optimized out>, argv=<optimized out>, envp=&...
2004 Aug 06
5
building icecast2 on OpenBSD
Is there anyone who has built icecast2 successfully for OpenBSD? I built it from source with no problem on Linux, but on my OBSD system the configure bombs while checking for a function in libxslt... # ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working
2004 Aug 06
2
libshout2 compiling problems under FreeBSD?
...k.c: In function `sock_get_localip': sock.c:95: warning: implicit declaration of function `gethostname' sock.c: In function `sock_write': sock.c:316: warning: implicit declaration of function `vsnprintf' sock.c: In function `sock_connected': sock.c:390: syntax error before "wfds" sock.c:398: warning: implicit declaration of function `FD_ZERO' sock.c:398: `wfds' undeclared (first use in this function) sock.c:398: (Each undeclared identifier is reported only once sock.c:398: for each function it appears in.) sock.c:399: warning: implicit declaration of function...
2004 Aug 06
3
libshout2 compiling problems under FreeBSD?
Hi, I couldn't find anything about this subject from archive - are there known problems with compiling libshout2 under FreeBSD 5.1 or 4.8 (both are up to date). I downloaded libshout2 latest nightly snapshot and tried to compile it on 5.0 and then later on 4.8. Both failed (problems were mostly around sock.c, sock.h, resolver.c - redeclaring and syntax errors). Thinking that it might be a
2013 Jul 15
21
[PATCH 00 of 21 RESEND] blktap3/drivers: Introduce tapdisk server.
This patch series copies the core of the tapdisk process from blktap2, with updates coming from blktap2.5. Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>