NetKVM: BZ#1169718: More rigoruous testing of incoming packet

Signed-off-by: Joseph Hindin <yhindin@rehat.com>
BOOLEAN ParaNdis_AnalyzeReceivedPacket(
    PVOID headersBuffer,
    ULONG dataLength,
    PNET_PACKET_INFO packetInfo)
{
    NdisZeroMemory(packetInfo, sizeof(*packetInfo));

    packetInfo->headersBuffer = headersBuffer;
    packetInfo->dataLength = dataLength;

    if(!AnalyzeL2Hdr(packetInfo))
        return FALSE;

    if (!AnalyzeL3Hdr(packetInfo))
        return FALSE;

    return TRUE;
}

BOOLEAN ParaNdis_AnalyzeReceivedPacket(
    PVOID headersBuffer,
    ULONG dataLength,
    PNET_PACKET_INFO packetInfo)
{
    NdisZeroMemory(packetInfo, sizeof(*packetInfo));

    packetInfo->headersBuffer = headersBuffer;
    packetInfo->dataLength = dataLength;

    if(!AnalyzeL2Hdr(packetInfo))
        return FALSE;

    if (!AnalyzeL3Hdr(packetInfo))
        return FALSE;

    return TRUE;
}
