[Network]
- added broadcast flag - removed hw types from dhcp [test_emac] - do dhcp discover on startup git-svn-id: http://moon:8086/svn/mips@214 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include "dhcp.h"
|
||||
|
||||
#define WITH_CLIENT_ID 1
|
||||
const char hostname[] = "ML-402";
|
||||
const char hostname[] = "ml402";
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Testing
|
||||
@@ -33,7 +33,7 @@ void DHCP_request_send(packet_t *pPacket, uint32_t dhcp_msg_type, uint8_t *mac_a
|
||||
pDHCP->hlen = 6;
|
||||
pDHCP->hops = 0;
|
||||
pDHCP->secs = 0;
|
||||
pDHCP->flags = 0;
|
||||
pDHCP->flags = DHCP_FLAGS_BROADCAST;
|
||||
memcpy(pDHCP->chaddr, mac_addr_src, pDHCP->hlen);
|
||||
|
||||
switch(dhcp_msg_type)
|
||||
@@ -69,7 +69,7 @@ void DHCP_request_send(packet_t *pPacket, uint32_t dhcp_msg_type, uint8_t *mac_a
|
||||
option_size += size;
|
||||
|
||||
size = 1;
|
||||
pDHCP->options[option_size] = HWTYPE_ETHERNET;
|
||||
pDHCP->options[option_size] = TYPE_HW_ETH10;
|
||||
option_size += size;
|
||||
|
||||
size = 6;
|
||||
@@ -124,7 +124,7 @@ void DHCP_request_send(packet_t *pPacket, uint32_t dhcp_msg_type, uint8_t *mac_a
|
||||
option_size += size;
|
||||
|
||||
size = 1;
|
||||
pDHCP->options[option_size] = HWTYPE_ETHERNET;
|
||||
pDHCP->options[option_size] = TYPE_HW_ETH10;
|
||||
option_size += size;
|
||||
|
||||
size = 6;
|
||||
|
||||
Reference in New Issue
Block a user