file_lib.h (snort-2.9.16.1) | : | file_lib.h (snort-2.9.17) | ||
---|---|---|---|---|
skipping to change at line 73 | skipping to change at line 73 | |||
MagicData *magics; | MagicData *magics; | |||
void *groups; | void *groups; | |||
uint32_t id; | uint32_t id; | |||
uint32_t rev; | uint32_t rev; | |||
} RuleInfo; | } RuleInfo; | |||
typedef struct _FileContext | typedef struct _FileContext | |||
{ | { | |||
bool file_type_enabled; | bool file_type_enabled; | |||
bool file_signature_enabled; | bool file_signature_enabled; | |||
uint8_t *file_name; | ||||
uint32_t file_name_size; | ||||
bool file_name_saved; | bool file_name_saved; | |||
uint64_t file_size; | ||||
bool upload; | bool upload; | |||
uint32_t file_name_size; | ||||
uint8_t *file_name; | ||||
uint64_t file_size; | ||||
uint64_t processed_bytes; | uint64_t processed_bytes; | |||
uint32_t file_type_id; | ||||
uint8_t *sha256; | uint8_t *sha256; | |||
void * file_type_context; | void * file_type_context; | |||
void * file_signature_context; | void * file_signature_context; | |||
void * file_config; | void * file_config; | |||
time_t expires; | time_t expires; | |||
uint16_t app_id; | uint16_t app_id; | |||
bool file_capture_enabled; | bool file_capture_enabled; | |||
bool partial_file; | ||||
uint32_t file_type_id; | ||||
FileCaptureInfo *file_capture; | FileCaptureInfo *file_capture; | |||
uint8_t *current_data; /*current file data*/ | uint8_t *current_data; /*current file data*/ | |||
uint32_t current_data_len; | uint32_t current_data_len; | |||
File_Verdict verdict; | File_Verdict verdict; | |||
bool suspend_block_verdict; | bool suspend_block_verdict; | |||
/* for some SMB upload cases, file size is not known during SMB negotiation. We are setting | /* for some SMB upload cases, file size is not known during SMB negotiation. We are setting | |||
* SIG_FLUSH during end of stream, but END of file is not set in case of SMB unknown | * SIG_FLUSH during end of stream, but END of file is not set in case of SMB unknown | |||
* file size upload. This causing file capture to fail. This flag is used to set End of file, | * file size upload. This causing file capture to fail. This flag is used to set End of file, | |||
* only for SMB upload cases. | * only for SMB upload cases. | |||
*/ | */ | |||
bool smb_unknown_file_size; | bool smb_unknown_file_size; | |||
void* attached_file_entry; | ||||
FileState file_state; | FileState file_state; | |||
uint32_t file_id; | uint32_t file_id; | |||
uint32_t file_config_version; | uint32_t file_config_version; | |||
bool partial_file; | ||||
} FileContext; | } FileContext; | |||
/*Main File Processing functions */ | /*Main File Processing functions */ | |||
void file_type_id( FileContext* context, uint8_t* file_data, int data_size, File Position position); | void file_type_id( FileContext* context, uint8_t* file_data, int data_size, File Position position); | |||
void file_signature_sha256( FileContext* context, uint8_t* file_data, int data_s ize, FilePosition position); | void file_signature_sha256( FileContext* context, uint8_t* file_data, int data_s ize, FilePosition position); | |||
/*File context management*/ | /*File context management*/ | |||
FileContext *file_context_create(void); | FileContext *file_context_create(void); | |||
void file_context_reset(FileContext *context); | void file_context_reset(FileContext *context); | |||
void file_context_free(void *context); | void file_context_free(void *context); | |||
End of changes. 7 change blocks. | ||||
5 lines changed or deleted | 6 lines changed or added |