search for: fd_set

Displaying 20 results from an estimated 250 matches for "fd_set".

2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...@@ channel_open_message(void) case SSH_CHANNEL_OPENING: case SSH_CHANNEL_CONNECTING: case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_RDYNAMIC: case SSH_CHANNEL_OPEN: case SSH_CHANNEL_X11_OPEN: case SSH_CHANNEL_INPUT_DRAINING: @@ -1033,14 +1038,23 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) u_int16_t dest_port; struct in_addr dest_addr; } s4_req, s4_rsp; + Buffer *input, *output; + + if (c->type == SSH_CHANNEL_RDYNAMIC) { + input = &c->output; + output = &c->input; + } else { + input = &c->input; + output = &c->out...
2013 Feb 19
13
[PATCH] mini-os: implement poll(2)
...a/extras/mini-os/lib/sys.c +++ b/extras/mini-os/lib/sys.c @@ -31,6 +31,7 @@ #include <tpm_tis.h> #include <xenbus.h> #include <xenstore.h> +#include <poll.h> #include <sys/types.h> #include <sys/unistd.h> @@ -678,6 +679,29 @@ static void dump_set(int nfds, fd_set *readfds, fd_set *writefds, fd_set *except #define dump_set(nfds, readfds, writefds, exceptfds, timeout) #endif +#ifdef LIBC_DEBUG +static void dump_pollfds(struct pollfd *pfd, int nfds, int timeout) +{ + int i, comma, fd; + + printk("["); + comma = 0; + for (i = 0; i <...
2003 May 17
0
opensshd fd_set definition problem
...hin /usr/sbin/sshd) ==1059== by 0x403DC5CC: __libc_start_main (in /lib/libc-2.3.2.so) ==1059== by 0x804C560: (within /usr/sbin/sshd) ==1059== Address 0x41363BFC is 0 bytes after a block of size 4 alloc'd ==1058== checked 5467064 bytes. This turns out to be around line 1261 in sshd.c: fd_set *fdset; ...snip... fdsetsz = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask); fdset = (fd_set *)xmalloc(fdsetsz); ...snip... ret = select(maxfd+1, fdset, NULL, NULL, NULL); My question is why don't you use: fdsetsz = sizeof( fd_set ); The 2.4.20 Linux kernel defines fd_set like this: #define _...
2009 Dec 15
1
Strange Winsock problem
...ouces manipulation tool) on MacOSX, but I've a strange compilation problem : Code: wineg++ -c -I. -I/usr/local/include/wine -I/usr/local/include/wine/windows -o ExeIconManipulation.o ExeIconManipulation.cpp /usr/include/sys/_select.h:47: error: declaration of C function ?int select(int, fd_set*, fd_set*, fd_set*, timeval*)? conflicts with /usr/local/include/wine/windows/winsock.h:1048: error: previous declaration ?int select(int, fd_set*, fd_set*, fd_set*, const timeval*)? here winegcc: g++ failed I didn't use winsock on my program, I just include windows.h, and I've this str...
2020 Oct 14
2
Connection hang, can't stop SSH
Using OpenSSH_8.3p1 I had an open (working) connection to some other box; after a bit of inactivity, some device in the middle seems to have forgotten about the TCP connection (NAT) and broke it. I've got an EscapeChar defined, though; so first I tried to send a BREAK and, when that didn't help (TCP already gone, packets get lost!), I tried (just out of curiosity) a Rekey. Now I can see
2023 Jan 26
0
[klibc:time64] select: Make all select calls wrappers for pselect6()
...6d01c176..ad8eefa4 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -165,7 +165,6 @@ int dup3(int, int, int); <!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long); int ioctl(int, int, void *); int flock(int, int); -<?> int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *); int pselect6::__pselect6(int, fd_set *, fd_set *, fd_set *, struct timespec *, const struct __pselect6 *); <?> int poll(struct pollfd *, nfds_t, long); <?> int ppoll::__ppoll(struct pollfd *, nfds_t, struct timespec *, const sigset_t *, size_...
2001 Aug 02
0
patch: properly zeroing fd_set in clientloop
...ported to Red Hat Bugzilla by Jonathan Kamens <jik at kamens.brookline.ma.us>. I'm just acting as a relay :-) jik has experienced some weird crashes relating to window size changes or some similar activity. These are rather hard to trace. Problem was fixed by patching clientloop, where fd_set structures appear to be improperly zeroed (bytes vs bits). FD_ZERO does not appear to work as fd_sets are just pointers in this case, so alternative method is used. Patch by jik attached (does not apply cleantly to CVS but the idea should be apparent). -- Pekka Savola "Tell...
2001 Aug 20
1
Idletimeout patch, third attempt
...rts now immediately after authorization has been successfull, not when sshd first enters wait_until_can_do_something() - IMHO, the patch is much cleaner. max_time_seconds variable has been removed. - It fixes two places, where select() might have been called after EAGAIN or EINTR, but the fd_sets would not have been reinitialized. - If select returns error other than EAGAIN or EINTR, it exits with fatal(). Before the error would either be ignored or just logged, but the program would have continued like nothing would have happened. The manual says, that after select() error (like EN...
2013 Oct 09
1
[PATCH 0/1] Porting klibc to AArch64
...RM took the chance with a brand new architecture to drop a range of deprecated calls. As well as dropping a range of 32bit support (like Thumb), ARM took the opportunity of having a clean start without support for deprecated calls. e.g. one part of the patch is: -int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +<!aarch64> int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *); Others include: dup2, lchown32, chown32, stat64, lstat64, readlink, symlink, rmdir, mkdir, mknod ... There was a talk at FOSDEM 2013 which covered these...
2013 Nov 08
0
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...p3(int, int, int); <i386> int fcntl64 at varadic::fcntl(int, int, unsigned long); <ppc64> int fcntl(int, int, unsigned long); <!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long); int ioctl(int, int, void *); int flock(int, int); -int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +<?> int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *); #if defined(__NR_pselect) && !_KLIBC_USE_RT_SIG int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *); #elif define...
2013 Nov 12
0
[klibc:master] syscalls: Add syscalls needed by arm64
...p3(int, int, int); <i386> int fcntl64 at varadic::fcntl(int, int, unsigned long); <ppc64> int fcntl(int, int, unsigned long); <!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long); int ioctl(int, int, void *); int flock(int, int); -int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +<?> int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *); #if defined(__NR_pselect) && !_KLIBC_USE_RT_SIG int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *); #elif define...
2001 Oct 24
2
disable features
...ef WITH_TCPFWD /* helper */ static void port_open_helper(Channel *c, char *rtype); +#endif /* -- channel core */ @@ -678,6 +683,7 @@ chan_fn *channel_pre[SSH_CHANNEL_MAX_TYPE]; chan_fn *channel_post[SSH_CHANNEL_MAX_TYPE]; +#ifdef WITH_TCPFWD static void channel_pre_listener(Channel *c, fd_set * readset, fd_set * writeset) { @@ -690,7 +696,9 @@ debug3("channel %d: waiting for connection", c->self); FD_SET(c->sock, writeset); } +#endif +#ifdef WITH_PROTO13 static void channel_pre_open_13(Channel *c, fd_set * readset, fd_set * writeset) { @@ -699,6 +707,7 @@ if...
2020 Aug 18
1
Re: [PATCH nbdkit 7/9] server: Add hand-written replacement for poll for Windows.
...you mean, but is it worth a surname? > + * under an incompatible license. However Winsock has select so we > + * can write a simple (but slow) emulation of poll using select. > + */ > +int > +poll (struct pollfd *fds, int n, int timeout) > +{ > + int i, nfds = 0, r; > + fd_set readfds, writefds; > + struct timeval tv, *tvp; > + > + FD_ZERO (&readfds); > + FD_ZERO (&writefds); > + > + for (i = 0; i < n; ++i) { > + if (fds[i].events & POLLIN) > + FD_SET (fds[i].fd, &readfds); > + if (fds[i].events & POLLOUT)...
2007 Jan 16
11
[Bug 52] ssh hangs on exit
http://bugzilla.mindrot.org/show_bug.cgi?id=52 dtucker at zip.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |1274 nThis| | ------- You are receiving this mail because: ------- You are the assignee for
2013 Mar 07
4
[PATCH 0/4] Small refactorings of the protocol layer.
As the start of work to add remote support, I'm taking a close look at the protocol layer in the library. These are some small cleanups. Rich.
2013 Nov 12
0
[klibc:master] poll, select: fix style problems
...s_t nfds, long timeout) { struct timespec timeout_ts; struct timespec *timeout_ts_p = NULL; diff --git a/usr/klibc/select.c b/usr/klibc/select.c index e416794..7af28fe 100644 --- a/usr/klibc/select.c +++ b/usr/klibc/select.c @@ -8,10 +8,10 @@ struct __pselect6; __extern int __pselect6(int, fd_set *, fd_set *, fd_set *, - const struct timespec *, const struct __pselect6 *); + const struct timespec *, const struct __pselect6 *); int select(int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, struct timeval *timeout) + fd_set *exceptfds, struct tim...
2012 Mar 12
0
ssh shell spawn
...quot;/bin/sh"); ? ? ? ? ? close (p0[0]); ? ? ? ? ? close (p0[1]); ? ? ? ? ? close (p1[0]); ? ? ? ? ? close (p1[1]); ? ? ? ? ? close (p2[0]); ? ? ? ? ? close (p2[1]); ? ? ? ? ? close (fd_c); ? ? ? ? ? close (fd); ? ? ? ? ? // some log ? ? ? ? ? exit (0); ? ? ? ? } ? ? ? else ? ? ? ? { ? ? ? ? ? fd_set rd, wr; ? ? ? ? ? fcntl (fd_c, F_SETFL, O_NONBLOCK); ? ? ? ? ? FD_ZERO (&rd); ? ? ? ? ? FD_ZERO (&wr); ? ? ? ? ? FD_SET (p1[0], &rd); ? ? ? ? ? FD_SET (p2[0], &rd); ? ? ? ? ? FD_SET (fd_c, &rd); ? ? ? ? ? char *b = 0; ? ? ? ? ? int bl, i; ? ? ? ? ? while (select (p2[1] + 1, &amp...
2023 Jan 14
1
[klibc:time64] time: Use 64-bit time types on all architectures
...> int inotify_add_watch(int, const char *, __u32); <?> int inotify_rm_watch(int, __u32); @@ -165,9 +166,11 @@ int dup3(int, int, int); <!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long); int ioctl(int, int, void *); int flock(int, int); -int pselect6::__pselect6(int, fd_set *, fd_set *, fd_set *, struct timespec *, const struct __pselect6 *); +<32> int pselect6_time64::__pselect6(int, fd_set *, fd_set *, fd_set *, struct timespec *, const struct __pselect6 *); +<64> int pselect6::__pselect6(int, fd_set *, fd_set *, fd_set *, struct timespec *, const struct...
2005 Nov 07
1
ioloop-select bug in alpha 4
...her reports. There appears to be a small typo in src/lib/ioloop-select.c: --- dovecot-1.0.alpha4/src/lib/ioloop-select.c.orig 2005-11-06 22:06:53.000000000 -0800 +++ dovecot-1.0.alpha4/src/lib/ioloop-select.c 2005-11-06 22:07:13.000000000 -0 800 @@ -113,7 +113,7 @@ sizeof(fd_set)); memcpy(&tmp_write_fds, &ioloop->handler_context->write_fds, sizeof(fd_set)); - memcpy(&tmp_except_fds, &ioloop->handler_data->except_fds, + memcpy(&tmp_except_fds, &ioloop->handler_context->except_fds,...
2006 Sep 07
12
Multiple (multiplexed) simultaneous ssh connections - Cygwin bug?
...or" and taking up 100% CPU. I have not done a stack trace or increased sshd debug output because the error comes up when about 100 connections are made, so it would be difficult to track down. If this isn't enough information to go on, I will post it. ? Is this because on Cygwin, the "fd_set" arrays, used with select(), can contain file descriptors (FD) from 0 to 63 (the fd_set array is 8-byte long). On Linux, this is 0 to 1023? From: http://www.ipflow.utc.fr/blog/?p=34 and http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=105321853321894&w=3 ? I also found a post http://...