diff options
author | brian <brian@FreeBSD.org> | 1997-08-03 18:20:03 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-08-03 18:20:03 +0000 |
commit | e7c02535af1562d83c5da123145906b1f3052ea8 (patch) | |
tree | 33547ba3ecdb3d721b25e6b37f689c588e1578b3 /sys/netinet/libalias/alias_old.c | |
parent | 18f2d2147c1f106b540853963b606553f9c14e19 (diff) | |
download | FreeBSD-src-e7c02535af1562d83c5da123145906b1f3052ea8.zip FreeBSD-src-e7c02535af1562d83c5da123145906b1f3052ea8.tar.gz |
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>
Diffstat (limited to 'sys/netinet/libalias/alias_old.c')
-rw-r--r-- | sys/netinet/libalias/alias_old.c | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/sys/netinet/libalias/alias_old.c b/sys/netinet/libalias/alias_old.c new file mode 100644 index 0000000..3f634d4 --- /dev/null +++ b/sys/netinet/libalias/alias_old.c @@ -0,0 +1,77 @@ +/* + This file can be considered a junk pile of old functions that + are either obsolete or have had their names changed. In the + transition from alias2.1 to alias2.2, all the function names + were rationalized so that they began with "PacketAlias..." + + These functions are included for backwards compatibility. +*/ + +#include <sys/types.h> +#include <netinet/in_systm.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include "alias.h" +#include "alias_local.h" + +void +InitPacketAlias(void) +{ + PacketAliasInit(); +} + +void +SetPacketAliasAddress(struct in_addr addr) +{ + PacketAliasSetAddress(addr); +} + +unsigned int +SetPacketAliasMode(unsigned int flags, unsigned int mask) +{ + return PacketAliasSetMode(flags, mask); +} + +int +PacketAliasPermanentLink(struct in_addr src_addr, u_short src_port, + struct in_addr dst_addr, u_short dst_port, + u_short alias_port, u_char proto) +{ + struct alias_link *link; + struct in_addr null_address; + + null_address.s_addr = 0; + link = PacketAliasRedirectPort(src_addr, src_port, + dst_addr, dst_port, + null_address, alias_port, + proto); + + if (link == NULL) + return -1; + else + return 0; +} + +int +SaveFragmentPtr(char *ptr) +{ + return PacketAliasSaveFragment(ptr); +} + +char * +GetNextFragmentPtr(char *ptr) +{ + return PacketAliasGetFragment(ptr); +} + +void +FragmentAliasIn(char *header, char *fragment) +{ + PacketAliasFragmentIn(header, fragment); +} + +u_short +InternetChecksum(u_short *ptr, int len) +{ + return PacketAliasInternetChecksum(ptr, len); +} |