From owner-p4-projects@FreeBSD.ORG Tue Jan 30 15:28:52 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 334FD16A56A; Tue, 30 Jan 2007 15:28:52 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 047FF16A561 for ; Tue, 30 Jan 2007 15:28:52 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id E868313C481 for ; Tue, 30 Jan 2007 15:28:51 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0UFSpSq057931 for ; Tue, 30 Jan 2007 15:28:51 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0UFSpDD057920 for perforce@freebsd.org; Tue, 30 Jan 2007 15:28:51 GMT (envelope-from piso@freebsd.org) Date: Tue, 30 Jan 2007 15:28:51 GMT Message-Id: <200701301528.l0UFSpDD057920@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 113706 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 15:28:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=113706 Change 113706 by piso@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);