Mapping C data structures and typedefs to .Net
问题 I'm trying to write an interface for communicating with a network protocol, but the IEEE document describes the protocol at the bit level with information split accross a single byte. What would be the best way to go about handling a C typedef such as typedef struct { Nibble transportSpecific; Enumeration4 messageType; UInteger4 versionPTP; UInteger16 messageLength; UInteger8 domainNumber; Octet flagField[2]; Integer64 correctionfield; PortIdentity sourcePortIdentity; UInteger16 sequenceId;