Packet Sniffer SDK DLL Edition

HNFileAdapter :: Properties :: FAdpGetMediumType

 Previous Next

Return network adapter type, in format of which the packets are dumped to a CAP file.

Syntax:

DWORD __stdcall FAdpGetMediumType(HANDLE hFAdp);

Parameters:

hFAdp

[in] HNFileAdapter object handle.

Return values:

If the function succeeds the return value will be the network adapter type, otherwise it will be atUnknown (see HNNetAdapterType).

Description:

Use FAdpGetMediumType to get the type of network adapter in format of which the packets are dumped to the CAP file.

HNFileAdapter.MediumType property is set automatically immediately after successful FAdpOpenFile function call matching to respective CAP file fields.

On a CAP file creation (see FAdpCreateFile) you should predetermine HNFileAdapter.MediumType[Set] property: its value will be stored in CAP file, that allows to detect data format for this CAP file off-line processing.
See also:HNNetAdapterType, FAdpSetMediumType, FAdpOpenFile, FAdpCreateFile, FAdpSyncSend, FAdpSyncSendEx