Ejemplo n.º 1
0
 private void CreateOutPorts(int numberOfOutputPorts)
 {
     for (int i = 0; i < numberOfOutputPorts; i++)
     {
         int     portNumber = Config.getIntegerProperty("OutPortNumber" + i);
         OutPort outPort    = new OutPort(portNumber);
         outPorts.Add(outPort);
     }
 }
Ejemplo n.º 2
0
        public static void sendIPPacket(Packet ipPacket, OutPort port, int outPort)
        {
            byte[] serializedMPLSPack = getSerializedIPPacket(ipPacket);
            int    packSize           = serializedMPLSPack.Length + 8;

            outputSocket.Send(BitConverter.GetBytes(packSize));
            outputSocket.Send(BitConverter.GetBytes(packSize));
            outputSocket.Send(BitConverter.GetBytes(outPort));
            outputSocket.Send(serializedMPLSPack);
        }