src/SeeDll/Packet32.c
/*!
  \brief Sets the working mode of an adapter.
  \param AdapterObject Pointer to an _ADAPTER structure.
  \param mode The new working mode of the adapter.
  \return If the function succeeds, the return value is nonzero.

  The device driver of WinPcap has 4 working modes:
  - Capture mode (mode = PACKET_MODE_CAPT): normal capture mode. The packets transiting on the wire are copied
   to the application when PacketReceivePacket() is called. This is the default working mode of an adapter.
  - Statistical mode (mode = PACKET_MODE_STAT): programmable statistical mode. PacketReceivePacket() returns, at
   precise intervals, statics values on the network traffic. The interval between the statistic samples is 
   by default 1 second but it can be set to any other value (with a 1 ms precision) with the 
   PacketSetReadTimeout() function. The data returned by PacketReceivePacket() when the adapter is in statistical
   mode is shown in the following figure:<p>
   	 \image html stats.gif "data structure returned by statistical mode"
   Two 64-bit counters are provided: the number of packets and the amount of bytes that satisfy a filter 
   previously set with PacketSetBPF(). If no filter has been set, all the packets are counted. The counters are 
   encapsulated in a bpf_hdr structure, so that they will be parsed correctly by wpcap. Statistical mode has a 
   very low impact on system performance compared to capture mode. 
  - Dump mode (mode = PACKET_MODE_DUMP): the packets are dumped to disk by the driver, in libpcap format. This
   method is much faster than saving the packets after having captured them. No data is returned 
   by PacketReceivePacket(). If the application sets a filter with PacketSetBPF(), only the packets that satisfy
   this filter are dumped to disk.
  - Statitical Dump mode (mode = PACKET_MODE_STAT_DUMP): the packets are dumped to disk by the driver, in libpcap 
   format, like in dump mode. PacketReceivePacket() returns, at precise intervals, statics values on the 
   network traffic and on the amount of data saved to file, in a way similar to statistical mode.
   The data returned by PacketReceivePacket() when the adapter is in statistical dump mode is shown in 
   the following figure:<p>   
	 \image html dump.gif "data structure returned by statistical dump mode"
   Three 64-bit counters are provided: the number of packets accepted, the amount of bytes accepted and the 
   effective amount of data (including headers) dumped to file. If no filter has been set, all the packets are 
   dumped to disk. The counters are encapsulated in a bpf_hdr structure, so that they will be parsed correctly 
   by wpcap.
   Look at the NetMeter example in the 
   WinPcap developer's pack to see how to use statistics mode.
*/
\brief Sets the working mode of an adapter.
\param AdapterObject Pointer to an _ADAPTER structure.
\param mode The new working mode of the adapter.
\return If the function succeeds, the return value is nonzero.

The device driver of WinPcap has 4 working modes:
Capture mode (mode = PACKET_MODE_CAPT): normal capture mode. The packets transiting on the wire are copied
to the application when PacketReceivePacket() is called. This is the default working mode of an adapter.
\ brief Sets the working mode of an adapter . \ param AdapterObject Pointer to an _ADAPTER structure . \ param mode The new working mode of the adapter . \ return If the function succeeds the return value is nonzero . The device driver of WinPcap has 4 working modes : Capture mode ( mode = PACKET_MODE_CAPT ) : normal capture mode . The packets transiting on the wire are copied to the application when PacketReceivePacket () is called . This is the default working mode of an adapter .
BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode)
{
	DWORD BytesReturned;
#ifndef _WINNT4
   if (AdapterObject->pWanAdapter != NULL)
      return WanPacketSetMode(AdapterObject->pWanAdapter, mode);
#endif 
    return DeviceIoControl(AdapterObject->hFile,pBIOCSMODE,&mode,4,NULL,0,&BytesReturned,NULL);
}
BOOLEAN PacketSetMode ( LPADAPTER AdapterObject , int mode ) { DWORD BytesReturned ; #ifndef _WINNT4 if ( AdapterObject -> pWanAdapter != NULL ) return WanPacketSetMode ( AdapterObject -> pWanAdapter , mode ) ; #endif return DeviceIoControl ( AdapterObject -> hFile , pBIOCSMODE , & mode , 4 , NULL , 0 , & BytesReturned , NULL ) ; }
\brief Sets the working mode of an adapter.
\ brief Sets the working mode of an adapter .
// _WINNT4
