Up to [DragonFly] / src / sys / netinet6
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
* Implement SOCK_SEQPACKET sockets for local communications. These sockets operate like SOCK_STREAM but each write() builds a record and each read() reads a record. That is, the data is not aggregated together or allowed to be partially read. This allows local sockets to have the same packetization characteristics as if_tap when desired. * Add a feature to the vkernel which allows a unix domain socket to be specified for the network interface rather then a TAP interface. The vkernel will connect to the socket using SOCK_SEQPACKET and read and write packets to it. * Clean up some libc/kernel namespace collisions related to including sys/socket.h.
For kmalloc(), MALLOC() and contigmalloc(), use M_ZERO instead of explicitly bzero()ing. Reviewed-by: sephe
- m_tag_get() expects MB_DONTWAIT not M_NOWAIT - Utilize MBTOM() in m_tag_alloc()
Rename printf -> kprintf in sys/ and add some defines where necessary (files which are used in userland, too).
Rename sprintf -> ksprintf Rename snprintf -> knsprintf Make allowances for source files that are compiled for both userland and the kernel.
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 2
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 1
Assert that he mbuf type is correct rather then blinding setting m_type.
Abstract out the location of an m_tag's data by adding a m_tag_data() inline. Replace all instances of 'mtag + 1' with the new inline. Fix numerous bugs, mainly in ipfw/ipfw2, where the m_tag data was being stored in the wrong place and corrupting the m_tag, resulting in a panic. This primarily occured with the use of divert rules. Reported-by: Ben Woolley <firstname.lastname@example.org>
Remove *spl() from netinet6 replacing them with critical sections.
Fix a bug which can allow a remote attacker to cause denial of service attack. Obtained from: KAME (rev.1.232)
Now that 'so_pcb' is properly declared as a 'void *', remove a layer of indirection and directly use 'so->so_pcb' in place of 'sotoinpcb(so)'.
Get rid of mb_map. Retool the mbuf and mbuf cluster allocator to use malloc() (our slab allocator). Get rid of the NULL callback function for M_EXT buffers, assign real functions for standard M_EXT buffers and add a new flag M_EXT_CLUSTER to tell the mbuf code when an M_EXT buffer is under management by the mbuf cluster allocator. Get rid of the address calculations and the char array ref count that used to exist for mbuf clusters. Replace with a meta-data structure to keep track of ref counts. Note that the new cluster code uses the new M_EXT mechanism. Increase the default mbuf+cluster pool from 10 to 20. Add sysctl's to set the mbuf and mbuf cluster free-pool maximums (kern.ipc.mcl_free_max and kern.ipc.mbuf_free_max), beyond which mbuf and mbuf cluster memory is returned to the system.
Stage 1/many: mbuf/cluster accounting rewrite and mbuf allocator rewrite. Implement 'new' style mbuf m_ext buffers where the callbacks are called with a custom argument instead of with (buf, size). Old style m_ext buffers have to jump through loops to properly track reference counters in a manner that is tightly integrated with the old mbuf/cluster KVA allocation array. The old clustering methodology is going to have to be converted to the new methodology before we can rip out the old mbuf allocator, plus we want to use the new mechanism anyway because it is a whole lot cleaner and because it's easier to import driver code (aka NDIS) from FreeBSD-5 with the new mechanism. This commit still supports the old mechanism via M_EXT_OLD, and all existing function-based M_EXT's have been converted to use M_EXT_OLD. The old mechanism (and M_EXT_OLD) will be removed in later stages.
Change mbug allocation flags from M_ to MB_ to avoid confusion with malloc flags. Requested by: Jeffrey Hsu
Style(9) cleanup to src/sys/netinet6: - Convert K&R-style function definitions to ANSI style. Submitted-by: Andre Nathan <email@example.com> Double-checked-by: YONETANI Tomokazu <firstname.lastname@example.org>
Move <machine/in_cksum.h> to <sys/in_cksum.h>. This file is now platform independant. If we want to add extreme machine specialization later on then sys/in_cksum.h will #include machine/in_cksum.h. Move i386/i386/in_cksum.c to netinet/in_cksum.c. Note that netinet/in_cksum.c already existed but was not used by the build system at all. The move overwrites it. The new in_cksum.c is a portable, complete rewrite which references core assembly (procedure call) to do 32-bit-aligned work. See also i386/i386/in_cksum2.s.
well, if netproto doesnt need old prototypes inet6 doesnt either
kernel tree reorganization stage 1: Major cvs repository work (not logged as commits) plus a major reworking of the #include's to accomodate the relocations. * CVS repository files manually moved. Old directories left intact and empty (temporary). * Reorganize all filesystems into vfs/, most devices into dev/, sub-divide devices by function. * Begin to move device-specific architecture files to the device subdirs rather then throwing them all into, e.g. i386/include * Reorganize files related to system busses, placing the related code in a new bus/ directory. Also move cam to bus/cam though this may not have been the best idea in retrospect. * Reorganize emulation code and place it in a new emulation/ directory. * Remove the -I- compiler option in order to allow #include file localization, rename all config generated X.h files to use_X.h to clean up the conflicts. * Remove /usr/src/include (or /usr/include) dependancies during the kernel build, beyond what is normally needed to compile helper programs. * Make config create 'machine' softlinks for architecture specific directories outside of the standard <arch>/include. * Bump the config rev. WARNING! after this commit /usr/include and /usr/src/sys/compile/* should be regenerated from scratch.
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most ids have been removed from !lint sections and moved into comment sections.
import from FreeBSD RELENG_4 126.96.36.199