Exemplo n.º 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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 internal static extern bool GetHwPacketFilter(DriverHandle hOpen, IntPtr hAdapter, ref HardwarePacketFilters pFilter);
Exemplo n.º 4
0
 internal static extern bool SetPacketEvent(DriverHandle hOpen, IntPtr hAdapter, SafeWaitHandle hWin32Event);
Exemplo n.º 5
0
 internal static extern bool GetAdapterPacketQueueSize(DriverHandle hOpen, IntPtr hAdapter, ref uint dwSize);
Exemplo n.º 6
0
 internal static extern bool GetAdapterMode(DriverHandle hOpen, ref AdapterMode mode);
Exemplo n.º 7
0
 internal static extern bool ReadPacket(DriverHandle hOpen, ref EthRequest packet);
Exemplo n.º 8
0
 internal static extern bool SendPacketToAdapter(DriverHandle hOpen, ref EthRequest packet);
Exemplo n.º 9
0
 internal static extern bool GetTcpipBoundAdaptersInfo(DriverHandle hOpen, ref TcpAdapterList adapters);
Exemplo n.º 10
0
 internal static extern uint GetDriverVersion(DriverHandle hOpen);