[prev in list] [next in list] [prev in thread] [next in thread]
List: net-snmp-users
Subject: Re: Can't retreive peername in V2 trap
From: Mihir Lala <mihirlala () yahoo ! com>
Date: 2005-08-24 15:00:20
Message-ID: 20050824150020.17042.qmail () web53709 ! mail ! yahoo ! com
[Download RAW message or body]
The peername can be retrieved from the transport
information(pdu->transport_data) that is passed to your trap handler.
Code like this would work:
struct sockaddr_in *addr = (struct sockaddr_in *)pdu->transport_data;
struct hostent *host = gethostbyaddr((char *)&(addr->sin_addr),
sizeof(struct in_addr), AF_INET);
-mrl
--- Denis Rheault <drelectrodesing@hotmail.com> wrote:
> Hi,
>
> Writing a snmptrapd and when I receive V2 trap I can't find where to
> retreive the peername. When receiving V1 I use pdy->agent_addr[]
>
> Thanks
>
> _________________________________________________________________
> Take charge with a pop-up guard built on patented Microsoft®
> SmartScreen
> Technology.
>
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
>
> Start enjoying all the benefits of MSN® Premium right now and get
> the
> first two months FREE*.
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
> & QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic