On Juniper routers they have vendor-specific traps for BGP and IPv6. One of the varbinds look like this:
jnxBgpM2PeerRemoteAddr.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.38.7.250.120.0.0.0.0.0.0.0.0.0.0.120.28= 38.7.250.120
this bit:
38.7.250.120.0.0.0.0.0.0.0.0.0.0.120.28
should get translated thus:
38 | 7 | 250 | 120 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 28 |
26 | 07 | FA | 78 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 78 | 1C |
Which is the IPv6 address of a router.
Anyone suggest any incantation to convert from the dotted-decimal to the HEX version?
[note I'm almost certain the oidValue is being truncated to 4 bytes since the trap knows this is an IP address and assumes that it's an ipv4 addresses]
Thanks