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:
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user