2023-12-26 14:26:03 +00:00
|
|
|
[![Build Status](https://cicd.apps.glenux.net/api/badges/glenux/igmpgen/status.svg)](https://cicd.apps.glenux.net/glenux/igmpgen)
|
|
|
|
![License LGPL3.0-or-later](https://img.shields.io/badge/license-LGPL3.0--or--later-blue.svg)
|
|
|
|
[![Donate on patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://patreon.com/glenux)
|
|
|
|
|
2018-07-15 18:27:59 +00:00
|
|
|
# IGMP Packet Generator
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
2023-12-26 14:17:55 +00:00
|
|
|
The IGMP Packet Generator (`igmpgen`) is a specialized tool designed for
|
|
|
|
generating various types of Internet Group Management Protocol (IGMP) packets.
|
2023-12-25 19:27:59 +00:00
|
|
|
|
|
|
|
This tool is particularly useful for network administrators, developers, and
|
|
|
|
researchers involved in testing and analyzing multicast network protocols.
|
2018-07-15 18:27:59 +00:00
|
|
|
|
|
|
|
## Features
|
|
|
|
|
2023-12-25 19:27:59 +00:00
|
|
|
* **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.
|
2023-12-24 19:27:59 +00:00
|
|
|
* **Router Alert Option**: Implements the Router Alert IP option (IPOPT_RA).
|
2018-07-15 18:27:59 +00:00
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
* Unix-like operating system.
|
|
|
|
* `libnet` library
|
|
|
|
* CMake for building the project.
|
2018-07-15 18:27:59 +00:00
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
For debian/ubuntu, simply type:
|
2018-07-15 18:27:59 +00:00
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
```shell-session
|
2023-12-26 14:17:55 +00:00
|
|
|
sudo apt-get install cmake libnet1-dev gcc rpm
|
2023-12-24 19:27:59 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
### Clone the Repository (if applicable):
|
2018-07-15 18:27:59 +00:00
|
|
|
|
|
|
|
```bash
|
2023-12-26 14:17:55 +00:00
|
|
|
git clone https://code.apps.glenux.net/glenux/igmpgen
|
2023-12-24 19:27:59 +00:00
|
|
|
cd igmpgen
|
2018-07-15 18:27:59 +00:00
|
|
|
```
|
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
### Build with CMake:
|
2018-07-15 18:27:59 +00:00
|
|
|
|
2023-12-26 14:17:55 +00:00
|
|
|
Run CMake and build the project:
|
2018-07-15 18:27:59 +00:00
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
```shell-session
|
2023-12-26 14:17:55 +00:00
|
|
|
cmake -S . -B _build
|
|
|
|
cmake --build _build
|
2023-12-24 19:27:59 +00:00
|
|
|
```
|
2018-07-15 18:27:59 +00:00
|
|
|
|
2023-12-26 14:17:55 +00:00
|
|
|
### Install binaries
|
|
|
|
|
|
|
|
Either with your favorite packaging system
|
2023-12-24 19:27:59 +00:00
|
|
|
|
|
|
|
```shell-session
|
2023-12-26 14:17:55 +00:00
|
|
|
cpack
|
2023-12-24 19:27:59 +00:00
|
|
|
```
|
|
|
|
|
2023-12-26 14:17:55 +00:00
|
|
|
Or directly
|
2023-12-24 19:27:59 +00:00
|
|
|
|
|
|
|
```shell-session
|
2023-12-26 14:17:55 +00:00
|
|
|
cmake --install _build
|
2018-07-15 18:27:59 +00:00
|
|
|
```
|
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
After building, you can run `igmpgen` with the necessary command-line arguments:
|
|
|
|
|
2018-07-15 18:27:59 +00:00
|
|
|
### Command-Line Arguments
|
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
```bash
|
|
|
|
IGMP packet generator
|
|
|
|
|
|
|
|
Usage: ./igmpgen [options]
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-i <interface> Specify the network interface (e.g., eth0)
|
|
|
|
-t <type> Specify the IGMP packet type and version (e.g., 1.query)
|
|
|
|
-g <group> Specify the IGMP group (e.g., 224.0.0.1)
|
|
|
|
-s <source> Specify the source IP and port (e.g., 192.168.1.1:1234)
|
|
|
|
-d <destination> Specify the destination IP and port (e.g., 224.0.0.2:5678)
|
|
|
|
-n <number> 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
|
|
|
|
```
|
2018-07-15 18:27:59 +00:00
|
|
|
|
|
|
|
### Example
|
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
Generate an IGMPv2 Membership Report for group `224.0.0.1` on `eth0`:
|
2018-07-15 18:27:59 +00:00
|
|
|
|
|
|
|
```bash
|
2023-12-24 19:27:59 +00:00
|
|
|
./igmpgen -i eth0 -g 224.0.0.1 -t 2.report
|
2018-07-15 18:27:59 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Contributing
|
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
Contributions to `igmpgen` are welcome. Please feel free to report issues,
|
|
|
|
suggest features, or submit pull requests.
|
2018-07-15 18:27:59 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
2023-12-24 19:27:59 +00:00
|
|
|
This project is licensed under the LGPL 3.0-or-later.
|
|
|
|
|
2023-12-26 14:17:55 +00:00
|
|
|
## Related projects
|
|
|
|
|
|
|
|
* [IGMPproxy (Official Version)](https://github.com/pali/igmpproxy): The official version of the IGMPproxy tool.
|
|
|
|
* [IGMPproxy with IGMPv3 & FreeBSD support](https://github.com/ViToni/igmpproxy/): A version of IGMPproxy with added support for IGMPv3 and FreeBSD.
|
|
|
|
|