procsys

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArpReplyMode

type ArpReplyMode int
const (
	ARPReplyMode0 ArpReplyMode = iota
	ARPReplyMode1
	ARPReplyMode2
	ARPReplyMode3
	ARPReplyMode8 = 8
)

arp_ignore - INTEGER

Define different modes for sending replies in response to
received ARP requests that resolve local target IP addresses:
0 - (default): reply for any local target IP address, configured
on any interface
1 - reply only if the target IP address is local address
configured on the incoming interface
2 - reply only if the target IP address is local address
configured on the incoming interface and both with the
sender's IP address are part from same subnet on this interface
3 - do not reply for local addresses configured with scope host,
only resolutions for global and link addresses are replied
4-7 - reserved
8 - do not reply for all local addresses

The max value from conf/{all,interface}/arp_ignore is used
when ARP request is received on the {interface}

Ref: https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

type ProcSys

type ProcSys struct{}

func (ProcSys) IPv4EnableForwarding

func (p ProcSys) IPv4EnableForwarding() error

func (ProcSys) IPv4EnableRouteLocalNet

func (p ProcSys) IPv4EnableRouteLocalNet(linkName string) error

func (ProcSys) IPv4GetArpIgnore

func (p ProcSys) IPv4GetArpIgnore(iface string) (ArpReplyMode, error)

func (ProcSys) IPv4GetForwarding

func (p ProcSys) IPv4GetForwarding() (bool, error)

func (ProcSys) IPv4GetPingGroupRange

func (p ProcSys) IPv4GetPingGroupRange() (int, int, error)

func (ProcSys) IPv4GetRouteLocalNet

func (p ProcSys) IPv4GetRouteLocalNet(linkName string) (bool, error)

func (ProcSys) IPv4GetUnprivilegedPortStart

func (p ProcSys) IPv4GetUnprivilegedPortStart() (int, error)

func (ProcSys) IPv4SetArpIgnore

func (p ProcSys) IPv4SetArpIgnore(iface string, replyMode ArpReplyMode) error

func (ProcSys) IPv4SetPingGroupRange

func (p ProcSys) IPv4SetPingGroupRange(from, to int) error

func (ProcSys) IPv4SetUnprivilegedPortStart

func (p ProcSys) IPv4SetUnprivilegedPortStart(port int) error

func (ProcSys) IPv6EnableForwarding

func (p ProcSys) IPv6EnableForwarding() error

func (ProcSys) IPv6GetForwarding

func (p ProcSys) IPv6GetForwarding() (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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