private List <string[]> addressTranslation; //IPaddress - localPort public ConnectionController(FIB fib, List <InPort> ports) { this.fib = fib; inPorts = ports; addressTranslation = new List <string[]>(); LoadTransationTableFromFile(); }
public LabelSwitchingRouter() { fib = new FIB(); numberOfInputModules = GetInputModulesNumber(); numberOfOutputModules = GetOutputModulesNumber(); inPorts = new List <InPort>(); outPorts = new List <OutPort>(); CreateInPorts(numberOfInputModules); CreateOutPorts(numberOfOutputModules); }
public LabelSwitchingRouter() { fib = new FIB(); numberOfInputModules = GetInputModulesNumber(); numberOfOutputModules = GetOutputModulesNumber(); inPorts = new List <InPort>(); outPorts = new List <OutPort>(); sendingTimer = new Timer(); sendingTimer.Interval = Config.getIntegerProperty("SendingInterval"); sendingTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent); sendingTimer.Enabled = true; //agent = new RouterAgent(fib, inPorts); //łączność z NMSem, teraz niepotrzebna CC = new ConnectionController(fib, inPorts); CreateInPorts(numberOfInputModules); CreateOutPorts(numberOfOutputModules); LogClass.WhiteLog("Created LSR"); ParentSubnetworkConnector.Init(CC); }
public RouterAgent(FIB fib, List <InPort> inPorts) { this.fib = fib; inCommand = new Command(); outCommand = new Command(); this.inPorts = inPorts; _interface = Config.getProperty("NMSInterface"); outport = Config.getIntegerProperty("NMSListenPort"); init(); LogClass.WhiteLog("Established connection with NMS"); SendSingleCommand(_interface, outport); LogClass.WhiteLog("Sent hello message"); inputSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPAddress ipAdd = IPAddress.Parse("127.0.0.1"); IPEndPoint remoteEP = new IPEndPoint(ipAdd, outport); inputSocket.Bind(remoteEP); Listen(); }
public InPort(int portNumber, List <Entry> routingTable) { this.portNumber = portNumber; fib = new FIB(routingTable); }
public InPort(int portNumber, FIB subMasterFIB) { this.portNumber = portNumber; fib = subMasterFIB; }