SlideServe
Menu
Préférences
© SlideServe · v2026

Adding a New Routing Protocol

thu avatar
17 diapositives · 345 Views · Oct 21, 2014

Adding a New Routing Protocol. Authors : Jeong GangHee Updated by Park YoonYoung. by Jeong - Ganghee. Step 1) Let QualNet know SRIP as a network layer protocol In the file include/ network.h. enum NetworkRoutingProtocolType { … ROUTING_PROTOCOL_SRIP , … }.

Adding a New Routing Protocol - slide 1
01 / 17Adding a New Routing Protocol
1 / 17

Télécharger la présentation

Adding a New Routing Protocol
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Adding a New Routing Protocol Authors : JeongGangHee Updated by Park YoonYoung by Jeong - Ganghee Advanced Operating System – Spring 2012

  2. Advanced Operating System – Spring 2012 • Step 1) Let QualNet know SRIP as a network layer protocol • In the file include/network.h enumNetworkRoutingProtocolType { … ROUTING_PROTOCOL_SRIP, … } Make SRIP Recognized by QualNet

  3. Advanced Operating System – Spring 2012 • Step 2)Let QualNet know SRIP as a network layer protocol • In the file include/network.h enumNetworkRoutingAdminDistanceType { … ROUTING_ADMIN_DISTANCE_SRIP, … } Make SRIP Recognized by QualNet

  4. Advanced Operating System – Spring 2012 • Step 3) Let QualNet know SRIP as a network layer protocol • In the file include/trace.h enumTraceProtocolType { … TRACE_SRIP, … } Make SRIP Recognized by QualNet

  5. Advanced Operating System – Spring 2012 • Step 4) Let IP module know SRIP as an IP protocol • In the file libraries/developer/src/network_ip.h // EndIARP #defineIPPROTO_SRIP number //InsertPatch ROUTING_IPPROTO 211 Make SRIP Recognized by QualNet

  6. Advanced Operating System – Spring 2012 • Step 5) Have IP module recognize the five entry functions of SRIP • Have the file libraries/developer/src/network_ip.cppinclude routing_srip.h #include <stdio.h> #include <stdlib.h> #include <string.h> … //InsertPatch HEADER_FILES #include “routing_srip.h” Make SRIP Recognized by QualNet

  7. Advanced Operating System – Spring 2012 • Step 6) Have IP initialize SRIP if specified in the configuration file • In the file network_ip.cpp, function NetworkIpParseAndSetRoutingProtocolType() … else if (strcmp(protocolString, “SRIP”) == 0) { routingProtocolType = ROUTING_PROTOCOL_SRIP; } else if (strcmp(protocolString, “NONE”) == 0) Make SRIP Recognized by QualNet

  8. Advanced Operating System – Spring 2012 • Step 7) Have IP initialize SRIP • In the file network_ip.cpp, function IpRoutingInit() #endif // NETSEC_LIB case ROUTING_PROTOCOL_SRIP: { if(!NetworkIpGetRoutingProtocol(node, ROUTING_PROTOCOL_SRIP)) SripInit(node, (SripData**)&ip->interfaceInfo[i]->routingProtocol, nodeInput, i); else NetworkIpUpdateUnicastRoutingProtocoAndRouterFunction( node, ROUTING_PROTOCOL_SRIP, i): break; } Make SRIP Recognized by QualNet

  9. Advanced Operating System – Spring 2012 • Step 8) When the network layer receives an event for SRIP, dispatch it to SRIP’s event handling function • In the file network_ip.cpp, function NetworkIpLayer() // InsertPatch NETWORK_IP_LAYER caseROUTING_PROTOCOL_SRIP: { SripHandleProtocolEvent(node, msg); break; } Make SRIP Recognized by QualNet

  10. Advanced Operating System – Spring 2012 • Step 9) When IP receives an SRIP route advertisement packet, dispatch it to SRIP’s packet handling function • In the file network_ip.cpp, function DeliverPacket() caseIPPROTO_SRIP: { if(NetworkIpGetUnicastRoutingProtocolType(node, interfaceIndex) == ROUTING_PROTOCOL_SRIP) { SripHandleProtocolPacket(node, msg, sourceAddr); } else { MESSAGE_Free(node, msg); } break; } // InsertPatchNETWORK_HANDLE_PACKET Make SRIP Recognized by QualNet

  11. Advanced Operating System – Spring 2012 • Step 10) Call SRIP’s finalizing function when IP is terminating • In the file network_ip.cpp, function NetworkIpFinalize() // InsertPatchNETWORK_HANDLE_PACKET caseROUTING_PROTOCOL_SRIP: { SripFinalize(node); break; } Make SRIP Recognized by QualNet

  12. Advanced Operating System – Spring 2012 • Step 11) Put SRIP source files (routing_srip.h/cpp) into the directory libraries/developer/src/ • Edit libraries/developer/Makefile-common • Add routing_srip.cpp to DEVELOPER_SRCS macro as the following # # common sources #DEVELOPER_SRCS = \ $(DEVELOPER_SRCDIR)/adaptation_aal5.cpp \ $(DEVELOPER_SRCDIR)/routing_srip.cpp \ Compiling QualNet with SRIP

  13. Advanced Operating System – Spring 2012 cd $(QUALNET_HOME)/main nmake • Step 12) Rebuild QualNet executable: Compiling QualNet with SRIP

  14. Advanced Operating System – Spring 2012 • Step 13) In $(QUALNET_HOME)/scenarios/default directory, • copy default.config into srip.config, • then modify/add the following parameters: EXPERIMENT-NAMEsrip #… ROUTING-PROTOCOLSRIP SRIP-UPDATE-INTERVAL10s #… Creating a configuration file for SRIP

  15. Advanced Operating System – Spring 2012 • Step 14) In $(QUALNET_HOME)/bin directory, run qualnet on the SRIP configuration file: • Check srip.stat file to find SRIP’s statistics #cd $(QUALNET_HOME)/bin #qualnetsrip.config Testing the Protocol

  16. Advanced Operating System – Spring 2012 • Step 15) In $(QUALNET_HOME)/gui/settings/protocol-models directory, routing-protocols.prt file: • Update this xml file • Insert SRIP to Qualnet GUI tool <option value=“SRIP” name=“SRIP”> <variable Key=“SRIP-UPDATE-INTERVAL” type=“Time” name=“SRIP Updated” default=“8s” /> </option> Insert SRIP to GUI menu

  17. Advanced Operating System – Spring 2012 End