有關u_int16_t

http://www-sop.inria.fr/planete/software/ns-doc/ns-current/u_int16_t.html

簡單的說
可以用的data type有
u_int8_t
u_int16_t
u_int32_t
u_int64_t

u_char (不一定是8bits)
u_int(不一定是32bits)

uid_t
uint

在32-bit machine的定義如下:
typedef unsigned char u_int8_t
typedef unsigned short u_int16_t
typedef unsigned int u_int32_t
typedef unsigned __int64 u_int64_t

還有底下這兩個, 再次提醒,他們不一定代表8/32 bits, 如果定死bytes數
就使用u_int8_t, u_int16_t…..
typedef unsigned char u_char
….

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: