src/SeeDll/Packet32.c
/*!
  \brief Performs a query/set operation on an internal variable of the network card driver.
  \param AdapterObject Pointer to an _ADAPTER structure.
  \param Set Determines if the operation is a set (Set=TRUE) or a query (Set=FALSE).
  \param OidData A pointer to a _PACKET_OID_DATA structure that contains or receives the data.
  \return If the function succeeds, the return value is nonzero.

  \note not all the network adapters implement all the query/set functions. There is a set of mandatory 
  OID functions that is granted to be present on all the adapters, and a set of facultative functions, not 
  provided by all the cards (see the Microsoft DDKs to see which functions are mandatory). If you use a 
  facultative function, be careful to enclose it in an if statement to check the result.
*/
\brief Performs a query/set operation on an internal variable of the network card driver.
\param AdapterObject Pointer to an _ADAPTER structure.
\param Set Determines if the operation is a set (Set=TRUE) or a query (Set=FALSE).
\param OidData A pointer to a _PACKET_OID_DATA structure that contains or receives the data.
\return If the function succeeds, the return value is nonzero.

\note not all the network adapters implement all the query/set functions. There is a set of mandatory
OID functions that is granted to be present on all the adapters, and a set of facultative functions, not
provided by all the cards . If you use a
facultative function, be careful to enclose it in an if statement to check the result.
\ brief Performs a query / set operation on an internal variable of the network card driver . \ param AdapterObject Pointer to an _ADAPTER structure . \ param Set Determines if the operation is a set ( Set = TRUE ) or a query ( Set = FALSE ) . \ param OidData A pointer to a _PACKET_OID_DATA structure that contains or receives the data . \ return If the function succeeds the return value is nonzero . \ note not all the network adapters implement all the query / set functions . There is a set of mandatory OID functions that is granted to be present on all the adapters and a set of facultative functions not provided by all the cards . If you use a facultative function be careful to enclose it in an if statement to check the result .
BOOLEAN PacketRequest(LPADAPTER  AdapterObject,BOOLEAN Set,PPACKET_OID_DATA  OidData)
{
    DWORD		BytesReturned;
    BOOLEAN		Result;
#ifndef _WINNT4
	if(AdapterObject->Flags != INFO_FLAG_NDIS_ADAPTER)
		return FALSE;
#endif 
	Result=DeviceIoControl(AdapterObject->hFile,(DWORD) Set ? (DWORD)pBIOCSETOID : (DWORD)pBIOCQUERYOID,
                           OidData,sizeof(PACKET_OID_DATA)-1+OidData->Length,OidData,
                           sizeof(PACKET_OID_DATA)-1+OidData->Length,&BytesReturned,NULL);
	ODSEx("PacketRequest, OID=%d ", OidData->Oid);
    ODSEx("Length=%d ", OidData->Length);
    ODSEx("Set=%d ", Set);
    ODSEx("Res=%d\n", Result);
	return Result;
}
BOOLEAN PacketRequest ( LPADAPTER AdapterObject , BOOLEAN Set , PPACKET_OID_DATA OidData ) { DWORD BytesReturned ; BOOLEAN Result ; #ifndef _WINNT4 if ( AdapterObject -> Flags != INFO_FLAG_NDIS_ADAPTER ) return FALSE ; #endif Result = DeviceIoControl ( AdapterObject -> hFile , ( DWORD ) Set ? ( DWORD ) pBIOCSETOID : ( DWORD ) pBIOCQUERYOID , OidData , sizeof ( PACKET_OID_DATA ) - 1 + OidData -> Length , OidData , sizeof ( PACKET_OID_DATA ) - 1 + OidData -> Length , & BytesReturned , NULL ) ; ODSEx ( " " , OidData -> Oid ) ; ODSEx ( " " , OidData -> Length ) ; ODSEx ( " " , Set ) ; ODSEx ( " \n " , Result ) ; return Result ; }
\brief Performs a query/set operation on an internal variable of the network card driver.
\ brief Performs a query / set operation on an internal variable of the network card driver .
// _WINNT4
 // output some debug info
