Documentation ¶
Index ¶
- Constants
- type AsicdClient
- type BootPMsgStruct
- type ClientIdStruct
- type ClientJson
- type DHCPServer
- func (server *DHCPServer) InitServer(paramDir string)
- func (server *DHCPServer) ProcessRecvPkts(port int32, pkt gopacket.Packet)
- func (server *DHCPServer) StartAllDhcpServer()
- func (server *DHCPServer) StartDhcpServer(ifIdx int32)
- func (server *DHCPServer) StartLeaseEntryHandler(port int32, ipAddr uint32, macAddr string)
- func (server *DHCPServer) StartRxDhcpPkt(port int32)
- func (server *DHCPServer) StartServer(paramDir string)
- func (server *DHCPServer) StartStaleEntryHandler(port int32, ipAddr uint32, macAddr string)
- func (server *DHCPServer) StopAllDhcpServer()
- func (server *DHCPServer) StopDhcpServer(ifIdx int32)
- type DNSStruct
- type DhcpClientBase
- type DhcpGlobalConfig
- type DhcpIntfConfig
- type DhcpIntfData
- type DhcpIntfKey
- type DhcpMsgTypeStruct
- type DhcpOfferedData
- type DhcpOptionData
- type DomainNameStruct
- type EthHdrMetadata
- type HostNameStruct
- type IPAddrLeaseTimeStruct
- type IPHdrMetadata
- type L3Property
- type LagProperty
- type MaxDhcpMsgSizeStruct
- type NetBIOSServerStruct
- type OptionFields
- type OptionMetadata
- type ParamReqListStruct
- type PktMetadata
- type PortProperty
- type RebindingTimeStruct
- type RenewalTimeStruct
- type ReqIPAddrStruct
- type RouterStruct
- type ServerIdStruct
- type StaticRouteStruct
- type SubnetMaskStruct
- type TFTPServerAddrStruct
- type UDPHdrMetadata
- type VendorSpecificInfoStruct
- type VlanProperty
Constants ¶
View Source
const ( SubnetMaskOptCode uint8 = 1 //ParamReqItemCode = 1 RouterOptCode uint8 = 3 //ParamReqItemCode = 3 DNSOptCode uint8 = 6 //ParamReqItemCode = 6 HostNameOptCode uint8 = 12 DomainNameOptCode uint8 = 15 //ParamReqItemCode = 15 StaticRouteOptCode uint8 = 33 //ParamReqItemCode = 33 VendorSpecificInfoOptCode uint8 = 43 //ParamReqItemCode = 43 NetBIOSServerOptCode uint8 = 44 //ParamReqItemCode = 44 ReqIPAddrOptCode uint8 = 50 IPAddrLeaseTimeOptCode uint8 = 51 DhcpMsgTypeOptCode uint8 = 53 ServerIdOptCode uint8 = 54 ParamReqListOptCode uint8 = 55 MaxDhcpMsgSizeOptCode uint8 = 57 RenewalTimeOptCode uint8 = 58 RebindingTimeOptCode uint8 = 59 ClientIdOptCode uint8 = 61 TFTPServerAddrOptCode uint8 = 150 //ParamReqItemCode = 150 EndOptCode uint8 = 255 )
View Source
const ( DHCPServerPort uint16 = 67 DHCPClientPort uint16 = 68 UDPProto uint8 = 17 BootPReply uint8 = 2 BootPRequest uint8 = 1 UDP_HDR_LEN uint16 = 8 CLIENT_HW_ADDR_LEN int = 16 MAX_LEN_SERVER_NAME int = 64 MAX_LEN_BOOT_FILENAME int = 128 DHCPDISCOVER uint8 = 1 DHCPOFFER uint8 = 2 DHCPREQUEST uint8 = 3 DHCPACK uint8 = 5 DHCPRELEASE uint8 = 7 BOOTP_MSG_SIZE uint16 = 236 )
View Source
const (
OFFERED uint8 = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsicdClient ¶
type AsicdClient struct { DhcpClientBase ClientHdl *asicdServices.ASICDServicesClient }
type BootPMsgStruct ¶
type BootPMsgStruct struct { OPCode uint8 HWAddrType uint8 HWAddrLen uint8 Hops uint8 TransactionId uint32 TimeElapsed uint16 Flags uint16 ClientIPAddr uint32 YourIPAddr uint32 ServerIPAddr uint32 RelayAgentIPAddr uint32 ClientHWAddr []byte ServerName []byte BootFilename []byte MagicCookie uint32 //DhcpOptFields OptionFields DhcpOptionMap map[uint8]DhcpOptionData }
func NewBootPMsgStruct ¶
func NewBootPMsgStruct() *BootPMsgStruct
type ClientIdStruct ¶
type ClientIdStruct struct { OptMd OptionMetadata ClientId []byte }
type ClientJson ¶
type DHCPServer ¶
type DHCPServer struct { DhcpGlobalConf DhcpGlobalConfig DhcpGlobalConfCh chan DhcpGlobalConfig DhcpIntfConfCh chan DhcpIntfConfig DhcpIntfConfRetCh chan error DhcpIntfConfMap map[DhcpIntfKey]DhcpIntfData InitDone chan bool // contains filtered or unexported fields }
func NewDHCPServer ¶
func NewDHCPServer(logger *logging.Writer) *DHCPServer
func (*DHCPServer) InitServer ¶
func (server *DHCPServer) InitServer(paramDir string)
func (*DHCPServer) ProcessRecvPkts ¶
func (server *DHCPServer) ProcessRecvPkts(port int32, pkt gopacket.Packet)
func (*DHCPServer) StartAllDhcpServer ¶
func (server *DHCPServer) StartAllDhcpServer()
func (*DHCPServer) StartDhcpServer ¶
func (server *DHCPServer) StartDhcpServer(ifIdx int32)
func (*DHCPServer) StartLeaseEntryHandler ¶
func (server *DHCPServer) StartLeaseEntryHandler(port int32, ipAddr uint32, macAddr string)
func (*DHCPServer) StartRxDhcpPkt ¶
func (server *DHCPServer) StartRxDhcpPkt(port int32)
func (*DHCPServer) StartServer ¶
func (server *DHCPServer) StartServer(paramDir string)
func (*DHCPServer) StartStaleEntryHandler ¶
func (server *DHCPServer) StartStaleEntryHandler(port int32, ipAddr uint32, macAddr string)
func (*DHCPServer) StopAllDhcpServer ¶
func (server *DHCPServer) StopAllDhcpServer()
func (*DHCPServer) StopDhcpServer ¶
func (server *DHCPServer) StopDhcpServer(ifIdx int32)
type DNSStruct ¶
type DNSStruct struct { OptMd OptionMetadata DNS []byte }
type DhcpClientBase ¶
type DhcpClientBase struct { Address string Transport thrift.TTransport PtrProtocolFactory *thrift.TBinaryProtocolFactory }
type DhcpGlobalConfig ¶
type DhcpIntfConfig ¶
type DhcpIntfData ¶
type DhcpIntfData struct {
// contains filtered or unexported fields
}
type DhcpIntfKey ¶
type DhcpIntfKey struct {
// contains filtered or unexported fields
}
type DhcpMsgTypeStruct ¶
type DhcpMsgTypeStruct struct { OptMd OptionMetadata MsgType []byte }
type DhcpOfferedData ¶
type DhcpOptionData ¶
type DomainNameStruct ¶
type DomainNameStruct struct { OptMd OptionMetadata DomainName []byte }
type EthHdrMetadata ¶
type EthHdrMetadata struct {
// contains filtered or unexported fields
}
func NewEthHdrMetadata ¶
func NewEthHdrMetadata() *EthHdrMetadata
type HostNameStruct ¶
type HostNameStruct struct { OptMd OptionMetadata HostName []byte }
type IPAddrLeaseTimeStruct ¶
type IPAddrLeaseTimeStruct struct { OptMd OptionMetadata IPAddrLeaseTime []byte }
type IPHdrMetadata ¶
func NewIPHdrMetadata ¶
func NewIPHdrMetadata() *IPHdrMetadata
type L3Property ¶
type L3Property struct { //State uint8 IpAddr uint32 Mask uint32 DhcpIfKey DhcpIntfKey DhcpConfig bool }
type LagProperty ¶
type MaxDhcpMsgSizeStruct ¶
type MaxDhcpMsgSizeStruct struct { OptMd OptionMetadata MaxDhcpMsgSize []byte }
type NetBIOSServerStruct ¶
type NetBIOSServerStruct struct { OptMd OptionMetadata NetBIOSServer []byte }
type OptionFields ¶
type OptionFields struct { SubnetMaskOpt bool SubnetMaskVar SubnetMaskStruct RouterOpt bool RouterVar RouterStruct DNSOpt bool DNSVar DNSStruct HostNameOpt bool HostNameVar HostNameStruct DomainNameOpt bool DomainNameVar DomainNameStruct StaticRouteOpt bool StaticRouteVar StaticRouteStruct VendorSpecificInfoOpt bool VendorSpecificInfoVar VendorSpecificInfoStruct NetBIOSServerOpt bool NetBIOSServerVar NetBIOSServerStruct ReqIPAddrOpt bool ReqIPAddrVar ReqIPAddrStruct IPAddrLeaseTimeOpt bool IPAddrLeaseTimeVar IPAddrLeaseTimeStruct DhcpMsgTypeOpt bool DhcpMsgTypeVar DhcpMsgTypeStruct ServerIdOpt bool ServerIdVar ServerIdStruct ParamReqListOpt bool ParamReqListVar ParamReqListStruct MaxDhcpMsgSizeOpt bool MaxDhcpMsgSizeVar MaxDhcpMsgSizeStruct RenewalTimeOpt bool RenewalTimeVar RenewalTimeStruct RebindingTimeOpt bool RebindingTimeVar RebindingTimeStruct ClientIdOpt bool ClientIdVar ClientIdStruct TFTPServerAddrOpt bool TFTPServerAddrVar TFTPServerAddrStruct }
type OptionMetadata ¶
type ParamReqListStruct ¶
type ParamReqListStruct struct { OptMd OptionMetadata ParamReqList []byte }
type PktMetadata ¶
type PktMetadata struct {
// contains filtered or unexported fields
}
func NewPktMetadata ¶
func NewPktMetadata() *PktMetadata
type PortProperty ¶
type RebindingTimeStruct ¶
type RebindingTimeStruct struct { OptMd OptionMetadata RebindingTime []byte }
type RenewalTimeStruct ¶
type RenewalTimeStruct struct { OptMd OptionMetadata RenewalTime []byte }
type ReqIPAddrStruct ¶
type ReqIPAddrStruct struct { OptMd OptionMetadata ReqIPAddr []byte }
type RouterStruct ¶
type RouterStruct struct { OptMd OptionMetadata Router []byte }
type ServerIdStruct ¶
type ServerIdStruct struct { OptMd OptionMetadata ServerId []byte }
type StaticRouteStruct ¶
type StaticRouteStruct struct { OptMd OptionMetadata StaticRoute []byte }
type SubnetMaskStruct ¶
type SubnetMaskStruct struct { OptMd OptionMetadata SubnetMask []byte }
type TFTPServerAddrStruct ¶
type TFTPServerAddrStruct struct { OptMd OptionMetadata TFTPServerAddr []byte }
type UDPHdrMetadata ¶
func NewUDPHdrMetadata ¶
func NewUDPHdrMetadata() *UDPHdrMetadata
type VendorSpecificInfoStruct ¶
type VendorSpecificInfoStruct struct { OptMd OptionMetadata VendorSpecificInfo []byte }
type VlanProperty ¶
Click to show internal directories.
Click to hide internal directories.