diff options
author | bms <bms@FreeBSD.org> | 2007-02-26 15:17:19 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2007-02-26 15:17:19 +0000 |
commit | b0363fd07975a8eaae4177594874a7c9765ed162 (patch) | |
tree | 1b1a1c94c31f341a814ceac86e7cdd4dd407128f /share/man/man9/mbuf.9 | |
parent | dfdc42503bbb9cdea45b5757e3b8c4b8bb321d32 (diff) | |
download | FreeBSD-src-b0363fd07975a8eaae4177594874a7c9765ed162.zip FreeBSD-src-b0363fd07975a8eaae4177594874a7c9765ed162.tar.gz |
Document m_pulldown().
Obtained from: MBUF issues in 4.4BSD IPv6/IPsec support (itojun)
Diffstat (limited to 'share/man/man9/mbuf.9')
-rw-r--r-- | share/man/man9/mbuf.9 | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index 0bb9317..4ea3a72 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 2006 +.Dd February 26, 2007 .Dt MBUF 9 .Os .\" @@ -97,6 +97,8 @@ .Ft struct mbuf * .Fn m_pullup "struct mbuf *mbuf" "int len" .Ft struct mbuf * +.Fn m_pulldown "struct mbuf *mbuf" "int offset" "int len" "int *offsetp" +.Ft struct mbuf * .Fn m_copym "struct mbuf *mbuf" "int offset" "int len" "int how" .Ft struct mbuf * .Fn m_copypacket "struct mbuf *mbuf" "int how" @@ -663,6 +665,42 @@ so must be less than .Dv MHLEN . .\" +.It Fn m_pulldown mbuf offset len offsetp +Arrange that +.Fa len +bytes between +.Fa offset +and +.Fa offset + len +in the +.Vt mbuf chain +are contiguous and lay in the data area of +.Fa mbuf , +so they are accessible with +.Fn mtod mbuf type . +.Fa len must be smaller than, or equal to, the size of an +.Vt mbuf cluster . +Return a pointer to an intermediate +.Vt mbuf +in the chain containing the requested region; +the offset in the data region of the +.Vt mbuf chain +to the data contained in the returned mbuf is stored in +.Fa *offsetp . +If +.Fa offp +is NULL, the region may be accessed using +.Fn mtod mbuf type . +If +.Fa offp +is non-NULL, the region may be accessed using +.Fn mtod mbuf uint8_t + *offsetp . +The region of the mbuf chain between its beginning and +.Fa off +is not modified, therefore it is safe to hold pointers to data within +this region before calling +.Fn m_pulldown . +.\" .It Fn m_copym mbuf offset len how Make a copy of an .Vt mbuf chain |