SlideShare a Scribd company logo
1 of 17
By
Mohammed Amer Al-Batati

         2012
 In our network we can’t add more than two nodes.
 The reason is that, Node.ned defines only one input
  gate and one output gate.
 The solution is to use gate vectors instead of single
  gates.



 A more advanced solution is to use inout gate, which
  is basically an input and an output gate glued together.
 Let’s modify our plan. When a node decides to
 transmit a message, it have to select a random
 destination. Therefore, we need to modify Node.cc
 file.
 Goto to “mynetwork”-> add more nodes -> connect
 them to each other then run the experiment. As
 follows:
 Depending on the model domain, message objects
  represent events, packets, commands, jobs, customers
  or other kinds of entities.
 There are cMessage and cPacket Classes.
 The cPacket class extends cMessage.
 cPacket is used for network packets (frames,
  datagrams,     transport    packets,  etc.)   in   a
  communication network, and cMessage is used for
  everything else.
   For   example, encapsulation and         decapsulation
    operations are only used with cPacket.
 cMessage *msg = new cMessage();
 cMessage *msg = new cMessage("timer");
 cMessage *msg = new cMessage("timer", kind);
 msg->setKind( kind );
 msg->setBitLength( length );
 msg->setTimestamp( simtime );
 int K = msg->getKind();
 int L = msg->getBitLength();
 simtime_t T = msg->getTimestamp();
 …etc
 cMessage *copy = msg->dup();




                                 … one slide…
                                  …one line…
 Example

    IP


   MAC




 MAC        IP
 Inspecting cMessage objects (previous code).
 Modify Node.cc code to include the encapsulation
  example.




 Save, build and run.
 Inspecting cPacekt objects (new code).
 Example
 Assume that the following cPacket was received as
 “MACdata”.
                 MAC         IP



 After using the following decapsulation statement:




            IP                       MAC
 Assume that you want to add your own header
 between IP and MAC.

                       MyHeader


                 MAC              IP




          Name            ID           Year
 Assume that you want to add your own header
 between IP and MAC.

                       MyHeader


                 MAC              IP




          Name            ID           Year
 From Project Explorer: right-click on myproject ->
  New -> Message Definition (.msg) -> name it
  (myHeader) -> Next -> Select New Message File ->
  Next -> Finish.
 Add our fields:




 Save and Build.
 OMNet++ generates .cc and .h (myHeader_m.cc and
  myHeader_m.h).
 Your needs are generated.




 How to use it.
 To use your new message:           At Node.cc

    1. Include the needed header.
    2. Use “myHeader” as “cPacket”
    3. That is it!
    Insert it between IP and MAC

More Related Content

What's hot

MQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsMQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsBryan Boyd
 
Cisco Routing and Switching by yateendra sahu ppt
Cisco Routing and Switching by yateendra sahu pptCisco Routing and Switching by yateendra sahu ppt
Cisco Routing and Switching by yateendra sahu pptyateendrasahu
 
Cloud computing : Cloud sim
Cloud computing : Cloud sim Cloud computing : Cloud sim
Cloud computing : Cloud sim Khalid EDAIG
 
Mise en place du Firewall IPCop
Mise en place du Firewall IPCopMise en place du Firewall IPCop
Mise en place du Firewall IPCopMohammed Zaoui
 
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptxCCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptxBabarYunus1
 
TD_complet_reseau__CISCO__Packet Tracer.pdf
TD_complet_reseau__CISCO__Packet Tracer.pdfTD_complet_reseau__CISCO__Packet Tracer.pdf
TD_complet_reseau__CISCO__Packet Tracer.pdfInes Ben Hassine
 
Cisco Packet Tracer Overview
Cisco Packet Tracer OverviewCisco Packet Tracer Overview
Cisco Packet Tracer OverviewAli Usman
 
Mise en place d'un serveur SMS Open Source sous GAMMU
Mise en place d'un serveur SMS Open Source sous GAMMUMise en place d'un serveur SMS Open Source sous GAMMU
Mise en place d'un serveur SMS Open Source sous GAMMUMahamadou Traore
 
Mise en place d'un système de messagerie roundcube sous cent os 7
Mise en place d'un système de messagerie roundcube sous cent os 7Mise en place d'un système de messagerie roundcube sous cent os 7
Mise en place d'un système de messagerie roundcube sous cent os 7Ousmane BADJI
 
