// pktmonclntk.h
NTSTATUS PktMonClntAddEdge(
PKTMON_COMPONENT_CONTEXT *CompContext,
PCUNICODE_STRING Name,
PKTMON_PACKET_TYPE PacketType,
PKTMON_EDGE_CONTEXT *EdgeContext
);
View the official Windows Driver Kit DDI referenceNo description available.
The PktMonClntAddEdge function adds an edge to a Packet Monitor component. An edge represents a pair of entry/exit points for a component. It can be referred to as a boundary for a component. Each component optionally registers its lower or/and upper edge.
CompContextPointer to the PKTMON_COMPONENT_CONTEXT structure that holds the context for the component.
NameThe name of the edge being added.
PacketTypePacket type to be handled by this edge. Must be a valid value defined in PKTMON_PACKET_TYPE.
EdgeContextPointer to a PKTMON_EDGE_CONTEXT which will store the context information for this edge.
If the function succeeds, it returns STATUS_SUCCESS. Otherwise, it returns a NTSTATUS error code.
An edge represents a pair of entry and exit points for a component. It can be referred to as a boundary for a component. Each component optionally registers its lower and upper edge. A component can have multiple edges. One call to PktMonClntAddEdge should be made for each of these edges.
The ListLink member of PKTMON_EDGE_CONTEXT is used to track all the edge contexts belonging to a component. ListLink can be used to access these edge contexts.
PKTMON_EDGE_CONTEXT EdgeContext = { 0 };
NTSTATUS
NTAPI
PktMonApiTstAddEdge()
{
NTSTATUS status = STATUS_SUCCESS;
DECLARE_CONST_UNICODE_STRING(EdgeName, L"LowerEdge");
status = PktMonClntAddEdge(
&PktMonComp,
&EdgeName,
PktMonPayload_IP,
&EdgeContext
);
if (STATUS_SUCCESS != status)
{
return status;
}
return status;
}