Bug #6199

rpc(3nsl): The XDR structure formatting needs improvements

Added by Marcel Telka over 3 years ago.

Status:NewStart date:2015-09-03
Priority:LowDue date:
Assignee:-% Done:


Category:manpage - manual pages
Target version:-
Difficulty:Bite-size Tags:needs-triage


The XDR structure in the rpc(3nsl) needs some improvements. It is listed in the man page as follows:

         typedef struct {

         enum xdr_op x_op;    /* operation; fast additional param */
         struct  xdr_ops  {

         bool_t       (*x_getlong)();      /* get long from underlying stream */
         bool_t       (*x_putlong)();      /* put long to underlying stream */
         bool_t       (*x_getbytes)();     /* get bytes from underlying stream */
         bool_t       (*x_putbytes)();     /* put bytes to underlying stream */
         uint_t       (*x_getpostn)();     /* returns bytes off from beginning */
         bool_t       (*x_setpostn)();     /* reposition the stream */
         rpc_inline_t *(*x_inline)();      /* buf quick ptr to buffered data */
         void         (*x_destroy)();      /* free privates of this xdr_stream */
         bool_t       (*x_control)();      /* changed/retrieve client object info*/
         bool_t       (*x_getint32)();     /* get int from underlying stream */
         bool_t       (*x_putint32)();     /* put int to underlying stream */

         } *x_ops;

         caddr_t      x_public;             /* users' data */
         caddr_t      x_priv                /* pointer to private data */
         caddr_t      x_base;               /* private used for position info */
         int          x_handy;              /* extra private word */

Here are the issues:

  • The XDR structure is dumped from usr/src/lib/libbc/inc/include/rpc/xdr.h, which is obsolete, no longer used and not distributed version of the header file. Currently the XDR structure is defined in usr/src/uts/common/rpc/xdr.h.
  • There is missing ending curly bracket between the x_handy member and XDR.
  • The x_priv should be changed to x_private. There is missing semicolon on the same line too.

Also available in: Atom