@gibme/mikrotik
    Preparing search index...

    Class Mikrotik

    Hierarchy

    • default
      • Mikrotik
    Index

    Constructors

    • Creates a new instance of the class

      Parameters

      • config: ConnectConfig

      Returns Mikrotik

    Properties

    cache: Memory = ...

    Methods

    • Executes a bandwidth test

      Note: you must supply a callback in the options to get the intermittent results of the bandwidth test; otherwise, you will only receive the final result back from the promise

      Parameters

      • target: string
      • username: string
      • password: string
      • options: Partial<Options> = {}

      Returns Promise<Update>

    • Retrieves the routes in the routing table

      Parameters

      • min_distance: number = 0
      • Optionalvrf: string
      • active_only: boolean = true

      Returns Promise<Mikrotik.Response.Route[]>

    • For all device IP addresses, counts the routes that exit (either directly or tunneled) the device using each IP address

      Parameters

      • min_distance: number = 0
      • Optionalvrf: string

      Returns Promise<Record<string, Count>>

    • Fetches the identity of the device

      Returns Promise<string>

    • Protected

      Executes a command that expects the result as a 'table' of key-value pairs separated by a colon (:)

      Type Parameters

      • Type extends object = any

      Parameters

      • command: string

      Returns Promise<Type>

    • Pings the target IP address from the source IP address (if supplied)

      Parameters

      • target: string
      • Optionalsource: string

      Returns Promise<Ping>

    • Fetches the semantic RouterOS version

      Returns Promise<{ major: number; minor: number; patch: number }>

    • Protected

      Executes a command with expected terse response and parses it accordingly

      Type Parameters

      • Type extends object = any

      Parameters

      • command: string

      Returns Promise<Type[]>

    • Performs a traceroute to the target IP address from the source IP address (if supplied)

      Parameters

      • target: string
      • Optionalsource: string

      Returns Promise<Traceroute[]>

    • Fetches the current RouterOS version

      Returns Promise<string>