pfconf

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolIfElementPresent

type BoolIfElementPresent bool

type Configuration

type Configuration struct {
	XMLName     xml.Name   `xml:"pfsense"`
	FileVersion string     `xml:"version"`
	System      System     `xml:"system"`
	Interfaces  Interfaces `xml:"interfaces"`
	Routes      []Route    `xml:"staticroutes>route"`
	Syslog      Syslog     `xml:"syslog"`
	Revision    Revision   `xml:"revision"`
	Gateways    []Gateway  `xml:"gateways>gateway_item"`
	GatewayIpv4 string     `xml:"gateways>defaultgw4"`
	GatewayIpv6 string     `xml:"gateways>defaultgw6"`
	SysCtls     []SysCtl   `xml:"sysctl>item"`
}

func (*Configuration) Finalize

func (c *Configuration) Finalize() error

type Gateway

type Gateway struct {
	Interface      string               `xml:"interface"`
	Gateway        string               `xml:"gateway"`
	Name           string               `xml:"name"`
	Weight         string               `xml:"weight"`
	Protocol       string               `xml:"ipprotocol"`
	Description    string               `xml:"descr"`
	MonitorDisable BoolIfElementPresent `xml:"monitor_disable"`
	ActionDisable  BoolIfElementPresent `xml:"action_disable"`
}

type Interface

type Interface struct {
	XMLName     xml.Name
	If          string               `xml:"if"`
	Enable      BoolIfElementPresent `xml:"enable"`
	BlockBogons BoolIfElementPresent `xml:"blockbogons"`
	SpoofMac    string               `xml:"spoofmac"`
	Description string               `xml:"descr"`
	Ip          string               `xml:"ipaddr"`
	Subnet      uint8                `xml:"subnet"`
	Gateway     string               `xml:"gateway"`
}

type Interfaces

type Interfaces struct {
	List []Interface `xml:",any"`
}

type Revision

type Revision struct {
	Time        string `xml:"time"`
	Description string `xml:"description"`
	Username    string `xml:"username"`
}

type Route

type Route struct {
	Network     string `xml:"network"`
	Gateway     string `xml:"gateway"`
	Description string `xml:"descr"`
}

type SysCtl

type SysCtl struct {
	Name        string `xml:"tunable"`
	Value       string `xml:"value"`
	Description string `xml:"descr"`
}

type Syslog

type Syslog struct {
	FilterDescriptions string               `xml:"filterdescriptions"`
	Nentries           string               `xml:"nentries"`
	Remoteserver       string               `xml:"remoteserver"`
	Remoteserver2      string               `xml:"remoteserver2"`
	Remoteserver3      string               `xml:"remoteserver3"`
	SourceIp           string               `xml:"sourceip"`
	Protocol           string               `xml:"ipproto"`
	LogAll             BoolIfElementPresent `xml:"logall"`
	Enable             BoolIfElementPresent `xml:"enable"`
}

type System

type System struct {
	XMLName          xml.Name `xml:"system"`
	Hostname         string   `xml:"hostname"`
	Timezone         string   `xml:"timezone"`
	Domain           string   `xml:"domain"`
	DnsServersString string   `xml:"dnsserver"`
	DnsServers       []string `xml:"-"`
	Timeservers      string   `xml:"timeservers"`
}

func (*System) Finalize

func (s *System) Finalize() error

Jump to

Keyboard shortcuts

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