summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2018-11-12OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-12OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-12OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: remove extra linePablo Mazzini
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: fix commentPablo Mazzini
2018-11-11add OptRelayAgentInformationPablo Mazzini
2018-11-09[ztpv4] add Opt60 (vc) parsing (#187)insomniac
2018-11-09address commentsPablo Mazzini
2018-11-09add additional testPablo Mazzini
2018-11-09update commentsPablo Mazzini
2018-11-09return nil vendor dataPablo Mazzini
2018-11-09return nil vendor dataPablo Mazzini
2018-11-09fix typo #2Pablo Mazzini
2018-11-09fix typoPablo Mazzini
2018-11-09parse only option 60Pablo Mazzini
2018-11-08Added DHCPv6 packet crafting example (#192)insomniac
2018-11-08Added DHCPv6 client example (#191)insomniac
2018-11-08Merge branch 'dhcpv6_client_example' of github.com:insomniacslk/dhcp into ↵Andrea Barberio
dhcpv6_client_example
2018-11-08Added DHCPv6 client exampleAndrea Barberio
2018-11-08Added DHCPv6 client exampleAndrea Barberio
2018-11-07Add netboot/netconf support for DHCPv4 (#185)Marco Guerri
2018-11-07Adding module for DHCPv6 Vendor Options (Opt 17) (#130)Chris Gorham
2018-11-06[ztp] add Opt60 (vc) and Opt124 (vico) parsingPablo Mazzini
2018-11-06[WIP] Added DHCPv4 server (#178)insomniac
* Added DHCPv4 server * Added more modifiers * Fixed some bugs
2018-10-28Updated README.md to include fbenderAndrea Barberio
2018-10-26Building with Go 1.11 stable instead of rc1Andrea Barberio
2018-10-18Make listening port for dhcpv4 client configurable (#179)Gianni Vialetto
2018-10-17Custom client/server addresses/ports for DHCPv4 client (#172)Gianni Vialetto
2018-10-16OptIAPrefix: sub-options (#177)Pablo Mazzini
2018-10-15OptIAForPrefixDelegation: make fields public (#176)Pablo Mazzini
2018-10-15Added String methods for types (#175)Pablo Mazzini
2018-10-12Merge pull request #173 from knweiss/statuscodesPablo Mazzini
statuscodes: Add RFC 5007/5460/7653/8156 status codes
2018-10-12statuscodes: Add RFC 5007/5460/7653/8156 status codesKarsten Weiss
2018-10-11Add some more DHCPv6 option tests. (#171)David Barr
* Add some more DHCPv6 option tests. * Remove AddRequestedOption() duplicate detection test due to failing on Go 1.9
2018-10-09Avoid panic on malformed OptIAPrefixDavid Barr
2018-10-08Merge pull request #169 from insomniacslk/fix_exchange_v4Sean Karlage
dhcpv4: fix but in Exchange where a nil packet is returned if send fails
2018-10-08dhcpv4: fix but in Exchange where a nil packet is returned if send failsAndrea Barberio
2018-10-07DHCPv4: syscall -> x/sys/unixSean Karlage
Fixes #156 Build a simple client like so: ``` package main import ( "fmt" "time" "github.com/insomniacslk/dhcp/dhcpv4" ) func main() { client := dhcpv4.Client{ReadTimeout: 5 * time.Second, WriteTimeout: 5 * time.Second} conversation, err := client.Exchange("en0", nil) if err != nil { fmt.Println(err) } for _, m := range conversation { fmt.Println(m.Summary()) } } ``` and run: ``` $ sudo ./main Password: DHCPv4 opcode=BootRequest hwtype=Ethernet hwaddrlen=6 hopcount=0 transactionid=0xabfad715 numseconds=0 flags=Broadcast (0x8000) clientipaddr=0.0.0.0 youripaddr=0.0.0.0 serveripaddr=0.0.0.0 gatewayipaddr=0.0.0.0 clienthwaddr=8c:85:90:20:2e:33 serverhostname= bootfilename= options= DHCP Message Type -> DISCOVER Parameter Request List -> [Subnet Mask, Router, Domain Name, Domain Name Server] End -> [] DHCPv4 opcode=BootReply hwtype=Ethernet hwaddrlen=6 hopcount=0 transactionid=0xabfad715 numseconds=0 flags=Broadcast (0x8000) clientipaddr=0.0.0.0 youripaddr=192.168.0.105 serveripaddr=0.0.0.0 gatewayipaddr=0.0.0.0 clienthwaddr=8c:85:90:20:2e:33 serverhostname= bootfilename= options= DHCP Message Type -> OFFER Server Identifier -> 192.168.0.1 IP Addresses Lease Time -> 5648 Subnet Mask -> ffffff00 Routers -> 192.168.0.1 Domain Name Servers -> 8.8.8.8, 8.8.4.4 End -> [] DHCPv4 opcode=BootRequest hwtype=Ethernet hwaddrlen=6 hopcount=0 transactionid=0xabfad715 numseconds=0 flags=Broadcast (0x8000) clientipaddr=0.0.0.0 youripaddr=0.0.0.0 serveripaddr=192.168.0.1 gatewayipaddr=0.0.0.0 clienthwaddr=8c:85:90:20:2e:33 serverhostname= bootfilename= options= DHCP Message Type -> REQUEST Requested IP Address -> 192.168.0.105 Server Identifier -> 192.168.0.1 End -> [] DHCPv4 opcode=BootReply hwtype=Ethernet hwaddrlen=6 hopcount=0 transactionid=0xabfad715 numseconds=0 flags=Broadcast (0x8000) clientipaddr=0.0.0.0 youripaddr=192.168.0.105 serveripaddr=0.0.0.0 gatewayipaddr=0.0.0.0 clienthwaddr=8c:85:90:20:2e:33 serverhostname= bootfilename= options= DHCP Message Type -> ACK Server Identifier -> 192.168.0.1 IP Addresses Lease Time -> 7200 Subnet Mask -> ffffff00 Routers -> 192.168.0.1 Domain Name Servers -> 8.8.8.8, 8.8.4.4 End -> [] ```
2018-10-06Dynamically determine loopback interface for server test (#167)David Barr
* Dynamically determine loopback interface for server test "lo" isn't configured everywhere. In FreeBSD for example, TestServerActivateAndServe() fails as the loopback address is "lo0", not "lo". Also, I don't believe the Zone is required for net.UDPAddr as ::1 is being used, not an fe80:: address. * Add error handling to getLoopbackInterface() - My editor also snuck in some space indentation
2018-10-06Add support for DHCPv6-PD sub-options (#166)David Barr
2018-10-03dhcpv4: Add OptRootPath (#163)Sean Karlage
* dhcpv4: Add OptRootPath Adds a root path option that supports DHCPv4 option 17 * Add root path parsing to giant option parsing switch
2018-10-03BSDP: Fix MessageTypeFromPacket to return a pointerSean Karlage
As @insomiacslk pointed out in #161, it's probably better to return a pointer rather than a (MessageType, bool) combo.