Cours routage dynamique (ri pv1,ripv2,ripng)
Cours routage dynamique (ri pv1,ripv2,ripng) Cours routage dynamique (ri pv1,ripv2,ripng)
Cours routage dynamique (ri pv1,ripv2,ripng) EL AMRI El Hassan
 
CS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit ICS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit Ipkaviya
 
Travaux pratiques configuration du routage entre réseaux locaux virtuels
Travaux pratiques   configuration du routage entre réseaux locaux virtuelsTravaux pratiques   configuration du routage entre réseaux locaux virtuels
Travaux pratiques configuration du routage entre réseaux locaux virtuelsMohamed Keita
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingPeter R. Egli
 
Rapport installation round cube centos 7
Rapport installation round cube centos 7Rapport installation round cube centos 7
Rapport installation round cube centos 7Mame Cheikh Ibra Niang
 
Adressage et routage
Adressage et routageAdressage et routage
Adressage et routageredwan_10
 

What's hot (20)

MQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsMQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of Things
 
Tp voip
Tp voipTp voip
Tp voip
 
Cisco Routing and Switching by yateendra sahu ppt
Cisco Routing and Switching by yateendra sahu pptCisco Routing and Switching by yateendra sahu ppt
Cisco Routing and Switching by yateendra sahu ppt
 
Protocole OSPF
Protocole OSPFProtocole OSPF
Protocole OSPF
 
Rapport Sockets en Java
Rapport Sockets en JavaRapport Sockets en Java
Rapport Sockets en Java
 
Cloud computing : Cloud sim
Cloud computing : Cloud sim Cloud computing : Cloud sim
Cloud computing : Cloud sim
 
Mise en place du Firewall IPCop
Mise en place du Firewall IPCopMise en place du Firewall IPCop
Mise en place du Firewall IPCop
 
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptxCCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx
 
TD_complet_reseau__CISCO__Packet Tracer.pdf
TD_complet_reseau__CISCO__Packet Tracer.pdfTD_complet_reseau__CISCO__Packet Tracer.pdf
TD_complet_reseau__CISCO__Packet Tracer.pdf
 
Cisco Packet Tracer Overview
Cisco Packet Tracer OverviewCisco Packet Tracer Overview
Cisco Packet Tracer Overview
 
Mise en place d'un serveur SMS Open Source sous GAMMU
Mise en place d'un serveur SMS Open Source sous GAMMUMise en place d'un serveur SMS Open Source sous GAMMU
Mise en place d'un serveur SMS Open Source sous GAMMU
 
Mise en place d'un système de messagerie roundcube sous cent os 7
Mise en place d'un système de messagerie roundcube sous cent os 7Mise en place d'un système de messagerie roundcube sous cent os 7
Mise en place d'un système de messagerie roundcube sous cent os 7
 
rapportfinal
rapportfinalrapportfinal
rapportfinal
 
Cours routage dynamique (ri pv1,ripv2,ripng)
Cours routage dynamique (ri pv1,ripv2,ripng) Cours routage dynamique (ri pv1,ripv2,ripng)
Cours routage dynamique (ri pv1,ripv2,ripng)
 
CS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit ICS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit I
 
Travaux pratiques configuration du routage entre réseaux locaux virtuels
Travaux pratiques   configuration du routage entre réseaux locaux virtuelsTravaux pratiques   configuration du routage entre réseaux locaux virtuels
Travaux pratiques configuration du routage entre réseaux locaux virtuels
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message Queueing
 
Rapport installation round cube centos 7
Rapport installation round cube centos 7Rapport installation round cube centos 7
Rapport installation round cube centos 7
 
Trace route
Trace routeTrace route
Trace route
 
Adressage et routage
Adressage et routageAdressage et routage
Adressage et routage
 

Viewers also liked

Tutorial 4 adding some details
Tutorial 4   adding some details Tutorial 4   adding some details
Tutorial 4 adding some details Mohd Batati
 
Tutorial 3 getting started with omnet
Tutorial 3   getting started with omnetTutorial 3   getting started with omnet
Tutorial 3 getting started with omnetMohd Batati
 
Tutorial 1 installing mixim and mixnet
Tutorial 1   installing mixim and mixnetTutorial 1   installing mixim and mixnet
Tutorial 1 installing mixim and mixnetMohd Batati
 
Tutorial 2 downloading and i nstalling omnet++
Tutorial 2   downloading and i nstalling omnet++Tutorial 2   downloading and i nstalling omnet++
Tutorial 2 downloading and i nstalling omnet++Mohd Batati
 
