Registry / networking / d2g-dhcp4client

d2g-dhcp4client

JSON →
library1.0.0gogounverified

A DHCP client library for Go supporting IPv4.

go get github.com/d2g/dhcp4client
INSTALL
IMPORT
SIG · D2G-DHCP4CLIENT
D
d2g-dhcp4client
networkinggov1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dhcp4client
github.com/d2g/dhcp4client

Send a DHCP request and print the assigned IP address.

package main import ( "github.com/d2g/dhcp4client" "log" "net" ) func main() { client, err := dhcp4client.New() if err != nil { log.Fatal(err) } defer client.Close() success, acknowledgement, err := client.Request() if err != nil { log.Fatal(err) } if success { log.Printf("Got IP: %v\n", acknowledgement.YourIP) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
d2g-dhcp4client — go get d2g-dhcp4client · libregistry