unsigned char *adata = (unsigned char*)malloc(500*sizeof(unsigned char));
unsigned char *single_char = adata+100;
single_char の最初の 4 ビットを変更して、1 ~ 10 (int) の値を表すにはどうすればよいですか?
質問は TCP ヘッダー構造から来ました:
Data Offset: 4 bits
The number of 32 bit words in the TCP Header. This indicates where
the data begins. The TCP header (even one including options) is an
integral number of 32 bits long.
通常、値は 4..5 で、char 値は 0xA0 のようになります。