datapath-windows/ovsext/Netlink/Netlink.c
/*
 * ---------------------------------------------------------------------------
 * Prepare netlink message headers. This API adds
 * NL_MSG_HDR + GENL_HDR + OVS_HDR to the tail of input NLBuf.
 * Attributes should be added by caller.
 * ---------------------------------------------------------------------------
 */
Prepare netlink message headers. This API adds
NL_MSG_HDR + GENL_HDR + OVS_HDR to the tail of input NLBuf.
Attributes should be added by caller.
Prepare netlink message headers . This API adds NL_MSG_HDR + GENL_HDR + OVS_HDR to the tail of input NLBuf . Attributes should be added by caller .
BOOLEAN
NlFillOvsMsg(PNL_BUFFER nlBuf, UINT16 nlmsgType,
             UINT16 nlmsgFlags, UINT32 nlmsgSeq,
             UINT32 nlmsgPid, UINT8 genlCmd,
             UINT8 genlVer, UINT32 dpNo)
{
    BOOLEAN writeOk;
    OVS_MESSAGE msgOut;
    UINT32 offset = NlBufSize(nlBuf);
    UNREFERENCED_PARAMETER(offset);
    ASSERT(NlBufAt(nlBuf, offset, 0) != 0);
    msgOut.nlMsg.nlmsgType = nlmsgType;
    msgOut.nlMsg.nlmsgFlags = nlmsgFlags;
    msgOut.nlMsg.nlmsgSeq = nlmsgSeq;
    msgOut.nlMsg.nlmsgPid = nlmsgPid;
    msgOut.nlMsg.nlmsgLen = sizeof(struct _OVS_MESSAGE);
    msgOut.genlMsg.cmd = genlCmd;
    msgOut.genlMsg.version = genlVer;
    msgOut.genlMsg.reserved = 0;
    msgOut.ovsHdr.dp_ifindex = dpNo;
    writeOk = NlMsgPutTail(nlBuf, (PCHAR)(&msgOut),
                           sizeof (struct _OVS_MESSAGE));
    return writeOk;
}
BOOLEAN NlFillOvsMsg ( PNL_BUFFER nlBuf , UINT16 nlmsgType , UINT16 nlmsgFlags , UINT32 nlmsgSeq , UINT32 nlmsgPid , UINT8 genlCmd , UINT8 genlVer , UINT32 dpNo ) { BOOLEAN writeOk ; OVS_MESSAGE msgOut ; UINT32 offset = NlBufSize ( nlBuf ) ; UNREFERENCED_PARAMETER ( offset ) ; ASSERT ( NlBufAt ( nlBuf , offset , 0 ) != 0 ) ; msgOut . nlMsg . nlmsgType = nlmsgType ; msgOut . nlMsg . nlmsgFlags = nlmsgFlags ; msgOut . nlMsg . nlmsgSeq = nlmsgSeq ; msgOut . nlMsg . nlmsgPid = nlmsgPid ; msgOut . nlMsg . nlmsgLen = sizeof ( struct _OVS_MESSAGE ) ; msgOut . genlMsg . cmd = genlCmd ; msgOut . genlMsg . version = genlVer ; msgOut . genlMsg . reserved = 0 ; msgOut . ovsHdr . dp_ifindex = dpNo ; writeOk = NlMsgPutTail ( nlBuf , ( PCHAR ) ( & msgOut ) , sizeof ( struct _OVS_MESSAGE ) ) ; return writeOk ; }
Prepare netlink message headers.
Prepare netlink message headers .
/* To keep compiler happy for release build. */