public static Guid CreateNetInterfaceFilter( IntPtr sessionHandle, Guid providerId, Guid sublayerId, DisplayData displayData, Layer layer, Action action, uint weight, uint index, bool persistent = false, Guid id = new Guid()) { AssertSuccess(() => PInvoke.CreateNetInterfaceFilter( sessionHandle, ref providerId, ref sublayerId, ref displayData, (uint)layer, (uint)action, weight, index, (uint)(persistent ? 1 : 0), ref id)); return(id); }
public static Guid CreateRemoteNetworkIPv4Filter( IntPtr sessionHandle, Guid providerId, Guid sublayerId, DisplayData displayData, Layer layer, Action action, uint weight, Guid calloutId, Guid providerContextId, NetworkAddress address, bool persistent = false, Guid id = new Guid()) { AssertSuccess(() => PInvoke.CreateRemoteNetworkIPv4Filter( sessionHandle, ref providerId, ref sublayerId, ref displayData, (uint)layer, (uint)action, weight, ref calloutId, ref providerContextId, ref address, (uint)(persistent ? 1 : 0), ref id)); return(id); }
public static extern uint CreateProviderContext( IntPtr sessionHandle, ref DisplayData displayData, [In] ref Guid providerKey, uint size, IntPtr data, [In, Out] ref Guid key);
public static Guid BlockOutsideDns( IntPtr sessionHandle, Guid providerId, Guid sublayerId, DisplayData displayData, Layer layer, Action action, uint weight, Guid calloutId, uint index) { var id = Guid.Empty; AssertSuccess(() => PInvoke.BlockOutsideDns( sessionHandle, ref providerId, ref sublayerId, ref displayData, (uint)layer, (uint)action, weight, ref calloutId, index, ref id)); return(id); }
public static extern uint CreateSublayer( IntPtr sessionHandle, [In] ref Guid providerKey, ref DisplayData displayData, uint weight, uint persistent, [In, Out] ref Guid key);
public static Guid CreateAppFilter(IntPtr sessionHandle, Guid providerId, Guid sublayerId, DisplayData displayData, Layer layer, Action action, uint weight, Guid calloutId, Guid providerContextId, string appPath) { var id = Guid.Empty; AssertSuccess(() => PInvoke.CreateAppFilter( sessionHandle, ref providerId, ref sublayerId, ref displayData, (uint)layer, (uint)action, weight, ref calloutId, ref providerContextId, appPath, ref id)); return(id); }
public static Guid CreateRemoteUdpPortFilter( IntPtr sessionHandle, Guid providerId, Guid sublayerId, DisplayData displayData, Layer layer, Action action, uint weight, uint port) { var id = Guid.Empty; AssertSuccess(() => PInvoke.CreateRemoteUDPPortFilter( sessionHandle, ref providerId, ref sublayerId, ref displayData, (uint)layer, (uint)action, weight, port, ref id)); return(id); }
public static extern uint CreateCallout( IntPtr sessionHandle, ref DisplayData displayData, [In] ref Guid providerKey, uint layer, uint persistent, [In, Out] ref Guid key);
public static Guid CreateNetInterfaceFilter( IntPtr sessionHandle, Guid providerId, Guid sublayerId, DisplayData displayData, Layer layer, Action action, uint weight, string interfaceId) { var id = Guid.Empty; AssertSuccess(() => PInvoke.CreateNetInterfaceFilter( sessionHandle, ref providerId, ref sublayerId, ref displayData, (uint)layer, (uint)action, weight, interfaceId, ref id)); return(id); }
public static Guid CreateRemoteNetworkIPv4Filter( IntPtr sessionHandle, Guid providerId, Guid sublayerId, DisplayData displayData, Layer layer, Action action, uint weight, NetworkAddress address) { var id = Guid.Empty; AssertSuccess(() => PInvoke.CreateRemoteNetworkIPv4Filter( sessionHandle, ref providerId, ref sublayerId, ref displayData, (uint)layer, (uint)action, weight, ref address, ref id)); return(id); }
public Guid CreateRemoteIPv4Filter( DisplayData displayData, Action action, Layer layer, uint weight, string address, bool persistent = false, Guid id = new Guid()) { Guid filterId = IpFilterNative.CreateRemoteIPv4Filter( Session.Handle, ProviderId, Id, displayData, layer, action, weight, Guid.Empty, Guid.Empty, address, persistent, id); AddFilter(filterId); return(filterId); }
public Guid CreateNetInterfaceFilter( DisplayData displayData, Action action, Layer layer, uint index, uint weight, bool persistent = false, Guid id = new Guid()) { Guid filterId = IpFilterNative.CreateNetInterfaceFilter( Session.Handle, ProviderId, Id, displayData, layer, action, weight, index, persistent, id); AddFilter(filterId); return(filterId); }
public Guid CreateRemoteTcpPortFilter( DisplayData displayData, Action action, Layer layer, uint weight, uint port, bool persistent = false, Guid id = new Guid()) { Guid filterId = IpFilterNative.CreateRemoteTcpPortFilter( Session.Handle, ProviderId, Id, displayData, layer, action, weight, port, persistent, id); AddFilter(filterId); return(filterId); }
public Guid CreateAppCalloutFilter(DisplayData displayData, Layer layer, uint weight, Callout callout, ProviderContext providerContext, string appPath, bool persistent = false, Guid id = new Guid()) { Guid filterId = IpFilterNative.CreateAppFilter( Session.Handle, ProviderId, Id, displayData, layer, Action.Callout, weight, callout.Id, providerContext.Id, appPath, persistent, id); AddFilter(filterId); return(filterId); }
public static Guid CreateProviderContext( IntPtr sessionHandle, Guid providerId, DisplayData displayData, byte[] data) { var id = Guid.Empty; var dataPtr = IntPtr.Zero; var size = 0; if (data != null && (size = data.Length) != 0) { dataPtr = Marshal.AllocHGlobal(size); Marshal.Copy(data, 0, dataPtr, size); } try { AssertSuccess(() => PInvoke.CreateProviderContext( sessionHandle, ref displayData, ref providerId, (uint)size, dataPtr, ref id)); } finally { Marshal.FreeHGlobal(dataPtr); } return(id); }
public Callout CreateCallout(DisplayData displayData, Guid calloutId, Layer layer) { var callout = _ipFilter.CreateCallout(displayData, calloutId, layer); _callouts.Add(callout.Id); return(callout); }
public static extern uint CreateLoopbackFilter( IntPtr sessionHandle, [In] ref Guid providerKey, [In] ref Guid sublayerKey, ref DisplayData displayData, uint layer, uint action, uint weight, [In, Out] ref Guid filterKey);
public Sublayer CreateSublayer(DisplayData displayData, uint weight) { var id = IpFilterNative.CreateSublayer( Session.Handle, ProviderId, displayData, weight); return(new Sublayer(this, id)); }
public ProviderContext CreateProviderContext(DisplayData displayData, byte[] data) { var id = IpFilterNative.CreateProviderContext( Session.Handle, ProviderId, displayData, data); return(new ProviderContext(id)); }
public static extern uint CreateRemoteNetworkIPv4Filter( IntPtr sessionHandle, [In] ref Guid providerKey, [In] ref Guid sublayerKey, ref DisplayData displayData, uint layer, uint action, uint weight, ref NetworkAddress addr, [In, Out] ref Guid filterKey);
public static extern uint CreateNetInterfaceFilter( IntPtr sessionHandle, [In] ref Guid providerKey, [In] ref Guid sublayerKey, ref DisplayData displayData, uint layer, uint action, uint weight, [MarshalAs(UnmanagedType.LPStr)] string interfaceId, [In, Out] ref Guid filterKey);
public Callout CreateCallout(DisplayData displayData, Guid key, Layer layer) { var id = IpFilterNative.CreateCallout( Session.Handle, key, ProviderId, displayData, layer); return(new Callout(id)); }
public static extern uint CreateRemoteUDPPortFilter( IntPtr sessionHandle, [In] ref Guid providerKey, [In] ref Guid sublayerKey, ref DisplayData displayData, uint layer, uint action, uint weight, uint port, uint persistent, [In, Out] ref Guid filterKey);
public static extern uint CreateNetInterfaceFilter( IntPtr sessionHandle, [In] ref Guid providerKey, [In] ref Guid sublayerKey, ref DisplayData displayData, uint layer, uint action, uint weight, uint index, uint persistent, [In, Out] ref Guid filterKey);
public static extern uint BlockOutsideDns( IntPtr sessionHandle, [In] ref Guid providerKey, [In] ref Guid sublayerKey, ref DisplayData displayData, uint layer, uint action, uint weight, [In] ref Guid calloutKey, uint index, [In, Out] ref Guid filterKey);
public Callout CreateCallout(DisplayData displayData, Guid key, Layer layer, bool persistent = false) { var calloutId = IpFilterNative.CreateCallout( Session.Handle, key, ProviderId, displayData, layer, persistent); return(new Callout(calloutId)); }
public static extern uint CreateLayerFilter( IntPtr sessionHandle, [In] ref Guid providerKey, [In] ref Guid sublayerKey, ref DisplayData displayData, uint layer, uint action, uint weight, [In] ref Guid calloutKey, [In] ref Guid providerContextKey, uint persistent, [In, Out] ref Guid filterKey);
public static extern uint CreateAppFilter( IntPtr sessionHandle, [In] ref Guid providerKey, [In] ref Guid sublayerKey, ref DisplayData displayData, uint layer, uint action, uint weight, [In] ref Guid calloutKey, [In] ref Guid providerContextKey, [MarshalAs(UnmanagedType.LPWStr)] string appPath, [In, Out] ref Guid filterKey);
public Sublayer CreateSublayer(DisplayData displayData, uint weight, bool persistent = false, Guid id = new Guid()) { var sublayerId = IpFilterNative.CreateSublayer( Session.Handle, ProviderId, displayData, weight, persistent, id); return(new Sublayer(this, sublayerId)); }
public ProviderContext CreateProviderContext(DisplayData displayData, byte[] data, bool persistent = false, Guid id = new Guid()) { var providerContextId = IpFilterNative.CreateProviderContext( Session.Handle, ProviderId, displayData, data, persistent, id); return(new ProviderContext(providerContextId)); }