Gjsify LogoGjsify Logo

Hierarchy

  • IPRoute

Index

Constructors

  • new IPRoute(family: number, dest: string, prefix: number, next_hop: 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

    • next_hop: 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

  • equal_full(other: IPRoute, cmp_flags: 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.

    • cmp_flags: 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

  • get_attribute_names(): string[]
  • get_dest(): string
  • get_family(): number
  • get_metric(): 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

  • get_next_hop(): 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

  • get_prefix(): number
  • ref(): void
  • set_dest(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

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

    Parameters

    • metric: number

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

    Returns void

  • set_next_hop(next_hop: 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

    • next_hop: string

      the route's next hop, as a string

    Returns void

  • set_prefix(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

  • attribute_validate(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, next_hop: 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

    • next_hop: string

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

    • metric: number

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

    Returns IPRoute

  • new_binary(family: number, dest: object, prefix: number, next_hop: 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

    • next_hop: 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