Documentation
¶
Index ¶
Constants ¶
View Source
const ( VlanModeDisabled VlanMode = 0 VlanModeOptional = 1 VlanModeEnabled = 2 VlanModeStrict = 2 )
View Source
const ( VlanHeaderLeaveAsIs VlanHeader = 0 VlanHeaderStrip = 1 VlanHeaderAddMissing = 2 )
View Source
const ( VlanReceiveAny VlanReceive = 0 VlanReceiveTagged = 1 VlanReceiveUntagged = 2 )
View Source
const ( Off PoeMode = 0 Auto = 1 On = 2 Calib = 3 )
View Source
const ( Disabled = 1 WaitingForLoad = 2 Active = 3 )
View Source
const ( VlanPortModeLeaveAsIs VlanPortMode = 0 VlanPortModeAlwaysStrip = 1 VlanPortModeAddIfMissing = 2 VlanPortModeNotAMember = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FwdPage ¶
type FwdPage struct {
PortForward []PortForward
MirrorTo int
// contains filtered or unexported fields
}
type PortForward ¶ added in v0.0.2
type SwOsClient ¶
type SwOsClient struct {
Links LinkPage
Sfp SfpPage
Sys SysPage
Rstp RstpPage
Fwd FwdPage
Vlan VlanPage
// contains filtered or unexported fields
}
func NewSwOsClient ¶
func NewSwOsClient(url string, user string, password string) (*SwOsClient, error)
func (*SwOsClient) Fetch ¶
func (client *SwOsClient) Fetch() error
func (*SwOsClient) Save ¶
func (client *SwOsClient) Save() error
type SysPage ¶
type SysPage struct {
Mac net.HardwareAddr
SerialNumber string
Identity string
Version string
BoardName string
RootBridgeMac net.HardwareAddr
Uptime int64
Ip net.IP
Build int // FIXME: wtf?
Dsc int // FIXME: wtf?
Wdt int // FIXME: wtf?
MikrotikDiscoveryProtocol []bool
IndependentVlanLookup bool
AllowFrom net.IP
Allm int // WTF
AllowFromPorts []bool
AllowFromVlan int
IgmpSnooping bool
IgmpQuerier bool
LongPoeCable bool
IgmpFastLeave []bool
IgmpVersion int //TODO: enum
Voltage int
Temperature int
BridgePriority int
PortCostMode int //TODO: enum
ForwardReservedMulticast bool
AddressAquisition int // TODO: enum 0 dhcp+fb, 1 static, 2 dhcp only
StaticIpAddress net.IP
// contains filtered or unexported fields
}
type Vlan ¶
type Vlan struct {
Id int
IndependentVlanLookup bool
IgmpSnooping bool
PortMode []VlanPortMode
}
type VlanHeader ¶
type VlanHeader int
type VlanPage ¶
type VlanPage struct {
Vlans []Vlan
// contains filtered or unexported fields
}
func (*VlanPage) DeleteVlan ¶
type VlanPortMode ¶
type VlanPortMode int
type VlanReceive ¶
type VlanReceive int
Click to show internal directories.
Click to hide internal directories.