我有一个结构来表示一个 ip 标头
struct IPHDR // the ip header
{
unsigned char VER : 4;
unsigned char IHL : 4;
unsigned char DSCP : 6;
unsigned char ECN : 2;
unsigned short len;
unsigned short id;
u_char Reserved:1; //Zeroes
u_char DF:1; //Dont Fragment
u_char MF:1; //More Fragment
unsigned short FragOffset : 13;
u_char ttl;
u_char protocol;
u_short checksum;
struct in_addr src;
struct in_addr dst;
} ;
sizeof(IPHDR) 在应该返回 20 时返回 24。出了什么问题?