diff --git a/stacks/dhcp_client.go b/stacks/dhcp_client.go index 41ec1b2..8c9c9a2 100644 --- a/stacks/dhcp_client.go +++ b/stacks/dhcp_client.go @@ -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() { diff --git a/stacks/stacks_test.go b/stacks/stacks_test.go index 4d24ba0..a28e3ab 100644 --- a/stacks/stacks_test.go +++ b/stacks/stacks_test.go @@ -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, })