SDNSim
A software-defined network simulator in C++
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Packet Class Reference

Represents a data packet in the SDN simulation. More...

#include <Packet.h>

Public Member Functions

 Packet (const std::string &src, const std::string &dest, const std::string &data)
 Constructs a packet with specified source, destination, and payload.
 

Public Attributes

std::string source
 
std::string destination
 
std::string payload
 

Detailed Description

Represents a data packet in the SDN simulation.

Contains source, destination, and payload information.

Definition at line 9 of file Packet.h.

Constructor & Destructor Documentation

◆ Packet()

Packet::Packet ( const std::string &  src,
const std::string &  dest,
const std::string &  data 
)

Constructs a packet with specified source, destination, and payload.

Constructs a packet with a source, destination, and payload.

< Content or message carried by the packet.

Parameters
srcThe name of the sending device.
destThe name of the receiving device.
dataThe content or message carried by the packet.

Initializes a network packet used in SDNSim to simulate communication between devices.

Parameters
srcName of the device sending the packet.
destName of teh device intended to recieve the packet.
dataThe content or message being transmitted.

Definition at line 12 of file Packet.cpp.

Member Data Documentation

◆ destination

std::string Packet::destination

< Name of the source device sending the packet.

Definition at line 12 of file Packet.h.

◆ payload

std::string Packet::payload

< Name of the destination device receiving the packet.

Definition at line 13 of file Packet.h.

◆ source

std::string Packet::source

Definition at line 11 of file Packet.h.


The documentation for this class was generated from the following files: