"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/network_inspectors/packet_tracer/packet_tracer.cc" between
snort3-3.1.28.0.tar.gz and snort3-3.1.29.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.

packet_tracer.cc  (snort3-3.1.28.0):packet_tracer.cc  (snort3-3.1.29.0)
skipping to change at line 334 skipping to change at line 334
actual_dip->ntop(dipstr, sizeof(dipstr)); actual_dip->ntop(dipstr, sizeof(dipstr));
char gr_buf[32] = { '\0' }; char gr_buf[32] = { '\0' };
if (p.is_inter_group_flow()) if (p.is_inter_group_flow())
snprintf(gr_buf, sizeof(gr_buf), " GR=%hd-%hd", p.pkth->ingress_group, snprintf(gr_buf, sizeof(gr_buf), " GR=%hd-%hd", p.pkth->ingress_group,
p.pkth->egress_group); p.pkth->egress_group);
if (shell_enabled) if (shell_enabled)
{ {
PacketTracer::log("\n"); PacketTracer::log("\n");
snprintf(debug_session, sizeof(debug_session), "%s %hu -> %s %hu %hhu AS =%hu ID=%u%s ", snprintf(debug_session, sizeof(debug_session), "%s %hu -> %s %hu %hhu AS =%u ID=%u%s ",
sipstr, sport, dipstr, dport, static_cast<uint8_t>(proto), sipstr, sport, dipstr, dport, static_cast<uint8_t>(proto),
p.pkth->address_space_id, get_instance_id(), gr_buf); p.pkth->address_space_id, get_instance_id(), gr_buf);
} }
else else
{ {
add_eth_header_info(p); add_eth_header_info(p);
PacketTracer::log("%s:%hu -> %s:%hu proto %u AS=%hu ID=%u%s\n", PacketTracer::log("%s:%hu -> %s:%hu proto %u AS=%u ID=%u%s\n",
sipstr, sport, dipstr, dport, static_cast<uint8_t>(proto), sipstr, sport, dipstr, dport, static_cast<uint8_t>(proto),
p.pkth->address_space_id, get_instance_id(), gr_buf); p.pkth->address_space_id, get_instance_id(), gr_buf);
} }
add_packet_type_info(p); add_packet_type_info(p);
} }
void PacketTracer::add_packet_type_info(const Packet& p) void PacketTracer::add_packet_type_info(const Packet& p)
{ {
bool is_v6 = p.ptrs.ip_api.is_ip6(); bool is_v6 = p.ptrs.ip_api.is_ip6();
char timestamp[TIMEBUF_SIZE]; char timestamp[TIMEBUF_SIZE];
skipping to change at line 406 skipping to change at line 406
if (shell_enabled) if (shell_enabled)
{ {
PacketTracer::log("\n"); PacketTracer::log("\n");
char gr_buf[32] = { '\0' }; char gr_buf[32] = { '\0' };
if (p.is_inter_group_flow()) if (p.is_inter_group_flow())
snprintf(gr_buf, sizeof(gr_buf), " GR=%hd-%hd", p.pkth->ingress_ group, snprintf(gr_buf, sizeof(gr_buf), " GR=%hd-%hd", p.pkth->ingress_ group,
p.pkth->egress_group); p.pkth->egress_group);
snprintf(debug_session, sizeof(debug_session), snprintf(debug_session, sizeof(debug_session),
"%02X:%02X:%02X:%02X:%02X:%02X -> %02X:%02X:%02X:%02X:%02X:%02X %04X" "%02X:%02X:%02X:%02X:%02X:%02X -> %02X:%02X:%02X:%02X:%02X:%02X %04X"
" AS=%hu ID=%u%s ", " AS=%u ID=%u%s ",
eh->ether_src[0], eh->ether_src[1], eh->ether_src[2], eh->ether_src[0], eh->ether_src[1], eh->ether_src[2],
eh->ether_src[3], eh->ether_src[4], eh->ether_src[5], eh->ether_src[3], eh->ether_src[4], eh->ether_src[5],
eh->ether_dst[0], eh->ether_dst[1], eh->ether_dst[2], eh->ether_dst[0], eh->ether_dst[1], eh->ether_dst[2],
eh->ether_dst[3], eh->ether_dst[4], eh->ether_dst[5], eh->ether_dst[3], eh->ether_dst[4], eh->ether_dst[5],
(uint16_t)eh->ethertype(), p.pkth->address_space_id, get_instanc e_id(), (uint16_t)eh->ethertype(), p.pkth->address_space_id, get_instanc e_id(),
gr_buf); gr_buf);
s_pkt_trace->active = true; s_pkt_trace->active = true;
} }
else else
{ {
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

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