getting erl_interface C program to reply to net_adm:ping/1

Peter-Henry Mander erlang@REDACTED
Mon Aug 4 17:02:25 CEST 2003


Hi Valentin,

Hmm, I looked at the net_adm.erl and auth.erl code and did find the 
"yes" you suggest, but I've tried that without success.

Having a look at what happens on the wire, an initial "ok" is sent but 
is followed by a slew of other transactions, including some containing 
net_kernel, $gen_call, is_auth, global_name_server, $gen_cast, 
init_connect etc... in them. Some locking, exchanging and resolving of 
data too, apparently.

It doesn't look as simple as just "yes", there's authentication 
happening too. It's definitely not ICMP 'ping' as we know it on the 
Internet!

Pete.

Valentin wrote:
> Try the following:
> start toolbar, and open process monitor, and localte net_adm process.
> Dobule-klick to start the trace. Then, from your local shell issue command:
> 
> net_adm:ping( node() ).
> 
> According to the trace that I am looking at:
> 
> rec {'$gen_call', {<0.29.0>, #Ref<0.0.0.302>}, {is_auth, 'Val2@REDACTED'}}
> 
> ...
> 
> ! To: <0.29.0> Msg: {#Ref<0.0.0.302>, yes}
> 
> This might be different for C-Nodes, thus try to reply with 'yes'  and see
> what happens.
> 
> Valentin.
> 
> Phartos Consulting (Pty) Ltd.
> 
> ----- Original Message -----
> From: "Peter-Henry Mander" <erlang@REDACTED>
> To: <erlang-questions@REDACTED>
> Sent: Monday, August 04, 2003 3:08 PM
> Subject: getting erl_interface C program to reply to net_adm:ping/1
> 
> 
> 
>>Hi Gurus,
>>
>>I'm locking horns with erl_interface C libraries, and so far I've
>>managed to get most thing to work, thanks to the excellent
>>documentation. But I've stumbled on net_adm:ping/1. I can receive the
>>{is_auth,NodeName} message, but since I don't know how to reply, the
>>pinging end never gets a 'pong' back and just dumbly sits there.
>>
>>What is the appropriate answer to a 'ping', when using erl_interface?
>>
>>Also, what is involved in making a 'C' node behave like a visible node
>>instead of a hidden one?
>>
>>Pete.
>>
>>
>>
> 
> 
> 
> 






More information about the erlang-questions mailing list