Ephemeral Port 是自動配置的近端 IP L4 通訊埠 (local port),作為當下通訊暫時使用。
ephemeral:無常的、短命的、短暫的
IANA 建議範圍 49152 ~ 65535,Linux 使用 32768 ~ 60999,可用
echo "49152 65535" > /proc/sys/net/ipv4/ip_local_port_range
更改範圍,實際上是存在陣列 sysctl_local_port_range 的兩個數字。
如何配置?
bind() 指定 local port
inet_hash_connect() @net/ipv4/inet_hashtables.c:
inet6_hash_connect() @net/ipv6/inet6_hashtables.c:local port 未指定時,範圍內從小到大...
__udp_lib_get_port() @net/ipv4/udp.c
inet_csk_get_port() @net/ipv4/inet_connection_sock.c
selinux_socket_bind() @security/selinux/hooks.c:不在範圍內時 ...
問題:
可針對不同 net_device 而有不同範圍?
最後更新:20200721
訂閱:
張貼留言 (Atom)
SIP header Via
所有 SIP 訊息 都要有 Via,縮寫 v。一開始的 UAC 和後續途經的每個 proxy 都會疊加一個 Via 放傳送的位址,依序作為回應的路徑。 格式 sent-protocol sent-by [ ;branch= branch ][ ; 參數 ...] s...
-
列出目錄的檔案。 opendir(目錄) 或 fdopendir(fd) 開啟一個 directory stream (DIR),包含此目錄的所有檔案 (含目錄)。readdir(DIR *) 自 directory stream 取得一個檔案,用 struct direct ...
-
-l:輸出 Long Listing 格式,包括下列資訊: 檔案 type and permissions:有 10 個字母,第 1 個字母是 file type: -:一般檔案 b:block device c:character device d:direct...
-
APRS(Automatic Packet Reporting System)字面翻是「自動封包回報系統」,其實是「自動位置回報系統』,是業餘無線電結合全球衛星定位系統 (GPS),以 AFSK AX.25 通訊模式回報給世界各地的 APRS 接收電台,電台再透過網際網路上傳到 ...
沒有留言:
張貼留言