Project

General

Profile

Actions

Bug #3262

closed

MulticastUdpTransport does not set remoteEndpoint

Added by Junxiao Shi about 9 years ago. Updated almost 9 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 2 (0 open2 closed)

Blocked by NFD - Feature #3168: UdpTransportClosedYukai Tu

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

Actions
Actions #1

Updated by Junxiao Shi about 9 years ago

Actions #2

Updated by Junxiao Shi about 9 years ago

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

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 endpointIds for different remote endpoints are different.

Actions #4

Updated by Yukai Tu about 9 years ago

  • Status changed from New to In Progress
Actions #5

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.

Actions #6

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.

Actions #7

Updated by Yukai Tu about 9 years ago

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

Actions #8

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.

Actions #9

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.

Actions #10

Updated by Junxiao Shi about 9 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.

Actions #11

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?

Actions #12

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.

Actions #13

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.

Actions #14

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.

Actions #15

Updated by Yukai Tu about 9 years ago

@Davide:

Thanks:)

Actions #16

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:

  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
Actions #17

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’

Actions #18

Updated by Davide Pesavento about 9 years ago

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

Actions #19

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.

Actions #20

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.

Actions #21

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.

Actions #22

Updated by Yukai Tu about 9 years ago

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

Actions #23

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.

Actions #24

Updated by Junxiao Shi about 9 years ago

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

Updated by Davide Pesavento about 9 years ago

  • % Done changed from 0 to 50
Actions #26

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
Actions #27

Updated by Davide Pesavento almost 9 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF