When I compile the below struct:-
typedef PACKED struct PACKED_SUFFIX SOCKET_LOG_DATA
{
typedef PACKED union PACKED_SUFFIX
{
PACKED struct PACKED_SUFFIX
{
UINT16 loss_reason : 1;
UINT16 unused : 15;
} fields;
UINT16 all_fields;
} ;
UINT16 socket_number;
SOCKET_LOG_DATA () : all_fields(0), socket_number(0) {}
} SOCKET_LOG_DATA;
I get compilation error that:-
error (dplus:1384): identifier all_fields not a direct member of SOCKET_LOG_DATA
How do I fix this?