|
Patch that adds tcp-echo helper, testsuit, example, and so on. With IPv6 support.
We've done a helper.
We added some files under src/applications/model:
tcp-echo-client.cc
tcp-echo-client.h
tcp-echo-server.cc
tcp-echo-server.h
Under src/applications/helper:
tcp-echo-helper.cc
tcp-echo-helper.h
Under src/applications/test:
tcp-echo-test-suite.cc
Under examples/tcp:
tcp-echo-example.cc
Added some code to files address-utils.cc and address-utils.h to print Ipv4 and
Ipv6 address easily (in human readable form), without the need to test what
kind of address they are. Simple to use, just cast the address to
AddressPrinter and ready.
Example:
NS_LOG_INFO ("Received " << packet->GetSize () << " bytes from " << (AddressPrinter)from);
It doesn't matter of what type is the variable "from", if it is Ipv4Address,
Ipv6Address, Address, InetSocketAddress, Inet6SocketAddress, it will print
fine.
I think it will save many if's from source.
Total comments: 14
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1579 lines, -1 line) |
Patch |
 |
A |
examples/tcp/tcp-echo-example.cc
|
View
|
|
1 chunk |
+149 lines, -0 lines |
6 comments
|
Download
|
 |
M |
examples/tcp/wscript
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/applications/helper/tcp-echo-helper.h
|
View
|
|
1 chunk |
+217 lines, -0 lines |
1 comment
|
Download
|
 |
A |
src/applications/helper/tcp-echo-helper.cc
|
View
|
|
1 chunk |
+158 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/applications/model/tcp-echo-client.h
|
View
|
|
1 chunk |
+166 lines, -0 lines |
1 comment
|
Download
|
 |
A |
src/applications/model/tcp-echo-client.cc
|
View
|
|
1 chunk |
+332 lines, -0 lines |
2 comments
|
Download
|
 |
A |
src/applications/model/tcp-echo-server.h
|
View
|
|
1 chunk |
+97 lines, -0 lines |
1 comment
|
Download
|
 |
A |
src/applications/model/tcp-echo-server.cc
|
View
|
|
1 chunk |
+171 lines, -0 lines |
1 comment
|
Download
|
 |
A |
src/applications/test/tcp-echo-test-suite.cc
|
View
|
|
1 chunk |
+181 lines, -0 lines |
1 comment
|
Download
|
 |
M |
src/applications/wscript
|
View
|
|
4 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/network/utils/address-utils.h
|
View
|
|
3 chunks |
+35 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/network/utils/address-utils.cc
|
View
|
|
2 chunks |
+62 lines, -1 line |
1 comment
|
Download
|
Total messages: 1
|