Movatterモバイル変換


[0]ホーム

URL:


routetable

package
v1.92.2Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:9Imported by:3

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package routetable provides functions that operate on the system's routetable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeRouteDestination

type RouteDestination struct {netip.PrefixZonestring}

RouteDestination is the destination of a route.

This is similar to net/netip.Prefix, but also contains an optional IPv6zone.

func (RouteDestination)String

func (rRouteDestination) String()string

typeRouteEntry

type RouteEntry struct {// Family is the IP family of the route; it will be either 4 or 6.Familyint// Type is the type of this route.TypeRouteType// Dst is the destination of the route.DstRouteDestination// Gatewayis the gateway address specified for this route.// This value will be invalid (where !r.Gateway.IsValid()) in cases// where there is no gateway address for this route.Gatewaynetip.Addr// Interface is the name of the network interface to use when sending// packets that match this route. This field can be empty.Interfacestring// Sys contains platform-specific information about this route.Sysany}

RouteEntry contains common cross-platform fields describing an entry in thesystem route table.

funcGet

func Get(maxint) ([]RouteEntry,error)

Get returns route entries from the system route table, limited to at mostmax results.

func (RouteEntry)Format

func (rRouteEntry) Format(ffmt.State, verbrune)

Format implements the fmt.Formatter interface.

typeRouteEntryLinux

type RouteEntryLinux struct {// Type is the raw type of the route.Typeint// Table is the routing table index of this route.Tableint// Src is the source of the route (if any).Srcnetip.Addr// Proto describes the source of the route--i.e. what caused this route// to be added to the route table.Protonetlink.RouteProtocol// Priority is the route's priority.Priorityint// Scope is the route's scope.Scopeint// InputInterfaceIdx is the input interface index.InputInterfaceIdxint// InputInterfaceName is the input interface name (if available).InputInterfaceNamestring}

RouteEntryLinux is the structure that makes up the Sys field of theRouteEntry structure.

func (RouteEntryLinux)Format

func (rRouteEntryLinux) Format(ffmt.State, verbrune)

Format implements the fmt.Formatter interface.

func (RouteEntryLinux)ScopeName

func (rRouteEntryLinux) ScopeName()string

ScopeName returns the string representation of this route's Scope.

func (RouteEntryLinux)TableName

func (rRouteEntryLinux) TableName()string

TableName returns the string representation of this route's Table.

func (RouteEntryLinux)TypeName

func (rRouteEntryLinux) TypeName()string

TypeName returns the string representation of this route's Type.

typeRouteType

type RouteTypeint

RouteType describes the type of a route.

const (// RouteTypeUnspecified is the unspecified route type.RouteTypeUnspecifiedRouteType =iota// RouteTypeLocal indicates that the destination of this route is an// address that belongs to this system.RouteTypeLocal// RouteTypeUnicast indicates that the destination of this route is a// "regular" address--one that neither belongs to this host, nor is a// broadcast/multicast/etc. address.RouteTypeUnicast// RouteTypeBroadcast indicates that the destination of this route is a// broadcast address.RouteTypeBroadcast// RouteTypeMulticast indicates that the destination of this route is a// multicast address.RouteTypeMulticast// RouteTypeOther indicates that the route is of some other valid type;// see the Sys field for the OS-provided route information to determine// the exact type.RouteTypeOther)

func (RouteType)String

func (rRouteType) String()string

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp