Documentation ¶
Index ¶
- func InterfaceType(ifname string) (api.InterfaceType, error)
- type ModemFrontend
- func (mf *ModemFrontend) Close() error
- func (mf *ModemFrontend) Initialize(nb *metadata.BackendMetaData, timeout time.Duration) error
- func (mf *ModemFrontend) ModemConnect(ctx context.Context, r *api.ModemConnectRequest) (*api.ModemConnectReply, error)
- func (mf *ModemFrontend) ModemDisconnect(ctx context.Context, r *api.ModemDisconnectRequest) (*api.ModemDisconnectReply, error)
- func (mf *ModemFrontend) ModemGetProperties(ctx context.Context, r *api.ModemGetPropertiesRequest) (*api.ModemGetPropertiesReply, error)
- func (mf *ModemFrontend) Serve() error
- type WiredFrontend
- func (wf *WiredFrontend) Close() error
- func (wf *WiredFrontend) Initialize(nb *metadata.BackendMetaData, timeout time.Duration) error
- func (wf *WiredFrontend) Serve() error
- func (wf *WiredFrontend) WiredAuthenticate8021X(ctx context.Context, r *api.WiredAuthenticate8021XRequest) (*api.WiredAuthenticate8021XReply, error)
- func (wf *WiredFrontend) WiredGetProperties(ctx context.Context, r *api.WiredGetPropertiesRequest) (*api.WiredGetPropertiesReply, error)
- type WirelessFrontend
- func (wf *WirelessFrontend) Close() error
- func (wf *WirelessFrontend) DisableInterface(ctx context.Context, r *api.DisableInterfaceRequest) (*api.DisableInterfaceReply, error)
- func (wf *WirelessFrontend) EnableInterface(ctx context.Context, r *api.EnableInterfaceRequest) (*api.EnableInterfaceReply, error)
- func (wf *WirelessFrontend) Initialize(nb *metadata.BackendMetaData, timeout time.Duration) error
- func (wf *WirelessFrontend) Serve() error
- func (wf *WirelessFrontend) WirelessConnect(ctx context.Context, r *api.WirelessConnectRequest) (*api.WirelessConnectReply, error)
- func (wf *WirelessFrontend) WirelessDisconnect(ctx context.Context, r *api.WirelessDisconnectRequest) (*api.WirelessDisconnectReply, error)
- func (wf *WirelessFrontend) WirelessGetProperties(ctx context.Context, r *api.WirelessGetPropertiesRequest) (*api.WirelessGetPropertiesReply, error)
- func (wf *WirelessFrontend) WirelessMonitorProperties(r *api.WirelessMonitorPropertiesRequest, ...) error
- type WirelessOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterfaceType ¶
func InterfaceType(ifname string) (api.InterfaceType, error)
InterfaceType returns the type of network interface, specified by name. An error is returned if the interface does not exist, or is not of valid type.
Types ¶
type ModemFrontend ¶
type ModemFrontend struct { // This is now required by protoc-gen-go-grpc, in order // to guarantee forward compatibility when an RPC is added. api.UnimplementedNetctlFrontServer // contains filtered or unexported fields }
ModemFrontend is a netctl frontend that is linked to a modem.
func NewModemFrontend ¶
func NewModemFrontend(mpath string, addr string) (*ModemFrontend, error)
NewModemFrontend returns a new netctl frontend for a modem.
func (*ModemFrontend) Close ¶
func (mf *ModemFrontend) Close() error
Close tears down the ModemFrontend
func (*ModemFrontend) Initialize ¶
func (mf *ModemFrontend) Initialize(nb *metadata.BackendMetaData, timeout time.Duration) error
Initialize starts the initialization phase and performs startup actions.
func (*ModemFrontend) ModemConnect ¶
func (mf *ModemFrontend) ModemConnect(ctx context.Context, r *api.ModemConnectRequest) (*api.ModemConnectReply, error)
func (*ModemFrontend) ModemDisconnect ¶
func (mf *ModemFrontend) ModemDisconnect(ctx context.Context, r *api.ModemDisconnectRequest) (*api.ModemDisconnectReply, error)
func (*ModemFrontend) ModemGetProperties ¶
func (mf *ModemFrontend) ModemGetProperties(ctx context.Context, r *api.ModemGetPropertiesRequest) (*api.ModemGetPropertiesReply, error)
func (*ModemFrontend) Serve ¶
func (mf *ModemFrontend) Serve() error
Serve starts the wireless frontend service.
type WiredFrontend ¶
type WiredFrontend struct { // This is now required by protoc-gen-go-grpc, in order // to guarantee forward compatibility when an RPC is added. api.UnimplementedNetctlFrontServer // contains filtered or unexported fields }
WiredFrontend is a netctl frontend that represents a wired interface.
func NewWiredFrontend ¶
func NewWiredFrontend(ifname, addr string) (*WiredFrontend, error)
NewWiredFrontend returns a new netctl frontend for a wired interface.
func (*WiredFrontend) Close ¶
func (wf *WiredFrontend) Close() error
Close tears down the WiredFrontend
func (*WiredFrontend) Initialize ¶
func (wf *WiredFrontend) Initialize(nb *metadata.BackendMetaData, timeout time.Duration) error
Initialize starts the initialization phase and performs startup actions.
func (*WiredFrontend) Serve ¶
func (wf *WiredFrontend) Serve() error
Serve starts the wired frontend service.
func (*WiredFrontend) WiredAuthenticate8021X ¶
func (wf *WiredFrontend) WiredAuthenticate8021X(ctx context.Context, r *api.WiredAuthenticate8021XRequest) (*api.WiredAuthenticate8021XReply, error)
func (*WiredFrontend) WiredGetProperties ¶
func (wf *WiredFrontend) WiredGetProperties(ctx context.Context, r *api.WiredGetPropertiesRequest) (*api.WiredGetPropertiesReply, error)
type WirelessFrontend ¶
type WirelessFrontend struct { // This is now required by protoc-gen-go-grpc, in order // to guarantee forward compatibility when an RPC is added. api.UnimplementedNetctlFrontServer // contains filtered or unexported fields }
WirelessFrontend is a netctl frontend that is linked to a wireless interface.
func NewWirelessFrontend ¶
func NewWirelessFrontend(ifname, addr string, opts ...WirelessOption) (*WirelessFrontend, error)
NewWirelessFrontend returns a new netctl frontend for a wireless interface.
func (*WirelessFrontend) Close ¶
func (wf *WirelessFrontend) Close() error
Close tears down the WirelessFrontend
func (*WirelessFrontend) DisableInterface ¶
func (wf *WirelessFrontend) DisableInterface(ctx context.Context, r *api.DisableInterfaceRequest) (*api.DisableInterfaceReply, error)
InterfaceDisable disables the network interface controlled by the frontend.
func (*WirelessFrontend) EnableInterface ¶
func (wf *WirelessFrontend) EnableInterface(ctx context.Context, r *api.EnableInterfaceRequest) (*api.EnableInterfaceReply, error)
InterfaceEnable enables the network interface controlled by the frontend.
func (*WirelessFrontend) Initialize ¶
func (wf *WirelessFrontend) Initialize(nb *metadata.BackendMetaData, timeout time.Duration) error
Initialize starts the initialization phase and performs startup actions.
func (*WirelessFrontend) Serve ¶
func (wf *WirelessFrontend) Serve() error
Serve starts the wireless frontend service.
func (*WirelessFrontend) WirelessConnect ¶
func (wf *WirelessFrontend) WirelessConnect(ctx context.Context, r *api.WirelessConnectRequest) (*api.WirelessConnectReply, error)
WirelessConnect connects to a wireless network.
func (*WirelessFrontend) WirelessDisconnect ¶
func (wf *WirelessFrontend) WirelessDisconnect(ctx context.Context, r *api.WirelessDisconnectRequest) (*api.WirelessDisconnectReply, error)
WirelessDisconnect disconnects a wireless network.
func (*WirelessFrontend) WirelessGetProperties ¶
func (wf *WirelessFrontend) WirelessGetProperties(ctx context.Context, r *api.WirelessGetPropertiesRequest) (*api.WirelessGetPropertiesReply, error)
WirelessGetProperties returns the current properties of the wireless frontend.
func (*WirelessFrontend) WirelessMonitorProperties ¶
func (wf *WirelessFrontend) WirelessMonitorProperties(r *api.WirelessMonitorPropertiesRequest, stream api.NetctlFront_WirelessMonitorPropertiesServer) error
WirelessMonitorProperties handles a stream of wireless properties updates.
type WirelessOption ¶
type WirelessOption interface {
// contains filtered or unexported methods
}
WirelessOption is used to configure a netctl frontend.
func WithConnectLastNetwork ¶
func WithConnectLastNetwork() WirelessOption
WithConnectLastNetwork tells the Service to try to connect to the last known network on startup.
func WithManagerOptions ¶
func WithManagerOptions(mopts ...wireless.ManagerOption) WirelessOption
WithManagerOptions specifies a list of wireless.ManagerOptions that the frontend should used when constructing its wireless.Manager.
func WithRememberNetworks ¶
func WithRememberNetworks() WirelessOption
WithRememberNetworks tells the Service to cache network configurations.
func WithUUID ¶
func WithUUID() WirelessOption
WithUUID tells the frontend to use a UUID as its identifier with the backend. By default, the frontend is identified by its interface name.