How njombart/hping works
Project type and purpose
• hping3 is a command‑line network testing and packet‑crafting tool with built‑in scripting capabilities via Tcl/Tk.
• It sends custom TCP/IP packets, handles fragmentation, parses replies, and supports traceroute, firewalk, OS fingerprinting, port scanning, and protocol auditing.
• It embeds a Tcl interpreter (“script.c” plus lib/*.htcl) to allow advanced scripted packet workflows.
File structure
• Top‑level C source modules (.c/.h) implement packet construction (send*.c), parsing (datahandler.c, waitpacket.c), utilities (byteorder.c, cksum.c, random.c), scripting glue (script.c, libpcap_stuff.c), and raw‑socket or pcap I/O (opensockraw.c, listen.c).
• “lib/” holds example Tcl scripts and a glue layer (apd.htcl, hpingstdlib.htcl, etc.).
• “docs/” and “RFCs/” contain user and protocol reference material.
• Build: “configure”, “Makefile.in”, “lib/README”, INSTALL.
• Dependencies implied by code and README: libpcap and optional Tcl/Tk.
README for additional insights
• Confirms core functionality and scripting API in docs/API.txt.
• Highlights reliance on root privileges for raw sockets and optional Tcl/Tk for scripting.
• Notes external integration points: system’s TCP/IP stack, libpcap capture API.