[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 2

esballoc Utility


Allocates message and data blocks.


mblk_t *
esballoc(base, size, pri, free_rtn)
unsigned char *base;
int size, pri;
frn_t *free_rtn;


The esballoc utility allocates message and data blocks that point directly to a client-supplied buffer. The esballoc utility sets the db _ base , b _ rptr , and b _ wptr fields to the value specified in the base parameter (data buffer size) and the db _ lim field to the base value plus the size value. The pointer to the free_rtn structure is placed in the db _ freep field of the data block.

The success of the esballoc utility depends on the success of the allocb utility and also that the base, size, and free_rtn parameters are not null. If successful, the esballoc utility returns a pointer to a message block. If an error occurs, the esballoc utility returns a null pointer.


base Specifies the data buffer size.
size Specifies the number of bytes.
pri Specifies the relative importance of this block to the module. The possible values are:

The pri parameter is currently unused and is maintained only for compatibility with applications developed prior to UNIX System V Release 4.0.

free_rtn Specifies the function and argument to be called when the message is freed.

Return Values

On successful completion, the esballoc utility returns a pointer to a message block. Otherwise, it returns a null pointer.

Implementation Specifics

This utility is part of STREAMS Kernel Extensions.

Related Information

The allocb utility.

List of Streams Programming References and Understanding STREAMS Messages in AIX Version 4.3 Communications Programming Concepts.

[ Previous | Next | Contents | Glossary | Home | Search ]