Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
RoutingProcess Class Reference

RoutingProcess handles and manipulates the static routing. More...

Inheritance diagram for RoutingProcess:
Process RoutingProcessv6

Public Member Functions

void clearAllRoutes ()
 Clears all routes. More...
 
void clearRoute (ip, ip)
 Clears the specified route. More...
 
bool addStaticRoute (ip, ip, ip, string, int)
 Adds a static route. More...
 
bool removeStaticRoute (ip, ip, ip, string, int)
 Removes the specified static route. More...
 
int getStaticRouteCount ()
 Returns the number of static routes. More...
 
StaticRoute getStaticRouteAt (int)
 Returns the static route at the specified index. More...
 
RoutingTable getRoutingTable ()
 Returns the routing table. More...
 
void routeAdded (ip, ip, int, int, ip, string, string)
 This event is emitted when a route is added. More...
 
void routeRemoved (ip, ip, int, int, ip, string, string)
 This event is emitted when a route is removed. More...
 
void networkAdded (ip, ip)
 This event is emitted when a network is added. More...
 
void networkRemoved (ip, ip)
 This event is emitted when a network is removed. More...
 
- Public Member Functions inherited from Process
Device getOwnerDevice ()
 Returns the device for this process. More...
 

Detailed Description

RoutingProcess handles and manipulates the static routing.

Member Function Documentation

◆ addStaticRoute()

bool RoutingProcess::addStaticRoute ( ip  ,
ip  ,
ip  ,
string  ,
int   
)

Adds a static route.

Parameters
ipAddress,thenetwork address.
subnetMas,thenetwork mask.
nextHop,thenext hop address.
portName,portNamecan be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
adminDistance,theadministrative distance value.
Returns
bool, true if successful, otherwise false.

◆ clearAllRoutes()

void RoutingProcess::clearAllRoutes ( )

Clears all routes.

◆ clearRoute()

void RoutingProcess::clearRoute ( ip  ,
ip   
)

Clears the specified route.

Parameters
networkId,thenetwork address of interest.
mask,thenetwork mask of interest.

◆ getRoutingTable()

RoutingTable RoutingProcess::getRoutingTable ( )

Returns the routing table.

Returns
RoutingTable, the RoutingTable object.

◆ getStaticRouteAt()

StaticRoute RoutingProcess::getStaticRouteAt ( int  )

Returns the static route at the specified index.

Parameters
index,theindex of the static route of interest.
Returns
StaticRoute, the StaticRoute object at the specified index.

◆ getStaticRouteCount()

int RoutingProcess::getStaticRouteCount ( )

Returns the number of static routes.

Returns
int, the number of static routes.

◆ networkAdded()

void RoutingProcess::networkAdded ( ip  ,
ip   
)

This event is emitted when a network is added.

  • network, the network address.
  • mask, the network mask.

IPC event.

◆ networkRemoved()

void RoutingProcess::networkRemoved ( ip  ,
ip   
)

This event is emitted when a network is removed.

  • network, the network address.
  • mask, the network mask.

IPC event.

◆ removeStaticRoute()

bool RoutingProcess::removeStaticRoute ( ip  ,
ip  ,
ip  ,
string  ,
int   
)

Removes the specified static route.

Parameters
ipAddress,thenetwork address.
subnetMas,thenetwork mask.
nextHop,thenext hop address.
portName,portNamecan be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
adminDistance,theadministrative distance value.
Returns
bool, true if successful, otherwise false.

◆ routeAdded()

void RoutingProcess::routeAdded ( ip  ,
ip  ,
int  ,
int  ,
ip  ,
string  ,
string   
)

This event is emitted when a route is added.

  • network, the network address.
  • mask, the network mask.
  • metric, the metric value.
  • distance, the administrative distance value.
  • nexthop, the next hop address.
  • portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
  • protocolCode, the protocol code.

IPC event.

◆ routeRemoved()

void RoutingProcess::routeRemoved ( ip  ,
ip  ,
int  ,
int  ,
ip  ,
string  ,
string   
)

This event is emitted when a route is removed.

  • network, the network address.
  • mask, the network mask.
  • metric, the metric value.
  • distance, the administrative distance value.
  • nexthop, the next hop address.
  • portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
  • protocolCode, the protocol code.

IPC event.


The documentation for this class was generated from the following file: