Allocates and attaches an external buffer.
Item | Description |
---|---|
m | Specifies the mbuf structure that the cluster will be associated with. |
how | Specifies either the M_DONTWAIT or M_WAIT value. |
size | Specifies the size of external cluster to attach. Any value less than MAXALLOCSAVE is valid. For larger values, M_WAIT must be specified. |
The m_clgetm service allocates an mbuf cluster of the specified number of bytes and attaches it to the mbuf structure indicated by the m parameter. If successful, the m_clgetm service sets the M_EXT flag.
The m_clgetm kernel service can be called from either the process or interrupt environment.
An interrupt handler can specify the wait parameter as M_DONTWAIT only.
Item | Description |
---|---|
1 | Indicates a successful operation. |
If there are no free mbuf structures, the m_clgetm kernel service returns a null value.