package
0.0.0-20200221232812-81b9770086ea
Repository: https://github.com/elastic/dhcp.git
Documentation: pkg.go.dev
# Functions
DecapsulateRelay extracts the content of a relay message.
DecapsulateRelayIndex extracts the content of a relay message.
DuidFromBytes parses a Duid from a byte slice.
EncapsulateRelay creates a RelayMessage message containing the passed DHCPv6 message as payload.
ExtractMAC looks into the inner most PeerAddr field in the RelayInfo header which contains the EUI-64 address of the client making the request, populated by the dhcp relay, it is possible to extract the mac address from that IP.
FromBytes reads a DHCPv6 message from a byte stream.
GenerateTransactionID generates a random 3-byte transaction ID.
GetGlobalAddr returns a global address for the interface.
GetLinkLocalAddr returns a link-local address for the interface.
GetMacAddressFromEUI64 will return a valid MAC address ONLY if it's a EUI-48.
GetTime returns a time integer suitable for DUID-LLT, i.e.
GetTransactionID returns a transactionID of a message or its inner message in case of relay.
IsUsingUEFI function takes a DHCPv6 message and returns true if the machine trying to netboot is using UEFI of false if it is not.
MessageFromBytes parses a DHCPv6 message from a byte stream.
NewAdvertiseFromSolicit creates a new ADVERTISE packet based on an SOLICIT packet.
NewMessage creates a new DHCPv6 message with default options.
NewRelayReplFromRelayForw creates a MessageTypeRelayReply based on a MessageTypeRelayForward and replaces the inner message with the passed DHCPv6 message.
NewReplyFromMessage creates a new REPLY packet based on a Message.
NewRequestFromAdvertise creates a new REQUEST packet based on an ADVERTISE packet options.
NewSolicit creates a new SOLICIT message, using the given hardware address to derive the IAID in the IA_NA option.
ParseOpt4RD builds an Opt4RD structure from a sequence of bytes.
ParseOpt4RDMapRule builds an Opt4RDMapRule structure from a sequence of bytes.
ParseOpt4RDNonMapRule builds an Opt4RDNonMapRule structure from a sequence of bytes.
ParseOptBootFileParam builds an OptBootFileParam structure from a sequence of bytes.
ParseOptBootFileURL builds an OptBootFileURL structure from a sequence of bytes.
ParseOptClientArchType builds an OptClientArchType structure from a sequence of bytes The input data does not include option code and length bytes.
ParseOptClientId builds an OptClientId structure from a sequence of bytes.
ParseOptDNSRecursiveNameServer builds an OptDNSRecursiveNameServer structure from a sequence of bytes.
ParseOptDomainSearchList builds an OptDomainSearchList structure from a sequence of bytes.
build an OptElapsedTime structure from a sequence of bytes.
ParseOptFQDN deserializes from bytes to build a OptFQDN structure.
ParseOptIAAddress builds an OptIAAddress structure from a sequence of bytes.
build an OptIAForPrefixDelegation structure from a sequence of bytes.
ParseOptIANA builds an OptIANA structure from a sequence of bytes.
ParseOptIAPrefix an OptIAPrefix structure from a sequence of bytes.
build an OptInterfaceId structure from a sequence of bytes.
ParseOption parses data according to the given code.
build an OptNetworkInterfaceId structure from a sequence of bytes.
build an OptRelayMsg structure from a sequence of bytes.
ParseOptRemoteId builds an OptRemoteId structure from a sequence of bytes.
build an OptRequestedOption structure from a sequence of bytes.
ParseOptServerId builds an OptServerId structure from a sequence of bytes.
ParseOptStatusCode builds an OptStatusCode structure from a sequence of bytes.
ParseOptUserClass builds an OptUserClass structure from a sequence of bytes.
ParseOptVendorClass builds an OptVendorClass structure from a sequence of bytes.
ParseOptVendorOpts builds an OptVendorOpts structure from a sequence of bytes.
RelayMessageFromBytes parses a relay message from a byte stream.
WithArchType adds an arch type option to the packet.
WithClientID adds a client ID option to a DHCPv6 packet.
WithDNS adds or updates an OptDNSRecursiveNameServer.
WithDomainSearchList adds or updates an OptDomainSearchList.
WithFQDN adds a fully qualified domain name option to the packet.
WithIAID updates an OptIANA option with the provided IAID.
WithIANA adds or updates an OptIANA option with the provided IAAddress options.
WithNetboot adds bootfile URL and bootfile param options to a DHCPv6 packet.
WithRapidCommit adds the rapid commit option to a message.
WithRequestedOptions adds requested options to the packet.
WithServerID adds a client ID option to a DHCPv6 packet.
WithUserClass adds a user class option to the packet.
# Constants
Default ports.
Default ports.
DUID types.
DUID types.
DUID types.
DUID types.
No description provided by the author
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
MessageTypeNone is used internally and is not part of the RFC.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
The DHCPv6 message types defined per RFC 3315, Section 5.3.
see rfc4578.
see rfc4578.
see rfc4578.
see rfc4578.
see rfc4578.
see rfc4578.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
All DHCPv6 options.
No description provided by the author
# Variables
Default multicast groups.
Default multicast groups.
DuidTypeToString maps a DuidType to a name.
InterfaceAddresses is used to fetch addresses of an interface with given name.
# Structs
Duid is a DHCP Unique Identifier.
Duration is a duration as embedded in IA messages (IAPD, IANA, IATA).
Message represents a DHCPv6 Message as defined by RFC 3315 Section 6.
Opt4RDMapRule represents a 4RD Mapping Rule option The option is described in https://tools.ietf.org/html/rfc7600#section-4.9 The 4RD mapping rules are described in https://tools.ietf.org/html/rfc7600#section-4.2.
Opt4RDNonMapRule represents 4RD parameters other than mapping rules.
OptClientArchType represents an option CLIENT_ARCH_TYPE
This module defines the OptClientArchType structure.
OptClientId represents a Client ID option
This module defines the OptClientId and DUID structures.
OptDNSRecursiveNameServer represents a OptionDNSRecursiveNameServer option
This module defines the OptDNSRecursiveNameServer structure.
OptDomainSearchList list implements a OptionDomainSearchList option
This module defines the OptDomainSearchList structure.
OptElapsedTime implements the Elapsed Time option.
OptFQDN implements OptionFQDN option.
OptIAAddress represents an OptionIAAddr.
OptIAForPrefixDelegation implements the identity association for prefix delegation option defined by RFC 3633, Section 9.
OptIANA implements the identity association for non-temporary addresses option.
OptIAPrefix implements the IAPrefix option.
OptInterfaceId implements the interface-id option as defined by RFC 3315, Section 22.18.
No description provided by the author
OptNetworkInterfaceId implements the NIC ID option for network booting as defined by RFC 4578 Section 2.2 and RFC 5970 Section 3.4.
No description provided by the author
OptRemoteId implemens the Remote ID option.
OptRequestedOption implements the requested options option.
OptServerId represents a Server ID option
This module defines the OptServerId and DUID structures.
OptStatusCode represents a DHCPv6 Status Code option
This module defines the OptStatusCode structure.
OptUserClass represent a DHCPv6 User Class option
This module defines the OptUserClass structure.
OptVendorClass represents a DHCPv6 Vendor Class option.
OptVendorOpts represents a DHCPv6 Status Code option
This module defines the OptVendorOpts structure.
RelayMessage is a DHCPv6 relay agent message as defined by RFC 3315 Section 7.
# Type aliases
DuidType is the DUID type as defined in rfc3315.
MessageType represents the kind of DHCPv6 message.
Modifier defines the signature for functions that can modify DHCPv6 structures.
Opt4RD represents a 4RD option.
OptBootFileParam implements the OptionBootfileParam option
This module defines the OPT_BOOTFILE_PARAM structure.
OptBootFileURL implements the OptionBootfileURL option
This module defines the OptBootFileURL structure.
OptionCode is a single byte representing the code for a given Option.
OptionParser is a function signature for option parsing.
Options is a collection of options.
TransactionID is a DHCPv6 Transaction ID defined by RFC 3315, Section 6.