 |
Index for Section 9 |
|
 |
Alphabetical listing for M |
|
 |
Bottom of page |
|
MGET(9r)
NAME
MGET - Network: Allocates an mbuf structure and initializes it to contain
internal data but no packet header
SYNOPSIS
#include <sys/mbuf.h>
MGET(
struct mbuf *mbuf_p,
int how,
int type );
ARGUMENTS
mbuf_p
Specifies a pointer to the mbuf structure for which you want to
allocate memory.
how Specifies how you want MGET() to allocate the memory. You can pass one
of the following constants defined in <mbuf.h>:
M_WAIT Allocates memory from the virtual memory subsystem if there is
not enough memory in the preallocated pool. This constant
signifies that the internal interface that allocates the memory
can block.
M_DONTWAIT
Does not allocate memory from the virtual memory subsystem if
there is not enough memory in the preallocated pool. This
constant signifies that the internal interface that allocates
the memory cannot block.
type
Specifies the type of memory buffer. The <mbuf.h> file defines the
possible memory buffer constants that you can pass. The MGET()
interface uses this value to initialize the mh_type member of the mbuf
structure.
DESCRIPTION
The MGET() routine calls an internal interface that allocates memory to
accommodate the specified mbuf structure pointer. If MGET() successfully
allocates the memory, it initializes the following members to contain
internal data:
· m_next
· m_type
· m_data
· m_flags
If MGET() cannot successfully allocate the memory, it calls an internal
interface to retry allocating the memory.
RETURN VALUES
None
FILES
<mbuf.h>
SEE ALSO
Routines: MGETHDR(9r), MCLGET(9r), MCLGET2(9r)
Data Structures: mbuf(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for M |
|
 |
Top of page |
|