----- Original Message ----- From: "Robert Story" <[EMAIL PROTECTED]> To: "RH" <[EMAIL PROTECTED]> Cc: <net-snmp-coders@lists.sourceforge.net> Sent: Tuesday, September 13, 2005 3:24 PM Subject: Re: Setting TOS option (newbie)
> On Tue, 13 Sep 2005 12:45:42 -0400 RH wrote: > R> I need to set the apply getsockopt() and setsockopt() against the socket(s) > R> used to send SNMP PDUs to an agent. It's a must-have capability to transmit > R> packets with a defined TOS option configuration. > > There is a function that sets the default sockopts for udp sockets: > _netsnmp_udp_sockopt_set(), but that would set it for all created sockets. I've got 5.1.3.1 sources and I can't yet find this function or doc for it. (Blast being a newbie.) RTFM'ing and STFW'ing, too. Where do I find it? > R> So far the only thing I've found that's close in the archives is to create > R> an netsnmp_transport and map it into the session using snmp_sess_add(). > R> > R> That's obviously better than my admittedly act-of-desperation hack: > R> Defeating the detail hiding / abstraction layer and use the session pointer > R> from snmp_open() to get access to the sock field of the netsnmp_transport > R> member of the session_list struct associated with that session. > > It depends on whether or not you want the users to have to know about the > special transport. If that's ok, then a new transport that simply wraps around > the existing udp transport and sets the socket option should be fine. I'm writing an app that the users will interact with as a binary only, so it's effectively irrelevant how I do it except I'd like to do it the library way. I'd really like to find out more about _netsnmp_udp_sockopt_set(), if possible. I've checked the library images, as well. Not seeing it yet. > If you want the details hidden from the user, then you're going to have to > defeat the abstraction or patch the library. > -- > NOTE: messages sent directly to me, instead of the lists, will be deleted > unless they are requests for paid consulting services. > > Robert Story; NET-SNMP Junkie > Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> > Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders> > > You are lost in a twisty maze of little standards, all different. > ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders