Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_DHCP_CLIENT_PORT = 68
View Source
const DEFAULT_DHCP_RELAY_PORT = 68
Variables ¶
This section is empty.
Functions ¶
func GetMainNic ¶
func GetMainNic(nics []*desc.SGuestNetwork) (*desc.SGuestNetwork, error)
Types ¶
type SDHCPRelay ¶
type SDHCPRelay struct { OnRecv recvFunc // contains filtered or unexported fields }
func NewDHCPRelay ¶
func NewDHCPRelay(guestDHCPConn *dhcp.Conn, addrs []string) (*SDHCPRelay, error)
func (*SDHCPRelay) Setup ¶
func (r *SDHCPRelay) Setup(addr string) error
type SGuestDHCPServer ¶
type SGuestDHCPServer struct {
// contains filtered or unexported fields
}
func NewGuestDHCPServer ¶
func NewGuestDHCPServer(iface string, port int, relay []string) (*SGuestDHCPServer, error)
func (*SGuestDHCPServer) IsDhcpPacket ¶
func (s *SGuestDHCPServer) IsDhcpPacket(pkt dhcp.Packet) bool
func (*SGuestDHCPServer) RelaySetup ¶
func (s *SGuestDHCPServer) RelaySetup(addr string) error
func (*SGuestDHCPServer) Start ¶
func (s *SGuestDHCPServer) Start(blocking bool)
type SRelayCache ¶
type SRelayCache struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.