[erlang-questions] Erlang filtering RARPs?
Wed Jun 25 11:18:07 CEST 2014
I'm not really familiar with Linux, but I guess it's not a procket issue
but Linux kernel issue.
The packet(7) man entry in
says you need to specify a link-level protocol
when calling socket() as:
packet_socket = socket(PF_PACKET, int socket_type, int protocol);
where the protocol number listed in <linux/if_ether.h> as:
#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */
You need to use ETH_P_ALL to check out all types of the packets.
See Erlang source file erts/emulator/drivers/common/inet_drv.c for the
further details. I've found no ETH_P_* stuff defined in OTP-17.0 source
++> Ken Hirata <khirata28@REDACTED> [2014-06-23 19:31:36 -0700]:
> Date: Mon, 23 Jun 2014 19:31:36 -0700
> From: Ken Hirata <khirata28@REDACTED>
> To: erlang-questions@REDACTED
> Subject: [erlang-questions] Erlang filtering RARPs?
> I can't seem to receive RARPs within an Erlang application using procket.
> I can see RARPs on a tcpdump trace running within Ubuntu Linux when the
> Erlang shell isn't executing. RARPs are not recorded once I execute erl.
> The RARPs contain the Ethernet source MAC address in the RARP Sender and
> Target MAC address fields.
> Does invoking Erlang initialize the OS network stack so that RARPs are
> discarded? If so, are there any configuration parameters to change the
> - Ken
> erlang-questions mailing list
More information about the erlang-questions