• Blitzping: A very high-speed, configurable, and portable packet-craftin

    From Fereydoun Memarzanjany@21:1/5 to All on Fri Aug 23 11:04:46 2024
    XPost: comp.lang.c, alt.comp.networking.routers, alt.2600.hackers
    XPost: comp.os.linux.misc, comp.unix.misc

    https://github.com/Thraetaona/Blitzping

    Hello!

    I've been working on Blitzping for the past few weeks. Blitzping is an open-source (GPLv3.0+) packet-crafting and sending utility designed to
    be much faster, more portable, and more configurable than existing tools
    like nping and hping3.

    Developed with embedded devices in mind, Blitzping operates with
    bare-minimum dependencies, requiring only POSIX.1-2001 Berkeley sockets (without any non-standard BSD-, GNU-, SysV, or XSI-specific extensions);
    this makes it highly portable to low-power MIPS- and ARM-based routers.
    The codebase uses C11 syntax (e.g., anonymous structs and comma lists)
    but without any hard dependency on actual C11 headers; it can compile
    under C99 just fine. Additionally, seeing how standard-nonconformance
    resulted in hping3's source code failing to compile under new compilers
    without requiring manual patches, Blitzping's source code gets compiled
    under "-Wall -Wextra -Werror -pedantic-errors" by default.

    Other than giving the user more control over editing all parts
    (including the reserved bits, unlike hping3/nping) of their packets,
    Blitzping also introduces several unique performance optimizations: pre-generating and buffering packets, multithreading, using asynchronous sockets, and using vectored I/O to minimize system calls. These
    optimizations enable Blitzping to significantly outperform its
    counterparts, achieving up to millions of (40-byte) packets per second
    even on underpowered ARM-based systems.

    Shown below are comparisons between Blitzping, hping3, and nping across
    two CPUs running OpenWrt GNU/Linux v23.05.03 (more details in the linked repository https://github.com/Thraetaona/Blitzping):

    # Quad-Core "Rockchip RK3328" CPU @ 1.3 GHz. (ARMv8-A) #
    +--------------------+--------------+--------------+---------------+
    | ARM (4 x 1.3 GHz) | nping | hping3 | Blitzping |
    +--------------------+ -------------+--------------+---------------+
    | Num. Instances | 4 (1 thread) | 4 (1 thread) | 1 (4 threads) |
    | Pkts. per Second | ~65,000 | ~80,000 | ~3,150,000 |
    | Bandwidth (MiB/s) | ~2.50 | ~3.00 | ~120 |
    +--------------------+--------------+--------------+---------------+

    # Single-Core "Qualcomm Atheros QCA9533" SoC @ 650 MHz. (MIPS32r2) #
    +--------------------+--------------+--------------+---------------+
    | MIPS (1 x 650 MHz) | nping | hping3 | Blitzping |
    +--------------------+--------------+--------------+---------------+
    | Num. Instances | 1 (1 thread) | 1 (1 thread) | 1 (1 thread) |
    | Pkts. per Second | ~5,000 | ~10,000 | ~420,000 |
    | Bandwidth (MiB/s) | ~0.20 | ~0.40 | ~16 |
    +--------------------+--------------+--------------+---------------+

    In terms of protocol support, as of the time of writing, the IPv4
    interface is complete and the TCP frontend is almost finished, too.
    Afterward, I will be adding IPv6, UDP, and ICMP support.

    (There's also an entry in the FSF directory for Blitzping: https://directory.fsf.org/wiki/Blitzping)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rek2 hispagatos@21:1/5 to Fereydoun Memarzanjany on Fri Aug 23 18:00:41 2024
    XPost: comp.lang.c, alt.comp.networking.routers, alt.2600.hackers
    XPost: comp.os.linux.misc, comp.unix.misc

    On 2024-08-23, Fereydoun Memarzanjany <thraetaona@ieee.org> wrote:
    https://github.com/Thraetaona/Blitzping

    Hello!

    I've been working on Blitzping for the past few weeks. Blitzping is an open-source (GPLv3.0+) packet-crafting and sending utility designed to
    be much faster, more portable, and more configurable than existing tools
    like nping and hping3.


    Very cool! thank you!


    Happy Hacking
    ReK2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to Fereydoun Memarzanjany on Tue Aug 27 11:22:27 2024
    On 23/08/2024 19:04, Fereydoun Memarzanjany wrote:
    https://github.com/Thraetaona/Blitzping

    Hello!

    I've been working on Blitzping for the past few weeks. Blitzping is an open-source (GPLv3.0+) packet-crafting and sending utility designed to
    be much faster, more portable, and more configurable than existing tools
    like nping and hping3.

    <snip>

    In terms of protocol support, as of the time of writing, the IPv4
    interface is complete and the TCP frontend is almost finished, too. Afterward, I will be adding IPv6, UDP, and ICMP support.

    (There's also an entry in the FSF directory for Blitzping: https://directory.fsf.org/wiki/Blitzping)

    Thanks for this!

    I can see this tool being useful for stress-testing some of my embedded
    systems (with Blitzping running on a PC). I'll keep a note of it for
    later use.

    Do you foresee this being added to the standard Debian repositories, to
    reach a wider audience?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Fereydoun Memarzanjany@21:1/5 to David Brown on Thu Aug 29 15:53:23 2024
    On 8/27/2024, David Brown wrote:

    Thanks for this!

    I can see this tool being useful for stress-testing some of my embedded systems (with Blitzping running on a PC).  I'll keep a note of it for
    later use.

    Do you foresee this being added to the standard Debian repositories, to
    reach a wider audience?


    You're welcome!

    Yes, I do want to eventually add it to various package repositories
    (including Debian's); I am waiting for the project to get to a stable
    and feature-complete milestone before submitting it there, however.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)