case PktType::TCP:
case PktType::UDP:
case PktType::ICMP:
- case PktType::USER:
+ case PktType::PDU:
case PktType::FILE:
{
PROFILE_VARS;
fpEvalHeaderSvc(p, omd, SNORT_PROTO_UDP);
break;
- case PktType::USER:
+ case PktType::PDU:
if ( snort_conf->sopgTable->user_mode )
fpEvalHeaderSvc(p, omd, SNORT_PROTO_USER);
case PktType::ICMP: return icmp_count;
case PktType::TCP: return tcp_count;
case PktType::UDP: return udp_count;
- case PktType::USER: return user_count;
+ case PktType::PDU: return user_count;
case PktType::FILE: return file_count;
default: return 0;
}
if ( (cache = get_cache(PktType::UDP)) )
cache->reset_prunes();
- if ( (cache = get_cache(PktType::USER)) )
+ if ( (cache = get_cache(PktType::PDU)) )
cache->reset_prunes();
if ( (cache = get_cache(PktType::FILE)) )
case PktType::ICMP: return icmp_cache;
case PktType::TCP: return tcp_cache;
case PktType::UDP: return udp_cache;
- case PktType::USER: return user_cache;
+ case PktType::PDU: return user_cache;
case PktType::FILE: return file_cache;
default: return nullptr;
}
init_roles_udp(p, flow);
break;
- case PktType::USER:
+ case PktType::PDU:
case PktType::FILE:
init_roles_user(p, flow);
break;
if ( !flow->session )
{
- flow->init(PktType::USER);
+ flow->init(PktType::PDU);
flow->session = get_user(flow);
}
m->add((unsigned)PktType::UDP, wiz_id);
if ( tcp or udp )
- m->add((unsigned)PktType::USER, wiz_id);
+ m->add((unsigned)PktType::PDU, wiz_id);
const InspectApi* api = get_plugin(bind_id);
InspectorManager::instantiate(api, m, sc);
const PktType mask[] =
{
PktType::ANY, PktType::IP, PktType::ICMP, PktType::TCP, PktType::UDP,
- PktType::USER, PktType::FILE
+ PktType::PDU, PktType::FILE
};
work->when.protos = (unsigned)mask[v.get_long()];
}
set_session(flow, INS_UDP);
break;
- case PktType::USER:
+ case PktType::PDU:
set_session(flow, INS_USER);
break;
case PktType::UDP:
return "UDP";
- case PktType::USER:
+ case PktType::PDU:
case PktType::FILE:
if ( proto_bits & PROTO_BIT__TCP )
return "TCP";
{ return ptrs.get_pkt_type() == PktType::ICMP; }
inline bool is_data() const
- { return (ptrs.get_pkt_type() == PktType::USER) or (ptrs.get_pkt_type() == PktType::FILE); }
+ { return (ptrs.get_pkt_type() == PktType::PDU) or (ptrs.get_pkt_type() == PktType::FILE); }
inline bool is_cooked() const
{ return packet_flags & PKT_PSEUDO; }
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"ftp",
fs_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"ftp-data",
fd_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"telnet",
tn_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
buffers,
"http",
hs_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"imap",
imap_init,
NHttpApi::nhttp_mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
legacy_buffers,
"http",
NHttpApi::nhttp_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"pop",
pop_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"sunrpc",
rd_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER | (uint16_t)PktType::UDP,
+ (uint16_t)PktType::PDU | (uint16_t)PktType::UDP,
nullptr, // buffers
"sip",
sip_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"smtp",
smtp_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"ssh",
ssh_init,
mod_dtor
},
IT_SERVICE,
- (uint16_t)PktType::USER,
+ (uint16_t)PktType::PDU,
nullptr, // buffers
"ssl",
ssl_init,
mod_dtor
},
IT_WIZARD,
- (uint16_t)PktType::TCP | (uint16_t)PktType::UDP | (uint16_t)PktType::USER,
+ (uint16_t)PktType::TCP | (uint16_t)PktType::UDP | (uint16_t)PktType::PDU,
nullptr, // buffers
nullptr, // service
nullptr, // init
t_stats.udp_flows = flow_con->get_flows(PktType::UDP);
t_stats.udp_prunes = flow_con->get_prunes(PktType::UDP);
- t_stats.user_flows = flow_con->get_flows(PktType::USER);
- t_stats.user_prunes = flow_con->get_prunes(PktType::USER);
+ t_stats.user_flows = flow_con->get_flows(PktType::PDU);
+ t_stats.user_prunes = flow_con->get_prunes(PktType::PDU);
t_stats.file_flows = flow_con->get_flows(PktType::FILE);
t_stats.file_prunes = flow_con->get_prunes(PktType::FILE);
}
if ( config->user_cfg.max_sessions )
{
- if ( (f = InspectorManager::get_session((uint16_t)PktType::USER)) )
+ if ( (f = InspectorManager::get_session((uint16_t)PktType::PDU)) )
{
flow_con->init_user(config->user_cfg, f);
// FIXIT-L update stream_ip to use standard memcap
- //UserSession::set_memcap(flow_con->get_memcap(PktType::USER));
+ //UserSession::set_memcap(flow_con->get_memcap(PktType::PDU));
}
}
if ( config->file_cfg.max_sessions )
flow_con->purge_flows(PktType::ICMP);
flow_con->purge_flows(PktType::TCP);
flow_con->purge_flows(PktType::UDP);
- flow_con->purge_flows(PktType::USER);
+ flow_con->purge_flows(PktType::PDU);
flow_con->purge_flows(PktType::FILE);
}
flow_con->process_udp(p);
break;
- case PktType::USER:
+ case PktType::PDU:
flow_con->process_user(p);
break;
// FIXIT-L consolidate encode format, update, and this into new function?
static void prep_s5_pkt(Flow* flow, Packet* p, uint32_t pkt_flags)
{
- s5_pkt->ptrs.set_pkt_type(PktType::USER);
+ s5_pkt->ptrs.set_pkt_type(PktType::PDU);
s5_pkt->proto_bits |= PROTO_BIT__TCP;
s5_pkt->packet_flags |= (pkt_flags & PKT_PDU_FULL);
s5_pkt->flow = flow;
mod_dtor
},
IT_STREAM,
- (unsigned)PktType::USER,
+ (unsigned)PktType::PDU,
nullptr, // buffers
nullptr, // service
nullptr, // pinit