logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: How to use net-snmp over IPv6: msg#00140

Subject: Re: How to use net-snmp over IPv6
  Hi, Zhenhai.

>   I read the simple application in the net-snmp tourial. 
> But it use IPv4 address.
>   I think the key is the         ss = snmp_open(&session);      
> function. But the session.peername  is IPv4 address. Can I give it a 
> IPv6 address?  What should I code?

  According to include/net-snmp/library/snmp_api.h,
  the type of sessrion.peername is (char *) to store a peername
  which is defined by "AGENT SPECIFICATION" at snmpcmd(5).

  For example, if you execute "snmpget -v1 -c publuc udp6:localhost:161"
  then, the pointer of "udp6:localhost:161" is stored in session.peername.

  Then, snmplib/snmpUDPIPv6Domain.c or snmplib/snmpTCPIPv6Domain.c  
  (if you specify "tcp6" as transport-specifier) will deal with 
  session.peername properly.

  Excuse me but I am not familier Windows XP's IPv6. So
  I don't have any positive proof that my reply is suitable for you.

Regards,
Katsuhisa ABE <abekatsu@xxxxxxxxxx>
Cyber Solutions Inc.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/


<Prev in Thread] Current Thread [Next in Thread>