Package dhcp6 implements a DHCPv6 server, as described in RFC 3315. MIT Licensed.

dhcp6 Build Status GoDoc Go Report Card

Package dhcp6 implements a DHCPv6 server, as described in IETF RFC 3315. MIT Licensed.

At this time, the API is not stable, and may change over time. The eventual goal is to implement a server, client, and testing facilities for consumers of this package.

The design of this package is inspired by Go's net/http package. The Go standard library is Copyright (c) 2012 The Go Authors. All rights reserved. The Go license can be found at https://golang.org/LICENSE.

Owner
Matt Layher
Software Engineer. Go, Linux, and open source software enthusiast. On and ever upward.
Matt Layher
Comments
  • Simplify API, fix package structure, simplify parsing.

    Simplify API, fix package structure, simplify parsing.

    Closes #22.

    • Cleaned up parsing code. No more magic numbers and manual indexing.
    • Options moved to their own package.
    • Server moved to its own package.
    • All tests passing.

    It may be easier to explore these changes here: https://github.com/hugelgupf/dhcp6/tree/simplify-api

  • WIP Simple Client package.

    WIP Simple Client package.

    Requires #23. Still untested, because I don't have a DHCP server handy -- and the part that is new here is the UDP socket instead of the raw socket :)

    This is so far all that we need for the u-root dhclient.

  • Vendor Class Option seems not correct

    Vendor Class Option seems not correct

    Hello, OptionVendorClass seems not respect RFC 3315, Section 22.16. Cause the EnterpriseNumber is missing.

    I have fix, plz see at: https://github.com/jerome-laforge/dhcp6/commit/78927a18b545211ced8c2e832aadc36ae6ded11e

    If it suitable for you, I can make PR. thx

  • ElapsedTime when elapsed time values greater than the largest time value that can be represented in the Elapsed Time option.

    ElapsedTime when elapsed time values greater than the largest time value that can be represented in the Elapsed Time option.

    Hello, When elapsed time values greater than the largest time value that can be represented in the Elapsed Time option, the client uses the value 0xffff.

    Plz this commit https://github.com/jerome-laforge/dhcp6/commit/924665b1b681f36187f78da14256467fc0fd8fa2

    If it is suitable for you, I can submit a PR

  • InterfaceID doesn't respect RFC 3315

    InterfaceID doesn't respect RFC 3315

    Hello InterfaceID seem not respect the RFC 3315. InterfaceID is just opaque value and not Length-Value.

    Plz see this commit that fix this issue: https://github.com/jerome-laforge/dhcp6/commit/113a6bf6a8e1999dee63e32d363ffa687b36111c

  • Set slice's max for option's data

    Set slice's max for option's data

    Hello, In unit test of our internal injector, we use to compare expected DHCPv6 packet and actual packet with this assert.

    Unfortunately, on the capacity option is not equal when when unmarshall from binary and when we create the packet from struct because capacity is not the same. So assert fails.

    Here example's extract:

    Diff:
    --- Expected
    +++ Actual
    @@ -1,2 +1,2 @@
    -(*dhcp6.Packet)(0xc82001b640)({
    +(*dhcp6.Packet)(0xc82001b650)({
      MessageType: (dhcp6.MessageType) MessageTypeSolicit,
    @@ -7,3 +7,3 @@
       (dhcp6.OptionCode) OptionClientID: ([][]uint8) (len=1 cap=1) {
    -   ([]uint8) (len=10 cap=130) {
    +   ([]uint8) (len=10 cap=10) {
    

    By the way, I seems to me more consistent, that set slice's max for option's data for avoiding all corrupt data (for example with append) This commit is fixing this pb: https://github.com/jerome-laforge/dhcp6/commit/2ba8cd69e42c7988facede487423eeccb703137a

    If it is suitable for you, I can make a PR.

  • Create dhcp6test package

    Create dhcp6test package

    Create a dhcp6/dhcp6test package akin to net/http/httptest, with types like Recorder and Server (test server). This will clean up some of the current tests, and make it easier to test Handler types.

    This may also require throwing out some or all of mux_test.go and server_test.go, and rewriting them in package dhcp6_test instead, to avoid circular imports.

  • dhcp6: move most options to another package

    dhcp6: move most options to another package

    The API is bloated because of all of the available options, and it really shows in the godoc page especially. Most unusual options should be moved to another package.

  • struct dhcp6.Packet cannot match DHCPv6 relay pack

    struct dhcp6.Packet cannot match DHCPv6 relay pack

    Hello: As title """ p := new(dhcp6.Packet) if err := p.UnmarshalBinary(b); err != nil { return nil, err } """ When ParseRequest UnmarshalBinary a dhcpv6 relay request, because of the structure does not match, it will lead to failure.

  • Add dhcp6client

    Add dhcp6client

    This adds a dhcp6 client. This code is currently used in github.com/u-root.

    Matt, if this seems like something you could bring in, let me know. If you have changes you want made, no problem. If you'd rather not bring it in, that's fine too.

    thanks.

    Signed-off-by: Ronald G. Minnich [email protected]

Related tags
Package ethernet implements marshaling and unmarshaling of IEEE 802.3 Ethernet II frames and IEEE 802.1Q VLAN tags. MIT Licensed.

ethernet Package ethernet implements marshaling and unmarshaling of IEEE 802.3 Ethernet II frames and IEEE 802.1Q VLAN tags. MIT Licensed. For more in

Dec 29, 2022
Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed.

raw Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed. For more information about using ra

Dec 28, 2022
Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and deadline support. MIT Licensed.

socket Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and d

Dec 14, 2022
A go implementation of the STUN client (RFC 3489 and RFC 5389)

go-stun go-stun is a STUN (RFC 3489, 5389) client implementation in golang (a.k.a. UDP hole punching). RFC 3489: STUN - Simple Traversal of User Datag

Jan 5, 2023
CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.
CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.

CoreRAD CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed. To get started with

Nov 14, 2022
Rabbitio - Rabbit stream cipher package RFC 4503 for Go

rabbitio rabbitio is a rabbit stream cipher packge based on RFC 4503 for golang

Dec 14, 2022
CoAP Client/Server implementing RFC 7252 for the Go Language

Canopus Canopus is a client/server implementation of the Constrained Application Protocol (CoAP) Updates 25.11.2016 I've added basic dTLS Support base

Nov 18, 2022
Fast RFC 5389 STUN implementation in go

STUN Package stun implements Session Traversal Utilities for NAT (STUN) [RFC5389] protocol and client with no external dependencies and zero allocatio

Nov 28, 2022
Diameter stack and Base Protocol (RFC 6733) for the Go programming language

Diameter Base Protocol Package go-diameter is an implementation of the Diameter Base Protocol RFC 6733 and a stack for the Go programming language. St

Dec 28, 2022
URI Templates (RFC 6570) implemented in Go

uritemplates -- import "github.com/jtacoma/uritemplates" Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf

Jan 15, 2022
Fast RFC 5389 STUN implementation in go

STUN Package stun implements Session Traversal Utilities for NAT (STUN) [RFC5389] protocol and client with no external dependencies and zero allocatio

Jan 1, 2023
RFC 1413 compliant fake identd

RFC 1413 compliant fake identd. It is an implementation of the Ident Protocol, but it lies to the clients and always returns fake identities of queried users.

Oct 29, 2022
Gcra - Package gcra implements the generic cell rate algorithm

gcra Package gcra implements the generic cell rate algorithm (GCRA). Example opt

Jan 23, 2022
TritonHTTP - A simple web server that implements a subset of the HTTP/1.1 protocol specification

TritonHTTP Spec Summary Here we provide a concise summary of the TritonHTTP spec. You should read the spec doc for more details and clarifications. HT

Nov 5, 2022
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang

中文文档 Gmqtt News: MQTT V5 is now supported. But due to those new features in v5, there area lots of breaking changes. If you have any migration problem

Jan 5, 2023
A little ping pong service that implements rate limiting with golang

Fred the Guardian Introduction Writing a little ping pong service that implements rate limiting with the programming language golang. Requirements Web

Jan 2, 2022
P2PDistributedHashTable - A golang Kademlia/Bittorrent DHT library that implements BEP5
P2PDistributedHashTable - A golang Kademlia/Bittorrent DHT library that implements BEP5

This is a golang Kademlia/Bittorrent DHT library that implements BEP 5. It's typ

Apr 10, 2022
Fetch-npm-package - A small utility that can be used to fetch a given version of a NPM package

Use fetch-npm-package <package> <version> <output-dir> E.g. fetch-npm-package is

May 21, 2022