From 2adba95683884c520fe37601430b0dd6c829168e Mon Sep 17 00:00:00 2001 From: Glenn Date: Sun, 24 Dec 2023 20:27:59 +0100 Subject: [PATCH] doc: improve readme content --- README.md | 102 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 74 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index efbbf98..b4aecb0 100644 --- a/README.md +++ b/README.md @@ -2,59 +2,105 @@ ## Overview -The IGMP Packet Generator is a specialized tool designed for generating various types of Internet Group Management Protocol (IGMP) packets. This tool is particularly useful for network administrators, developers, and researchers involved in testing and analyzing network protocols, multicast networks, and network security systems. +The IGMP Packet Generator is a specialized tool designed for generating various +types of Internet Group Management Protocol (IGMP) p ackets. This tool is +particularly useful for network administrators, developers, and researchers +involved in testing and analyzing ne twork protocols, multicast networks, and +network security systems. ## Features -- **Multiple IGMP Versions Support**: Supports different IGMP versions, including IGMPv1, IGMPv2, and IGMPv3. -- **Various IGMP Packet Types**: Capable of generating different types of IGMP packets, such as Query, Report, and Leave messages. -- **Customizable Packet Parameters**: Allows customization of various packet parameters like source and destination IP addresses, ports, and group addresses. -- **Router Alert Option**: Includes support for the Router Alert IP option (IPOPT_RA). +* **Support for Multiple IGMP Versions**: Compatible with IGMPv1, IGMPv2, and IGMPv3. +* **Variety of IGMP Packets**: Capable of generating Query, Report, Leave, and other IGMP packet types. +* **Customizable Packet Parameters**: Allows setting of source/destination IPs, ports, and multicast groups. +* **Router Alert Option**: Implements the Router Alert IP option (IPOPT_RA). ## Requirements -- A Unix-like operating system. -- `libnet` library installed for packet crafting and network handling. +* Unix-like operating system. +* `libnet` library +* CMake for building the project. -## Installation +For debian/ubuntu, simply type: -1. Ensure that the `libnet` library is installed on your system. -2. Compile the source code using a C compiler. For example: - -```bash -gcc -o igmp_packet_generator igmp_packet_generator.c -lnet +```shell-session +sudo apt-get install cmake libnet1-dev ``` -3. Run the compiled binary to start generating IGMP packets. +## Install + +### Clone the Repository (if applicable): + +```bash +git clone [repository-url] +cd igmpgen +``` + +### Build with CMake: + +Create a build directory: + +```shell-session +mkdir _build && cd _build +``` + +Run CMake and build the project: + +```shell-session +cmake .. +cmake --build . +``` + +### Install binaries + +```shell-session +cmake .. +cmake --install . +``` ## Usage -To use the IGMP Packet Generator, run the compiled program with the necessary command-line arguments: - -```bash -./igmp_packet_generator -i [interface] -g [group] -t [version.packet_type] [-s [src_ip:port]] [-d [dst_ip:port]] -``` +After building, you can run `igmpgen` with the necessary command-line arguments: ### Command-Line Arguments -- `-i [interface]`: Specify the network interface to use (e.g., `eth0`). -- `-g [group]`: Specify the multicast group IP address. -- `-t [version.packet_type]`: Define the IGMP version and packet type (e.g., `2.query` for an IGMPv2 Query). -- `-s [src_ip:port]`: (Optional) Set the source IP address and port. -- `-d [dst_ip:port]`: (Optional) Set the destination IP address and port. +```bash +IGMP packet generator + +Usage: ./igmpgen [options] + +Options: + -i Specify the network interface (e.g., eth0) + -t Specify the IGMP packet type and version (e.g., 1.query) + -g Specify the IGMP group (e.g., 224.0.0.1) + -s Specify the source IP and port (e.g., 192.168.1.1:1234) + -d Specify the destination IP and port (e.g., 224.0.0.2:5678) + -n Specify delay between packets in seconds (optional) + +Available IGMP packet types: + - 1.query + - 1.report + - 1.dvmrp + - 2.query + - 2.report + - 2.leave + - 3.report +``` ### Example -To generate an IGMPv2 Membership Report for the group `224.0.0.1` on `eth0`: +Generate an IGMPv2 Membership Report for group `224.0.0.1` on `eth0`: ```bash -./igmp_packet_generator -i eth0 -g 224.0.0.1 -t 2.report +./igmpgen -i eth0 -g 224.0.0.1 -t 2.report ``` ## Contributing -Contributions to the project are welcome. You can contribute by reporting issues, suggesting enhancements, or submitting pull requests with improvements or new features. +Contributions to `igmpgen` are welcome. Please feel free to report issues, +suggest features, or submit pull requests. ## License -The project is licensed under LGPL3.0-or-later +This project is licensed under the LGPL 3.0-or-later. +