gmgrpl wrote on Wednesday, March 25, 2015:
I simply added a uint8_t byte array of size 18 in the xARP_HEADER struct in FreeRTOS_IP_Private.h
And I corrected the xDefaultPartARPPacketHeader array in FreeRTOS_UDP_IP.c
struct __attribute__((__packed__)) xARP_HEADER
{
uint16_t usHardwareType;
uint16_t usProtocolType;
uint8_t ucHardwareAddressLength;
uint8_t ucProtocolAddressLength;
uint16_t usOperation;
xMACAddress_t xSenderHardwareAddress;
uint32_t ulSenderProtocolAddress;
xMACAddress_t xTargetHardwareAddress;
uint32_t ulTargetProtocolAddress;
uint8_t padding[18];
};
typedef struct xARP_HEADER xARPHeader_t;
static const uint8_t xDefaultPartARPPacketHeader[] =
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* Ethernet destination address. */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Ethernet source address. */
0x08, 0x06, /* Ethernet frame type (ipARP_TYPE). */
0x00, 0x01, /* usHardwareType (ipARP_HARDWARE_TYPE_ETHERNET). */
0x08, 0x00, /* usProtocolType. */
ipMAC_ADDRESS_LENGTH_BYTES, /* ucHardwareAddressLength. */
ipIP_ADDRESS_LENGTH_BYTES, /* ucProtocolAddressLength. */
0x00, 0x01, /* usOperation (ipARP_REQUEST). */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* xSenderHardwareAddress. */
0x00, 0x00, 0x00, 0x00, /* ulSenderProtocolAddress */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* xTargetHardwareAddress. */
0x00, 0x00, 0x00, 0x00, /* ulTargetProtocolAddress. */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 18 bytes of pad */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
Ray