GetCaptureMacType
The GetCaptureMacType function returns the MAC type of a given capture.
DWORD WINAPIGetCaptureMacType(HCAPTUREhCapture);
Parameters
- hCapture
[in] Handle to the capture. For information about obtaining the capture handle, see the Remarks section in this GetCaptureMacType topic.
Return Values
If the function is successful, the return value is one of the following MAC types.
- MAC_TYPE_UNKNOWN
- MAC_TYPE_ETHERNET
- MAC_TYPE_TOKENRING
- MAC_TYPE_FDDI
If the function is unsuccessful, the return value is an error code.
Return code | Description |
---|---|
NMERR_MAC_TYPE_UNKNOWN | Network Monitor could not find a known MAC type. |
Remarks
The handle of the capture can be obtained in several ways, depending on who makes the call. For experts, the handle is specified in the hCapture member of the EXPERTSTARTUPINFO structure. For parsers, the capture handle can be obtained by calling the GetFrameCaptureHandle function.
Experts and parsers can call the GetCaptureMacType function.
Requirements
Client | Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0. |
Server | Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0. |
Header | Declared in Netmon.h. |
Library | Link to Nmapi.lib. |
DLL | Requires Nmapi.dll. |