#include <headers.h>
#include <datatypes.h>
#include <display.h>
#include <parser.h>
#include <leases.h>
#include <options.h>
Go to the source code of this file.
◆ parse_dhcp_options()
Definition at line 8 of file parser.c.
51 while( opointer < olength )
53 switch( dhcpm->
options[opointer] ){
101 opointer += dhcpm->
options[opointer] + 1;
181 fprintf(
stdout,
"parse_dhcp_options: END option found! [end]!\n");
GLsizei const GLvoid * pointer
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
struct __rpc_client CLIENT
Referenced by main().
◆ process_dhcp_packet()
Definition at line 193 of file parser.c.
201 if( (!dhcpm) || (!dhcpo) )
205 switch( dhcpo->
type ){
335 sprintf(
name,
"%u.%u.%u.%u", (dhcpl.
ip & 0xFF), ((dhcpl.
ip>>8) & 0xFF), ((dhcpl.
ip>>16)&0xFF), (dhcpl.
ip>>24));
GLsizei const GLvoid * pointer
#define sprintf(buf, format,...)
int display_dhcp_packet(DHCPMESSAGE *dhcpm, DHCPOPTIONS *dhcpo)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
int confirm_lease(DHCPLEASE *, u32b)
char * strcpy(char *DstString, const char *SrcString)
int find_lease(DHCPLEASE *, u32b, u8b *)
int write_packet(DHCPMESSAGE *dhcpm, char *name)
GLuint const GLchar * name
Referenced by main().
◆ write_packet()
Definition at line 348 of file parser.c.
379 their_addr.sin_family =
AF_INET;
380 their_addr.sin_port =
htons(68);
381 their_addr.sin_addr = *((
struct in_addr *)he->h_addr);
383 their_addr.sin_family =
AF_INET;
384 their_addr.sin_port =
htons(68);
385 their_addr.sin_addr.s_addr = 0xFFFFFFFF;
389 memset(&(their_addr.sin_zero),
'\0', 8);
397 printf(
"sent %d bytes to %s\n", numbytes,
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
INT WSAAPI setsockopt(IN SOCKET s, IN INT level, IN INT optname, IN CONST CHAR FAR *optval, IN INT optlen)
PHOSTENT WSAAPI gethostbyname(IN const char FAR *name)
INT WSAAPI sendto(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags, IN CONST struct sockaddr *to, IN INT tolen)
int strcmp(const char *String1, const char *String2)
Referenced by process_dhcp_packet().