Packet Sniffer SDK DLL Edition

HNPacket :: Properties :: PktSetMediumType

 Previous Next

Sets the network adapter type.

Syntax:

DWORD __stdcall PktSetMediumType(HANDLE hPkt, DWORD MediumType);

Return values:

If the function succeeds the return value will be the MediumType parameter value.

Parameters:

hPkt

[in] HNPacket object handle.

MediumType

[in] Network adapter type.

Description:

Use PktSetMediumType to set the type of the adapter which received this packet.

This function may be useful if you have your own source of packets to be generated as HNPacket objects. For example, can read packets from a CAP file, and then pack their data in HNPacket objects, and then try to assemble TCP sessions using HNTcpManager.

See also:HNNetAdapterType, PktGetMediumType