[Ns-developers] packet socket tree
tomh at tomh.org
Sun Aug 5 23:41:06 PDT 2007
Mathieu Lacage wrote:
> The http://code.nsnam.org/mathieu/ns-3-packet-socket tree contains the
> merge of emanuelle's packet socket code with the new address changes. It
> implements the changes to the Node base class I proposed in my earlier
> Example code is located in examples/csma-cd-packet-socket.cc and it
> shows how you can send packets to a specific destination mac address
> with Socket::Send.
> Right now, this code is decently solid so, I think it is ready for a
> merge. Once it is merged, I would like to finish for the release the
> other socket API items outlined in the "issues left" section below.
> Comments ?
I've looked at the APIs and example and agree that it looks good to
check in, but I prefer the implicit conversion in ns-3-address changeset
> Here is a summary of the changes I performed on that branch:
> - PacketSocketAddress
> - PacketSocketFactory
> - PacketSocket
> - Node::RegisterProtocolHandler
> - Node::UnregisterProtocolHandler
> - Eui64Address
> - pure virtual Node::DoAddDevice -> virtual Node::NotifyDeviceAdded
> - replace Node::DoCreateTraceResolver with Node::DoFillTraceResolver.
> - NetDevice rx callback now reports the "from" address of every
> Removed (because no longer necessary after the changes to the Node API):
> - L3Demux
> - L3Protocol
> - Ipv4Private
> - ArpPrivate
> Issues left:
> - can remove Ipv4Impl
> - can rename ArpL3Protocol to Arp ?
> - can rename Ipv4L3Protocol to something else ?
> - integrate the other changes suggested by gustavo to the Socket API:
> * replace Recv with SetReceiveCallback and, more generally, add
> callback setter methods, separate from the main API.
> * replace the buffer-based API with a packet-based API.
All of the above seem like reasonable next steps.
More information about the Ns-developers