anchor.diff:  %% api
   -export([handle_packet/1,
            handle_datagram/2,
  +         get_messages/1,
            get_peer_uri/1,
            get_endpoint/1,
  -         get_messages/1,
            get_peer_channel/1,
            get_swarm_options/1,
            unpack/3,
            pack/1]).
   
  --opaque endpoint() :: {endpoint, list(endpoint_option())}.
  --opaque uri() :: {uri, string()}.
  --opaque endpoint_option() :: {ip, inet:ip_address()}
  -| {socket, inet:socket()}
  -| {port, inet:port_number()}
  -| {transport, udp}
  -| uri()
  -| ppspp_channel:channel().
  --opaque datagram() :: {datagram, list(endpoint() | ppspp_message:messages())}.
  +-opaque endpoint() :: #{ uri => string(),
  +                         ip => inet:ip_address(),
  +                         socket => inet:socket(),
  +                         port => inet:port_number(),
  +                         transport => udp,
  +                         channel => ppspp_channel:channel()}.
  +-opaque datagram() :: #{ endpoint => endpoint(),
  +                         messages =>
  +                         ppspp_message:messages()}.
  +-type uri() :: string().
   -export_type([endpoint/0,
  -              endpoint_option/0,
  -              uri/0,
                 datagram/0]).
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
positive.code:     Channel_Name = convert:int_to_hex(ppspp_channel:get_channel_id(Channel)),
      Peer_as_String = peer_to_string(IP, Port),
      Endpoint_as_URI = lists:concat([ Peer_as_String, "#", Channel_Name]),
      {endpoint, orddict:from_list([{ip, IP},
                                    Channel,
                                    {port, Port},
                                    {uri, Endpoint_as_URI},
                                    {transport, udp},
                                    {socket, Socket} ])}.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% @doc given an endpoint, returns the associated data e.g. uri or channel
  
negative.code:     Peer_Requested_Swarm_Options = get_swarm_options(Datagram),
      {Datagram, Peer_Requested_Swarm_Options}.
  
  -spec unpack_on_existing_channel(ppspp_channel:channel(),
                                   binary(),
                                   endpoint()) ->
      {datagram(), ppspp_options:options()}.
  unpack_on_existing_channel(Channel, Maybe_Datagram, Endpoint) ->
      {ok, Swarm_id} = ppspp_channel:get_swarm_id(Channel),
  