I want to implement a package header for a client using a structure.
it is posible that sizeof(short) to be different on various boxes? on mine is 2. The structure is always sum of sizes of the components inside the structure ?Code:typedef struct header { short ID; short opt; //QR(1) Opcode(4) AA(1) TC(1) RD(1) RA(1) Z(3) RCODE(4) short QDCOUNT; short ANCOUNT; short NSCOUNT; short ARCOUNT; } header;
Sorry if this question seems dumb!