Skip to content

GavinITP/netflow-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetFlow Generator

This project simulates and generates NetFlow data in pcap file, typically used for network monitoring and analysis.

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/GavinITP/netflow-generator.git
    cd netflow-generator
  2. Compile the code:

    clang++ -std=c++20 -O3 main.cpp netflow.cpp utils.cpp -o netflow_pcap_writer

    or

    g++ -std=c++20 -O3 main.cpp netflow.cpp utils.cpp -o netflow_pcap_writer
  3. Run the program:

    ./netflow_pcap_writer

Code Overview

  • main.cpp: Generate raw packets with NetFlow data and writing them to a .pcap file.
  • netflow.cpp: Contains the logic to generate and serialize NetFlow data.
  • utils.cpp: Provides utility functions like generating random numbers and converting IP addresses to uint32_t.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages