Documentation ¶
Overview ¶
Copyright 2017 Politecnico di Torino
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Politecnico di Torino ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This file is a slight modified version of https://github.com/krolaw/dhcp4/blob/master/example_test.go
Index ¶
- Variables
- type DHCPHandler
- type DhcpModule
- func (m *DhcpModule) AttachExternalInterface(ifaceName string) (err error)
- func (m *DhcpModule) AttachToIoModule(ifaceId int, ifaceName string) (err error)
- func (m *DhcpModule) Configure(conf interface{}) (err error)
- func (m *DhcpModule) ConfigureParameters(netmask net.IPMask, addr_low net.IP, addr_high net.IP, dns net.IP, ...) (err error)
- func (m *DhcpModule) Deploy() (err error)
- func (m *DhcpModule) Destroy() (err error)
- func (m *DhcpModule) DetachExternalInterface(ifaceName string) (err error)
- func (m *DhcpModule) DetachFromIoModule(ifaceName string) (err error)
- func (m *DhcpModule) GetModuleId() string
- func (m *DhcpModule) ProcessPacket(p *hover.PacketIn) (err error)
- func (m *DhcpModule) ReadFrom(b []byte) (n int, addr net.Addr, err error)
- func (m *DhcpModule) WriteTo(b []byte, addr net.Addr) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
var DhcpServer = `` /* 3067-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type DHCPHandler ¶
type DHCPHandler struct {
// contains filtered or unexported fields
}
type DhcpModule ¶
type DhcpModule struct { ModuleId string // contains filtered or unexported fields }
func Create ¶
func Create(hc *hover.Client) *DhcpModule
func (*DhcpModule) AttachExternalInterface ¶
func (m *DhcpModule) AttachExternalInterface(ifaceName string) (err error)
func (*DhcpModule) AttachToIoModule ¶
func (m *DhcpModule) AttachToIoModule(ifaceId int, ifaceName string) (err error)
func (*DhcpModule) Configure ¶
func (m *DhcpModule) Configure(conf interface{}) (err error)
func (*DhcpModule) ConfigureParameters ¶
func (m *DhcpModule) ConfigureParameters(netmask net.IPMask, addr_low net.IP, addr_high net.IP, dns net.IP, router net.IP, leaseTime uint32, serverMAC net.HardwareAddr, serverIP net.IP) (err error)
TODO: this function should be split on smaller pieces.
func (*DhcpModule) Deploy ¶
func (m *DhcpModule) Deploy() (err error)
func (*DhcpModule) Destroy ¶
func (m *DhcpModule) Destroy() (err error)
func (*DhcpModule) DetachExternalInterface ¶
func (m *DhcpModule) DetachExternalInterface(ifaceName string) (err error)
func (*DhcpModule) DetachFromIoModule ¶
func (m *DhcpModule) DetachFromIoModule(ifaceName string) (err error)
func (*DhcpModule) GetModuleId ¶
func (m *DhcpModule) GetModuleId() string
func (*DhcpModule) ProcessPacket ¶
func (m *DhcpModule) ProcessPacket(p *hover.PacketIn) (err error)