Date: Mon, 15 Jan 2018 20:37:11 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328014 - head/lib/libsysdecode Message-ID: <201801152037.w0FKbBq2048410@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Mon Jan 15 20:37:11 2018 New Revision: 328014 URL: https://svnweb.freebsd.org/changeset/base/328014 Log: Add support for decoding the nxt_flags, rcv_flags, and snd_flags of SCTP level cmsgs. Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/flags.c head/lib/libsysdecode/sysdecode.h head/lib/libsysdecode/sysdecode_mask.3 Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Mon Jan 15 19:25:11 2018 (r328013) +++ head/lib/libsysdecode/Makefile Mon Jan 15 20:37:11 2018 (r328014) @@ -96,6 +96,9 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ sysdecode_mask.3 sysdecode_semget_flags.3 \ sysdecode_mask.3 sysdecode_sendfile_flags.3 \ sysdecode_mask.3 sysdecode_shmat_flags.3 \ + sysdecode_mask.3 sysdecode_sctp_nxt_flags.3 \ + sysdecode_mask.3 sysdecode_sctp_rcv_flags.3 \ + sysdecode_mask.3 sysdecode_sctp_snd_flags.3 \ sysdecode_mask.3 sysdecode_socket_type.3 \ sysdecode_mask.3 sysdecode_thr_create_flags.3 \ sysdecode_mask.3 sysdecode_umtx_cvwait_flags.3 \ Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Mon Jan 15 19:25:11 2018 (r328013) +++ head/lib/libsysdecode/flags.c Mon Jan 15 20:37:11 2018 (r328014) @@ -1206,6 +1206,40 @@ sysdecode_sctp_pr_policy(int policy) return (lookup_value(sctpprpolicy, policy)); } +static struct name_table sctpsndflags[] = { + X(SCTP_EOF) X(SCTP_ABORT) X(SCTP_UNORDERED) X(SCTP_ADDR_OVER) + X(SCTP_SENDALL) X(SCTP_SACK_IMMEDIATELY) XEND +}; + +bool +sysdecode_sctp_snd_flags(FILE *fp, int flags, int *rem) +{ + + return (print_mask_int(fp, sctpsndflags, flags, rem)); +} + +static struct name_table sctprcvflags[] = { + X(SCTP_UNORDERED) XEND +}; + +bool +sysdecode_sctp_rcv_flags(FILE *fp, int flags, int *rem) +{ + + return (print_mask_int(fp, sctprcvflags, flags, rem)); +} + +static struct name_table sctpnxtflags[] = { + X(SCTP_UNORDERED) X(SCTP_COMPLETE) X(SCTP_NOTIFICATION) XEND +}; + +bool +sysdecode_sctp_nxt_flags(FILE *fp, int flags, int *rem) +{ + + return (print_mask_int(fp, sctpnxtflags, flags, rem)); +} + static struct name_table sctpsinfoflags[] = { X(SCTP_EOF) X(SCTP_ABORT) X(SCTP_UNORDERED) X(SCTP_ADDR_OVER) X(SCTP_SENDALL) X(SCTP_EOR) X(SCTP_SACK_IMMEDIATELY) XEND Modified: head/lib/libsysdecode/sysdecode.h ============================================================================== --- head/lib/libsysdecode/sysdecode.h Mon Jan 15 19:25:11 2018 (r328013) +++ head/lib/libsysdecode/sysdecode.h Mon Jan 15 20:37:11 2018 (r328014) @@ -91,8 +91,11 @@ bool sysdecode_rfork_flags(FILE *_fp, int _flags, int const char *sysdecode_rlimit(int _resource); const char *sysdecode_rtprio_function(int _function); const char *sysdecode_scheduler_policy(int _policy); +bool sysdecode_sctp_nxt_flags(FILE *_fp, int _flags, int *_rem); const char *sysdecode_sctp_pr_policy(int _policy); +bool sysdecode_sctp_rcv_flags(FILE *_fp, int _flags, int *_rem); void sysdecode_sctp_sinfo_flags(FILE *_fp, int _sinfo_flags); +bool sysdecode_sctp_snd_flags(FILE *_fp, int _flags, int *_rem); const char *sysdecode_semctl_cmd(int _cmd); bool sysdecode_semget_flags(FILE *_fp, int _flag, int *_rem); bool sysdecode_sendfile_flags(FILE *_fp, int _flags, int *_rem); Modified: head/lib/libsysdecode/sysdecode_mask.3 ============================================================================== --- head/lib/libsysdecode/sysdecode_mask.3 Mon Jan 15 19:25:11 2018 (r328013) +++ head/lib/libsysdecode/sysdecode_mask.3 Mon Jan 15 20:37:11 2018 (r328014) @@ -50,6 +50,9 @@ .Nm sysdecode_semget_flags , .Nm sysdecode_sendfile_flags , .Nm sysdecode_shmat_flags , +.Nm sysdecode_sctp_nxt_flags , +.Nm sysdecode_sctp_rcv_flags , +.Nm sysdecode_sctp_snd_flags , .Nm sysdecode_socket_type , .Nm sysdecode_thr_create_flags , .Nm sysdecode_umtx_cvwait_flags , @@ -100,6 +103,12 @@ .Ft bool .Fn sysdecode_rfork_flags "FILE *fp" "int flags" "int *rem" .Ft bool +.Fn sysdecode_sctp_nxt_flags "FILE *fp" "int flags" "int *rem" +.Ft bool +.Fn sysdecode_sctp_rcv_flags "FILE *fp" "int flags" "int *rem" +.Ft bool +.Fn sysdecode_sctp_snd_flags "FILE *fp" "int flags" "int *rem" +.Ft bool .Fn sysdecode_semget_flags "FILE *fp" "int flags" "int *rem" .Ft bool .Fn sysdecode_sendfile_flags "FILE *fp" "int flags" "int *rem" @@ -185,6 +194,21 @@ and .Dv F_SETFL .Xr fcntl 2 commands. +.It Fn sysdecode_sctp_nxt_flags +The +.Fa nxt_flags +member of a +.Vt struct sctp_nxtinfo . +.It Fn sysdecode_sctp_rcv_flags +The +.Fa rcv_flags +member of a +.Vt struct sctp_rcvinfo . +.It Fn sysdecode_sctp_snd_flags +The +.Fa snd_flags +member of a +.Vt struct sctp_sndinfo . .It Fn sysdecode_umtx_cvwait_flags The .Fa val
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801152037.w0FKbBq2048410>