Beispiel #1
0
/*
 * ---------------------------------------------------------------------------
 * Adds data of length 'len' to the tail end of NL_BUF.
 * Refer nl_msg_put for more details.
 * ---------------------------------------------------------------------------
 */
BOOLEAN
NlMsgPutTail(PNL_BUFFER buf, const PCHAR data, UINT32 len)
{
    len = NLMSG_ALIGN(len);
    if (NlBufCopyAtTail(buf, data, len)) {
        return TRUE;
    }

    return FALSE;
}
Beispiel #2
0
/*
 * --------------------------------------------------------------------------
 * NlBufCopyAtTailUninit --
 *
 *    Memsets the buffer portion of length len at tail end with zero.
 * --------------------------------------------------------------------------
 */
PCHAR
NlBufCopyAtTailUninit(PNL_BUFFER nlBuf, UINT32 len)
{
    PCHAR ret;

    ret = nlBuf->tail;
    if ((NlBufCopyAtTail(nlBuf, NULL, len)) == FALSE) {
        ret = NULL;
    }

    return ret;
}