datapath-windows/ovsext/User.c
/*
 *----------------------------------------------------------------------------
 *  _MapNlAttrToOvsPktExec --
 *    Maps input Netlink attributes to OvsPacketExecute.
 *----------------------------------------------------------------------------
 */
_MapNlAttrToOvsPktExec
Maps input Netlink attributes to OvsPacketExecute.
_MapNlAttrToOvsPktExec Maps input Netlink attributes to OvsPacketExecute .
static VOID
_MapNlAttrToOvsPktExec(PNL_MSG_HDR nlMsgHdr, PNL_ATTR *nlAttrs,
                       PNL_ATTR *keyAttrs, OvsPacketExecute *execute)
{
    execute->packetBuf = NlAttrGet(nlAttrs[OVS_PACKET_ATTR_PACKET]);
    execute->packetLen = NlAttrGetSize(nlAttrs[OVS_PACKET_ATTR_PACKET]);
    execute->nlMsgHdr = nlMsgHdr;
    execute->actions = NlAttrGet(nlAttrs[OVS_PACKET_ATTR_ACTIONS]);
    execute->actionsLen = NlAttrGetSize(nlAttrs[OVS_PACKET_ATTR_ACTIONS]);
    ASSERT(keyAttrs[OVS_KEY_ATTR_IN_PORT]);
    execute->inPort = NlAttrGetU32(keyAttrs[OVS_KEY_ATTR_IN_PORT]);
    execute->keyAttrs = keyAttrs;
    if (nlAttrs[OVS_PACKET_ATTR_MRU]) {
        execute->mru = NlAttrGetU16(nlAttrs[OVS_PACKET_ATTR_MRU]);
    }
}
static VOID _MapNlAttrToOvsPktExec ( PNL_MSG_HDR nlMsgHdr , PNL_ATTR * nlAttrs , PNL_ATTR * keyAttrs , OvsPacketExecute * execute ) { execute -> packetBuf = NlAttrGet ( nlAttrs [ OVS_PACKET_ATTR_PACKET ] ) ; execute -> packetLen = NlAttrGetSize ( nlAttrs [ OVS_PACKET_ATTR_PACKET ] ) ; execute -> nlMsgHdr = nlMsgHdr ; execute -> actions = NlAttrGet ( nlAttrs [ OVS_PACKET_ATTR_ACTIONS ] ) ; execute -> actionsLen = NlAttrGetSize ( nlAttrs [ OVS_PACKET_ATTR_ACTIONS ] ) ; ASSERT ( keyAttrs [ OVS_KEY_ATTR_IN_PORT ] ) ; execute -> inPort = NlAttrGetU32 ( keyAttrs [ OVS_KEY_ATTR_IN_PORT ] ) ; execute -> keyAttrs = keyAttrs ; if ( nlAttrs [ OVS_PACKET_ATTR_MRU ] ) { execute -> mru = NlAttrGetU16 ( nlAttrs [ OVS_PACKET_ATTR_MRU ] ) ; } }
_MapNlAttrToOvsPktExec
    Maps input Netlink attributes to OvsPacketExecute.
_MapNlAttrToOvsPktExec Maps input Netlink attributes to OvsPacketExecute .