Gjsify LogoGjsify Logo

Hierarchy

  • IPRoute

Index

Constructors

  • new IPRoute(family: number, dest: string, prefix: number, nextHop: string, metric: number): IPRoute
  • Creates a new #NMIPRoute object.

    Parameters

    • family: number

      the IP address family (AF_INET or AF_INET6)

    • dest: string

      the IP address of the route's destination

    • prefix: number

      the address prefix length

    • nextHop: string

      the IP address of the next hop (or %NULL)

    • metric: number

      the route metric (or -1 for "default")

    Returns IPRoute

Properties

name: string

Methods

  • Determines if two #NMIPRoute objects contain the same destination, prefix, next hop, and metric. (Attributes are not compared.)

    Parameters

    • other: IPRoute

      the #NMIPRoute to compare route to.

    Returns boolean

  • equalFull(other: IPRoute, cmpFlags: number): boolean
  • Determines if two #NMIPRoute objects contain the same destination, prefix, next hop, and metric.

    Parameters

    • other: IPRoute

      the #NMIPRoute to compare route to.

    • cmpFlags: number

      tune how to compare attributes. Currently, only NM_IP_ROUTE_EQUAL_CMP_FLAGS_NONE (0) and NM_IP_ROUTE_EQUAL_CMP_FLAGS_WITH_ATTRS (1) is supported.

    Returns boolean

  • Gets the value of the attribute with name name on route

    Parameters

    • name: string

      the name of an route attribute

    Returns GLib.Variant

  • getAttributeNames(): string[]
  • Gets an array of attribute names defined on route.

    Returns string[]

  • getDest(): string
  • Gets the IP destination address property of this route object.

    Returns string

  • getFamily(): number
  • Gets the IP address family (eg, AF_INET) property of this route object.

    Returns number

  • getMetric(): number
  • Gets the route metric property of this route object; lower values indicate "better" or more preferred routes; -1 indicates "default" (meaning NetworkManager will set it appropriately).

    Returns number

  • getNextHop(): string
  • Gets the IP address of the next hop of this route; this will be %NULL if the route has no next hop.

    Returns string

  • getPrefix(): number
  • Gets the IP prefix (ie "24" or "30" etc) of this route.

    Returns number

  • ref(): void
  • Increases the reference count of the object.

    Returns void

  • Sets the named attribute on route to the given value.

    Parameters

    • name: string

      the name of a route attribute

    • value: GLib.Variant

      the value

    Returns void

  • setDest(dest: string): void
  • Sets the destination property of this route object.

    dest must be a valid address of route's family. If you aren't sure you have a valid address, use nm_utils_ipaddr_is_valid() to check it.

    Parameters

    • dest: string

      the route's destination, as a string

    Returns void

  • setMetric(metric: number): void
  • Sets the metric property of this route object.

    Parameters

    • metric: number

      the route metric (or -1 for "default")

    Returns void

  • setNextHop(nextHop: string): void
  • Sets the next-hop property of this route object.

    next_hop (if non-%NULL) must be a valid address of route's family. If you aren't sure you have a valid address, use nm_utils_ipaddr_valid() to check it.

    Parameters

    • nextHop: string

      the route's next hop, as a string

    Returns void

  • setPrefix(prefix: number): void
  • Sets the prefix property of this route object.

    Parameters

    • prefix: number

      the route prefix

    Returns void

  • unref(): void
  • Decreases the reference count of the object. If the reference count reaches zero, the object will be destroyed.

    Returns void

  • attributeValidate(name: string, value: GLib.Variant, family: number): [boolean, boolean]
  • Validates a route attribute, i.e. checks that the attribute is a known one and the value is of the correct type and well-formed.

    Parameters

    • name: string

      the attribute name

    • value: GLib.Variant

      the attribute value

    • family: number

      IP address family of the route

    Returns [boolean, boolean]

  • new(family: number, dest: string, prefix: number, nextHop: string, metric: number): IPRoute
  • Creates a new #NMIPRoute object.

    Parameters

    • family: number

      the IP address family (AF_INET or AF_INET6)

    • dest: string

      the IP address of the route's destination

    • prefix: number

      the address prefix length

    • nextHop: string

      the IP address of the next hop (or %NULL)

    • metric: number

      the route metric (or -1 for "default")

    Returns IPRoute

  • newBinary(family: number, dest: object, prefix: number, nextHop: object, metric: number): IPRoute
  • Creates a new #NMIPRoute object. dest and next_hop (if non-%NULL) must point to buffers of the correct size for family.

    Parameters

    • family: number

      the IP address family (AF_INET or AF_INET6)

    • dest: object

      the IP address of the route's destination

    • prefix: number

      the address prefix length

    • nextHop: object

      the IP address of the next hop (or %NULL)

    • metric: number

      the route metric (or -1 for "default")

    Returns IPRoute

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method