>>>>> On Sun, 31 Jul 2011 09:04:42 +0200, Bart Van Assche <[email protected]> 
>>>>> 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.

I'll defer to someone that knows the networking socket code on all the
platforms :-/

BVA> - In apps/sshtosnmp.c using MSG_NOSIGNAL makes sense but is nonportable. A
BVA> possible approach here is to remove MSG_NOSIGNAL and make the OS ignore
BVA> SIGPIPE. That should help on OS/X where MSG_NOSIGNAL is not available but
BVA> where SIGPIPE can be generated by the kernel.

We could always leave it and trigger on SIGPIPE too.  I'm not convinced
everywhere will generate a SIGPIPE?  Does windows do that properly?  I'd
assume so since it's you that's posting the suggestion.

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> specified. How about removing that flag and setting the socket
BVA> option SO_SNDTIMEO instead ?  At least on Linux that option works
BVA> for Unix sockets.

The data will all get sent or the session will break at some point in
the future.  I'm not sure I agree it's dangerous.  I'm not sure
SO_SNDTIMEO is portable either (based on some quick (lame) header
searches).  We could, again, do both?
-- 
Wes Hardaker
Please mail all replies to [email protected]

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to