=============================================================================== $Id: CHANGELOG,v 1.24 2004/03/29 17:24:34 mike Exp $ LIBNET 1.1 (c) 1998 - 2004 Mike D. Schiffman http://www.packetfactory.net/libnet =============================================================================== Mon Mar 29 09:23:49 PST 2004 1.1.2.1 Fixed a typo in the ICMP patch mentioned below. Thu Mar 25 10:49:04 PST 2004 1.1.2 Fixed the ICMP error message builders (there was a pblock assembly bug that would prevent you from building more than one ICMP {unreach, time exceed, redirect} in succession; the order of operations has changed slightly for building these packets, see the documenation and sample code Added a Sebek builder Fixed a bug in libnet_autobuild_arp() that had it pulling in the address to a pointer instead of just the address Added AM_MAINTAINER_MODE to configure.in Changed the __libnet_dump* namespace to the more descriptive libnet_diag* Added libnet_getpacket_size() to return the size of a packet in a given l Removed "protocol" from the libnet context. It was a waste of four bytes The raw socket interface always uses the "IPPROTO_RAW" protocol Fixed a memory leak in the advanced interface; there is now a function libnet_adv_free_packet() to free the memory allocated for the packet when libnet_adv_cull_packet() is called Fixed a bug on big endian boxes that had TCP and UDP checksums with odd payloads come out incorrect Changes all error messages to look and feel the same: "%s(): foo\n", __func__ Added a bunch of htons/htonl fixes Continued to add to the doxygen-based documentation Added support for unconfigured interfaces Changed the number of interfaces libnet can handle from 32 to 512 Removed uneeded control structure cruft from libnet_link_dlpi.c Removed sample/ip.c and added sample/ip_link.c and sample/ip_raw.c Added IPv6 fragmentation header builder Added IPv6 routing information header builder Added IPv6 destination options header builder Fixed IPv6 flowlabel and traffic class bitwise math Tue Nov 25 15:33:27 PST 2003 1.1.1 Fixed a bug in libnet_build_icmp_redirect: htonl(gateway) --> gateway. Added icmp_redirect.c sample code. Added libnet_autobuild_arp(). Added a slightly faster checksum. Added a GRE builder. Fixed a buffer overflow in libnet_build_dhcp(). Added more sanity checks to ensure we have proper link or network layer headers when not in advanced mode. Fixed a bug that would sometimes make __libnet_dump_context() crash under linux. Migration from sprintf and strcpy snprintf and strncpy. Fixed bug in libnet_build_ipv4() when calculating size of memory block Removed the support directory -- if you're an OLD version of OpenBSD or FreeBSD you deserve what you get. Added a BGP builder. Changed the error handing functions to be more consistent and use __FUNCTION__. Fixed a bug in libnet_pblock_free() -- replaced it with libnet_pblock_delete(). Fixed all of the inconsistencies inside all of the builders and pblock code where some fringe conditions could result in u_longs being crunched into u_shorts. Fixed libnet_pblock_coalesce() to only require one pass through the list. Added better diagnostics (__libnet_dump_context(), __libnet_dump_pblock()). Added Token Ring and FDDI builders (Linux and Solaris only). Added Token Ring and FDDI sample programs. Fixed the handling of TCP and IP payloads when reusing a pblocks. Fixed the handling of IP headers such that if a TCP packet changes size via subsequent calls to libnet_build_tcp(), the IP header automatically changes size as well. Added libnet_pblock_delete() to remove a pblock from the list. Added ip.c sample program (builds an arbitrary IP packet). Added additional payload sanity checks to libnet_build_*. Added a payload to sample/icmp_echo_cq.c. Added an MPLS builder. Added an 802.1x builder. Added an RPC builder! Bout time eh? Fixed do1x.c sample code to make the frame valid. Fixed link-interface semantics under Mac/OSX Changed libnet_stats to all be unsigned long longs to accomodate all of hardcore packet writers. Fixed IPv6 support (to some extent) removed the IP_HDRINCL stuff and reworked the resolver stuff to use net_pton() and inet_ntop(). Fixed libnet_build_icmpv4_*() to properly handle the IP header in the payload. Fixed libnet_build_igmp() to handle checksums properly. Fixed a bug in libnet_build_dnsv4() -- now it will work for TCP or UDP -- see the sample program for details... Fixed a bug in sample/dhcp_discover.c Added multiple packet interface (called the context queue interface). Until I finish the manpage, see the sample code and README files for instructions on how it works. Fixed Cygwin support. Fixed an OS/X compilation error due to lack of system header files. Fixed OS/X link layer bug. Fixed a bug in pblock_coalesce() that resulted in bad checksums when the advanced mode was enabled. Fixed a potential memory leak in pblock_coalesce(). Fixed a potential memory leak in libnet_select_device(). Fixed a potential memory leak in libnet_plist_chain_new(). Fixed Solaris support for IPv6 address support. Fixed minor bugs in libnet_advanced.c. Added loopback device support. Mon Aug 5 15:18:52 PDT 2002 1.1.0 First 1.1.0 non-beta release. Added libnet_adv_write_link() which allows an advanced user to access libnet's low-level frame injection functionality directly. Wed Jul 10 08:18:15 PDT 2002 1.1.0 Beta 07b Added some words to the manpage. Fixed a typo in libnet-functions.h -- forgot a comma. Sun Jul 7 10:37:12 PDT 2002 1.1.0 Beta 07a My bad. Forgot to `make distclean` before last release resulting in some compilation errors. My bad. Forgot to add advanced *_ADV writing support to libnet_write(). Simple fix. Tue Jul 2 08:42:57 PDT 2002 1.1.0 Beta 07 BETA support for IPv6. Fixed the IP and TCP options bugs that bound the TCP and IP payloads to the IP and TCP headers respectively and saw options being appended after the payload. Added libnet_hex_aton(). This functions reads in arbirtrarily long hex strings from the command line and returns the equivalent byte string. It does an implicit malloc() so make sure to free(). Frédéric Raynal submitted a patch to break the coalesce loop down to two passes using realloc resulting in a modest performance increase! Cool! Added "Advanced Mode" which will initialize the library with additional functionality for advanced users who "know what they're doing". Basically this feature will remove some of the sanity checks libnet does when building and injecting packets, at the programmer's peril. It also exposes the libnet_adv() functions. FINALLY changed that irritating struct ether_addr redefintion problem. I internalized the name space of it (-> libnet_ether_addr) so there will be no more issues there. Please update your code accordingly! Added IGMP checksum support which was omitted by accident. Removed netinet/ip_icmp.h from include list. This was causing problems when including dnet.h which includes other system headers. We can probably stand to remove several headers from libnet.h.in. Added sanity check to ensure that when *build_ethernet() is called the injection method is LIBNET_LINK (except when advanced mode is on). Thu Mar 28 22:18:46 PST 2002 1.1.0 Beta 06 Fixed ICMP unreachable checksum error and payload issues. Now using the payload interface with unreachables will append the payload to the IPv4 header of the "offending packet". Split STP builder into two; libnet_build_stp_conf() and libnet_build_stp_tcn(). New CHANGELOG format. :) Mar 24 2002 1.1.0 Beta 05 New building logic. Top down. Much smarter, we now build packets and frames like an OS kernel. Added Cisco ISL builder. Mar 18 2002 1.1.0 Beta 04 Added an STP builder. Hooks for Cisco ISL builder. Changed libnet_init() to now accept an IP address for the device (so either "fxp0" or "192.168.0.1" will work). Added libnet_clear_packet() to free packet memory when we're done with it. Feb 28 2002 1.1.0 Beta 03 Added 802.1q, 802.2, 802.3 builders. Feb 25 2002 1.1.0 Beta 02 Fixed Cygwin support. Feb 01 2002 1.1.0 Beta 01 Complete new API and overhaul of most everything. Improved linux packet socket support. Renamed libnet_host_lookup() and libnet_name_resolve() to the more intuitive libnet_addr2name() and libnet_name2addr(). All of the address resolution functions return host byte order (which is what the build functions want). Removed a ton of code from every corner of libnet. Removed alot of useless crap: misc directory ports directory util directory cleaned out the test directory and moved it to sample The libnet-config script is no longer needed to specify machine endianess -- that has been moved to libnet.h and done at compile time. You can still use it to specify other CPP constants as well as libraries. Added cygwin support. Hooks for a few ieee 802 builders. Added NTP builder. Added DHCP builder. Added BOOTP builder. Added Cisco CDP builder (needs work). Added IPSEC builder (needs work). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.0.2a 02.06.2001 Oops! Messed up the install stuff. Fixed now. Fixed the config.sub to correctly look for arm* architecture. Fixed the test.sh script (Thankz again to syke). 1.0.2 02.03.2001 Added OpenBSD 2.7 etherspoof lkm and kernel patch. (Thankz to obecian). Added FreeBSD 4.0-STABLE (and 5.0-CURRENT?) etherspoof kernel patch. (Thankz to Matt Bing). Added FreeBSD 4 support for automagic MAC address spoofing (via ioctl). No more lkm! (Thankz to Toni Andjelkovic). Added VRRP support. Fixed a NULL pointer check in libnet_checksum.c. (Thankz to syke). Fixed a function naming problem in libnet_if_addr.c. (Thankz to gigisull). Fixed a potential byte error in libnet_version. (Thankz to wotan). Fixed a potential overflow in libnet_link_sockpacket.c and libnet_link_dlpi.c. (Thankz to Jarno Huuskonen). Fixed a manpage discrepancy (get_ip_addr returns host-byte, not network-byte). Fixed arena allocation code (misalignments and whatnot) and arena manpage entry (2 arguments were swapped). (Thankz to Bryan T. Schmersal). Fixed datatype discrepancies (u_char was used liberally when char should have been used). (Thankz to Kyle Hargraves). Fixed the PF_PACKET interface to work correctly. (Thankz to Smiler). 1.0.1b 04.07.2000 Fixed portlist chaining code to allow for more than one active plist chain at a time (as per twitch's patch). Fixed discrepancy between the manpage and code for libnet_close_link_interface. It now returns 1 on success as per libnet standard (thankz to Toni Andjelkovic for pointing this out). 1.0.1a 03.29.2000 Fixed a small bug in libnet_link_dlpi.c. 1.0.1 12.19.1999 Fixed a typo in libnet-headers.h ARH_H -> ARP_H. Fixed a small typo in ether_mod-2.5.c. Pre-happy BD to libnet! She'z almost 2 yearz old! 1.0.0 10.27.1999 Added verbose html documentation. Added verbosely commented example code. Fixed OSPF testcode compile issues. Added ping of death ICMP test code module. Fixed manpage installation wrongness. Fixed a reported bug in OpenBSD etherspoof lkm. Merged OSPF lsa checksum code into main checksum module. Fixed a reported bug in the Makefile.in under Solaris when make install was invoked, the ln failed. Fixed linux-based IP broadcasting using the raw sockets interface. 0.99g 09.13.1999 Added an OSPF builder (which is still in beta). Fixed the Linux/configure.in bug. This was an odd bug that affected Linux-based boxes, but not BSD-based machines. The configure script refused to expand most of the Makefile.in macros in every file because of a conditional check. Fixed some Makefile.in issues. 0.99f 09.09.1999 Changed test/poink.c to not rely on a previous install of libnet to compile. Added a redhat RPM. Changed sourcefile naming scheme to libnet_*. Removed all assertions from the tree. We are moving closer to a 1.0 release and assertions have no place in production code. Furthermore, there should be no exit points inside a library. Currently, all functions that made assertions now return an integral 1 upon success and a -1 when the assertion would have failed (some had to be changed from returning void to returning int). This will not break backward compatbility. Fixed bugs in the arena code. next_packet_from_arena would never return the first chunk of memory, only the "next". It now handles this special case. Thanks to Sascha Gresk for locating this bug. Fixed another potential bug when attempting to allocate large packet sizes inside an arena. Added an OpenBSD 2.5 ether_spoof lkm. Fixed TCP options bugs. 0.99e 07.21.1999 Modified the libnet-config script to work more intutively now. It accepts multiple arguments. See README.libnet-config. Solaris m4/sh fixes (autoconf phase). Internal error handling changed to use libnet_error. 0.99d 06.24.1999 Added: build_icmp_redirect(). Added: FreeBSD 3.x support for spoofing source. Added: libnet_error(). Added: port list chaining code. MAC addrresses (see README.bpf). Bugfix: libnet_select_device correctly accepts NULL device arguments. Bugfix: build_icmp.c now copies the correct amount of header information. Bugfix: OpenBSD needs HAVE_SOCKADDR_SA_LEN. Changed: write_ip internal semantics. Cleaner and faster now. Changed: init_packet argument parameters. More correct now. Takes a u_short vs. a size_t. 0.99c 05.28.1999 link_int -> libnet_link_int. Misc small testcode fixes. Added libnet_tcp_header and libnet_ip_header. Added libnet-config shell script, see README.libnet-config and the manpage. Updated ports. Revamped checksum module -- it's much simpler and more efficient (ripped out arch specific code which seemed to be buggy with series' of very large packets). Dug Song wrote it, with small fixes/changes by MDS. 0.99b 05.06.1999 Fixed a nasty UDP/TCP + data checksum bug. Header structure further divided into subfiles. Moved get_hwaddr into low-level interface locales. Fixed the BSD get_hwaddr (dugsong@anzen.com). Ported to BSD/OS 3.x. Added `LIBNET_VERSION` symbolic constant. build_ip with payload semantics changed (now requires a payload length which is more intuitive). Fixed the `disappearing MAC address problem` within the linux version of get_hwaddr(). 0.99a 04.14.1999 Linux 2.0.x kernels don't have 0.99 included this header file without checking to see if it present. This is now fixed. Non-x86 systems have no tcp_check function but the stub.c sourcefile did not check this. This is now fixed. Added the utilities directory and get_mac.c. 0.99 04.13.1999 Major manpage redux. Added (broken?) PF_PACKET support for Linux (see README.linux). Moved alot of m4 from configure.in to aclocal.m4. Added Linux m4 macro to detect PF_PACKET. Added build_icmp_unreach Added build_icmp_timestamp Added standard nomenclature for all the ICMP type/code symbolic constants (see the manpage). Changed internal network structure nomenclature. Decided to stop using the word nomenclature so much. Fixed semantics of get_ipaddr (s/PF_INET/AF_INET). Added a symlink in the install directory so libnet is also named `libpwrite`. Added ASN.1 conversion routines, mostly pilfered from ucd snmplib. Removed get_hwaddr from sockpacket.c and made the existing one portable to Linux. Added more testcode and changed testcode structure to be more intuitive. Added init_packet and destroy_packet. Added an arena allocator. Fixed alignment issues on SPARC and Alpha (possibly others with strict alignment requirements). Added a packet dumping routine. Not fully tested. Testcode updates including a master testcode shell script. Added stub functions to ease the eventual transition to a more proper `libnet_*` function naming convention. See README.stubs for more info. 0.10a 02.04.1999 Added the libnet.s2h configuration file to the distribution. GLIBC fix. 0.10 01.31.1999 Many low-level changes, same interface though. Split up the main libnet.h file into two files. Autoconf changes: checks to see if the underlying architecture needs to be aligned. flexible install location. explicitly set $CC option in Makefile.in. Added ensure-dir.sh. Changes DEBUG semantics as I was told the previous stuff broke on some compilers. Created a FreeBSD/OpenBSD ports entry. SGI snoop (drain) interface fixed. Solaris/HPUX DLPI interface fixed. Support for getting local IP addresses. Support for getting local hardware addresses. Added a DNS packet builder. Added an RIP packet builder. Added an ICMP MASKREQ/REPLY packet builder. Added ICMP at the link layer test code. Changed GLIBC version detection semantics. 0.9 12.15.1998 Major changes/additions here... Added lowlevel packet building and writing routines with a codebase from libpcap. Broken DPLI support (fixme!). Added ethernet and ARP building routines. Added ICMP_ECHO building routine which led to the Discovery of an odd kernel panic bug under OpenBSD (see hook.c in test dir). Added IGMP building routine. Reworked autoconf script. Fixed Linux ip_sum vs. ip_csum naming issue. Fixed Solaris checksums (2.4, 2.5.x). Added NetBSD autoconf entry. Changed BSD_BYTE_SWAP semantics to correctly handle IP datagrams through BPF (see write_ip.c). 0.8c 11.10.1998 Added more testcode. 0.8b 10.21.1998 OK. I THINK WE'VE FINALLY FIXED THAT GLIBC THING. Ported to alpha Linux. 0.8a 10.15.1998 Added support for IP TOS bits (oops. Broke backward compatibility again. Like I said, don't rely on this until 1.x). 0.8 10.13.1998 Added support for IP options. Added support for TCP options. Added a dummy version function. Fixed linux libc vs. glibc nomenclature discrepancy. Solaris checksums fixed for non-payload laden packets? 0.7b 09.22.1998 Linux glibc/libc nomenclature anomoly still there. Fixed Linux/BSD icmp header size problem. 0.7a 08.26.1998 Fixed payload support (see test code). 0.7 08.25.1998 Solaris port (checksums broken -- Solaris has gay fucking quirks when it comes to checksumming on raw sockets). Added autoconf scripts. Added psuedorandom number generation code. Added payload support (breaks backward compatability and is untested). 0.6 06.21.1998 Fixed UDP checksum. Removed USE_NAME CPP option made it a run time decision. Makes code more extensible, but breaks backward compatibility. 0.5 06.02.1998 Added TCP/UDP/IP packet assembly routines. Added a checksum function. Added a manpage. Removed daemonizing function (BSD has one). UDP checksums broken... 0.4 01.12.1998 IP checksum (x86 assembly implementation). 0.3 01.12.1998 daemonizing function. 0.2 01.11.1998 raw socket function changed to allow user designated protocol for raw socket 0.1 01.05.1998 Initial release, contains: network byte order -> human readable IP address, human readable IP address -> network byte order, simple raw socket / IP_HDRINCL wrapper, TCP checksum (x86 assembly implementation) EOF