Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 2009 09:45:03 +0000 (UTC)
From:      Paolo Pisati <piso@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r190994 - user/piso/ipfw/sys/netinet/libalias
Message-ID:  <200904130945.n3D9j3Y1064992@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: piso
Date: Mon Apr 13 09:45:03 2009
New Revision: 190994
URL: http://svn.freebsd.org/changeset/base/190994

Log:
  Remove megapullup() from main libalias since it is not used anymore.

Modified:
  user/piso/ipfw/sys/netinet/libalias/alias.c
  user/piso/ipfw/sys/netinet/libalias/alias.h

Modified: user/piso/ipfw/sys/netinet/libalias/alias.c
==============================================================================
--- user/piso/ipfw/sys/netinet/libalias/alias.c	Mon Apr 13 09:23:20 2009	(r190993)
+++ user/piso/ipfw/sys/netinet/libalias/alias.c	Mon Apr 13 09:45:03 2009	(r190994)
@@ -1742,40 +1742,3 @@ LibAliasUnLoadAllModule(void)
 }
 
 #endif
-
-#ifdef _KERNEL
-/*
- * m_megapullup() - this function is a big hack.
- * Thankfully, it's only used in ng_nat and ipfw+nat.
- *
- * It allocates an mbuf with cluster and copies the whole chain into cluster,
- * so that it is all contiguous and the whole packet can be accessed via a
- * plain (char *) pointer.  This is required, because libalias doesn't know
- * how to handle mbuf chains.
- *
- * On success, m_megapullup returns an mbuf with cluster containing the input
- * packet, on failure NULL.  In both cases, the input packet is consumed.
- */
-struct mbuf *
-m_megapullup(struct mbuf *m, int len) {
-	struct mbuf *mcl;
-	caddr_t cp;
-	
-	if (len > MCLBYTES)
-		goto bad;
-	
-	if ((mcl = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL)
-		goto bad;
- 
-	cp = mtod(mcl, caddr_t);
-	m_copydata(m, 0, len, cp);
-	m_move_pkthdr(mcl, m);
-	mcl->m_len = mcl->m_pkthdr.len;
-	m_freem(m);
- 
-	return (mcl);
-bad:
-	m_freem(m);
-	return (NULL);
-}
-#endif

Modified: user/piso/ipfw/sys/netinet/libalias/alias.h
==============================================================================
--- user/piso/ipfw/sys/netinet/libalias/alias.h	Mon Apr 13 09:23:20 2009	(r190993)
+++ user/piso/ipfw/sys/netinet/libalias/alias.h	Mon Apr 13 09:45:03 2009	(r190994)
@@ -207,9 +207,6 @@ int             LibAliasLoadModule(char 
 int             LibAliasUnLoadAllModule(void);
 int             LibAliasRefreshModules(void);
 
-/* Mbuf helper function. */
-struct mbuf    *m_megapullup(struct mbuf *, int);
-
 /*
  * Mode flags and other constants.
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904130945.n3D9j3Y1064992>