[erlang-questions] Inets socket_type, what's ip_comm and how order IPvX sockets?

Ameretat Reith ameretat.reith@REDACTED
Tue Sep 20 09:04:50 CEST 2016


On Tuesday, September 20, 2016 2:10:26 AM IRDT, Kenneth Lakin wrote:
> On 09/19/2016 10:14 AM, Ameretat Reith wrote:
>> Can I (in inets:start call) tell I wan't IPv4 sockets?
>
> I'm pretty sure that adding the tuple
>
> {bind_address, {0,0,0,0}}
>
> to the property list in the inets:start call [0] will create an HTTP
> server that listens for only IPv4 requests. (Feel free to replace the
> IPv4 ANY address with a real address if you only want to listen on a
> particular interface.)

Thanks.  Strangely I can see now tsung opens IPv4 sockets:

tcp        0      0 10.0.3.148:8091         0.0.0.0:*               LISTEN

But packets won't responded, tcpdump:

06:59:04.480107 IP gw.60546 > 10.0.3.148.8091: Flags [S], seq 2442667145, 
win 27200, options [mss 1360,sackOK,TS val 4075095 ecr 0,nop,wscale 7], 
length 0
06:59:04.728993 IP gw.60548 > 10.0.3.148.8091: Flags [S], seq 2593659205, 
win 27200, options [mss 1360,sackOK,TS val 4075345 ecr 0,nop,wscale 7], 
length 0




More information about the erlang-questions mailing list