VOID NTAPI classifyFn(
_In_ const FWPS_INCOMING_VALUES0
*
inFixedValues,
_In_ const FWPS_INCOMING_METADATA_VALUES0
*
inMetaValues,
_Inout_opt_ void
*
layerData,
_In_opt_ const void
*
classifyContext,
_In_ const FWPS_FILTER
*
filter
,
_In_ UINT64 flowContext,
_Inout_ FWPS_CLASSIFY_OUT0
*
classifyOut
) {
if
(layerData !
=
NULL) {
DbgPrint(
"layerData != NULL"
);
PNET_BUFFER_LIST pNetBufferList
=
(PNET_BUFFER_LIST)layerData;
PNET_BUFFER pFirstBuffer
=
NET_BUFFER_LIST_FIRST_NB(pNetBufferList);
PMDL pMDL
=
NET_BUFFER_FIRST_MDL(pFirstBuffer);
ULONG dataBufferLength
=
0
;
VOID
*
pData
=
NULL;
while
(pMDL) {
NdisQueryMdl(pMDL, (PVOID
*
)&pData, &dataBufferLength, NormalPagePriority);
if
(pData !
=
NULL) {
for
(ULONG i
=
0
; i < pMDL
-
>ByteCount; i
+
+
) {
DbgPrint(
"%d == %c"
, i, ((char
*
)pData)[i]);
}
}
pMDL
=
pMDL
-
>
Next
;
}
}