NetworkRoute

Description

The NetworkRoute object represents a route in TCP/IP networks and can be attached to NetworkInterface objects.

This object was introduced in InCore 2.3.

› Inherits:

Object

Overview

Properties

Methods

Signals

Enumerations

Properties

destination

This property holds the destination host or network of the route. For networks, it has to be followed by a slash and the prefix length.

› Type:

String

› Signal:

destinationChanged()

› Attributes:

Writable

gateway

This property holds the gateway of the route.

› Type:

String

› Signal:

gatewayChanged()

› Attributes:

Writable

metric

This property holds the metric of the route.

› Type:

SignedInteger

› Signal:

metricChanged()

› Attributes:

Writable

mtu

This property holds the maximum transmission unit in bytes to set for the route.

› Type:

SignedInteger

› Signal:

mtuChanged()

› Attributes:

Writable

protocol

This property holds the routing protocol identifier of the route.

› Type:

Protocol

› Default:

NetworkRoute.Static

› Signal:

protocolChanged()

› Attributes:

Writable

scope

This property holds the scope of the IPv4 route. It’s not used for IPv6 routes.

› Type:

Scope

› Default:

NetworkRoute.Global

› Signal:

scopeChanged()

› Attributes:

Writable

source

This property holds the optional source prefix of the route, possibly followed by a slash and the prefix length.

› Type:

String

› Signal:

sourceChanged()

› Attributes:

Writable

Enumerations

Protocol

This enumeration describes the supported routing protocol identifiers.

Name

Value

Description

NetworkRoute.Kernel

0

The route was installed by the kernel during autoconfiguration.

NetworkRoute.Boot

1

The route was installed during the bootup sequence.

NetworkRoute.Static

2

The route was installed manually to override dynamic routing.

NetworkRoute.RA

3

The route was installed by Router Discovery protocol.

NetworkRoute.Dhcp

4

The route was installed by DHCP client.

Scope

This enumeration describes the supported scopes for IPv4 routes.

Name

Value

Description

NetworkRoute.Global

0

The route can reach hosts more than one hop away.

NetworkRoute.Site

1

An interior route in the local autonomous system.

NetworkRoute.Host

3

The route will not leave the local machine (used for internal addresses like 127.0.0.1).

NetworkRoute.Nowhere

4

The destination doesn’t exist.