Re: Net-SNMP, MSG_NOSIGNAL and MSG_DONTWAIT

2011-08-05 Thread Wes Hardaker
> On Fri, 5 Aug 2011 18:52:30 +0200, Bart Van Assche > said: BVA> As far as I know you avoid reading GPLv2 licensed source code in order to BVA> avoid copyright violations ? No, I avoid it because it takes too much time :-P -- Wes Hardaker Please mail all replies to net-snmp-coders@lis

Re: Net-SNMP, MSG_NOSIGNAL and MSG_DONTWAIT

2011-08-05 Thread Bart Van Assche
On Fri, Aug 5, 2011 at 6:34 PM, Wes Hardaker wrote: > > On Fri, 5 Aug 2011 11:42:36 +0200, Bart Van Assche < > bvanass...@acm.org> said: > > BVA> I'm not sure the above is correct. My interpretation is that > MSG_DONTWAIT > BVA> returns as soon as the send buffer is full, hence using that fla

Re: Net-SNMP, MSG_NOSIGNAL and MSG_DONTWAIT

2011-08-05 Thread Garrett Cooper
On Fri, Aug 5, 2011 at 9:34 AM, Wes Hardaker wrote: >> On Fri, 5 Aug 2011 11:42:36 +0200, Bart Van Assche >> said: > > BVA> I'm not sure the above is correct. My interpretation is that MSG_DONTWAIT > BVA> returns as soon as the send buffer is full, hence using that flag in > BVA> apps/ss

Re: Net-SNMP, MSG_NOSIGNAL and MSG_DONTWAIT

2011-08-05 Thread Wes Hardaker
> On Fri, 5 Aug 2011 11:42:36 +0200, Bart Van Assche > said: BVA> I'm not sure the above is correct. My interpretation is that MSG_DONTWAIT BVA> returns as soon as the send buffer is full, hence using that flag in BVA> apps/sshtosnmp.c is dangerous. Where did you read that? In the linu

Re: Net-SNMP, MSG_NOSIGNAL and MSG_DONTWAIT

2011-08-05 Thread Bart Van Assche
On Wed, Aug 3, 2011 at 6:02 PM, Wes Hardaker wrote: > > On Sun, 31 Jul 2011 09:04:42 +0200, Bart Van Assche < > bvanass...@acm.org> said: > BVA> - The use of MSG_DONTWAIT in apps/sshtosnmp.c looks dangerous to me > BVA> since there is no guarantee that all data gets sent if this flag is > BVA

Re: Net-SNMP, MSG_NOSIGNAL and MSG_DONTWAIT

2011-08-03 Thread Wes Hardaker
> On Sun, 31 Jul 2011 09:04:42 +0200, Bart Van Assche > said: BVA> - As far as I know setting MSG_NOSIGNAL only makes sense for stream BVA> (connected) sockets and not for UDP sockets, so it should be fine to remove BVA> all uses of MSG_NOSIGNAL in snmplib/transports/snmpUDPBaseDomain.c.

Net-SNMP, MSG_NOSIGNAL and MSG_DONTWAIT

2011-07-31 Thread Bart Van Assche
Hello, Since MSG_NOSIGNAL and MSG_DONTWAIT are non-POSIX using these flags can make code non-portable. I had a quick look at how these flags are used. Can anyone comment on the following: - As far as I know setting MSG_NOSIGNAL only makes sense for stream (connected) sockets and not for UDP socket