PERFORCE change 113706 for review
Paolo Pisati
piso at FreeBSD.org
Tue Jan 30 15:28:52 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=113706
Change 113706 by piso at piso_newluxor on 2007/01/30 15:28:37
Modify UdpAliasIn(), TcpAliasIn() and ProtoAliasIn() to handle a "void *"
argument instead of a "struct ip *" in _KERNEL case.
Affected files ...
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#41 edit
Differences ...
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#41 (text+ko) ====
@@ -264,13 +264,13 @@
static int IcmpAliasOut2(struct libalias *, struct ip *);
static int IcmpAliasOut(struct libalias *, struct ip *, int create);
-static int ProtoAliasIn(struct libalias *, struct ip *);
+static int ProtoAliasIn(struct libalias *, void *);
static int ProtoAliasOut(struct libalias *, struct ip *, int create);
-static int UdpAliasIn(struct libalias *, struct ip *);
+static int UdpAliasIn(struct libalias *, void *);
static int UdpAliasOut(struct libalias *, struct ip *, int create);
-static int TcpAliasIn(struct libalias *, struct ip *);
+static int TcpAliasIn(struct libalias *, void *);
static int TcpAliasOut(struct libalias *, struct ip *, int, int create);
@@ -661,7 +661,7 @@
static int
-ProtoAliasIn(struct libalias *la, struct ip *pip)
+ProtoAliasIn(struct libalias *la, void *ptr)
{
/*
Handle incoming IP packets. The
@@ -669,7 +669,14 @@
the dest IP address of the packet to our inside
machine.
*/
+ struct ip *pip;
struct alias_link *lnk;
+#ifdef _KERNEL
+ // XXX - m_pullup()
+ pip = ptr;
+#else
+ pip = ptr;
+#endif
LIBALIAS_LOCK_ASSERT(la);
/* Return if proxy-only mode is enabled */
@@ -728,10 +735,17 @@
static int
-UdpAliasIn(struct libalias *la, struct ip *pip)
+UdpAliasIn(struct libalias *la, void *ptr)
{
+ struct ip *pip;
struct udphdr *ud;
struct alias_link *lnk;
+#ifdef _KERNEL
+ // XXX - m_pullup()
+ pip = ptr;
+#else
+ pip = ptr;
+#endif
LIBALIAS_LOCK_ASSERT(la);
/* Return if proxy-only mode is enabled */
@@ -855,10 +869,17 @@
static int
-TcpAliasIn(struct libalias *la, struct ip *pip)
+TcpAliasIn(struct libalias *la, void *ptr)
{
+ struct ip *pip;
struct tcphdr *tc;
struct alias_link *lnk;
+#ifdef _KERNEL
+ // XXX - m_pullup()
+ pip = ptr;
+#else
+ pip = ptr;
+#endif
LIBALIAS_LOCK_ASSERT(la);
tc = (struct tcphdr *)ip_next(pip);
More information about the p4-projects
mailing list