A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
sixlowpan-nd-test-utils.h
Go to the documentation of this file.
1
/*
2
* Utility functions for sixlowpan ND tests.
3
* Extracted from sixlowpan-nd-reg-test.cc to reduce duplication and improve reuse.
4
*/
5
#ifndef SIXLOWPAN_ND_TEST_UTILS_H
6
#define SIXLOWPAN_ND_TEST_UTILS_H
7
8
#include "ns3/core-module.h"
9
#include "ns3/internet-module.h"
10
11
#include <list>
12
#include <string>
13
#include <utility>
14
#include <vector>
15
16
namespace
ns3
17
{
18
19
/**
20
* @brief Generate expected routing table output for a star topology.
21
* @param numNodes total number of nodes (1 router + numNodes-1 leaf nodes)
22
* @param time simulation time at which the table is printed
23
* @return the expected routing table string
24
*/
25
std::string
GenerateRoutingTableOutput
(uint32_t numNodes,
Time
time);
26
27
/**
28
* @brief Sort the host-route entries in node 0's routing table block numerically.
29
* @param routingTable the raw routing table string to sort
30
* @return the sorted routing table string
31
*/
32
std::string
SortRoutingTableString
(std::string routingTable);
33
34
/**
35
* @brief Replace STALE with REACHABLE in an NDisc cache output string.
36
* @param ndiscOutput the NDisc cache output to normalize
37
* @return the normalized string
38
*/
39
std::string
NormalizeNdiscCacheStates
(
const
std::string& ndiscOutput);
40
41
/**
42
* @brief Generate expected NDisc cache output for a star topology.
43
* @param numNodes total number of nodes
44
* @param time simulation time at which the cache is printed
45
* @return the expected NDisc cache string
46
*/
47
std::string
GenerateNdiscCacheOutput
(uint32_t numNodes,
Time
time);
48
49
/**
50
* @brief Generate expected binding table output for a star topology.
51
* @param numNodes total number of nodes
52
* @param time simulation time at which the table is printed
53
* @return the expected binding table string
54
*/
55
std::string
GenerateBindingTableOutput
(uint32_t numNodes,
Time
time);
56
57
}
// namespace ns3
58
59
#endif
// SIXLOWPAN_ND_TEST_UTILS_H
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:95
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::SortRoutingTableString
std::string SortRoutingTableString(std::string routingTable)
Sort the host-route entries in node 0's routing table block numerically.
Definition
sixlowpan-nd-test-utils.cc:129
ns3::GenerateNdiscCacheOutput
std::string GenerateNdiscCacheOutput(uint32_t numNodes, Time time)
Generate expected NDisc cache output for a star topology.
Definition
sixlowpan-nd-test-utils.cc:211
ns3::GenerateBindingTableOutput
std::string GenerateBindingTableOutput(uint32_t numNodes, Time time)
Generate expected binding table output for a star topology.
Definition
sixlowpan-nd-test-utils.cc:243
ns3::NormalizeNdiscCacheStates
std::string NormalizeNdiscCacheStates(const std::string &ndiscOutput)
Replace STALE with REACHABLE in an NDisc cache output string.
Definition
sixlowpan-nd-test-utils.cc:203
ns3::GenerateRoutingTableOutput
std::string GenerateRoutingTableOutput(uint32_t numNodes, Time time)
Generate expected routing table output for a star topology.
Definition
sixlowpan-nd-test-utils.cc:77
src
sixlowpan
test
sixlowpan-nd-test-utils.h
Generated on
for ns-3 by
1.15.0