LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1584|回复: 0

REVIEW & TEST: libalias megapatch for FreeBSD-current

[复制链接]
发表于 2004-1-5 11:32:58 | 显示全部楼层 |阅读模式
This patch by FreeBSD's Poul-Henning Kamp makes it possible for programs like natd to run multiple packet-aliasing engines, this was not previously possible because of the widespread use of global variables in libalias.
http://phk.freebsd.dk/patch/libalias.patch

This patch makes it possible to have multiple packet aliasing
instances in a single process.

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

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

Put all global variables in the instance structure.

Implement old API in terms of the new API.

No functional change.

No functions removed so there is no need for shlib version bump,
only an updating entry and a __FreeBSD_version bump.


The intent is to subsequently add a "multilink" facility to natd(8)
for people with two xDSL lines to different providers etc.

For this we need to run one packet-aliasing engine per line, and
in order to not totally toast throughput, this should not result
in more context switches then we are used to. (ie: not
kern/usr/kern/usr/kern for the second line, but just kern/usr/kern
as always).

This patch makes it possible for programs like natd to run multiple
packet-aliasing engines, this was not previously possible because
of the widespread use of global variables in libalias.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表