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); } }
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); }