git: 1f3d8c09be67 - main - procstat: fix printing divert(4) sockets
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 30 Aug 2022 23:43:02 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1f3d8c09be67f9b01f60b3e6434780c193228567 commit 1f3d8c09be67f9b01f60b3e6434780c193228567 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2022-08-30 23:26:21 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2022-08-30 23:26:21 +0000 procstat: fix printing divert(4) sockets --- usr.bin/procstat/procstat.1 | 12 ++++++++---- usr.bin/procstat/procstat_files.c | 5 +++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1 index 65299c7f07e9..b24ac3957f8f 100644 --- a/usr.bin/procstat/procstat.1 +++ b/usr.bin/procstat/procstat.1 @@ -414,10 +414,6 @@ The following network protocols may be displayed (grouped by address family): .Dv IPPROTO_ICMP ; see .Xr icmp 4 . -.It IPD -.Dv IPPROTO_DIVERT ; -see -.Xr divert 4 . .It IP? unknown protocol. .It RAW @@ -453,6 +449,14 @@ see unknown protocol. .El .Pp +.Dv AF_DIVERT +.Pp +.Bl -tag -width indent -compact +.It IPD +.Dv Divert socket; see +.Xr divert 4 . +.El +.Pp .Bl -tag -width indent -compact .It ? unknown address family. diff --git a/usr.bin/procstat/procstat_files.c b/usr.bin/procstat/procstat_files.c index 1d7b419b3f4a..c7306b6a2a1d 100644 --- a/usr.bin/procstat/procstat_files.c +++ b/usr.bin/procstat/procstat_files.c @@ -68,8 +68,6 @@ protocol_to_string(int domain, int type, int protocol) return ("RAW"); case IPPROTO_SCTP: return ("SCT"); - case IPPROTO_DIVERT: - return ("IPD"); default: return ("IP?"); } @@ -83,6 +81,9 @@ protocol_to_string(int domain, int type, int protocol) default: return ("UD?"); } + case AF_DIVERT: + return ("IPD"); + break; default: return ("?"); }