示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WinpkFilterDevice" /> class.
        /// </summary>
        /// <param name="adapterHandle">The handle.</param>
        /// <param name="nameBytes">Name of the adapter in bytes.</param>
        /// <param name="medium">The medium.</param>
        /// <param name="address">The mac address.</param>
        /// <param name="mtu">The mtu.</param>
        internal WinpkFilterDevice(
            DriverHandle driverHandle, IntPtr adapterHandle,
            byte[] nameBytes,
            uint medium, byte[] address, ushort mtu)
        {
            DriverHandle  = driverHandle;
            AdapterHandle = adapterHandle;
            Mtu           = mtu;
            NdisMedium    = medium;

            MacAddress = new PhysicalAddress(address);

            Name         = GetPrivateName(nameBytes);
            FriendlyName = ConvertAdapterName(nameBytes);
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WinpkFilterDriver" /> class.
 /// </summary>
 /// <param name="handle">The filter driver handle.</param>
 /// <param name="driverNameBytes">The driver name bytes.</param>
 protected WinpkFilterDriver(DriverHandle handle)
 {
     Handle = handle;
 }
示例#3
0
 internal static extern bool GetHwPacketFilter(DriverHandle hOpen, IntPtr hAdapter, ref HardwarePacketFilters pFilter);
示例#4
0
 internal static extern bool SetPacketEvent(DriverHandle hOpen, IntPtr hAdapter, SafeWaitHandle hWin32Event);
示例#5
0
 internal static extern bool GetAdapterPacketQueueSize(DriverHandle hOpen, IntPtr hAdapter, ref uint dwSize);
示例#6
0
 internal static extern bool GetAdapterMode(DriverHandle hOpen, ref AdapterMode mode);
示例#7
0
 internal static extern bool ReadPacket(DriverHandle hOpen, ref EthRequest packet);
示例#8
0
 internal static extern bool SendPacketToAdapter(DriverHandle hOpen, ref EthRequest packet);
示例#9
0
 internal static extern bool GetTcpipBoundAdaptersInfo(DriverHandle hOpen, ref TcpAdapterList adapters);
示例#10
0
 internal static extern uint GetDriverVersion(DriverHandle hOpen);