Port TcpFace and UdpFace to the new code base
#3 Updated by Steven Collison about 4 years ago
- I plan on trying to port ndn-udp-face first since it's simpler
- I'll use ndn-net-device-face as a baseline
- To receive data, should I be registering a receive callback with the underlying transport mechanism(ns3 socket?)
- What is the point of TcpBoundaryHeader in ndn-tcp-face? Is it used for debugging or do we actually need to add an extra header ? (https://github.com/NDN-Routing/ndnSIM/blob/master-v1/plugins/ip-faces/ndn-tcp-face.cc)
#4 Updated by Spyros Mastorakis about 4 years ago
1) To my understanding, the answer is yes, you will need to use the ns3 socket class, but you will have to replace the existing Face class with the Face class of NFD and, in general, overload the methods of the nfd::Face class. For example, the RegisterProtocolHandlers and UnRegisterProtocolHandlers methods do not exist anymore.
2) To my understanding again by looking at the source code, Alex has made some tricks (or "magic" as he likes to call it :)) and actually sends two NS3 packets. The first one contains the segment length at its header and the second one is the actual TCP segment:
I guess that he did that to make the sending the receiving process easier.
@Alex: feel free to correct me, if I have said something wrong. Actually, I have not worked enough with these TCP, IP and UDP faces in order to be 100% sure that the things I have said are fully correct.
#5 Updated by Alex Afanasyev about 4 years ago
To receive data, should I be registering a receive callback with the underlying transport mechanism(ns3 socket?)
Yes, though I don't really understand this question. With TCP face, you need to communicate through tcp tunnel, not raw network interface like in NetDeviceFace.
What is the point of TcpBoundaryHeader in ndn-tcp-face? Is it used for debugging or do we actually need to add an extra header ?
This could be my question for you in cs118 :) This additional header was useful with old packet format (as there was no indication about message length in the packet format itself). With new packet format, it is no longer needed.
#6 Updated by Steven Collison about 4 years ago
I noticed NetDeviceFace increments a FwHopCountTag before sending a packet. Should the Udp/Tcp Faces also increment the hop count? https://github.com/NDN-Routing/ndnSIM/blob/master/model/ndn-net-device-face.cpp#L84-L87
#15 Updated by Alex Afanasyev about 3 years ago
- Target version deleted (
To follow up on this issue. There is no immediate plan to implement this feature. Effects of overlay simulations (such as varying overlay link bandwidths, cross traffic, etc.) is better simulated directly using Loss and Delay models on p2p or mcast links.