Tutorial 6 queues & arrays & results recording
Tutorial 6   queues & arrays & results recording Tutorial 6   queues & arrays & results recording
Tutorial 6 queues & arrays & results recording Mohd Batati
 
Simulators for Wireless Sensor Networks (OMNeT++)
Simulators for Wireless Sensor Networks (OMNeT++)Simulators for Wireless Sensor Networks (OMNeT++)
Simulators for Wireless Sensor Networks (OMNeT++)Pradeep Kumar TS
 
Using Omnet++ in Simulating Ad-Hoc Network
Using Omnet++ in Simulating Ad-Hoc Network Using Omnet++ in Simulating Ad-Hoc Network
Using Omnet++ in Simulating Ad-Hoc Network Ahmed Nour
 

Viewers also liked (11)

Tutorial 4 adding some details
Tutorial 4   adding some details Tutorial 4   adding some details
Tutorial 4 adding some details
 
Tutorial 3 getting started with omnet
Tutorial 3   getting started with omnetTutorial 3   getting started with omnet
Tutorial 3 getting started with omnet
 
Tutorial 1 installing mixim and mixnet
Tutorial 1   installing mixim and mixnetTutorial 1   installing mixim and mixnet
Tutorial 1 installing mixim and mixnet
 
Tutorial 2 downloading and i nstalling omnet++
Tutorial 2   downloading and i nstalling omnet++Tutorial 2   downloading and i nstalling omnet++
Tutorial 2 downloading and i nstalling omnet++
 
Tutorial 6 queues & arrays & results recording
Tutorial 6   queues & arrays & results recording Tutorial 6   queues & arrays & results recording
Tutorial 6 queues & arrays & results recording
 
Simulators for Wireless Sensor Networks (OMNeT++)
Simulators for Wireless Sensor Networks (OMNeT++)Simulators for Wireless Sensor Networks (OMNeT++)
Simulators for Wireless Sensor Networks (OMNeT++)
 
Using Omnet++ in Simulating Ad-Hoc Network
Using Omnet++ in Simulating Ad-Hoc Network Using Omnet++ in Simulating Ad-Hoc Network
Using Omnet++ in Simulating Ad-Hoc Network
 
Traffic Classification
Traffic ClassificationTraffic Classification
Traffic Classification
 
Manual
ManualManual
Manual
 
Introduction to om ne t++
Introduction to om ne t++Introduction to om ne t++
Introduction to om ne t++
 
An Introduction to OMNeT++ 5.1
An Introduction to OMNeT++ 5.1An Introduction to OMNeT++ 5.1
An Introduction to OMNeT++ 5.1
 

Similar to Modifying Node Code to Add Custom Packet Headers

maXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazinemaXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazineMax Kleiner
 
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati Python Ireland
 
MQTT enabling the smallest things
MQTT enabling the smallest thingsMQTT enabling the smallest things
MQTT enabling the smallest thingsIan Craggs
 
DMKit_2.0_README_1
DMKit_2.0_README_1DMKit_2.0_README_1
DMKit_2.0_README_1ibtesting
 
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2MLeveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2MBenjamin Cabé
 
WiMAX implementation in ns3
WiMAX implementation in ns3WiMAX implementation in ns3
WiMAX implementation in ns3Mustafa Khaleel
 
Introduction to NS2 - Cont..
Introduction to NS2 - Cont..Introduction to NS2 - Cont..
Introduction to NS2 - Cont..cscarcas
 
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDRob Tweed
 
CloudStack and cloud-init
CloudStack and cloud-initCloudStack and cloud-init
CloudStack and cloud-initMarcusS13
 
An MXM-based Application for Sharing Protected Content
An MXM-based Application for Sharing Protected ContentAn MXM-based Application for Sharing Protected Content
An MXM-based Application for Sharing Protected ContentAlpen-Adria-Universität
 
MQTT in Reactive Blocks
MQTT in Reactive BlocksMQTT in Reactive Blocks
MQTT in Reactive BlocksBitreactive
 
Jafka guide
Jafka guideJafka guide
Jafka guideAdy Liu
 
Maxbox starter18
Maxbox starter18Maxbox starter18
Maxbox starter18Max Kleiner
 

Similar to Modifying Node Code to Add Custom Packet Headers (20)

maXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazinemaXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_Magazine
 
Introduction to Objective - C
Introduction to Objective - CIntroduction to Objective - C
Introduction to Objective - C
 
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
 
