diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2016-12-28 23:07:47 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2016-12-28 23:53:55 +0100 |
commit | f01e5383616dad18c29facf9fe94150f0a78ca78 (patch) | |
tree | dc8fd7b3c4a78586768217fed2a039293ede9615 /src/dhcpv4.c | |
parent | 700f5abbeff4e3dcc0f6b12d4883315e2cfb9b74 (diff) |
dhcpv4: make dhcpv4_msg_to_string static
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/dhcpv4.c')
-rw-r--r-- | src/dhcpv4.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/dhcpv4.c b/src/dhcpv4.c index 9d9ed92..2381cb1 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -46,30 +46,6 @@ int init_dhcpv4(void) return 0; } -char *dhcpv4_msg_to_string(uint8_t reqmsg) -{ - switch (reqmsg) { - case (DHCPV4_MSG_DISCOVER): - return "DHCPV4_MSG_DISCOVER"; - case (DHCPV4_MSG_OFFER): - return "DHCPV4_MSG_OFFER"; - case (DHCPV4_MSG_REQUEST): - return "DHCPV4_MSG_REQUEST"; - case (DHCPV4_MSG_DECLINE): - return "DHCPV4_MSG_DECLINE"; - case (DHCPV4_MSG_ACK): - return "DHCPV4_MSG_ACK"; - case (DHCPV4_MSG_NAK): - return "DHCPV4_MSG_NAK"; - case (DHCPV4_MSG_RELEASE): - return "DHCPV4_MSG_RELEASE"; - case (DHCPV4_MSG_INFORM): - return "DHCPV4_MSG_INFORM"; - default: - return "UNKNOWN"; - } -} - int setup_dhcpv4_interface(struct interface *iface, bool enable) { if (iface->dhcpv4_event.uloop.fd > 0) { @@ -233,6 +209,30 @@ int setup_dhcpv4_interface(struct interface *iface, bool enable) return 0; } +static char *dhcpv4_msg_to_string(uint8_t reqmsg) +{ + switch (reqmsg) { + case (DHCPV4_MSG_DISCOVER): + return "DHCPV4_MSG_DISCOVER"; + case (DHCPV4_MSG_OFFER): + return "DHCPV4_MSG_OFFER"; + case (DHCPV4_MSG_REQUEST): + return "DHCPV4_MSG_REQUEST"; + case (DHCPV4_MSG_DECLINE): + return "DHCPV4_MSG_DECLINE"; + case (DHCPV4_MSG_ACK): + return "DHCPV4_MSG_ACK"; + case (DHCPV4_MSG_NAK): + return "DHCPV4_MSG_NAK"; + case (DHCPV4_MSG_RELEASE): + return "DHCPV4_MSG_RELEASE"; + case (DHCPV4_MSG_INFORM): + return "DHCPV4_MSG_INFORM"; + default: + return "UNKNOWN"; + } +} + static void free_dhcpv4_assignment(struct dhcpv4_assignment *a) { if (a->head.next) |