The value is 10240 or 2800 in hex. TOTAL_LENGTH is a unsigned short. 0028 in decimal is 40 which is what I am expecting (or is at least a reasonable value).
Any ideas why I am getting a 0 instead of a 40? Thinking about reversing the bits myself but really don't want to. xD
unsigned short total_length = ntohl(ipData->TOTAL_LENGTH);
These are the headers I am including.
#include <winsock2.h>
#include <ws2tcpip.h>