From: <bur...@pa...> - 2002-03-14 22:18:56
|
David, When the "forwarder" calls recvfrom(), it gets the sender's IP address, as you say. If the forwarder uses sendto() to forward a copy of the trap, the copy will appear to originate from the forwarder, and not from the original sender. To put it another way, when a manager recieves the copy from the forwarder, via recvfrom(), the sender's address will be that of the forwarder. The manager will not be able to determine the true origin of the trap. So it is similar to NAT - we wish to rewrite the destination address of the trap packet, but still preserve the source IP address. Since V1 traps contain a sender address within the trap data, there is a workaround, but this is not available for V2 traps. -SEan HI, Why do you say that the original sender's address is lost? Regards, /david t. perkins At 01:30 PM 3/14/2002 -0800, Vishal Verma wrote: >The original sender address is lost, not the immediate sender! It's like >NAT, in a way. > >-vish > >>-----Original Message----- >>From: net...@li... >>[mailto:net...@li...]On Behalf Of David >>T. Perkins >>Sent: Thursday, March 14, 2002 1:13 PM >>To: net...@li... >>Subject: Re: Suggestions on trap packet forwarding >> >> >>HI, >> >> >>In general, recvfrom does return the UDP address of the sender. >> >>In the uses of recvfrom in file snmpUDPDomain, the source address is >>retrieved and returned. >> >>Can you provide the details showing how the source address is "lost". >> >>At 11:58 AM 3/14/2002 -0800, bur...@pa... wrote: >>>I would appreciate any suggestions the readers of this list might >>>have for the following problem: >>> >>>We would like to be able to create duplicates of SNMP trap packets, >>>so that copies of a trap message could be sent to backup systems, >>>alarm loggers, and the like. >>> >>>The problem is that if we use the recvfrom() and sendto() calls, >>>as in snmpUDPDomain.c, we lose the IP address of the original sender >>>(for V2 traps, anyway). >>> >>>It seems likely that others have encountered this problem before, >>>but I didn't find anything relevant in the FAQ. Can anyone direct >>>me to a solution? >>> >>>-SEan >> >>Regards, >>/david t. perkins >> >> >>_______________________________________________ >>Net-snmp-coders mailing list >>Net...@li... >>https://lists.sourceforge.net/lists/listinfo/net-snmp-coders > > >_______________________________________________ >Net-snmp-coders mailing list >Net...@li... >https://lists.sourceforge.net/lists/listinfo/net-snmp-coders _______________________________________________ Net-snmp-coders mailing list Net...@li... https://lists.sourceforge.net/lists/listinfo/net-snmp-coders |