Skip to content

Commit

Permalink
datapath-windows/NetlinkBuf.h: Added NlBufSize
Browse files Browse the repository at this point in the history
Added an inline function to return used size in the buffer.

Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
ankursh authored and blp committed Sep 12, 2014
1 parent 81e3044 commit 402bf08
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions datapath-windows/ovsext/Netlink/NetlinkBuf.h
Expand Up @@ -38,4 +38,18 @@ PCHAR NlBufCopyAtOffsetUninit(PNL_BUFFER nlBuf, UINT32 len, UINT32 offset);

PCHAR NlBufAt(PNL_BUFFER nlBuf, UINT32 offset, UINT32 len);

/*
* --------------------------------------------------------------------------
* NlBufSize --
*
* Returns the used size of buffer.
* --------------------------------------------------------------------------
*/
static __inline UINT32
NlBufSize(PNL_BUFFER nlBuf)
{
ASSERT(nlBuf);
return (nlBuf->bufLen - nlBuf->bufRemLen);
}

#endif /* __NETLINK_BUF_H_ */

0 comments on commit 402bf08

Please sign in to comment.