Bug #3262
closedMulticastUdpTransport does not set remoteEndpoint
100%
Description
Transport::Packet::remoteEndpoint
field shall be set to a distinct value for each remote endpoint on a multi-access link on the receive path.
There's no code in MulticastUdpTransport
to set this field.
Updated by Junxiao Shi about 9 years ago
- Blocked by Feature #3168: UdpTransport added
Updated by Junxiao Shi about 9 years ago
- Blocks Task #3172: Refactor Face: completion added
Updated by Junxiao Shi about 9 years ago
- Assignee set to Yukai Tu
This is assigned to Yukai, author of MulticastUdpTransport
.
EndpointId
is a typedef of uint64_t
.
MulticastUdpTransport
is IPv4-only.
Thus, the easiest way of setting endpointId
is to pack remote IPv4 address (32 bits) and remote port number (16 bits) into the 64-bit integer.
A Face/MulticastUdpTransport/Receive
test case should verify the endpointId
for same remote endpoint is the same, and the endpointId
s for different remote endpoints are different.
Updated by Yukai Tu about 9 years ago
Does other transport need this setEndpintId? If so, I would prefer put the calculate method into parent class.
Updated by Junxiao Shi about 9 years ago
Does other transport need this setEndpintId?
MulticastUdpTransport
is currently the only transport that needs to derive EndpointId from an IP address.
The other two IP-based transports, UnicastUdpTransport
and TcpTransport
, are both point-to-point, so they just need to keep EndpointId as zero.
Updated by Yukai Tu about 9 years ago
RemoteEndpoint is for transport who send packet or who receive packet?
Updated by Junxiao Shi about 9 years ago
RemoteEndpoint is for transport who send packet or who receive packet?
EndpointId
is needed on receive path only. It should indicate the sender of a received packet.
Updated by Yukai Tu about 9 years ago
I am not sure it will work because only Transport::packet::packet
is wrote into buffer, field RemoteEndpointId
is not.
Updated by Junxiao Shi about 9 years ago
only
Transport::packet::packet
is wrote into buffer, fieldRemoteEndpointId
is not.
There's no concept of "buffer" at API level.
Transport::Packet::remoteEndpoint
needs to be set correctly when passed to Transport::receive
.
How it's used later is out of scope of this issue.
Updated by Yukai Tu about 9 years ago
Sorry I still can't have a good understanding. Receive logic is in datagram-transport, where does remoteEndpoint come from at this transport?
Updated by Davide Pesavento about 9 years ago
I think we have to use async_receive_from
.
Btw, I can take over this task if you want.
Updated by Yukai Tu about 9 years ago
@Davide:
Thanks! If this task is very urgent, or I can have a try.
I'm sorry for delaying this task.
Updated by Davide Pesavento about 9 years ago
I don't think it's urgent, given that fragmentation/reassembly in GenericLinkService
hasn't been implemented yet. Take your time.
Updated by Junxiao Shi about 9 years ago
- Description updated (diff)
I had a conference call with Yukai on 20151026.
I explained the semantics of Packet::remoteEndpoint
, and why it's needed by NDNLPv2 reassembly.
I suggested the unit testing to be designed as follows:
- construct a
MulticastUdpTransport
to listen on a multicast group - set
IP_MULTICAST_LOOP
option so that packets sent by the local host to the multicast group can be received by the local host - create two UDP sockets on different ports
- send two packets via socket1 to the multicast group, expect two packets received with same
remoteEndpoint
- send one packet via socket2 to the multicast group, expect one packet received with a different
remoteEndpoint
than step4
Updated by Yukai Tu about 9 years ago
I updated my ndn-cxx and NFD, but I still can't build NFD successfully. Here are messages:
In file included from ../tests/daemon/face/websocket-transport.t.cpp:29:0:
../tests/daemon/face/transport-properties.hpp: In function ‘void nfd::face::tests::checkStaticPropertiesInitialized(const nfd::face::Transport&)’:
../tests/daemon/face/transport-properties.hpp:49:1: error: ‘FACE_SCOPE_NONE’ is not a member of ‘ndn::nfd’
../tests/daemon/face/transport-properties.hpp:50:1: error: ‘FACE_PERSISTENCY_NONE’ is not a member of ‘ndn::nfd’
../tests/daemon/face/transport-properties.hpp:51:1: error: ‘LINK_TYPE_NONE’ is not a member of ‘ndn::nfd’
Updated by Davide Pesavento about 9 years ago
are you sure you installed the new ndn-cxx after building it?
Updated by Yukai Tu about 9 years ago
I used command
git clone ssh://myusername@gerrit.named-data.net:29418/ndn-cxx
then
./waf configure
./waf
./waf install
ldconfig
And I still can't build NFD.
Updated by Davide Pesavento about 9 years ago
And was the install step successful? Usually you need sudo
to install, which is missing from your command.
Updated by Yukai Tu about 9 years ago
I used root permission. And all steps successful. I will try to implement environment in another mechine.
Updated by Yukai Tu about 9 years ago
Does latest version of NFD pass the building? I still can't make it...
Updated by Junxiao Shi about 9 years ago
Does latest version of NFD pass the building?
Should be YES.
Refer to Jenkins, or use ndn-cxx-breaks to find out.
Updated by Junxiao Shi about 9 years ago
- Subject changed from MulticastUdpTransport does not set EndpointId to MulticastUdpTransport does not set remoteEndpoint
Updated by Davide Pesavento almost 9 years ago
- Status changed from In Progress to Code review
- Assignee changed from Yukai Tu to Davide Pesavento
- Start date deleted (
10/14/2015) - % Done changed from 50 to 100
Updated by Davide Pesavento almost 9 years ago
- Status changed from Code review to Closed