Library ospf
A limited OSPF (Open Shortest Path First routing protocol) library, currently supporting IPv4 and the following OSPF message types: HELLO, DB_DESCRIPTION, LS_REQUEST, LS_UPDATE
The library consists of an OSPF class that contains code to handle OSPFv2 packets.
Authors:
Copyright © Same as Nmap--See https://nmap.org/book/man-legal.html
Source: https://svn.nmap.org/nmap/nselib/ospf.lua
Functions
- addNeighbor (self, neighbor)
Adds a neighbor to the list of neighbors.
- addRequest (self, type, id, adv_router)
Adds a request to the list of requests.
- setAreaID (self, areaid)
Sets the OSPF Area ID
- setBackupRouter (self, router)
Sets the OSPF backup Router.
- setDesignatedRouter (self, router)
Sets the OSPF designated Router.
- setLength (self, length)
Sets the OSPF Packet length
- setNetmask (self, netmask)
Sets the OSPF netmask.
- setRouterId (self, router_id)
Sets the OSPF Router ID
Functions
- addNeighbor (self, neighbor)
-
Adds a neighbor to the list of neighbors.
Parameters
- self
- neighbor
- IP Address of the neighbor.
- addRequest (self, type, id, adv_router)
-
Adds a request to the list of requests.
Parameters
- self
- type
- LS Type.
- id
- Link State ID
- adv_router
- Advertising Router
- setAreaID (self, areaid)
-
Sets the OSPF Area ID
Parameters
- self
- areaid
- Area ID.
- setBackupRouter (self, router)
-
Sets the OSPF backup Router.
Parameters
- self
- router
- IP Address of the backup router.
- setDesignatedRouter (self, router)
-
Sets the OSPF designated Router.
Parameters
- self
- router
- IP address of the designated router.
- setLength (self, length)
-
Sets the OSPF Packet length
Parameters
- self
- length
- Packet length.
- setNetmask (self, netmask)
-
Sets the OSPF netmask.
Parameters
- self
- netmask
- Netmask in A.B.C.D
- setRouterId (self, router_id)
-
Sets the OSPF Router ID
Parameters
- self
- router_id
- Router ID.