Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The PktMonClntSetComponentProperty function sets a property for a specific component.
Syntax
NTSTATUS PktMonClntSetComponentProperty(
PKTMON_COMPONENT_CONTEXT *CompContext,
PKTMON_COMPONENT_PROPERTY *CompProperty
);
Parameters
CompContext
Pointer to the PKTMON_COMPONENT_CONTEXT structure that holds the context for the component.
CompProperty
Pointer to the PKTMON_COMPONENT_PROPERTY structure that describes the property to be set.
Return value
If the function succeeds, it returns STATUS_SUCCESS
. Otherwise, it returns a NTSTATUS
error code.
Remarks
Use the PktMonClntSetComponentProperty function to set various properties for a component. Call this function once for each property. These properties provide detailed information about the component, such as its interface ID, name, etc. You can display the properties of the components using the pktmon
command:
Pktmon.exe list -a
The properties are defined in the PKTMON_COMPONENT_PROPERTY structure and can include interface indices, GUIDs, MAC addresses, and other relevant information. Each property is identified by an Id from the PKTMON_COMPONENT_PROPERTY_ID enumeration.
Requirements
Requirement | Value |
---|---|
Header | pktmonclntk.h |
See also
Example
NTSTATUS PktMonApiTstSetComponentProperties()
{
NTSTATUS status = STATUS_SUCCESS;
PKTMON_COMPONENT_PROPERTY compProp = {0};
compProp.Id = PktMonCompProp_IfIndex;
compProp.IfIndex = 100;
status = PktMonClntSetComponentProperty(&PktMonComp, &compProp);
if (STATUS_SUCCESS != status)
{
// Log error
return status;
}
return status;
}