FreeBSD kernel kern code
subr_mchain.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
#include <sys/endian.h>
#include <sys/errno.h>
#include <sys/mbuf.h>
#include <sys/module.h>
#include <sys/uio.h>
#include <sys/mchain.h>
Include dependency graph for subr_mchain.c:

Go to the source code of this file.

Macros

#define MBERROR(format, ...)
 
#define MBPANIC(format, ...)
 

Functions

 __FBSDID ("$BSDSUniX$")
 
 FEATURE (libmchain,"mchain library")
 
 MODULE_VERSION (libmchain, 1)
 
int mb_init (struct mbchain *mbp)
 
void mb_initm (struct mbchain *mbp, struct mbuf *m)
 
void mb_done (struct mbchain *mbp)
 
struct mbuf * mb_detach (struct mbchain *mbp)
 
int mb_fixhdr (struct mbchain *mbp)
 
caddr_t mb_reserve (struct mbchain *mbp, int size)
 
int mb_put_padbyte (struct mbchain *mbp)
 
int mb_put_uint8 (struct mbchain *mbp, uint8_t x)
 
int mb_put_uint16be (struct mbchain *mbp, uint16_t x)
 
int mb_put_uint16le (struct mbchain *mbp, uint16_t x)
 
int mb_put_uint32be (struct mbchain *mbp, uint32_t x)
 
int mb_put_uint32le (struct mbchain *mbp, uint32_t x)
 
int mb_put_int64be (struct mbchain *mbp, int64_t x)
 
int mb_put_int64le (struct mbchain *mbp, int64_t x)
 
int mb_put_mem (struct mbchain *mbp, c_caddr_t source, int size, int type)
 
int mb_put_mbuf (struct mbchain *mbp, struct mbuf *m)
 
int mb_put_uio (struct mbchain *mbp, struct uio *uiop, int size)
 
int md_init (struct mdchain *mdp)
 
void md_initm (struct mdchain *mdp, struct mbuf *m)
 
void md_done (struct mdchain *mdp)
 
void md_append_record (struct mdchain *mdp, struct mbuf *top)
 
int md_next_record (struct mdchain *mdp)
 
int md_get_uint8 (struct mdchain *mdp, uint8_t *x)
 
int md_get_uint16 (struct mdchain *mdp, uint16_t *x)
 
int md_get_uint16le (struct mdchain *mdp, uint16_t *x)
 
int md_get_uint16be (struct mdchain *mdp, uint16_t *x)
 
int md_get_uint32 (struct mdchain *mdp, uint32_t *x)
 
int md_get_uint32be (struct mdchain *mdp, uint32_t *x)
 
int md_get_uint32le (struct mdchain *mdp, uint32_t *x)
 
int md_get_int64 (struct mdchain *mdp, int64_t *x)
 
int md_get_int64be (struct mdchain *mdp, int64_t *x)
 
int md_get_int64le (struct mdchain *mdp, int64_t *x)
 
int md_get_mem (struct mdchain *mdp, caddr_t target, int size, int type)
 
int md_get_mbuf (struct mdchain *mdp, int size, struct mbuf **ret)
 
int md_get_uio (struct mdchain *mdp, struct uio *uiop, int size)
 

Macro Definition Documentation

