[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OFFSET defenition in packet.h



Hi,

I was trying to figure out how the following MACRO is working.

#define OFFSET(type, field)     ((int) &((type *)0)->field)

Could anyone help me to figure that out. I know that it returns
the offset of field in the structure type but I can't understand the
meaning of that zero.

Thanks alot in advance.

--Abdollah