svn commit: r190994 - user/piso/ipfw/sys/netinet/libalias
Paolo Pisati
piso at FreeBSD.org
Mon Apr 13 02:45:04 PDT 2009
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.
*/
More information about the svn-src-user
mailing list