Re: problem to assign source addr port number, instead of random selection

Nagaraju Surulivel <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi Dave,
        I did some modification to fix local IP address as explicitly.
   
  I bind the agent address with port number in netsnmp_udp_transport(struct sockaddr_in *addr, int local) function.
   
  when i send the Trap to manager, manager can identify the port, which i fixed. I could able to send the ping msg periodically without error.
   
  But i have some problem, when i use get/set cmd from Manager.
   
  when the manager send a Get Request, the agent is receiving the cmd with same Sock Id ( In my case 7 which is used Trap from agent). Its receiving full buf ( Just i verified the buf length).
   
  its giving session version is V2c and Pdu cmd is 160. 

  The manager always is receiving Timeout Error. I do not know in where is the mistake. 
   
  I believe, once we fix the port number with local ip addr using bind system call, it wont change until close the socket. I found that close socket is called, when the snmpd is close.
   
  Give me some idea, how to proceed next. I'm unable to trace out, after finish the _sess_process_packet(void *sessp, netsnmp_session * sp, ....) function.
   
  Please give some idea....
   
  Thanks
   Raju


Dave Shield <[email protected]> wrote:
  On 12/03/2008, Nagaraju Surulivel wrote:
> The source port number is chosing as random. But i must set as explictily as
> 161 (In my case its important). Please give me some information.

I don't believe it is possible to set the source port.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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



       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
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.