summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/nclient4/client.go
AgeCommit message (Collapse)Author
2023-03-25dhcpv4: implement interface for sending INFORM requestsDennis Marttinen
Signed-off-by: Dennis Marttinen <twelho@welho.tech>
2022-07-27dhcpv4: add a client method to facilitate lease renewalsDennis Marttinen
Signed-off-by: Dennis Marttinen <twelho@welho.tech>
2021-03-14nclient4: fix buildChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2021-03-13nclient4: Ensure server identifier matches (#410)Moritz Fischer
Ensure server identifier matches the offer server identifier when looking for ACKs or NAKs. This protects against rogue DHCP servers NAKing requests the shouldn't. Signed-off-by: Moritz Fischer <moritzf@google.com> Co-authored-by: Moritz Fischer <moritzf@google.com>
2021-01-20nclient4: WithUnicast default port should be 68 (#403)Canwu Yao
Signed-off-by: yaocw2020 <yaocanwu@gmail.com>
2020-09-16nclients: export serverAddr and ifaceHWAddrChris Koch
For any users to write their own Discover or Request methods, they need access to the ifaceHWAddr and serverAddr. Discovered while trying to move pinterest/bender to nclients. Signed-off-by: Chris Koch <chrisko@google.com>
2020-09-16nclient4: respect NAKsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-07-16- remove Lease.IDOptions and update corresponding struct / functionHu Jun
- add NewReleaseFromLease and update Client.Release() accordingly - update lease_test.go accordingly - remove example_lease_test.go Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-07-14- use modifiers to build release msg in Client.Release()Hu Jun
- update lease_test.go make sure server side error is caught - some minor fixes based on PR discussion Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-07-10- add Offer into LeaseHu Jun
- change Client.Request so it now only return Lease - change test case and example accordingly Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-06-23- make changes based on discussion on PR #386 of insomniacslk/dhcpHu Jun
Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-06-18- move the example to a separate file example_lease_test.goHu Jun
- fix a few more lint complains Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-06-17add lease&release support for nclient4Hu Jun
Signed-off-by: Hu Jun <hujun.work@gmail.com>
2019-11-29Added option nclient4.WithHWAddrDmitrii Okunev
This option allows to receive answers DHCP with arbitrary client addresses Signed-off-by: Dmitrii Okunev <xaionaro@fb.com>
2019-11-28Simplified porting from client4 to nclient4Dmitrii Okunev
Signed-off-by: Dmitrii Okunev <xaionaro@fb.com>
2019-09-24nclient6: copy & paste log infra to v6Chris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2019-06-19nclient4: add logging optionsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2019-04-17nclient4: fix conn race conditionChristopher Koch
Why did I ever think this would work?? Signed-off-by: Christopher Koch <chrisko@google.com>
2019-04-07nclient4: simplify New interfaceChristopher Koch
Signed-off-by: Christopher Koch <chrisko@google.com>
2019-03-27client4: add a new DHCPv4 client.Christopher Koch
- Able to send UDP packets before interface is configured. - Able to use any net.PacketConn. - RFC2131-compliant retransmission logic. - Tests. - Race-condition-averse. Previous clients (both mine and the ones here) are prone to race condition errors. Having one and only one place that calls receive on the socket "continuously" without having to coordinate hand-offs makes the logic way easier to follow, and allows for multiple requests in flux at a time. Signed-off-by: Christopher Koch <chrisko@google.com>