'Generic SMB class.  Handles parsing of SMB Header Messages and some specific SMB Command Objects
Reference:
[1] http://msdn.microsoft.com/en-us/library/ee441774%28v=prot.13%29.aspx        SMB Header Protocol Definition
[2] http://msdn.microsoft.com/en-us/library/ee441616(v=prot.13).aspx
proto = 4 bytes         4s      4-byte literal string \'ÿ\', \'S\', \'M\', \'B\'
cmd = 1 byte            B       one-byte command code, commands listed at [2]
status = 4 bytes        I       A 32-bit field used to communicate error messages from the server to the client [SUCCESS = 0x0000
flags1 = 1 byte         B
flags2 = 2 bytes        H
pidhigh = 2 bytes       H
security = 8 bytes      8s
reserved = 2 bytes      H
tid = 2 bytes           H
pidlow = 2 bytes        H
uid = 2 bytes           H       Associate a session with a specific user
mid = 2 bytes           H       Multiplexer identifier'

def __init__(self, pktdata):

    self.filename = None
    if (len(pktdata) < 32):
        raise InsufficientData
    (self.proto, self.cmd, self.status, self.flags1, self.flags2, self.pidhigh, self.security, self.reserved, self.tid, self.pidlow, self.uid, self.mid) = struct.unpack('<4sBIBHH8sHHHHH', pktdata[:32])
    self.smbdata = pktdata[32:]
