Re: obtaining client ip address

th exterit <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
For anyone that cares:

from Neils Baggesen:
---------------------------
If you had looked into snmptrapd_log you would have found

transport->flags &= ~NETSNMP_TRANSPORT_FLAG_
HOSTNAME;
tstr = transport->f_fmtaddr(transport, pdu->transport_data,
                           pdu->transport_data_length);

which gives you a textual representation ...
----------------------------


On Wed, Feb 16, 2011 at 12:28 PM, Abraham Varricatt <
[email protected]> wrote:

> On Wed, Feb 16, 2011 at 5:38 PM, th exterit <[email protected]> wrote:
>
>> Thanks but that hasn't worked, damn.
>>
>> When a trap is recieved, I cast the corresponding pdu->transport_data to a
>> sockaddr_in like you said and the address I get is "2.0.11.184" and it never
>> changes.  I find it remarkable that this is proving to be so difficult.
>> *Should I post on the coders mailing list?*  Will someone be able to tell
>> me straight away where I should look?
>
>
> <Personal Message>
>
> Give it a shot (coders list) - I doubt if anyone will complain.
>
> -Abraham V.
>

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.