[Ns-developers] packet socket tree

Tom Henderson tomh at tomh.org
Sun Aug 5 23:41:06 PDT 2007


Mathieu Lacage wrote:
> hi,
> 
> 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
> email.
> 
> 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 
1021.

> 
> Here is a summary of the changes I performed on that branch:
> Added:
>   - PacketSocketAddress
>   - PacketSocketFactory
>   - PacketSocket
>   - Node::RegisterProtocolHandler
>   - Node::UnregisterProtocolHandler
>   - Eui64Address
> 
> Changed:
>   - pure virtual Node::DoAddDevice -> virtual Node::NotifyDeviceAdded
>   - replace Node::DoCreateTraceResolver with Node::DoFillTraceResolver.
>   - NetDevice rx callback now reports the "from" address of every
> packet.
> 
> 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.

Tom


More information about the Ns-developers mailing list