From 1d4935106b3fc4607cadf150cd99378a5dfc8657 Mon Sep 17 00:00:00 2001 From: soypat Date: Thu, 7 Dec 2023 23:42:49 -0300 Subject: [PATCH] rename DHCPRequest method --- stacks/dhcp_client.go | 2 +- stacks/stacks_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, })