#define MBERROR (   format,
  ... 
)
Value:
printf("%s(%d): "format, __func__ , \
__LINE__ , ## __VA_ARGS__)
int printf(const char *fmt,...)
Definition: subr_prf.c:367

Definition at line 48 of file subr_mchain.c.

Referenced by md_get_mem().

#define MBPANIC (   format,
  ... 
)
Value:
printf("%s(%d): "format, __func__ , \
__LINE__ , ## __VA_ARGS__)
int printf(const char *fmt,...)
Definition: subr_prf.c:367

Definition at line 51 of file subr_mchain.c.

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
FEATURE ( libmchain  ,
"mchain library"   
)
struct mbuf* mb_detach ( struct mbchain *  mbp)

Definition at line 86 of file subr_mchain.c.

void mb_done ( struct mbchain *  mbp)

Definition at line 77 of file subr_mchain.c.

References m_freem().

Here is the call graph for this function:

int mb_fixhdr ( struct mbchain *  mbp)

Definition at line 96 of file subr_mchain.c.

References m_fixhdr().

Here is the call graph for this function:

int mb_init ( struct mbchain *  mbp)

Definition at line 58 of file subr_mchain.c.

References mb_initm().

Here is the call graph for this function:

void mb_initm ( struct mbchain *  mbp,
struct mbuf *  m 
)

Definition at line 69 of file subr_mchain.c.

Referenced by mb_init().

Here is the caller graph for this function:

int mb_put_int64be ( struct mbchain *  mbp,
int64_t  x 
)

Definition at line 180 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

int mb_put_int64le ( struct mbchain *  mbp,
int64_t  x 
)

Definition at line 187 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

int mb_put_mbuf ( struct mbchain *  mbp,
struct mbuf *  m 
)

Definition at line 253 of file subr_mchain.c.

int mb_put_mem ( struct mbchain *  mbp,
c_caddr_t  source,
int  size,
int  type 
)

Definition at line 194 of file subr_mchain.c.

References count.

Referenced by mb_put_int64be(), mb_put_int64le(), mb_put_padbyte(), mb_put_uint16be(), mb_put_uint16le(), mb_put_uint32be(), mb_put_uint32le(), mb_put_uint8(), and mb_put_uio().

Here is the caller graph for this function:

int mb_put_padbyte ( struct mbchain *  mbp)

Definition at line 131 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

int mb_put_uint16be ( struct mbchain *  mbp,
uint16_t  x 
)

Definition at line 152 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

int mb_put_uint16le ( struct mbchain *  mbp,
uint16_t  x 
)

Definition at line 159 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

int mb_put_uint32be ( struct mbchain *  mbp,
uint32_t  x 
)

Definition at line 166 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

int mb_put_uint32le ( struct mbchain *  mbp,
uint32_t  x 
)

Definition at line 173 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

int mb_put_uint8 ( struct mbchain *  mbp,
uint8_t  x 
)

Definition at line 146 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

int mb_put_uio ( struct mbchain *  mbp,
struct uio *  uiop,
int  size 
)

Definition at line 271 of file subr_mchain.c.

References mb_put_mem().

Here is the call graph for this function:

caddr_t mb_reserve ( struct mbchain *  mbp,
int  size 
)

Definition at line 108 of file subr_mchain.c.

References panic().

Here is the call graph for this function:

void md_append_record ( struct mdchain *  mdp,
struct mbuf *  top 
)

Definition at line 338 of file subr_mchain.c.

References md_initm().

Here is the call graph for this function:

void md_done ( struct mdchain *  mdp)

Definition at line 325 of file subr_mchain.c.

References m_freem().

Referenced by md_next_record().

Here is the call graph for this function:

Here is the caller graph for this function:

int md_get_int64 ( struct mdchain *  mdp,
int64_t *  x 
)

Definition at line 437 of file subr_mchain.c.

References md_get_mem().

Referenced by md_get_int64be(), and md_get_int64le().

Here is the call graph for this function:

Here is the caller graph for this function:

int md_get_int64be ( struct mdchain *  mdp,
int64_t *  x 
)

Definition at line 443 of file subr_mchain.c.

References md_get_int64().

Here is the call graph for this function:

int md_get_int64le ( struct mdchain *  mdp,
int64_t *  x 
)

Definition at line 455 of file subr_mchain.c.

References md_get_int64().

Here is the call graph for this function:

int md_get_mbuf ( struct mdchain *  mdp,
int  size,
struct mbuf **  ret 
)

Definition at line 513 of file subr_mchain.c.

References m_copym(), and md_get_mem().

Here is the call graph for this function:

int md_get_mem ( struct mdchain *  mdp,
caddr_t  target,
int  size,
int  type 
)

Definition at line 467 of file subr_mchain.c.

References count, and MBERROR.

Referenced by md_get_int64(), md_get_mbuf(), md_get_uint16(), md_get_uint32(), md_get_uint8(), and md_get_uio().

Here is the caller graph for this function:

int md_get_uint16 ( struct mdchain *  mdp,
uint16_t *  x 
)

Definition at line 379 of file subr_mchain.c.

References md_get_mem().

Referenced by md_get_uint16be(), and md_get_uint16le().

Here is the call graph for this function:

Here is the caller graph for this function:

int md_get_uint16be ( struct mdchain *  mdp,
uint16_t *  x 
)

Definition at line 396 of file subr_mchain.c.

References md_get_uint16().

Here is the call graph for this function:

int md_get_uint16le ( struct mdchain *  mdp,
uint16_t *  x 
)

Definition at line 385 of file subr_mchain.c.

References md_get_uint16().

Here is the call graph for this function:

int md_get_uint32 ( struct mdchain *  mdp,
uint32_t *  x 
)

Definition at line 407 of file subr_mchain.c.

References md_get_mem().

Referenced by md_get_uint32be(), and md_get_uint32le().

Here is the call graph for this function:

Here is the caller graph for this function:

int md_get_uint32be ( struct mdchain *  mdp,
uint32_t *  x 
)

Definition at line 413 of file subr_mchain.c.

References md_get_uint32().

Here is the call graph for this function:

int md_get_uint32le ( struct mdchain *  mdp,
uint32_t *  x 
)

Definition at line 425 of file subr_mchain.c.

References md_get_uint32().

Here is the call graph for this function:

int md_get_uint8 ( struct mdchain *  mdp,
uint8_t *  x 
)

Definition at line 373 of file subr_mchain.c.

References md_get_mem().

Here is the call graph for this function:

int md_get_uio ( struct mdchain *  mdp,
struct uio *  uiop,
int  size 
)

Definition at line 524 of file subr_mchain.c.

References md_get_mem().

Here is the call graph for this function:

int md_init ( struct mdchain *  mdp)

Definition at line 306 of file subr_mchain.c.

References md_initm().

Here is the call graph for this function:

void md_initm ( struct mdchain *  mdp,
struct mbuf *  m 
)

Definition at line 317 of file subr_mchain.c.

Referenced by md_append_record(), md_init(), and md_next_record().

Here is the caller graph for this function:

int md_next_record ( struct mdchain *  mdp)

Definition at line 358 of file subr_mchain.c.

References md_done(), and md_initm().

Here is the call graph for this function:

MODULE_VERSION ( libmchain  ,
 
)