Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #94: Internet outage


comp / comp.lang.c / Blitzping: A very high-speed, configurable, and portable packet-crafting utility optimized for embedded devices

SubjectAuthor
* Blitzping: A very high-speed, configurable, and portable packet-crafting utilityFereydoun Memarzanjany
`- Re: Blitzping: A very high-speed, configurable, and portable packet-crafting utirek2 hispagatos

1
Subject: Blitzping: A very high-speed, configurable, and portable packet-crafting utility optimized for embedded devices
From: Fereydoun Memarzanja
Newsgroups: comp.lang.c, alt.comp.networking.routers, alt.2600.hackers, comp.os.linux.misc, comp.unix.misc, comp.arch.embedded
Organization: A noiseless patient Spider
Date: Fri, 23 Aug 2024 17:04 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: thraetaona@ieee.org (Fereydoun Memarzanjany)
Newsgroups: comp.lang.c,alt.comp.networking.routers,alt.2600.hackers,comp.os.linux.misc,comp.unix.misc,comp.arch.embedded
Subject: Blitzping: A very high-speed, configurable, and portable
packet-crafting utility optimized for embedded devices
Date: Fri, 23 Aug 2024 11:04:46 -0600
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <vaaffd$vsfr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 23 Aug 2024 19:04:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="904c75dc8d632c1850165c3683654194";
logging-data="1044987"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/VZoklFjW7h/wHK6GMpImaFaXFSPjZB30="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:OVyxRFD+ySs+ruBcv3xG+w5XIAw=
Content-Language: en-US
View all headers

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)

Subject: Re: Blitzping: A very high-speed, configurable, and portable packet-crafting utility optimized for embedded devices
From: rek2 hispagatos
Newsgroups: comp.lang.c, alt.comp.networking.routers, alt.2600.hackers, comp.os.linux.misc, comp.unix.misc, comp.arch.embedded
Organization: Hispagatos
Date: Fri, 23 Aug 2024 18:00 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.hispagatos.org!.POSTED!not-for-mail
From: rek2@hispagatos.org.invalid (rek2 hispagatos)
Newsgroups: comp.lang.c,alt.comp.networking.routers,alt.2600.hackers,comp.os.linux.misc,comp.unix.misc,comp.arch.embedded
Subject: Re: Blitzping: A very high-speed, configurable, and portable
packet-crafting utility optimized for embedded devices
Date: Fri, 23 Aug 2024 18:00:41 -0000 (UTC)
Organization: Hispagatos
Message-ID: <vaaio9$mnes$1@matrix.hispagatos.org>
References: <vaaffd$vsfr$1@dont-email.me>
Reply-To: ReK2 <rek2@hispagatos.org>
Injection-Date: Fri, 23 Aug 2024 18:00:41 -0000 (UTC)
Injection-Info: matrix.hispagatos.org;
logging-data="744924"; mail-complaints-to="abuse@hispagatos.org"
User-Agent: slrn/pre1.0.4-9 (Linux)
View all headers

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

1

rocksolid light 0.9.8
clearnet tor