|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
29 #include "ns3/outputmanager.h"
30 #include "ns3/segmentnum.h"
31 #include "ns3/outputmanager.h"
32 #include "ns3/onionmanager.h"
33 #include "ns3/onionvalidator.h"
35 #include "ns3/mobility-model.h"
36 #include "ns3/core-module.h"
37 #include "ns3/network-module.h"
38 #include "ns3/internet-module.h"
39 #include "ns3/olsr-module.h"
40 #include "ns3/wifi-module.h"
42 #include "ns3/trace-source-accessor.h"
43 #include "ns3/packet.h"
97 void NodeDegree (
double coord_x,
double coord_y);
113 void SendSegment (InetSocketAddress remote, Ptr<Packet> packet,
bool b_onion);
138 Ptr<Packet>
RecvSegment (Ptr<Socket> socket, Address &from);
154 Ptr<Packet>
RecvSeg (Ptr<Socket> socket, Ptr<Packet> p, Address from);
212 void NotifyTx (Ptr<const Packet> packet);
221 void NotifyRx (Ptr<const Packet> packet);
uint16_t f_mss
maximum segment size
int f_segmentSize
the size of the whole packet
Ptr< Socket > m_socket
listening socket
Ptr< Packet > RecvSegment(Ptr< Socket > socket)
method for receiving a segment calls ns3::Wsn_node::RecvSeg()
int o_hopCount
track how the onion is is transiting in the network
Class that manages encryption keys and the encryption and decryption of layers of onion messagess The...
int o_sequenceNum
sequence number of the onion, should be same as onion_id
void SendSegment(InetSocketAddress remote, Ptr< Packet > packet, bool b_onion)
Send a packet through a TCP connection to the remote address.
uint32_t getNodeDelay(Ipv4Address node_address)
compute when the node should start the handshake process from the node ip address Used to not generat...
Ptr< OnionValidator > m_onionValidator
Pointer to the ns3::OnionValidator.
TracedCallback< Ptr< const Packet > > m_appTx
traced callback for packet transmission
Ipv4Address m_address
ns3::Ipv4Address of this node
Ptr< Packet > f_pendingPacket
pointer to the packet where received segment fragments are stored
virtual void StopApplication(void)
Stop the application.
uint16_t m_onionTimeout
timer in seconds, if elepsed and the onion was not recieved by the next receiver, then delete the oni...
void NotifyRx(Ptr< const Packet > packet)
Call to signal the receipt of a Packet at the application layer.
OnionManager m_onionManager
The ns3::OnionManager object.
Ptr< OutputManager > m_outputManager
Pointer to the ns3::OutputManager.
void DisableNode()
The method disables the node.
void CheckSentOnion(int count)
The method checks if the onion was received by the next receiving node If the onion was not received ...
TracedCallback< Ptr< const Packet > > m_appRx
traced callback for packet receipt
uint16_t m_port
port of the application
void ActivateNode()
The method re-activates a node that was disabled using the DisableNode() method.
The wsn node base class that manages the sending and receiving of packets and basic configuration of ...
virtual void StartApplication(void)
Start the application.
static TypeId GetTypeId(void)
Register this type.
Wsn_node()
Default constructor.
void NotifyTx(Ptr< const Packet > packet)
Call to signal the transmission of a Packet at the application layer.
void OnionReceived(void)
Signal to the ns3::OnionValidator that the onion was corrctly received.
void NodeDegree(double coord_x, double coord_y)
Retrieve the degreee this node from the OLSR routing protocol.
Ptr< Packet > RecvSeg(Ptr< Socket > socket, Ptr< Packet > p, Address from)
method for receiving packets able to merge segment fragments if a packet was split into multiple segm...
Ipv4Address f_receivingAddress
the receiving address
uint16_t m_delay
delay after which the handshake process will start