src/SeeDll/Packet32.c
/*!
  \brief Set the dump mode limits.
  \param AdapterObject Pointer to an _ADAPTER structure.
  \param maxfilesize The maximum dimension of the dump file, in bytes. 0 means no limit.
  \param maxnpacks The maximum number of packets contained in the dump file. 0 means no limit.
  \return If the function succeeds, the return value is nonzero.

  This function sets the limits after which the NPF driver stops to save the packets to file when an adapter
  is in dump mode. This allows to limit the dump file to a precise number of bytes or packets, avoiding that
  very long dumps fill the disk space. If both maxfilesize and maxnpacks are set, the dump is stopped when
  the first of the two is reached.

  \note When a limit is reached, the dump is stopped, but the file remains opened. In order to flush 
  correctly the data and access the file consistently, you need to close the adapter with PacketCloseAdapter().
*/
\brief Set the dump mode limits.
\param AdapterObject Pointer to an _ADAPTER structure.
\param maxfilesize The maximum dimension of the dump file, in bytes. 0 means no limit.
\param maxnpacks The maximum number of packets contained in the dump file. 0 means no limit.
\return If the function succeeds, the return value is nonzero.

This function sets the limits after which the NPF driver stops to save the packets to file when an adapter
is in dump mode. This allows to limit the dump file to a precise number of bytes or packets, avoiding that
very long dumps fill the disk space. If both maxfilesize and maxnpacks are set, the dump is stopped when
the first of the two is reached.

\note When a limit is reached, the dump is stopped, but the file remains opened. In order to flush
correctly the data and access the file consistently, you need to close the adapter with PacketCloseAdapter().
\ brief Set the dump mode limits . \ param AdapterObject Pointer to an _ADAPTER structure . \ param maxfilesize The maximum dimension of the dump file in bytes . 0 means no limit . \ param maxnpacks The maximum number of packets contained in the dump file . 0 means no limit . \ return If the function succeeds the return value is nonzero . This function sets the limits after which the NPF driver stops to save the packets to file when an adapter is in dump mode . This allows to limit the dump file to a precise number of bytes or packets avoiding that very long dumps fill the disk space . If both maxfilesize and maxnpacks are set the dump is stopped when the first of the two is reached . \ note When a limit is reached the dump is stopped but the file remains opened . In order to flush correctly the data and access the file consistently you need to close the adapter with PacketCloseAdapter () .
BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks)
{
	DWORD		BytesReturned;
	UINT valbuff[2];
#ifndef _WINNT4
	if (AdapterObject->Flags != INFO_FLAG_NDIS_ADAPTER)
	{
		ODS("PacketSetDumpLimits: not allowed on wan adapters\n");
		return FALSE;
	}
#endif 
	valbuff[0] = maxfilesize;
	valbuff[1] = maxnpacks;
    return DeviceIoControl(AdapterObject->hFile,
		pBIOCSETDUMPLIMITS,
		valbuff,
		sizeof valbuff,
		NULL,
		0,
		&BytesReturned,
		NULL);	
}
BOOLEAN PacketSetDumpLimits ( LPADAPTER AdapterObject , UINT maxfilesize , UINT maxnpacks ) { DWORD BytesReturned ; UINT valbuff [ 2 ] ; #ifndef _WINNT4 if ( AdapterObject -> Flags != INFO_FLAG_NDIS_ADAPTER ) { ODS ( " \n " ) ; return FALSE ; } #endif valbuff [ 0 ] = maxfilesize ; valbuff [ 1 ] = maxnpacks ; return DeviceIoControl ( AdapterObject -> hFile , pBIOCSETDUMPLIMITS , valbuff , sizeof valbuff , NULL , 0 , & BytesReturned , NULL ) ; }
\brief Set the dump mode limits.
\ brief Set the dump mode limits .
// _WINNT4
