# IGMP Packet Generator ## 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. ## 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). ## Requirements - A Unix-like operating system. - `libnet` library installed for packet crafting and network handling. ## Installation 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 ``` 3. Run the compiled binary to start generating IGMP packets. ## 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]] ``` ### 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. ### Example To generate an IGMPv2 Membership Report for the group `224.0.0.1` on `eth0`: ```bash ./igmp_packet_generator -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. ## License The project is licensed under LGPL3.0-or-later