modulepackage
0.0.0-20190402165401-39c137f31ad3
Repository: https://github.com/packethost/dhcp4-go.git
Documentation: pkg.go.dev
# README
dhcp4-go
DHCPv4 packet serialization/deserialization.
Includes a handler to create your own DHCPv4 server with (see handler.go
).
RFCs
Other RFCs are informational or obsoleted by newer versions.
- 2131: Dynamic Host Configuration Protocol
- 3396: Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)
License
This project is available under the Apache 2.0 license.
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPacket creates and returns a new packet with the specified OpCode.
NewPacketConn returns a PacketConn based on the specified net.PacketConn.
NewReply creates and returns a new reply packet given a request.
PacketFromBytes deserializes the wire-level representation of a DHCP packet contained in the []byte b into a Packet struct.
PacketToBytes serializes the DHCP packet pointed to by p into its wire-level representation.
Serve reads packets off the network and calls the specified handler.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
Message op codes defined in RFC2132.
Message op codes defined in RFC2132.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RFC2132 Section 9: DHCP Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC4388: Dynamic Host Configuration Protocol (DHCP) Leasequery.
From RFC3118: Authentication for DHCP Messages.
From RFC2563: DHCP Option to Disable Stateless Auto-Configuration in IPv4 Clients.
From RFC4280: Dynamic Host Configuration Protocol (DHCP) Options for Broadcast and Multicast Control Servers.
From RFC4280: Dynamic Host Configuration Protocol (DHCP) Options for Broadcast and Multicast Control Servers.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC3495: Dynamic Host Configuration Protocol (DHCP) Option for CableLabs Client Configuration.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC3442: The Classless Static Route Option for Dynamic Host Configuration Protocol (DHCP) version 4.
From RFC4702: The Dynamic Host Configuration Protocol (DHCP) Client Fully Qualified Domain Name (FQDN) Option.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC4388: Dynamic Host Configuration Protocol (DHCP) Leasequery.
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
RFC2132 Section 7: TCP Parameters.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2610: DHCP Options for Service Location Protocol.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC3397: Dynamic Host Configuration Protocol (DHCP) Domain Search Option.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
RFC2132 Section 4: IP Layer Parameters per Host.
From RFC4776: Dynamic Host Configuration Protocol (DHCPv4 and DHCPv6) Option for Civic Addresses Configuration Information.
From RFC6225: Dynamic Host Configuration Protocol Options for Coordinate-Based Location Configuration Information.
From RFC6225: Dynamic Host Configuration Protocol Options for Coordinate-Based Location Configuration Information.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC4174: The IPv4 Dynamic Host Configuration Protocol (DHCP) Option for the Internet Storage Name Service.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC3679: Unused Dynamic Host Configuration Protocol (DHCP) Option Codes.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
RFC2132 Section 5: IP Layer Parameters per Interface.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2937: The Name Service Search Option for DHCP.
From RFC2241: DHCP Options for Novell Directory Services.
From RFC2241: DHCP Options for Novell Directory Services.
From RFC2241: DHCP Options for Novell Directory Services.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC3679: Unused Dynamic Host Configuration Protocol (DHCP) Option Codes.
From RFC3679: Unused Dynamic Host Configuration Protocol (DHCP) Option Codes.
From RFC2242: NetWare/IP Domain Name and Information.
From RFC2242: NetWare/IP Domain Name and Information.
RFC2132 Section 8: Application and Service Parameters.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
RFC2132 Section 3: RFC 1497 Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC4833: Timezone Options for DHCP.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC4039: Rapid Commit Option for the Dynamic Host Configuration Protocol version 4 (DHCPv4).
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC3046: DHCP Relay Agent Information Option.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2610: DHCP Options for Service Location Protocol.
From RFC3361: Dynamic Host Configuration Protocol (DHCP-for-IPv4) Option for Session Initiation Protocol (SIP) Servers.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC3011: The IPv4 Subnet Selection Option for DHCP.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC4833: Timezone Options for DHCP.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
RFC2132 Section 6: Link Layer Parameters per Interface.
From RFC3679: Unused Dynamic Host Configuration Protocol (DHCP) Option Codes.
From RFC2485: DHCP Option for The Open Group\x27s User Authentication Protocol.
From RFC3004: The User Class Option for DHCP.
From RFC4578: Dynamic Host Configuration Protocol (DHCP) Options for the Intel Preboot eXecution Environment (PXE).
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC3925: Vendor-Identifying Vendor Options for Dynamic Host Configuration Protocol version 4 (DHCPv4).
From RFC3925: Vendor-Identifying Vendor Options for Dynamic Host Configuration Protocol version 4 (DHCPv4).
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
From RFC2132: DHCP Options and BOOTP Vendor Extensions.
# Variables
No description provided by the author
No description provided by the author
# Structs
Ack is a server to client packet with configuration parameters, including committed network address.
Nak is a server to client packet indicating client's notion of network address is incorrect (e.g., client has moved to new subnet) or client's lease as expired.
Offer is a server to client packet in response to DHCPDISCOVER with offer of configuration parameters.
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
FIXME(betawaffle) Handler defines the interface an object needs to implement to handle DHCP packets.
OptionGetter defines a bag of functions that can be used to get options.
OptionSetter defines a bag of functions that can be used to set options.
PacketConn groups PacketReader and PacketWriter to form a subset of net.PacketConn.
No description provided by the author
PacketReader defines an adaptation of the ReadFrom function (as defined net.PacketConn) that includes the interface index the packet arrived on.
No description provided by the author
PacketWriter defines an adaptation of the WriteTo function (as defined net.PacketConn) that includes the interface index the packet should be sent on.
Reply defines an interface implemented by DHCP replies.
ReplyWriter defines an interface for the object that writes a reply to the network to the intended received, be it via broadcast or unicast.
No description provided by the author
# Type aliases
MessageType is the type for the various DHCP messages defined in RFC2132.
No description provided by the author
Option is the type for DHCP option tags.
OptionMap maps DHCP option tags to their values.
No description provided by the author