Expand description
OSPF routing daemon (RFC 2328)
Link-state routing protocol implementation (single area, Area 0):
- Hello protocol for neighbor discovery
- Database description exchange
- Link-state database with LSA flooding
- SPF (Dijkstra) shortest path calculation
- DR/BDR election
Structs§
- Hello
Packet - OSPF Hello packet
- LsDatabase
- Link-State Database
- LsaHeader
- LSA header (20 bytes)
- LsaKey
- Key for LSA database lookup: (type, link_state_id, advertising_router)
- Network
Lsa - Network LSA (type 2)
- Ospf
Header - OSPF packet header (24 bytes)
- Ospf
Neighbor - OSPF neighbor entry
- Ospf
Router - OSPF Router
- Router
Link - A single link in a Router LSA
- Router
Lsa - Router LSA (type 1)
- SpfEntry
- SPF result entry
Enums§
- Auth
Type - OSPF authentication type
- Lsa
- Stored LSA in the database
- LsaType
- LSA types
- Neighbor
State - OSPF neighbor states (RFC 2328 Section 10.1)
- Ospf
Packet Type - OSPF packet types
- Router
Link Type - Router LSA link types
Constants§
- DEAD_
INTERVAL - Default dead interval in ticks (4x hello)
- HELLO_
INTERVAL - Default Hello interval in ticks
- MAX_
LSA_ AGE - Maximum LSA age in ticks
- OSPF_
ALL_ DR - OSPF all-DR multicast (224.0.0.6)
- OSPF_
ALL_ ROUTERS - OSPF all-routers multicast (224.0.0.5)
- OSPF_
INFINITY - Cost representing infinity (unreachable)
- OSPF_
PROTOCOL - OSPF protocol number (IP protocol 89)
- OSPF_
VERSION - OSPF version 2
Functions§
- deserialize_
header - Deserialize an OSPF header from bytes
- serialize_
header - Serialize an OSPF header to bytes