Opened 17 years ago
Closed 17 years ago
#1684 closed enhancement (fixed)
Add -n option to netstat
Reported by: | mjw | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Command Line Tools | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
I have produced a small patch to src/bin/netstat/netstat.cpp to prevent netstat resolving names. This functionality is enabled by the -n switch as in most other OSs.
Attachments (2)
Change History (6)
by , 17 years ago
Attachment: | netstat.cpp.diff added |
---|
comment:1 by , 17 years ago
Component: | - General → - Applications/Command Line Tools |
---|
comment:2 by , 17 years ago
OK, I'll work on that.
I have also noticed that gethostbyaddr() is called incorrectly. It is being called as: gethostbyaddr((const char *)_address,...), whereas it should be called as gethostbyaddr((const char *)&address.sin_addr,...).
Do you want me to roll that fix into this patch, or should I create a new bug to deal with that?
comment:3 by , 17 years ago
Thanks!
I have also noticed that gethostbyaddr() is called incorrectly.
Nice catch, I've already fixed the problem in hrev23223.
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Absolutely! Thanks, I've applied it in hrev23252. I've only made two minor changes: I removed the superfluous parentheses around "address.sin_addr", and I added you to the list of authors.
Thanks for the patch! I would like to apply it, but there are many coding style related issues - please have a look at http://haiku-os.org/documents/dev/haiku_coding_guidelines and resubmit your patch; a few hints: