Task #2557
openCreate examples using UDP faces.
10%
Description
Creation of examples using UDP faces. The first step can be to port back the related simple example from ndnSIM 1.0:
https://github.com/named-data/ndnSIM/blob/master-v1/examples/ndn-simple-udp.cc
Updated by Steven Collison almost 10 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
- Estimated time set to 4.00 h
ndn-udp-simple used IpFacesHelper which used IpFaceStack. Neither of these modules seem to be working. Should I try to port both of them to make the example work? It looks like a lot of work to get both of them working.
It looks like the old IpFaceStack did a lot of the socket communication on behalf of the Tcp/Udp faces. Ex: IpFaceStack registers a receive callback with with ns3 socket. Right now I'm registering the receive callback from within the UdpFace. Should I change my current UdpFace implementation to conform to this? Or should I not follow what IpFaceStack does?
Would it be a better idea to try to hack the example without using IpFaceStack?
Updated by Alex Afanasyev almost 10 years ago
You need to make it work in one way or another :)
If you don't want to follow the way it was done before, propose your design and we can comment on that. You has to have an entity that manages Udp/Tcp faces (= listens for incoming connections for TCP, processes incoming UDP packets from new remote addresses). IpFaceStack is one, but not the only option for that. NFD codebase has different design principle that you can follow (this would be UdpChannel and TcpChannel with UdpFactory and TcpFactory to create the channels).
Updated by Steven Collison almost 10 years ago
I think I underestimated the number of changes that need to be made to integrate the new IpFaces! For now I'll try to work with IpFaceStack. I'm a little busy right now(big surprise) but I should have another update later in the week.
Updated by Steven Collison over 9 years ago
I've spent some time adapting the IpFaceStack and the ndn-simple-udp example. I've got it to successfully compile and run, though I'm not sure about the correctness.
A Couple questions:
Isn't this call to bind unnecessary since m_udpserver is already receiving all udp packets? https://github.com/NDN-Routing/ndnSIM/blob/master-v1/plugins/ip-faces/ndn-ip-face-stack.cc#L209
It looks like the SetUp() method is gone, so I just removed the call. Is there a replacement method I need to call? https://github.com/NDN-Routing/ndnSIM/blob/master-v1/plugins/ip-faces/ndn-ip-face-stack.cc#L217
Should ndn-ip-faces-helper be in the helper folder? Or should I put it in model/ip-faces?
Updated by Spyros Mastorakis over 9 years ago
- Assignee changed from Steven Collison to Yuanzhi Gao
Updated by Alex Afanasyev over 8 years ago
- Status changed from In Progress to New
- Assignee deleted (
Yuanzhi Gao)
Updated by Alex Afanasyev over 6 years ago
- Target version changed from 2.1 to 2.7