I am working on a small piece of code that will just receive UDP SNMP traps, and forward them to multiple locations, but the source address information needs to be intact. Otherwise all the traps will appear to be coming from the system running this distributor code. This is UDP one way communication, so I don't have to worry about any responses. Thanks.
Asked
Active
Viewed 461 times
0
-
1Sounds interesting. What have you written, since it's expected you show you've made an attempt to solve the problem. – the Tin Man Jan 10 '13 at 21:38
1 Answers
0
You need to create a RAW
socket and create your own packets from scratch. This is pretty straightforward if you have a working example, such as what traceroute
does with UDP, or by following the RFC specification very closely.
It's not too hard to assemble these using pack
and the correct options.

tadman
- 208,517
- 23
- 234
- 262