Skip to content

Commit

Permalink
rename DHCPRequest method
Browse files Browse the repository at this point in the history
  • Loading branch information
soypat committed Dec 8, 2023
1 parent 39836e3 commit 1d49351
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stacks/dhcp_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type DHCPRequestConfig struct {
Xid uint32
}

func (d *DHCPClient) BeginIPv4Request(cfg DHCPRequestConfig) error {
func (d *DHCPClient) BeginRequest(cfg DHCPRequestConfig) error {
if cfg.Xid == 0 {
return errors.New("xid must be non-zero")
} else if !cfg.RequestedAddr.Is4() {
Expand Down
2 changes: 1 addition & 1 deletion stacks/stacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestDHCP(t *testing.T) {

client := stacks.NewDHCPClient(clientStack, 68)
server := stacks.NewDHCPServer(serverStack, siaddr, 67)
err := client.BeginIPv4Request(stacks.DHCPRequestConfig{
err := client.BeginRequest(stacks.DHCPRequestConfig{
RequestedAddr: requestedIP,
Xid: 0x12345678,
})
Expand Down

0 comments on commit 1d49351

Please sign in to comment.