1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-11-23 13:22:36 +01:00

Add correct protocol identification for netflow

This commit is contained in:
Pavel Odintsov 2015-01-25 22:56:10 +03:00
parent e0d4746281
commit 0e7a013089

@ -70,11 +70,14 @@ void process_netflow_packet_v5(u_int len, u_int8_t *packet) {
switch (nf5_flow->protocol) {
case 1: {
//ICMP
current_packet.protocol = IPPROTO_ICMP;
}
break;
case 6: {
// TCP
current_packet.protocol = IPPROTO_TCP;
current_packet.source_port = nf5_flow->src_port;
current_packet.destination_port = nf5_flow->dest_port;
@ -85,6 +88,8 @@ void process_netflow_packet_v5(u_int len, u_int8_t *packet) {
case 17: {
// UDP
current_packet.protocol = IPPROTO_UDP;
current_packet.source_port = nf5_flow->src_port;
current_packet.destination_port = nf5_flow->dest_port;
}