getting erl_interface C program to reply to net_adm:ping/1
Thu Aug 7 18:54:01 CEST 2003
I have found that now my C-node replies to net_adm:ping/1 it only
appears in the hidden node list. In order to communicate with a C-node,
epmd must be running, and any other Erlang-node can send and receive
messages to the C-node. So running epmd is not sufficient.
The phrase "register themselves with epmd" seems to imply more than
simply being pingable. The C function erl_publish is used to "register
with the local name server epmd", but even though I do this, the C-node
remains hidden, and only appears in the hidden node list after a ping.
Should I be using erl_global_register? What Pid should I give to
globally register a C-node under a name? What kind of process id can a
C-node have? The example in chapter 1.1.10 gives an example:
pid = erl_mk_pid(thisnode,14,0,0);
Apparently the number, serial, and creation values (14,0,0) are
arbitrary. I'll try this and give some feedback.
Rick Pettit wrote:
> On Mon, Aug 04, 2003 at 02:08:36PM +0100, Peter-Henry Mander wrote:
>>Also, what is involved in making a 'C' node behave like a visible node
>>instead of a hidden one?
> Haven't gotten that far yet but the docs (Erl Interface User's Guide) seem to
> 1.7 Using EPMD
> Epmd is the Erlang Port Mapper Daemon. Distributed Erlang nodes register with
> epmd on the localhost to indicate to other nodes that they exist and can accept
> connections. Epmd maintains a register of node and port number information, and
> when a node wishes to connect to another node, it first contacts epmd in order
> to find out the correct port number to connect to.
> When you use erl_connect() to connect to an Erlang node, a connection is first
> made to epmd and, if the node is known, a connection is then made to the Erlang
> *** C nodes can also register themselves with epmd if they want other nodes in
> the system to be able to find and connect to them. ***
> I put ***'s around the pertinent part. Seems to indicate that the node is no
> longer "hidden", but again I have not yet tested this. I will try get back to
> you when I have.
More information about the erlang-questions