void Stream5InitUdp(Stream5GlobalConfig *gconfig) { if (gconfig == NULL) return; /* Now UDP */ if ((udp_lws_cache == NULL) && (gconfig->track_udp_sessions)) { udp_lws_cache = InitLWSessionCache(gconfig->max_udp_sessions, 30, (3*60), 5, 0, &UdpSessionCleanup); if(!udp_lws_cache) { FatalError("Unable to init stream5 UDP session cache, no UDP " "stream inspection!\n"); } if (mempool_init(&udp_session_mempool, gconfig->max_udp_sessions, sizeof(UdpSession)) != 0) { FatalError("%s(%d) Could not initialize udp session memory pool.\n", __FILE__, __LINE__); } } }
void Stream5InitIcmp(Stream5GlobalConfig *gconfig) { if (gconfig == NULL) return; /* Finally ICMP */ if((icmp_lws_cache == NULL) && gconfig->track_icmp_sessions) { icmp_lws_cache = InitLWSessionCache(gconfig->max_icmp_sessions, 30, 5, 0, NULL); if(!icmp_lws_cache) { FatalError("Unable to init stream5 ICMP session cache, no ICMP " "stream inspection!\n"); } if (mempool_init(&icmp_session_mempool, gconfig->max_icmp_sessions, sizeof(IcmpSession)) != 0) { FatalError("%s(%d) Could not initialize icmp session memory pool.\n", __FILE__, __LINE__); } } }
void Stream5InitIp (Stream5GlobalConfig* gconfig) { if (gconfig == NULL) return; if((ip_lws_cache == NULL) && gconfig->track_ip_sessions) { ip_lws_cache = InitLWSessionCache( gconfig->max_ip_sessions, 30, 30, 5, 0, IpSessionCleanup); if(!ip_lws_cache) { ParseError("Unable to init stream5 IP session cache, no IP " "stream inspection!\n"); } } }
void Stream5InitIcmp(void) { /* Finally ICMP */ if((icmp_lws_cache == NULL) && s5_global_config.track_icmp_sessions) { icmp_lws_cache = InitLWSessionCache(s5_global_config.max_icmp_sessions, 30, 5, 0, NULL); if(!icmp_lws_cache) { FatalError("Unable to init stream5 ICMP session cache, no ICMP " "stream inspection!\n"); } mempool_init(&icmp_session_mempool, s5_global_config.max_icmp_sessions, sizeof(IcmpSession)); } }