문제

What's the mean for * when using netstat command to check result?

udp        0      0 10.224.54.76:18253          10.224.2.253:*              ESTABLISHED 30433/wbx

I noticed that there are two results, if there need to create two connections for udp?

udp        0      0 10.224.54.76:18252          10.224.2.253:37008          ESTABLISHED 30433/wbx     
udp        0      0 10.224.54.76:18253          10.224.2.253:*              ESTABLISHED 30433/wbx
도움이 되었습니까?

해결책

* is a wildcard that means anything. So that socket is bound to the local address 10.224.54.76, local port 18253, remote address 10.224.2.253, and will accept packets from any remote port.

In your updated question, the first socket will only receive packets from remote port 37008 to local port 18252. The second socket will receive packets from any remote port to local port 18253.

Both of these come from calling connect() on a UDP socket. In the first case, port 37008 was specified in the remote address, in the second case port 0 was specified, which means any port.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top