Author: tuexen
Date: Sat Apr  7 21:04:43 2018
New Revision: 332248
URL: https://svnweb.freebsd.org/changeset/base/332248

Log:
  MFC r328014:
  
  Add support for decoding the nxt_flags, rcv_flags, and snd_flags of
  SCTP level cmsgs.

Modified:
  stable/11/lib/libsysdecode/Makefile
  stable/11/lib/libsysdecode/flags.c
  stable/11/lib/libsysdecode/sysdecode.h
  stable/11/lib/libsysdecode/sysdecode_mask.3
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libsysdecode/Makefile
==============================================================================
--- stable/11/lib/libsysdecode/Makefile Sat Apr  7 21:03:46 2018        
(r332247)
+++ stable/11/lib/libsysdecode/Makefile Sat Apr  7 21:04:43 2018        
(r332248)
@@ -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: stable/11/lib/libsysdecode/flags.c
==============================================================================
--- stable/11/lib/libsysdecode/flags.c  Sat Apr  7 21:03:46 2018        
(r332247)
+++ stable/11/lib/libsysdecode/flags.c  Sat Apr  7 21:04:43 2018        
(r332248)
@@ -1204,6 +1204,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: stable/11/lib/libsysdecode/sysdecode.h
==============================================================================
--- stable/11/lib/libsysdecode/sysdecode.h      Sat Apr  7 21:03:46 2018        
(r332247)
+++ stable/11/lib/libsysdecode/sysdecode.h      Sat Apr  7 21:04:43 2018        
(r332248)
@@ -90,8 +90,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: stable/11/lib/libsysdecode/sysdecode_mask.3
==============================================================================
--- stable/11/lib/libsysdecode/sysdecode_mask.3 Sat Apr  7 21:03:46 2018        
(r332247)
+++ stable/11/lib/libsysdecode/sysdecode_mask.3 Sat Apr  7 21:04:43 2018        
(r332248)
@@ -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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to