anchor.diff:      register_node(Name,?DUMMY_PORT).
   
   register_node(Name, Port) ->
  -    case connect() of
  +    case send_req([?EPMD_ALIVE_REQ, put16(Port), Name]) of
   	{ok,Sock} ->
  -	    M = [?EPMD_ALIVE_REQ, put16(Port), Name],
  -	    case send(Sock, [size16(M), M]) of
  -		ok ->
  -		    case recv(Sock,3) of
  -			{ok, [?EPMD_ALIVE_OK_RESP,_D1,_D0]} ->
  -			    {ok,Sock};
  -			Other ->
  -			    test_server:format("recv on sock ~w: ~p~n",
  -					       [Sock,Other]),
  -			    error
  -		    end;
  +	    case recv(Sock,3) of
  +		{ok, [?EPMD_ALIVE_OK_RESP,_D1,_D0]} ->
  +		    {ok,Sock};
   		Other ->
  -		    test_server:format("send on sock ~w: ~w~n",[Sock,Other]),
  +		    test_server:format("recv on sock ~w: ~p~n",
  +				       [Sock,Other]),
   		    error
   	    end;
  +	error ->
  +	    error
  +    end.
  +
  +register_node_v2(Port, NodeType, Prot, HVsn, LVsn, Name, Extra) ->
  +    Req = [?EPMD_ALIVE2_REQ, put16(Port), NodeType, Prot,
  +	   put16(HVsn), put16(LVsn),
  +	   size16(Name), Name,
  +	   size16(Extra), Extra],
  +    case send_req(Req) of
  +	{ok,Sock} ->
  +	    case recv(Sock,4) of
  +		{ok, [?EPMD_ALIVE2_RESP,_Res=0,_C0,_C1]} ->
  +		    {ok,Sock};
  +		Other ->
  +		    test_server:format("recv on sock ~w: ~p~n",
  +				       [Sock,Other]),
  +		    error
  +	    end;
  +	error ->
  +	    error
  +    end.
  +
  +% Internal function to fetch information about a node
  +
  +port_please_v2(Name) ->
  +    case send_req([?EPMD_PORT_PLEASE2_REQ, Name]) of
  +	{ok,Sock} ->
  +	    case recv_until_sock_closes(Sock) of
  +		{ok, Resp} ->
  +		    parse_port2_resp(Resp);
  +		Other ->
  +		    test_server:format("recv on sock ~w: ~p~n",
  +				       [Sock,Other]),
  +		    error
  +	    end;
  +	error ->
  +	    error
  +    end.
  +
  +parse_port2_resp(Resp) ->
  +    case list_to_binary(Resp) of
  +	<<?EPMD_PORT2_RESP,Res,Port:16,NodeType,Prot,HVsn:16,LVsn:16,
  +	  NLen:16,NodeName:NLen/binary,
  +	  ELen:16,Extra:ELen/binary>> when Res =:= 0 ->
  +	    {ok, #node_info{port=Port,node_type=NodeType,prot=Prot,
  +			    hvsn=HVsn,lvsn=LVsn,
  +			    node_name=binary_to_list(NodeName),
  +			    extra=binary_to_list(Extra)}};
   	Other ->
  -	    test_server:format("Connect on port ~w: ~p~n",[Port,Other]),
  +	    test_server:format("invalid port2 resp: ~p~n",
  +			       [Resp]),
   	    error
       end.
  -
  -
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
  
positive.code: %%
  %% %CopyrightBegin%
  %% 
  %% Copyright Ericsson AB 1998-2009. All Rights Reserved.
  %% 
  %% The contents of this file are subject to the Erlang Public License,
  %% Version 1.1, (the "License"); you may not use this file except in
  %% compliance with the License. You should have received a copy of the
  %% Erlang Public License along with this software. If not, it can be
  %% retrieved online at http://www.erlang.org/.
  %% 
  %% Software distributed under the License is distributed on an "AS IS"
  %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  %% the License for the specific language governing rights and limitations
  %% under the License.
  %% 
  %% %CopyrightEnd%
  %%
  -module(epmd_SUITE).
  
negative.code:     too_large/1,
      alive_req_too_small_1/1,
      alive_req_too_small_2/1,
      alive_req_too_large/1,
  
      returns_valid_empty_extra/1,
      returns_valid_populated_extra_with_nulls/1
     ]).
  
  
  