MQTT enabling the smallest things
MQTT enabling the smallest thingsMQTT enabling the smallest things
MQTT enabling the smallest things
 
Objective c intro (1)
Objective c intro (1)Objective c intro (1)
Objective c intro (1)
 
Extending ns
Extending nsExtending ns
Extending ns
 
DMKit_2.0_README_1
DMKit_2.0_README_1DMKit_2.0_README_1
DMKit_2.0_README_1
 
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2MLeveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
 
An Introduction to OMNeT++ 6.0
An Introduction to OMNeT++ 6.0An Introduction to OMNeT++ 6.0
An Introduction to OMNeT++ 6.0
 
WiMAX implementation in ns3
WiMAX implementation in ns3WiMAX implementation in ns3
WiMAX implementation in ns3
 
Introduction to NS2 - Cont..
Introduction to NS2 - Cont..Introduction to NS2 - Cont..
Introduction to NS2 - Cont..
 
6. TinyOS_2.pdf
6. TinyOS_2.pdf6. TinyOS_2.pdf
6. TinyOS_2.pdf
 
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
 
CloudStack and cloud-init
CloudStack and cloud-initCloudStack and cloud-init
CloudStack and cloud-init
 
An MXM-based Application for Sharing Protected Content
An MXM-based Application for Sharing Protected ContentAn MXM-based Application for Sharing Protected Content
An MXM-based Application for Sharing Protected Content
 
MQTT in Reactive Blocks
MQTT in Reactive BlocksMQTT in Reactive Blocks
MQTT in Reactive Blocks
 
Jafka guide
Jafka guideJafka guide
Jafka guide
 
INET for Starters
INET for StartersINET for Starters
INET for Starters
 
An Introduction to OMNeT++ 5.4
An Introduction to OMNeT++ 5.4An Introduction to OMNeT++ 5.4
An Introduction to OMNeT++ 5.4
 
Maxbox starter18
Maxbox starter18Maxbox starter18
Maxbox starter18
 

Recently uploaded

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Modifying Node Code to Add Custom Packet Headers

  • 2.  In our network we can’t add more than two nodes.  The reason is that, Node.ned defines only one input gate and one output gate.  The solution is to use gate vectors instead of single gates.  A more advanced solution is to use inout gate, which is basically an input and an output gate glued together.
  • 3.  Let’s modify our plan. When a node decides to transmit a message, it have to select a random destination. Therefore, we need to modify Node.cc file.
  • 4.  Goto to “mynetwork”-> add more nodes -> connect them to each other then run the experiment. As follows:
  • 5.  Depending on the model domain, message objects represent events, packets, commands, jobs, customers or other kinds of entities.  There are cMessage and cPacket Classes.  The cPacket class extends cMessage.  cPacket is used for network packets (frames, datagrams, transport packets, etc.) in a communication network, and cMessage is used for everything else.  For example, encapsulation and decapsulation operations are only used with cPacket.
  • 6.  cMessage *msg = new cMessage();  cMessage *msg = new cMessage("timer");  cMessage *msg = new cMessage("timer", kind);  msg->setKind( kind );  msg->setBitLength( length );  msg->setTimestamp( simtime );  int K = msg->getKind();  int L = msg->getBitLength();  simtime_t T = msg->getTimestamp();  …etc
  • 7.  cMessage *copy = msg->dup(); … one slide… …one line…
  • 8.  Example IP MAC MAC IP
  • 9.  Inspecting cMessage objects (previous code).
  • 10.  Modify Node.cc code to include the encapsulation example.  Save, build and run.
  • 11.  Inspecting cPacekt objects (new code).
  • 12.  Example  Assume that the following cPacket was received as “MACdata”. MAC IP  After using the following decapsulation statement: IP MAC
  • 13.  Assume that you want to add your own header between IP and MAC. MyHeader MAC IP Name ID Year
  • 14.  Assume that you want to add your own header between IP and MAC. MyHeader MAC IP Name ID Year
  • 15.  From Project Explorer: right-click on myproject -> New -> Message Definition (.msg) -> name it (myHeader) -> Next -> Select New Message File -> Next -> Finish.  Add our fields:  Save and Build.
  • 16.  OMNet++ generates .cc and .h (myHeader_m.cc and myHeader_m.h).  Your needs are generated.  How to use it.
  • 17.  To use your new message: At Node.cc 1. Include the needed header. 2. Use “myHeader” as “cPacket” 3. That is it!  Insert it between IP and MAC