about Erlang C Node monitor

Yu-Teh Shen <>
Mon Dec 14 08:36:05 CET 2009

I have read doc about how to write a simple C node.

But what I should do if I want to *monitor* the C node like all other Erlang
node and make erlang *connects*, *net_adm:ping* works?

I think I need to handle the message in my C node loop. But which file I
should check to find out the format of communication to Erlang Node.

Could anyone give me some direction?

Thanks a lot!

        got = erl_receive_msg(fd, buf, BUFSIZE, &emsg);
        printf("got =%d\n", got);
        if (got == ERL_TICK)
            /* ignore */
        else if(got == ERL_ERROR)
            if(emsg.type == ERL_REG_SEND)
                     // check whether it's the monitor message
                     // or it's the normal message  which i should handle


Shen, Yu-Teh

More information about the erlang-questions mailing list