Documentation ¶
Index ¶
- type Config
- type DeviceConfig
- type ICMP
- type IPHeader
- type Module
- type Network
- func (n *Network) EnableDevice(pathOrIface string, enabled bool) (cpath dbus.ObjectPath, error *dbus.Error)
- func (v *Network) GetExportedMethods() dbusutil.ExportedMethods
- func (n *Network) GetInterfaceName() string
- func (n *Network) IsDeviceEnabled(pathOrIface string) (enabled bool, busErr *dbus.Error)
- func (n *Network) Ping(host string) *dbus.Error
- func (n *Network) ToggleWirelessEnabled() (enabled bool, busErr *dbus.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { VpnEnabled bool Devices map[string]*DeviceConfig }
type DeviceConfig ¶
type DeviceConfig struct {
Enabled bool
}
type IPHeader ¶
type IPHeader struct { Version uint8 // the first byte[0:4] Length uint8 // the first byte[4:8] TOS uint8 // type of service TotalLen uint16 Identifier uint16 Flag uint8 // only has 3 bits Offset uint16 // has 13 bits TTL uint8 Protocol uint8 // ICMP: 1, TCP: 6, UDP: 7。 定义在 /etc/protocols CheckSum uint16 Source [4]uint8 Destination [4]uint8 Options [40]uint8 // 可选字段,根据 Length 来判断是否存在 }
IPHeader store ip header data
type Module ¶
type Module struct { *loader.ModuleBase // contains filtered or unexported fields }
func (*Module) GetDependencies ¶
type Network ¶
type Network struct { VpnEnabled bool `prop:"access:rw"` // contains filtered or unexported fields }
func (*Network) EnableDevice ¶
func (*Network) GetExportedMethods ¶
func (v *Network) GetExportedMethods() dbusutil.ExportedMethods
func (*Network) GetInterfaceName ¶
func (*Network) IsDeviceEnabled ¶
Click to show internal directories.
Click to hide internal directories.