mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Add const-qualifiers for source mbuf argument in m_dup(), m_copym(),
m_dup_pkthdr() and m_tag_copy_chain().
This commit is contained in:
parent
709c835a5a
commit
0cbefd30cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286450
@ -396,7 +396,7 @@ mb_free_ext(struct mbuf *m)
|
||||
* and bump the refcount of the cluster.
|
||||
*/
|
||||
static void
|
||||
mb_dupcl(struct mbuf *n, struct mbuf *m)
|
||||
mb_dupcl(struct mbuf *n, const struct mbuf *m)
|
||||
{
|
||||
|
||||
KASSERT(m->m_flags & M_EXT, ("%s: M_EXT not set on %p", __func__, m));
|
||||
@ -567,7 +567,7 @@ m_move_pkthdr(struct mbuf *to, struct mbuf *from)
|
||||
* In particular, this does a deep copy of the packet tags.
|
||||
*/
|
||||
int
|
||||
m_dup_pkthdr(struct mbuf *to, struct mbuf *from, int how)
|
||||
m_dup_pkthdr(struct mbuf *to, const struct mbuf *from, int how)
|
||||
{
|
||||
|
||||
#if 0
|
||||
@ -631,7 +631,7 @@ m_prepend(struct mbuf *m, int len, int how)
|
||||
* only their reference counts are incremented.
|
||||
*/
|
||||
struct mbuf *
|
||||
m_copym(struct mbuf *m, int off0, int len, int wait)
|
||||
m_copym(const struct mbuf *m, int off0, int len, int wait)
|
||||
{
|
||||
struct mbuf *n, **np;
|
||||
int off = off0;
|
||||
@ -785,7 +785,7 @@ m_copydata(const struct mbuf *m, int off, int len, caddr_t cp)
|
||||
* you need a writable copy of an mbuf chain.
|
||||
*/
|
||||
struct mbuf *
|
||||
m_dup(struct mbuf *m, int how)
|
||||
m_dup(const struct mbuf *m, int how)
|
||||
{
|
||||
struct mbuf **p, *top = NULL;
|
||||
int remain, moff, nsize;
|
||||
|
@ -427,7 +427,7 @@ m_tag_copy(struct m_tag *t, int how)
|
||||
* destination mbuf.
|
||||
*/
|
||||
int
|
||||
m_tag_copy_chain(struct mbuf *to, struct mbuf *from, int how)
|
||||
m_tag_copy_chain(struct mbuf *to, const struct mbuf *from, int how)
|
||||
{
|
||||
struct m_tag *p, *t, *tprev = NULL;
|
||||
|
||||
|
@ -953,7 +953,7 @@ int m_extadd(struct mbuf *, caddr_t, u_int,
|
||||
struct mbuf *m_collapse(struct mbuf *, int, int);
|
||||
void m_copyback(struct mbuf *, int, int, c_caddr_t);
|
||||
void m_copydata(const struct mbuf *, int, int, caddr_t);
|
||||
struct mbuf *m_copym(struct mbuf *, int, int, int);
|
||||
struct mbuf *m_copym(const struct mbuf *, int, int, int);
|
||||
struct mbuf *m_copypacket(struct mbuf *, int);
|
||||
void m_copy_pkthdr(struct mbuf *, struct mbuf *);
|
||||
struct mbuf *m_copyup(struct mbuf *, int, int);
|
||||
@ -962,8 +962,8 @@ void m_demote_pkthdr(struct mbuf *);
|
||||
void m_demote(struct mbuf *, int, int);
|
||||
struct mbuf *m_devget(char *, int, int, struct ifnet *,
|
||||
void (*)(char *, caddr_t, u_int));
|
||||
struct mbuf *m_dup(struct mbuf *, int);
|
||||
int m_dup_pkthdr(struct mbuf *, struct mbuf *, int);
|
||||
struct mbuf *m_dup(const struct mbuf *, int);
|
||||
int m_dup_pkthdr(struct mbuf *, const struct mbuf *, int);
|
||||
u_int m_fixhdr(struct mbuf *);
|
||||
struct mbuf *m_fragment(struct mbuf *, int, int);
|
||||
void m_freem(struct mbuf *);
|
||||
@ -1070,7 +1070,7 @@ void m_tag_delete_chain(struct mbuf *, struct m_tag *);
|
||||
void m_tag_free_default(struct m_tag *);
|
||||
struct m_tag *m_tag_locate(struct mbuf *, u_int32_t, int, struct m_tag *);
|
||||
struct m_tag *m_tag_copy(struct m_tag *, int);
|
||||
int m_tag_copy_chain(struct mbuf *, struct mbuf *, int);
|
||||
int m_tag_copy_chain(struct mbuf *, const struct mbuf *, int);
|
||||
void m_tag_delete_nonpersistent(struct mbuf *);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user