Project

General

Profile

Bug #3262

MulticastUdpTransport does not set remoteEndpoint

Added by Junxiao Shi over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Faces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
2.00 h

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.


Related issues

Blocked by NFD - Feature #3168: UdpTransportClosedYukai Tu

Actions
Blocks NFD - Task #3172: Refactor Face: completionClosedJunxiao Shi

Actions
#1

Updated by Junxiao Shi over 4 years ago

#2

Updated by Junxiao Shi over 4 years ago

  • Blocks Task #3172: Refactor Face: completion added
#3

Updated by Junxiao Shi over 4 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 endpointIds for different remote endpoints are different.

#4

Updated by Yukai Tu over 4 years ago

  • Status changed from New to In Progress
#5

Updated by Yukai Tu over 4 years ago

Does other transport need this setEndpintId? If so, I would prefer put the calculate method into parent class.

#6

Updated by Junxiao Shi over 4 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.

#7

Updated by Yukai Tu over 4 years ago

RemoteEndpoint is for transport who send packet or who receive packet?

#8

Updated by Junxiao Shi over 4 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.

#9

Updated by Yukai Tu over 4 years ago

I am not sure it will work because only Transport::packet::packet is wrote into buffer, field RemoteEndpointId is not.

#10

Updated by Junxiao Shi over 4 years ago

only Transport::packet::packet is wrote into buffer, field RemoteEndpointId 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.

#11

Updated by Yukai Tu over 4 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?

#12

Updated by Davide Pesavento over 4 years ago

I think we have to use async_receive_from.

Btw, I can take over this task if you want.

#13

Updated by Yukai Tu over 4 years ago

@Davide:

Thanks! If this task is very urgent, or I can have a try.

I'm sorry for delaying this task.

#14

Updated by Davide Pesavento over 4 years ago

I don't think it's urgent, given that fragmentation/reassembly in GenericLinkService hasn't been implemented yet. Take your time.

#15

Updated by Yukai Tu over 4 years ago

@Davide:

Thanks:)

#16

Updated by Junxiao Shi over 4 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:

  1. construct a MulticastUdpTransport to listen on a multicast group
  2. set IP_MULTICAST_LOOP option so that packets sent by the local host to the multicast group can be received by the local host
  3. create two UDP sockets on different ports
  4. send two packets via socket1 to the multicast group, expect two packets received with same remoteEndpoint
  5. send one packet via socket2 to the multicast group, expect one packet received with a different remoteEndpoint than step4
#17

Updated by Yukai Tu over 4 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’

#18

Updated by Davide Pesavento over 4 years ago

are you sure you installed the new ndn-cxx after building it?

#19

Updated by Yukai Tu over 4 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.

#20

Updated by Davide Pesavento over 4 years ago

And was the install step successful? Usually you need sudo to install, which is missing from your command.

#21

Updated by Yukai Tu over 4 years ago

I used root permission. And all steps successful. I will try to implement environment in another mechine.

#22

Updated by Yukai Tu over 4 years ago

Does latest version of NFD pass the building? I still can't make it...

#23

Updated by Junxiao Shi over 4 years ago

Does latest version of NFD pass the building?

Should be YES.

Refer to Jenkins, or use ndn-cxx-breaks to find out.

#24

Updated by Junxiao Shi over 4 years ago

  • Subject changed from MulticastUdpTransport does not set EndpointId to MulticastUdpTransport does not set remoteEndpoint
#25

Updated by Davide Pesavento over 4 years ago

  • % Done changed from 0 to 50
#26

Updated by Davide Pesavento over 4 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
#27

Updated by Davide Pesavento over 4 years ago

  • Status changed from Code review to Closed

Also available in: Atom PDF