#include <stdlib.h>
#include <net.h>
#include <acess/sys.h>
+#include <errno.h>
enum {
UDP_IOCTL_GETSETLPORT = 4,
msg->options[i++] = 53; // DHCP Message Type
msg->options[i++] = 1;
msg->options[i++] = 1; // - DHCPDISCOVER
- msg->options[i++] = 255; // End of list
+ msg->options[i ] = 255; // End of list
+ // UDP Header
data[0] = 67; data[1] = 0; // Port
data[2] = 4; data[3] = 0; // AddrType
data[4] = 255; data[5] = 255; data[6] = 255; data[7] = 255;
i = _SysWrite(Iface->SocketFD, data, sizeof(data));
if( i != sizeof(data) ) {
- _SysDebug("_SysWrite failed (%i != %i)", i, sizeof(data));
+ _SysDebug("_SysWrite failed (%i != %i): %s", i, sizeof(data),
+ strerror(errno));
}
Update_State(Iface, STATE_DISCOVER_SENT);
}