History log of /freebsd-current/sys/netinet/libalias/alias_util.c
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# effc8e57 14-May-2021 Lutz Donnerhacke <donner@FreeBSD.org>

libalias: Style cleanup

libalias is a convolut of various coding styles modified by a series
of different editors enforcing interesting convetions on spacing and
comments.

This patch is a baseline to start with a perfomance rework of
libalias. Upcoming patches should be focus on the code, not on the
style. That's why most annoying style errors should be fixed
beforehand.

Reviewed by: hselasky
Discussed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D30259


# 662c1305 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

net: clean up empty lines in .c and .h files


# fe267a55 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 6c7faee2 06-Dec-2007 Dag-Erling Smørgrav <des@FreeBSD.org>

Simpler version of the previous commit.


# 962e1ce3 23-Nov-2007 John Birrell <jb@FreeBSD.org>

Fix strict alias warnings.


# ccd57eea 14-Dec-2006 Paolo Pisati <piso@FreeBSD.org>

o made in kernel libalias mpsafe
o fixed a comment
o made in kernel libalias a bit less verbose (disabled automatic
logging everytime a new link is added or deleted)

Approved by: glebius (mentor)


# be4f3cd0 26-Sep-2006 Paolo Pisati <piso@FreeBSD.org>

Summer of Code 2005: improve libalias - part 1 of 2

With the first part of my previous Summer of Code work, we get:

-made libalias modular:

-support for 'particular' protocols (like ftp/irc/etcetc) is no more
hardcoded inside libalias, but it's available through external
modules loadable at runtime

-modules are available both in kernel (/boot/kernel/alias_*.ko) and
user land (/lib/libalias_*)

-protocols/applications modularized are: cuseeme, ftp, irc, nbt, pptp,
skinny and smedia

-added logging support for kernel side

-cleanup

After a buildworld, do a 'mergemaster -i' to install the file libalias.conf
in /etc or manually copy it.

During startup (and after every HUP signal) user land applications running
the new libalias will try to read a file in /etc called libalias.conf:
that file contains the list of modules to load.

User land applications affected by this commit are ppp and natd:
if libalias.conf is present in /etc you won't notice any difference.

The only kernel land bit affected by this commit is ng_nat:
if you are using ng_nat, and it doesn't correctly handle
ftp/irc/etcetc sessions anymore, remember to kldload
the correspondent module (i.e. kldload alias_ftp).

General information and details about the inner working are available
in the libalias man page under the section 'MODULAR ARCHITECTURE
(AND ipfw(4) SUPPORT)'.

NOTA BENE: this commit affects _ONLY_ libalias, ipfw in-kernel nat
support will be part of the next libalias-related commit.

Approved by: glebius
Reviewed by: glebius, ru


# 59dde15e 27-Jun-2005 Gleb Smirnoff <glebius@FreeBSD.org>

Disable checksum processing in LibAlias, when it works as a
kernel module. LibAlias is not aware about checksum offloading,
so the caller should provide checksum calculation. (The only
current consumer is ng_nat(4)). When TCP packet internals has
been changed and it requires checksum recalculation, a cookie
is set in th_x2 field of TCP packet, to inform caller that it
needs to recalculate checksum. This ugly hack would be removed
when LibAlias is made more kernel friendly.

Incremental checksum updates are left as is, since they don't
conflict with offloading.

Approved by: re (scottl)


# 72f2d657 20-Jun-2005 Gleb Smirnoff <glebius@FreeBSD.org>

- Don't use legacy function in a non-legacy one. This gives us
possibility to compile libalias without legacy support.
- Use correct way to mark variable as unused.

Approved by: re (dwhite)


# c649a2e0 05-May-2005 Gleb Smirnoff <glebius@FreeBSD.org>

Play with includes so that libalias can be compiled both as userland
library and kernel module.


# 9fa0fd26 05-Jul-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Introduce inline {ip,udp,tcp}_next() functions which take a pointer to an
{ip,udp,tcp} header and return a void * pointing to the payload (i.e. the
first byte past the end of the header and any required padding). Use them
consistently throughout libalias to a) reduce code duplication, b) improve
code legibility, c) get rid of a bunch of alignment warnings.


# ed01a582 05-Jul-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Make libalias WARNS?=6-clean. This mostly involves renaming variables
named link, foo_link or link_foo to lnk, foo_lnk or lnk_foo, fixing
signed / unsigned comparisons, and shoving unused function arguments
under the carpet.

I was hoping WARNS?=6 might reveal more serious problems, and perhaps
the source of the -O2 breakage, but found no smoking gun.


# f311ebb4 05-Jul-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Mechanical whitespace cleanup.


# 2871c501 31-Mar-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Deal with aliasing warnings.

Reviewed by: ru
Approved by: silence on the lists


# f0f93429 16-Mar-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Run through indent(1) so I can read the code without getting a headache.
The result isn't quite knf, but it's knfer than the original, and far
more consistent.


# 5e289f9e 17-Jan-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Mostly mechanical rework of libalias:

Makes it possible to have multiple packet aliasing instances in a
single process by moving all static and global variables into an
instance structure called "struct libalias".

Redefine a new API based on s/PacketAlias/LibAlias/g

Add new "instance" argument to all functions in the new API.

Implement old API in terms of the new API.


# 27cc91fb 01-Jul-2002 Brian Somers <brian@FreeBSD.org>

Remove trailing whitespace


# e83aaae3 03-Nov-2001 Brian Somers <brian@FreeBSD.org>

cmott@scientech.com -> cm@linktel.net

Requested by: Charles Mott <cmott@scientech.com>


# e2505aa6 30-Sep-2001 Matthew Dillon <dillon@FreeBSD.org>

Add __FBSDID's to libalias


# f987e1bd 04-Jun-2001 Brian Somers <brian@FreeBSD.org>

Add BSD-style copyright headers

Approved by: Charles Mott <cmott@scientech.com>


# 91cc2995 05-Apr-2000 Ruslan Ermilov <ru@FreeBSD.org>

Minor spelling fixes.


# a5a388c7 29-Aug-1999 Bill Fumerola <billf@FreeBSD.org>

Add $FreeBSD$ and spell Eklund properly.

Approved by: brian (well, he approved adding $Id$)


# 46d28b44 21-Apr-1999 Luoqi Chen <luoqi@FreeBSD.org>

Work around an egcs optimizer bug (i386). This should fix the active ftp
hang problem. A bug report has been sent to cygnus.


# 3efa11bb 03-Aug-1997 Brian Somers <brian@FreeBSD.org>

Update to version 2.2. Only the PacketAlias*()
functions should now be used. The old 2.1 stuff is
there for backwards compatability.
Submitted by: Charles Mott <cmott@snake.srv.net>


# 3b160b8b 22-May-1997 Brian Somers <brian@FreeBSD.org>

Create the alias library. This is currently only used by
ppp (or will be shortly). Natd can now be updated to use
this library rather than carrying its own version of the code.

Submitted by: Charles Mott <cmott@srv.net>