def pack(self): return Struct.pack(self) + self['name']
def pack(self): data = Struct.pack(self) return data
def pack(self): data = Struct.pack(self) return data + pack('<BBH', self.n_context_elem, 0, 0) + self['p_context_elem'] + self['auth_verifier']
def pack(self): #self['alloc_hint'] = len(self['data']) #XXX: Not true for fragmented requests --Kostya data = Struct.pack(self) return data + self['data'] + self['auth_verifier']
def pack(self): self['auth_pad_length'] = len(self['auth_pad']) data = Struct.pack(self) return self['auth_pad'] + data + self['auth_value']
def pack(self): data = Struct.pack(self) return data + self['auth_verifier']
def pack(self): self['OutputBufferOffset'] = self[ 'StructureSize'] + SMB2_HEADER_SIZE - 1 self['OutputBufferLength'] = len(self['Buffer']) return Struct.pack(self) + self['Buffer']
def pack(self): self['PathOffset'] = self['StructureSize'] + SMB2_HEADER_SIZE - 1 path = self['Buffer'].encode('UTF-16LE') self['PathLength'] = len(path) return Struct.pack(self) + path
def pack(self): filename = self['SourceFileName'].encode('UTF-16LE') self['SourceFileNameLength'] = len(filename) return Struct.pack(self) + filename
def pack(self): self['ByteCount'] = len(self['ErrorData']) return Struct.pack(self) + self['ErrorData']
def pack(self): self['ChunkCount'] = len(self['Chunks']) / 24 return Struct.pack(self) + self['Chunks']
def pack(self): return Struct.pack(self) + self['Locks']
def pack(self): self['ReadChannelInfoOffset'] = self[ 'StructureSize'] + SMB2_HEADER_SIZE - 1 self['Buffer'] = '\x00' return Struct.pack(self) + self['Buffer']
def pack(self, pack_header=1, pack_string=0): data = Struct.pack(self) if (len(data) % 4) != 0: data += '\0' * (4 - (len(data) % 4)) return data
def pack(self): data = Struct.pack(self) for subauth in self['Subauthorities']: data += pack('<L', subauth) return data
def pack(self): return Struct.pack(self)
def pack(self): data = Struct.pack(self) data += self['annotation'].pack() return data