mod: Update dhcp libraries

This commit is contained in:
James Shubin
2023-11-21 15:38:04 -05:00
parent 6670407c9c
commit 29a124900c
3 changed files with 20 additions and 8 deletions

View File

@@ -92,16 +92,16 @@ func main() {
// TODO: add modifiers
log.Printf("Requesting...")
ctx := context.Background() // TODO: add to ^C handler
offer, ack, err := c.Request(ctx, modifiers...) // (offer, ack *dhcpv4.DHCPv4, err error)
ctx := context.Background() // TODO: add to ^C handler
lease, err := c.Request(ctx, modifiers...) // (lease *Lease, err error)
if err != nil {
log.Printf("Error requesting from server: %v", err)
return
}
// Show the results of the D-O-R-A exchange.
log.Printf("Offer: %+v", offer)
log.Printf("Ack: %+v", ack)
log.Printf("Offer: %+v", lease.Offer)
log.Printf("Ack: %+v", lease.ACK)
log.Printf("Done!")
}