Documentation ¶
Overview ¶
Package sysutil contains utilities for functions requiring system calls.
Index ¶
- Constants
- func CanBindPrivilegedPorts() (can bool, err error)
- func ConfigureSyslog(serviceName string) error
- func GatewayIP(ifaceName string) net.IP
- func HaveAdminRights() (bool, error)
- func IfaceHasStaticIP(ifaceName string) (has bool, err error)
- func IfaceSetStaticIP(ifaceName string) (err error)
- func SendProcessSignal(pid int, sig syscall.Signal) error
- func SetRlimit(val uint)
Constants ¶
const ErrNoStaticIPInfo agherr.Error = "no information about static ip"
ErrNoStaticIPInfo is returned by IfaceHasStaticIP when no information about the IP being static is available.
Variables ¶
This section is empty.
Functions ¶
func CanBindPrivilegedPorts ¶
CanBindPrivilegedPorts checks if current process can bind to privileged ports.
func ConfigureSyslog ¶
ConfigureSyslog reroutes standard logger output to syslog.
func HaveAdminRights ¶
HaveAdminRights checks if the current user has root (administrator) rights.
func IfaceHasStaticIP ¶
IfaceHasStaticIP checks if interface is configured to have static IP address. If it can't give a definitive answer, it returns false and an error for which errors.Is(err, ErrNoStaticIPInfo) is true.
func IfaceSetStaticIP ¶
IfaceSetStaticIP sets static IP address for network interface.
func SendProcessSignal ¶
SendProcessSignal sends signal to a process.
func SetRlimit ¶
func SetRlimit(val uint)
SetRlimit sets user-specified limit of how many fd's we can use https://github.com/AdguardTeam/AdGuardHome/internal/issues/659.
Types ¶
This section is empty.