__u32smb_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 */
__u32smb_buf_length;/* big endian on wire *//* BB length is only two
or three bytes - with one or two byte type preceding it that are
zero - we could mask the type byte off just in case BB */
__u8Protocol[4];
__u8Command;
union{
...
...
@@ -308,9 +323,9 @@ struct smb_hdr {
__u8ErrorClass;
__u8Reserved;
__le16Error;
}DosError;
}__attribute__((packed))DosError;
__le32CifsError;
}Status;
}__attribute__((packed))Status;
__u8Flags;
__le16Flags2;/* note: le */
__le16PidHigh;
...
...
@@ -318,16 +333,16 @@ struct smb_hdr {
struct{
__le32SequenceNumber;/* le */
__u32Reserved;/* zero */
}Sequence;
}__attribute__((packed))Sequence;
__u8SecuritySignature[8];/* le */
}Signature;
}__attribute__((packed))Signature;
__u8pad[2];
__u16Tid;
__le16Pid;
__u16Uid;
__u16Mid;
__u8WordCount;
};
}__attribute__((packed));
/* given a pointer to an smb_hdr retrieve the value of byte count */