Documentation ¶
Index ¶
- Constants
- func GetMainNic(nics []*desc.SGuestNetwork) *desc.SGuestNetwork
- type SDHCPRelay
- type SGuestDHCPServer
- func (s *SGuestDHCPServer) IsDhcpPacket(pkt dhcp.Packet) bool
- func (s *SGuestDHCPServer) RelaySetup(addr string) error
- func (s *SGuestDHCPServer) ServeDHCP(ctx context.Context, pkt dhcp.Packet, addr *net.UDPAddr, intf *net.Interface) (dhcp.Packet, []string, error)
- func (s *SGuestDHCPServer) Start(blocking bool)
- type SRelayCache
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
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.