diff options
author | phk <phk@FreeBSD.org> | 2002-09-18 13:41:37 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-18 13:41:37 +0000 |
commit | 22fe384f6f4452e5def19ab22effb1b93a0a73ee (patch) | |
tree | cac78e0d34bc18caf115f633b6d366225b464066 | |
parent | aef6a01e62c6a07fc147d9fb374637729c123e76 (diff) | |
download | FreeBSD-src-22fe384f6f4452e5def19ab22effb1b93a0a73ee.zip FreeBSD-src-22fe384f6f4452e5def19ab22effb1b93a0a73ee.tar.gz |
Move m_fixhdr() from "mbchain" to "mbuf" where it belongs.
-rw-r--r-- | sys/kern/subr_mchain.c | 14 | ||||
-rw-r--r-- | sys/kern/uipc_mbuf.c | 14 | ||||
-rw-r--r-- | sys/sys/mbuf.h | 1 | ||||
-rw-r--r-- | sys/sys/mchain.h | 2 |
4 files changed, 15 insertions, 16 deletions
diff --git a/sys/kern/subr_mchain.c b/sys/kern/subr_mchain.c index a222267..82a5a49 100644 --- a/sys/kern/subr_mchain.c +++ b/sys/kern/subr_mchain.c @@ -55,20 +55,6 @@ MODULE_VERSION(libmchain, 1); * Various helper functions */ int -m_fixhdr(struct mbuf *m0) -{ - struct mbuf *m = m0; - int len = 0; - - while (m) { - len += m->m_len; - m = m->m_next; - } - m0->m_pkthdr.len = len; - return len; -} - -int mb_init(struct mbchain *mbp) { struct mbuf *m; diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 39bcdbc..6d66245 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -710,3 +710,17 @@ m_print(const struct mbuf *m) } return; } + +int +m_fixhdr(struct mbuf *m0) +{ + struct mbuf *m = m0; + int len = 0; + + while (m) { + len += m->m_len; + m = m->m_next; + } + m0->m_pkthdr.len = len; + return len; +} diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 2d61e73..a791d35 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -480,6 +480,7 @@ void m_copy_pkthdr(struct mbuf *to, struct mbuf *from); struct mbuf *m_devget(char *, int, int, struct ifnet *, void (*copy)(char *, caddr_t, u_int)); struct mbuf *m_dup(struct mbuf *, int); +int m_fixhdr(struct mbuf *m); struct mbuf *m_free(struct mbuf *); void m_freem(struct mbuf *); struct mbuf *m_get(int, short); diff --git a/sys/sys/mchain.h b/sys/sys/mchain.h index 7b4f7ec..61f0af9 100644 --- a/sys/sys/mchain.h +++ b/sys/sys/mchain.h @@ -134,8 +134,6 @@ struct mdchain { u_char * md_pos; /* offset in the current mbuf */ }; -int m_fixhdr(struct mbuf *m); - int mb_init(struct mbchain *mbp); void mb_initm(struct mbchain *mbp, struct mbuf *m); void mb_done(struct mbchain *mbp); |