src/SeeDll/Packet32.c
/*! 
  \brief Sets the maximum possible lookahead buffer for the driver's Packet_tap() function.
  \param AdapterObject Handle to the service control manager.
  \return If the function succeeds, the return value is nonzero.

  The lookahead buffer is the portion of packet that Packet_tap() can access from the NIC driver's memory
  without performing a copy. This function tries to increase the size of that buffer.
*/
\brief Sets the maximum possible lookahead buffer for the driver's Packet_tap() function.
\param AdapterObject Handle to the service control manager.
\return If the function succeeds, the return value is nonzero.

The lookahead buffer is the portion of packet that Packet_tap() can access from the NIC driver's memory
without performing a copy. This function tries to increase the size of that buffer.
\ brief Sets the maximum possible lookahead buffer for the driver ' s Packet_tap () function . \ param AdapterObject Handle to the service control manager . \ return If the function succeeds the return value is nonzero . The lookahead buffer is the portion of packet that Packet_tap () can access from the NIC driver ' s memory without performing a copy . This function tries to increase the size of that buffer .
BOOLEAN PacketSetMaxLookaheadsize (LPADAPTER AdapterObject)
{
    BOOLEAN    Status;
    ULONG      IoCtlBufferLength=(sizeof(PACKET_OID_DATA)+sizeof(ULONG)-1);
    PPACKET_OID_DATA  OidData;
    OidData = GlobalAllocPtr(GMEM_MOVEABLE | GMEM_ZEROINIT,IoCtlBufferLength);
    if (OidData == NULL) {
        ODS("PacketSetMaxLookaheadsize failed\n");
        return FALSE;
    }
    OidData->Oid=OID_GEN_MAXIMUM_LOOKAHEAD;
    OidData->Length=sizeof(ULONG);
    Status=PacketRequest(AdapterObject,FALSE,OidData);
    OidData->Oid=OID_GEN_CURRENT_LOOKAHEAD;
    Status=PacketRequest(AdapterObject,TRUE,OidData);
    GlobalFreePtr(OidData);
    return Status;
}
BOOLEAN PacketSetMaxLookaheadsize ( LPADAPTER AdapterObject ) { BOOLEAN Status ; ULONG IoCtlBufferLength = ( sizeof ( PACKET_OID_DATA ) + sizeof ( ULONG ) - 1 ) ; PPACKET_OID_DATA OidData ; OidData = GlobalAllocPtr ( GMEM_MOVEABLE | GMEM_ZEROINIT , IoCtlBufferLength ) ; if ( OidData == NULL ) { ODS ( " \n " ) ; return FALSE ; } OidData -> Oid = OID_GEN_MAXIMUM_LOOKAHEAD ; OidData -> Length = sizeof ( ULONG ) ; Status = PacketRequest ( AdapterObject , FALSE , OidData ) ; OidData -> Oid = OID_GEN_CURRENT_LOOKAHEAD ; Status = PacketRequest ( AdapterObject , TRUE , OidData ) ; GlobalFreePtr ( OidData ) ; return Status ; }
\brief Sets the maximum possible lookahead buffer for the driver's Packet_tap() function.
\ brief Sets the maximum possible lookahead buffer for the driver ' s Packet_tap () function .
//set the size of the lookahead buffer to the maximum available by the the NIC driver
