コード例 #1
0
 /// <summary>
 /// Sets the hardware packet filter.
 /// </summary>
 /// <param name="networkAdapter">The network adapter.</param>
 /// <param name="ndisPacketType">Type of the ndis packet.</param>
 /// <returns><c>true</c> if successful, <c>false</c> otherwise.</returns>
 public bool SetHwPacketFilter(NetworkAdapter networkAdapter, Native.NdisApi.NDIS_PACKET_TYPE ndisPacketType)
 {
     return(Native.NdisApi.SetHwPacketFilter(Handle, networkAdapter.Handle, ndisPacketType));
 }
コード例 #2
0
 /// <summary>
 /// Sends the packets to MSTCP or adapter.
 /// </summary>
 /// <param name="networkAdapter">The network adapter.</param>
 /// <param name="ethRequests">The ether requests.</param>
 /// <returns><c>true</c> if successful, <c>false</c> otherwise.</returns>
 public bool SendPackets(NetworkAdapter networkAdapter, IList <Native.NdisApi.NDISRD_ETH_Packet> ethRequests)
 {
     return(SendPackets(networkAdapter.Handle, ethRequests));
 }
コード例 #3
0
 /// <summary>
 /// Flushes the adapter packet queue.
 /// </summary>
 /// <param name="networkAdapter">The network adapter.</param>
 /// <returns><c>true</c> if successful, <c>false</c> otherwise.</returns>
 public bool FlushAdapterPacketQueue(NetworkAdapter networkAdapter)
 {
     return(Native.NdisApi.FlushAdapterPacketQueue(Handle, networkAdapter.Handle));
 }
コード例 #4
0
 /// <summary>
 /// Sets the packet event to the specified <see cref="networkAdapter" />.
 /// </summary>
 /// <remarks>This will not set the <see cref="networkAdapter" />'s wait handle.</remarks>
 /// <param name="networkAdapter">The network adapter.</param>
 /// <param name="safeWaitHandle">The safe wait handle.</param>
 /// <returns><c>true</c> if successful, <c>false</c> otherwise.</returns>
 public bool SetPacketEvent(NetworkAdapter networkAdapter, SafeWaitHandle safeWaitHandle)
 {
     return(Native.NdisApi.SetPacketEvent(Handle, networkAdapter.Handle, safeWaitHandle));
 }