in reply to Re^2: OSPF Protocol
in thread OSPF Protocol

OSPF and BGP are very different. The reason I suggested Net::BGP as a starting point is that it implements event driven code based on receipt of routing packets.

This is a bit off topic, so I won't go into too much detail, but OSPF is a multicast connectionless protocol - route updates are sent to a multicast address (224.0.0.5). BGP is connection oriented - routers are configured with relationships to each other, and unicast updates over TCP. When I was first learning both OSPF and BGP I wrote some brief notes on each, which you can see here. (I make no warranty as to their accuracy).

For your purposes I would suggest starting by sniffing some OSPF LSAs from the wire, using tcpdump/ethereal/some other packet sniffer listening to 224.0.0.5, and (referring to the OSPF rfcs where necessary) writing some code to parse and interpret them.

VGhpcyBtZXNzYWdlIGludGVudGlvbmFsbHkgcG9pbnRsZXNz