Class NetGate
  
  Represents a network gate - a logical filter of incoming network traffic.
Network gate is somewhat similar to a firewall - it allows/denies the int/out traffic based on the set of rules
 
  
  
    Inheritance
    System.Object
    
    
    
    NetGate
   
  
    Implements
    
    
    
    
    
    
    System.IDisposable
    
   
  
    Inherited Members
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
   
  
  Assembly: NFX.dll
  Syntax
  
    public class NetGate : Service, IService, INamed, ILocalizedTimeProvider, INetGateImplementation, INetGate, IApplicationComponent, IDisposable, IConfigurable
   
  Constructors
  
  
  
  
  NetGate()
  
  
  Declaration
  
  
  
  
  NetGate(Object)
  
  
  Declaration
  
    public NetGate(object director)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Object | 
        director | 
         | 
      
    
  
  Fields
  
  
  
  CONFIG_ADDRESS_SECTION
  
  
  Declaration
  
    public const string CONFIG_ADDRESS_SECTION = "address"
   
  Field Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  CONFIG_DEFAULT_ACTION_ATTR
  
  
  Declaration
  
    public const string CONFIG_DEFAULT_ACTION_ATTR = "default-action"
   
  Field Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  CONFIG_GROUP_SECTION
  
  
  Declaration
  
    public const string CONFIG_GROUP_SECTION = "group"
   
  Field Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  CONFIG_INCOMING_SECTION
  
  
  Declaration
  
    public const string CONFIG_INCOMING_SECTION = "incoming"
   
  Field Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  CONFIG_OUTGOING_SECTION
  
  
  Declaration
  
    public const string CONFIG_OUTGOING_SECTION = "outgoing"
   
  Field Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  CONFIG_RULE_SECTION
  
  
  Declaration
  
    public const string CONFIG_RULE_SECTION = "rule"
   
  Field Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  CONFIG_VARDEF_SECTION
  
  
  Declaration
  
    public const string CONFIG_VARDEF_SECTION = "var-def"
   
  Field Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  PATTERN_CAPTURE_WC
  
  
  Declaration
  
    public const string PATTERN_CAPTURE_WC = "*"
   
  Field Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  Properties
  
  
  
  
  ComponentCommonName
  
  
  Declaration
  
    public override string ComponentCommonName { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  Overrides
  
  
  
  
  Enabled
  Enables/diables the protection. When protection is disabled then all traffic is allowed
 
  
  Declaration
  
    [Config]
public bool Enabled { get; set; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
  
  
  Item[TrafficDirection]
  
  
  Declaration
  
    public NetGate.State this[TrafficDirection direction] { get; }
   
  Parameters
  
  Property Value
  
  Methods
  
  
  
  
  CheckTraffic(ITraffic)
  Checks whether the specified traffic is allowed or denied
 
  
  Declaration
  
    public GateAction CheckTraffic(ITraffic traffic)
   
  Parameters
  
  Returns
  
  
  
  
  CheckTraffic(ITraffic, out Rule)
  Checks whether the specified traffic is allowed or denied.
Returns the rule that determined the allow/deny outcome or null when no rule matched
 
  
  Declaration
  
    public GateAction CheckTraffic(ITraffic traffic, out Rule rule)
   
  Parameters
  
  Returns
  
  
  
  
  
  
  
  Declaration
  
    protected override void DoConfigure(IConfigSectionNode node)
   
  Parameters
  
  Overrides
  
  
  
  
  DoStart()
  
  
  Declaration
  
    protected override void DoStart()
   
  Overrides
  
  
  
  
  DoWaitForCompleteStop()
  
  
  Declaration
  
    protected override void DoWaitForCompleteStop()
   
  Overrides
  
  
  
  
  IncreaseVariable(TrafficDirection, String, String, Int32)
  Increases the named variable in the network scope which this specified traffic falls under
 
  
  Declaration
  
    public virtual void IncreaseVariable(TrafficDirection direction, string address, string varName, int value)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | TrafficDirection | 
        direction | 
         | 
      
      
        | System.String | 
        address | 
         | 
      
      
        | System.String | 
        varName | 
         | 
      
      
        | System.Int32 | 
        value | 
         | 
      
    
  
  
  
  
  Log(MessageType, String, String, Exception, String, Nullable<Guid>)
  Facilitates net gate logging
 
  
  Declaration
  
    protected void Log(MessageType type, string text, string from = null, Exception error = null, string pars = null, Guid? related = default (Guid? ))
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | MessageType | 
        type | 
         | 
      
      
        | System.String | 
        text | 
         | 
      
      
        | System.String | 
        from | 
         | 
      
      
        | System.Exception | 
        error | 
         | 
      
      
        | System.String | 
        pars | 
         | 
      
      
        | System.Nullable<System.Guid> | 
        related | 
         | 
      
    
  
  
  
  
  SetVariable(TrafficDirection, String, String, Int32)
  Sets the named variable in the network scope which this specified traffic falls under
 
  
  Declaration
  
    public virtual void SetVariable(TrafficDirection direction, string address, string varName, int value)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | TrafficDirection | 
        direction | 
         | 
      
      
        | System.String | 
        address | 
         | 
      
      
        | System.String | 
        varName | 
         | 
      
      
        | System.Int32 | 
        value | 
         | 
      
    
  
  Implements
  
  
  
  
  
  
  
      System.IDisposable
  
  
  Extension Methods