Show / Hide Table of Contents

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
DisposableObject
ApplicationComponent
Service
NetGate
Implements
IService
INamed
ILocalizedTimeProvider
INetGateImplementation
INetGate
IApplicationComponent
System.IDisposable
IConfigurable
Inherited Members
Service.CONFIG_NAME_ATTR
Service.Destructor()
Service.ApplicationDontAutoStartService
Service.Status
Service.Running
Service.Name
Service.TimeLocation
Service.LocalizedTime
Service.Configure(IConfigSectionNode)
Service.Start()
Service.SignalStop()
Service.CheckForCompleteStop()
Service.WaitForCompleteStop()
Service.AcceptManagerVisit(Object, DateTime)
Service.UniversalTimeToLocalizedTime(DateTime)
Service.LocalizedTimeToUniversalTime(DateTime)
Service.AbortStart()
Service.DoSignalStop()
Service.DoCheckForCompleteStop()
Service.CheckServiceInactive()
Service.CheckServiceActive()
Service.CheckServiceActiveOrStarting()
Service.DoAcceptManagerVisit(Object, DateTime)
Service.____ObtainPrivateServiceStatusLockObject()
ApplicationComponent.AllComponents
ApplicationComponent.GetAppComponentBySID(UInt64)
ApplicationComponent.GetAppComponentByCommonName(String)
ApplicationComponent.ComponentSID
ApplicationComponent.ComponentStartTime
ApplicationComponent.ComponentDirector
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
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()
Namespace: NFX.IO.Net.Gate
Assembly: NFX.dll
Syntax
public class NetGate : Service, IService, INamed, ILocalizedTimeProvider, INetGateImplementation, INetGate, IApplicationComponent, IDisposable, IConfigurable

Constructors

NetGate()

Declaration
public NetGate()

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
ApplicationComponent.ComponentCommonName

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]

Returns gate state

Declaration
public NetGate.State this[TrafficDirection direction] { get; }
Parameters
Type Name Description
TrafficDirection direction
Property Value
Type Description
NetGate.State

Methods

CheckTraffic(ITraffic)

Checks whether the specified traffic is allowed or denied

Declaration
public GateAction CheckTraffic(ITraffic traffic)
Parameters
Type Name Description
ITraffic traffic
Returns
Type Description
GateAction

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
Type Name Description
ITraffic traffic
Rule rule
Returns
Type Description
GateAction

DoConfigure(IConfigSectionNode)

Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Type Name Description
IConfigSectionNode node
Overrides
Service.DoConfigure(IConfigSectionNode)

DoStart()

Declaration
protected override void DoStart()
Overrides
Service.DoStart()

DoWaitForCompleteStop()

Declaration
protected override void DoWaitForCompleteStop()
Overrides
Service.DoWaitForCompleteStop()

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

IService
INamed
ILocalizedTimeProvider
INetGateImplementation
INetGate
IApplicationComponent
System.IDisposable
IConfigurable

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX