netdev

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Obfuscate = true

Obfuscate controls whether sensitive values are replaced with hashes in tool output. Enabled by default; set to false via --no-obfuscate.

Functions

func GetConfig

GetConfig retrieves the running or startup configuration from a network device.

func RunPing added in v1.2.0

RunPing executes a ping command on a network device.

func RunShowCommand

func RunShowCommand(ctx context.Context, req *mcp.CallToolRequest, args RunShowCommandInput) (*mcp.CallToolResult, any, error)

RunShowCommand executes an arbitrary show command on a network device.

func RunTraceroute added in v1.2.0

func RunTraceroute(ctx context.Context, req *mcp.CallToolRequest, args RunTracerouteInput) (*mcp.CallToolResult, any, error)

RunTraceroute executes a traceroute command on a network device.

func TrustHostKey added in v1.4.0

func TrustHostKey(ctx context.Context, req *mcp.CallToolRequest, args TrustHostKeyInput) (*mcp.CallToolResult, any, error)

TrustHostKey fetches and optionally stores an SSH host key in known_hosts.

Types

type GetConfigInput

type GetConfigInput struct {
	Host       string `json:"host"        jsonschema:"hostname or IP address of the network device"`
	Username   string `json:"username,omitempty" jsonschema:"SSH username; if omitted, falls back to the DEVICE_USERNAME environment variable"`
	Port       int    `json:"port"        jsonschema:"SSH port, defaults to 22"`
	ConfigType string `` /* 127-byte string literal not displayed */
	DeviceType string `` /* 212-byte string literal not displayed */
}

GetConfigInput defines the input parameters for the get_config tool.

type RunPingInput added in v1.2.0

type RunPingInput struct {
	Host        string `json:"host"        jsonschema:"hostname or IP address of the network device to connect to"`
	Destination string `json:"destination" jsonschema:"IP address or hostname to ping"`
	Username    string `json:"username,omitempty" jsonschema:"SSH username; if omitted, falls back to the DEVICE_USERNAME environment variable"`
	Port        int    `json:"port"        jsonschema:"SSH port, defaults to 22"`
	Count       int    `json:"count"       jsonschema:"number of echo requests to send"`
	Timeout     int    `json:"timeout"     jsonschema:"per-probe timeout in seconds; supported on FortiOS"`
	Source      string `json:"source"      jsonschema:"source IP address or interface name"`
	VRF         string `json:"vrf"         jsonschema:"VRF name"`
	Size        int    `json:"size"        jsonschema:"packet size in bytes"`
	OutgoingIf  string `json:"outgoing_interface,omitempty" jsonschema:"outgoing interface for FortiOS ping"`
	DeviceType  string `` /* 219-byte string literal not displayed */
}

RunPingInput defines the input parameters for the run_ping tool.

type RunShowCommandInput

type RunShowCommandInput struct {
	Host       string `json:"host"       jsonschema:"hostname or IP address of the network device"`
	Command    string `json:"command"    jsonschema:"command to execute: use 'show ...' on Arista/Cisco/JunOS or 'get ...' on FortiOS"`
	Username   string `json:"username,omitempty" jsonschema:"SSH username; if omitted, falls back to the DEVICE_USERNAME environment variable"`
	Port       int    `json:"port"       jsonschema:"SSH port, defaults to 22"`
	DeviceType string `` /* 169-byte string literal not displayed */
}

RunShowCommandInput defines the input parameters for the run_show_command tool.

type RunTracerouteInput added in v1.2.0

type RunTracerouteInput struct {
	Host        string `json:"host"        jsonschema:"hostname or IP address of the network device to connect to"`
	Destination string `json:"destination" jsonschema:"IP address or hostname to trace the path to"`
	Username    string `json:"username,omitempty" jsonschema:"SSH username; if omitted, falls back to the DEVICE_USERNAME environment variable"`
	Port        int    `json:"port"        jsonschema:"SSH port, defaults to 22"`
	MaxHops     int    `json:"max_hops"    jsonschema:"maximum number of hops (TTL); defaults to device default (usually 30)"`
	Timeout     int    `json:"timeout"     jsonschema:"per-probe timeout in seconds"`
	Probe       int    `json:"probe"       jsonschema:"number of probes per hop"`
	Source      string `json:"source"      jsonschema:"source IP address or interface name"`
	VRF         string `json:"vrf"         jsonschema:"VRF name; maps to routing-instance on JunOS"`
	OutgoingIf  string `json:"outgoing_interface,omitempty" jsonschema:"outgoing interface for FortiOS traceroute"`
	DeviceType  string `` /* 186-byte string literal not displayed */
}

RunTracerouteInput defines the input parameters for the run_traceroute tool.

type TrustHostKeyInput added in v1.4.0

type TrustHostKeyInput struct {
	Host            string `json:"host"             jsonschema:"hostname or IP address of the network device"`
	Port            int    `json:"port"             jsonschema:"SSH port, defaults to 22"`
	Confirm         bool   `` /* 128-byte string literal not displayed */
	ReplaceExisting bool   `json:"replace_existing" jsonschema:"replace an existing mismatched key after you verify the new fingerprint"`
}

TrustHostKeyInput defines the input parameters for the trust_host_key tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL