Page MenuHomeFreeBSD

netstat: remove gethostby*() calls
Needs ReviewPublic

Authored by yanhaowang on Jul 9 2024, 3:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 14, 8:02 AM
Unknown Object (File)
Mon, Apr 14, 3:48 AM
Unknown Object (File)
Mon, Apr 14, 1:32 AM
Unknown Object (File)
Sun, Apr 13, 9:11 PM
Unknown Object (File)
Tue, Apr 1, 1:04 AM
Unknown Object (File)
Mar 20 2025, 11:22 AM
Unknown Object (File)
Feb 7 2025, 7:41 AM
Unknown Object (File)
Jan 18 2025, 1:57 AM
Subscribers

Details

Reviewers
hrs
lwhsu
Summary

Use getnameinfo with NI_NAMEREQD flag to replace gethostbyaddr.

Test Plan

I just check netstat -4 output and it look similar (just similar because it seem the network status is change anytime) with the origin output.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningusr.bin/netstat/inet.c:CHMOD1Invalid Executable
Unit
No Test Coverage
Build Status
Buildable 58577
Build 55465: arc lint + arc unit