>>>>> On Fri, 22 Apr 2005 16:56:39 +0200, "Susanne Goldammer" <[EMAIL 
>>>>> PROTECTED]> said:
 
>>Susanne> What i like to do is to write a proxy.
>
> Do you realize that net-snmp"s agent already contains proxy support?
> see the "proxy" directive in the snmpd.conf manual page which should
> let you do just about everything you want I think.
> 
> -- 
> Wes Hardaker
> Sparta, Inc.
 

Hello,

the proxy of net-snmp has a possibility to forward all incoming packets to a 
specific ip or host.
I can configure this in snmpd.conf. But this is not what i am looking for.


What i want to do with my own proxy is getting packets from different agents 
and simulating a bad network,
so that some packets are dropped or falsified. The rest of the packets are 
forwarded to my manager.
The packets have to go out on the right (virtual) interface, so that they get 
the correct source-ip, which the manager associates
with the agent.

Also i like to do some impairment for packets from the manager to one of the 
agents.
Then i need to know, for which agent the packet ist for?
For that problem i wanted to create different virtual interfaces with different 
ips on my proxy. So the manager sends the packets for
an agent to a specific ip. Now i have to find out, on which virtual interface 
the packet arrives, and then i can put
in the correct peername in my session to forward the packet to the right agent.

Thanks a lot
Susanne


***********************
***********************
Original message:
***********************

Hello again :-)


i have another question about the functional range of the net-snmp library.
I found some other questions in the user-list which concern nearly the same 
problem, but i 
could not find a good solution for that.

So what is it all about:


What i like to do is to write a proxy.
This proxy communicates with one manager and different agents.

>From the view of the manager the proxy should simulate different 
agents. These agents are really existing.

>From the view of the agents the proxy should simulate one manager.
This manager is also existing.

The manager can send packets to a specific agent using a specific 
ip address of one of my virtual interfaces:

ifconfig eth0:1 192.168.1.2 netmask ...   // agent 1
ifconfig eth0:2 192.168.1.3 ...                 // agent 2
...

To forward the packets, i need to change the source and destination ip addresses
and ports.


Now 3 problems:

1.
When an agent sends a packet to the manager, "i have to know which agent sends 
the packet".
I saw that the source ip address of a pdu is in the transport_data field of the 
pdu. Can i always find the source address 
of a packet in this field?
Or is there another possibility to find out, who sent the packet?
(When i know the agent who sent the packet i can send out the packet on the 
right virtual interface.)

2.
How can i specify the interface where i want to send out the packet?

3.
When the manager sends a packet, i have to know which agent should get the 
packet.
So i need the destination ip address. 
I will know this, if i find out, which specific interface received the packet. 
But how can i do this?



Summary:

How can i get packets from one or more interface(s)?

How can i get the source address of a received pdu?.

How can i get the destination ip address of a received pdu (when i am listening 
on different interfaces)?

How can i specify the interface to send out the pdu?


Thanks a lot for any hint
Susanne


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
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

Reply via email to