- simplified DHCP
-added UdpAppend() git-svn-id: http://moon:8086/svn/mips@219 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -38,10 +38,19 @@ typedef struct _sDHCP
|
||||
|
||||
typedef struct _sdhcp_opt_hdr_t
|
||||
{
|
||||
uint8_t code, len;
|
||||
uint8_t code;
|
||||
uint8_t size;
|
||||
|
||||
} __attribute__ ((__packed__)) dhcp_opt_hdr_t;
|
||||
|
||||
typedef struct _soption_list_t
|
||||
{
|
||||
size_t capacity;
|
||||
size_t size;
|
||||
uint8_t *buffer;
|
||||
uint8_t *pData;
|
||||
} option_list_t;
|
||||
|
||||
#define DHCP_FLAGS_BROADCAST 0x8000
|
||||
|
||||
#define DHCP_OPT_HOSTNAME 12
|
||||
@@ -61,6 +70,9 @@ typedef struct _sdhcp_opt_hdr_t
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
void DHCP_request_send(packet_t *pPacket, uint32_t dhcp_msg_type, uint8_t *mac_addr_src, uint8_t *inet_addr_src, uint8_t *inet_addr_dst, DHCP *pLast);
|
||||
void option_list_init(option_list_t *pObj, void *pBuffer, size_t size);
|
||||
void option_list_append(option_list_t *pObj, uint8_t option_type, void const *pData, size_t size);
|
||||
size_t data_entry_create(void *pDst, uint8_t type, void const *pData, size_t size);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
#endif // DHCP_H
|
||||
|
||||
Reference in New Issue
Block a user