Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

PfTestPacket (iphlpapi)
 
.
Summary
The PfTestPacket function tests the specified packet and returns the action that would be performed given the specified interface.

C# Signature:

    [DllImport("iphlpapi.dll", EntryPoint = "PfTestPacket")]
    public static extern UInt32 PfTestPacket(IntPtr pInInterface, IntPtr pOutInterface, uint cBytes, IntPtr pbPacket, ref PFFORWARD_ACTION ppAction);

VB Signature:

Declare Function PfTestPacket Lib "iphlpapi.dll" (TODO) As TODO

User-Defined Types:

    internal enum PFFORWARD_ACTION : uint
    {
        PF_ACTION_FORWARD = 0,
        PF_ACTION_DROP
    }

Notes:

    /// <summary>
    /// The PfTestPacket function tests the specified packet and returns the action that would be performed given the specified interface.
    /// </summary>
    /// <param name="pInInterface">[in, optional] Handle to an interface to use as an input interface for the packet. This parameter is optional and may be NULL.</param>
    /// <param name="pOutInterface">[in, optional] Handle to an interface to use as an output interface for the packet. This parameter is optional and may be NULL.</param>
    /// <param name="cBytes">[in] Specifies the size, in bytes, of the test packet specified by the pbPacket parameter.</param>
    /// <param name="pbPacket">[in] Pointer to a network packet to test with the specified interface (or interfaces).</param>
    /// <param name="ppAction">[out] Pointer to a variable of type PFFORWARD_ACTION. This variable receives the action that would have been taken given the specified interface(s) and packet.</param>
    /// <returns>If the function succeeds, the return value is NO_ERROR.</returns>

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions