"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/service_inspectors/dce_rpc/dce_smb2_session.h" between
snort3-3.1.29.0.tar.gz and snort3-3.1.30.0.tar.gz

About: Snort 3 is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

dce_smb2_session.h  (snort3-3.1.29.0):dce_smb2_session.h  (snort3-3.1.30.0)
skipping to change at line 40 skipping to change at line 40
class Dce2Smb2SessionTracker class Dce2Smb2SessionTracker
{ {
public: public:
Dce2Smb2SessionTracker(const Smb2SessionKey& key) Dce2Smb2SessionTracker(const Smb2SessionKey& key)
{ {
session_id = key.sid; session_id = key.sid;
session_key = key; session_key = key;
reload_prune = false; reload_prune = false;
do_not_delete = false; do_not_delete = false;
file_context_cleaned = false;
command_prev = SMB2_COM_MAX; command_prev = SMB2_COM_MAX;
encryption_flag = false; encryption_flag = false;
SMB_DEBUG(dce_smb_trace, DEFAULT_TRACE_OPTION_ID, TRACE_DEBUG_LEVEL, GET _CURRENT_PACKET, SMB_DEBUG(dce_smb_trace, DEFAULT_TRACE_OPTION_ID, TRACE_DEBUG_LEVEL, GET _CURRENT_PACKET,
"session tracker %" PRIu64 "created\n", session_id); "session tracker %" PRIu64 "created\n", session_id);
} }
~Dce2Smb2SessionTracker(); ~Dce2Smb2SessionTracker();
Dce2Smb2TreeTracker* connect_tree(const uint32_t, const uint32_t, Dce2Smb2TreeTracker* connect_tree(const uint32_t, const uint32_t,
uint8_t=SMB2_SHARE_TYPE_DISK); uint8_t=SMB2_SHARE_TYPE_DISK);
void disconnect_tree(uint32_t tree_id) void disconnect_tree(uint32_t tree_id)
skipping to change at line 80 skipping to change at line 81
void clean_file_context_from_flow(uint64_t, uint64_t); void clean_file_context_from_flow(uint64_t, uint64_t);
void unlink(); void unlink();
Dce2Smb2SessionData* get_flow(uint32_t); Dce2Smb2SessionData* get_flow(uint32_t);
void process(const uint16_t, uint8_t, const Smb2Hdr*, const uint8_t*, const uint32_t); void process(const uint16_t, uint8_t, const Smb2Hdr*, const uint8_t*, const uint32_t);
void increase_size(const size_t size); void increase_size(const size_t size);
void decrease_size(const size_t size); void decrease_size(const size_t size);
void set_reload_prune(bool flag) { reload_prune = flag; } void set_reload_prune(bool flag) { reload_prune = flag; }
uint64_t get_session_id() { return session_id; } uint64_t get_session_id() { return session_id; }
void set_do_not_delete(bool flag) { do_not_delete = flag; } void set_do_not_delete(bool flag) { do_not_delete = flag; }
bool get_do_not_delete() { return do_not_delete; } bool get_do_not_delete() { return do_not_delete; }
void set_file_context_cleaned(bool flag) { file_context_cleaned = flag; }
bool get_file_context_cleaned() { return file_context_cleaned; }
void set_prev_comand(uint16_t cmd) { command_prev = cmd; } void set_prev_comand(uint16_t cmd) { command_prev = cmd; }
uint16_t get_prev_command() { return command_prev; } uint16_t get_prev_command() { return command_prev; }
std::mutex co_tracker_mutex; std::mutex co_tracker_mutex;
void set_encryption_flag(bool flag) void set_encryption_flag(bool flag)
{ {
encryption_flag = flag; encryption_flag = flag;
if (flag) if (flag)
dce2_smb_stats.total_encrypted_sessions++; dce2_smb_stats.total_encrypted_sessions++;
} }
bool get_encryption_flag() { return encryption_flag; } bool get_encryption_flag() { return encryption_flag; }
private: private:
// do_not_delete is to make sure when we are in processing we should not del ete the context // do_not_delete is to make sure when we are in processing we should not del ete the context
// which is being processed // which is being processed
bool do_not_delete; bool do_not_delete;
bool file_context_cleaned;
Dce2Smb2TreeTracker* find_tree_for_message(const uint64_t, const uint32_t); Dce2Smb2TreeTracker* find_tree_for_message(const uint64_t, const uint32_t);
uint64_t session_id; uint64_t session_id;
//to keep the tab of previous command //to keep the tab of previous command
uint16_t command_prev; uint16_t command_prev;
Smb2SessionKey session_key; Smb2SessionKey session_key;
Dce2Smb2SessionDataMap attached_flows; Dce2Smb2SessionDataMap attached_flows;
Dce2Smb2TreeTrackerMap connected_trees; Dce2Smb2TreeTrackerMap connected_trees;
std::atomic<bool> reload_prune; std::atomic<bool> reload_prune;
std::atomic<bool> encryption_flag; std::atomic<bool> encryption_flag;
std::mutex connected_trees_mutex; std::mutex connected_trees_mutex;
 End of changes. 3 change blocks. 
0 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)