#include <headers.h>
#include <datatypes.h>
#include <display.h>
#include <options.h>
Go to the source code of this file.
◆ display_dhcp_packet()
Definition at line 6 of file display.c.
7{
8 char *mtype;
10 return -1;
11
12 fprintf(
stdout,
"op: %s\t|htype: %s\t|hlen: %u\t|hops: %u\n", (dhcpm->
op == 1)?
"BOOTREQUEST":
"BOOTREPLY", (dhcpm->
htype==1)?
"Ethernet 10Mb":
"unknown", dhcpm->
hlen, dhcpm->
hops);
22
24 {
27 strcpy( mtype,
"DHCPDISCOVER" );
28 break;
31 strcpy( mtype,
"DHCPREQUEST" );
32 break;
35 strcpy( mtype,
"DHCPACK" );
36 break;
39 strcpy( mtype,
"DHCPNAK" );
40 break;
43 strcpy( mtype,
"DHCPRELEASE" );
44 break;
47 strcpy( mtype,
"DHCPDECLINE" );
48 break;
51 strcpy( mtype,
"DHCPOFFER" );
52 break;
53 default:
55 strcpy( mtype,
"Unknown Type" );
56 break;
57 }
60 return 0;
61}
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
Referenced by main(), and process_dhcp_packet().