Feature #3179
closedEndpointId
100%
Description
Develop EndpointId
struct in Face=LinkService+Transport API.
Updated by Junxiao Shi about 9 years ago
- Blocks Feature #3104: NDNLPv2: GenericLinkService encoding/decoding added
Updated by Junxiao Shi about 9 years ago
- Blocks Feature #3168: UdpTransport added
Updated by Junxiao Shi about 9 years ago
- Blocks Feature #3170: EthernetTransport added
Updated by Junxiao Shi about 9 years ago
- Blocked by Task #3088: Refactor Face as LinkService+Transport added
Updated by Junxiao Shi about 9 years ago
- Category set to Faces
- Target version set to v0.4
- Estimated time set to 2.00 h
See #2222 note-32 answer-8 for an explanation on the necessity of NetworkAddress
, and why is appears with every packet in Transport::Packet
struct.
See #2222 note-45 for the design intention of NetworkAddress
.
Quote from that answer:
NetworkAddress
is a data structure that represents an underlying address.
It also has a special value ANY.The exact value of
NetworkAddress
is unimportant because it's neither used byLinkService
nor used by forwarding.
Equality ofNetworkAddress
is important for reassembly on a multi-access link, and for #2108.
Updated by Junxiao Shi about 9 years ago
commit:c2ee303880e6bfd79c107a4cda2cc28194356409 implements NetworkAddress
similar to ns3::Address
, but it has caused disputes, such as:
I'm confused about the NetworkAddress class, and since I can't see how it'll be used I don't know what's the best way to implement it. I'm also slightly worried about adding an overhead of 256 bytes for the two addresses to every packet.
Since all we need is equality comparison, we could do:
NetworkAddress
is declared as a tuple that contains: aTransport
pointer, a numeric index that indicates a peer within theTransport
.A
Transport
that is capable of multi-access links should maintain an internal map from a peer address to a numeric index.
For example, inUdpTransport
:UdpTransport
has an internal map from IP+port to int is maintained.- For each incoming packet, lookup its sourceIP+port in this map.
- If not found, insert sourceIP+port into this map, with a new numeric index (generated from an auto-increment counter).
- The remote
NetworkAddress
is a self pointer, and the numeric index in this map. - Recently unused IP+port can be erased from the map.
This solution has less memory overhead than ns3::Address
design, at the cost of a hashtable.
Updated by Junxiao Shi about 9 years ago
20150908 conference call decides to take an approach similar to note-6.
NetworkAddress
is renamed to Transport::EndpointId
, and is a typedef of uint64_t
.
A Transport
should either fit the address into the 64 bits (enough for IPv4+port or Ethernet MAC address), or use an internal map as described in note-6.
Updated by Junxiao Shi about 9 years ago
- Subject changed from NetworkAddress to EndpointId
- Description updated (diff)
- Status changed from New to In Progress
- Assignee set to Junxiao Shi
Updated by Junxiao Shi about 9 years ago
- Status changed from In Progress to Code review
Updated by Junxiao Shi about 9 years ago
- Status changed from Code review to Closed
- % Done changed from 0 to 100