3 typedef unsigned __u32;
4 typedef unsigned char __u8;
5 typedef unsigned short __u16;
9 # define offsetof(T,F) ((unsigned int)((char *)&((T *)0L)->F - (char *)0L))
12 __u32 smb_buf_length; /* big endian on wire *//* BB length is only two or three bytes - with one or two byte type preceding it but that is always zero - we could mask the type byte off just in case BB */
19 __u16 Error; /* note: treated as little endian (le) on wire */
21 __u32 CifsError; /* note: le */
24 __u16 Flags2; /* note: le */
25 __u16 PidHigh; /* note: le */
28 __u32 SequenceNumber; /* le */
29 __u32 Reserved; /* zero */
31 __u8 SecuritySignature[8]; /* le */
35 __u16 Pid; /* note: le */
45 printf("size is %d\n", sizeof(h));
47 h.Status.CifsError = 3;
49 printf("error is at %d\n", offsetof(struct smb_hdr, Status.CifsError));
54 printf("error is %d\n", h.Status.CifsError++);