Print this page
XXXX adding PID information to netstat output

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/strsubr.h
          +++ new/usr/src/uts/common/sys/strsubr.h
↓ open down ↓ 36 lines elided ↑ open up ↑
  37   37   * contents of this file is that if you include it, your
  38   38   * code will not port to the next release.
  39   39   */
  40   40  #include <sys/stream.h>
  41   41  #include <sys/stropts.h>
  42   42  #include <sys/kstat.h>
  43   43  #include <sys/uio.h>
  44   44  #include <sys/proc.h>
  45   45  #include <sys/netstack.h>
  46   46  #include <sys/modhash.h>
       47 +#include <sys/pidnode.h>
  47   48  
  48   49  #ifdef  __cplusplus
  49   50  extern "C" {
  50   51  #endif
  51   52  
  52   53  /*
  53   54   * In general, the STREAMS locks are disjoint; they are only held
  54   55   * locally, and not simultaneously by a thread.  However, module
  55   56   * code, including at the stream head, requires some locks to be
  56   57   * acquired in order for its safety.
↓ open down ↓ 177 lines elided ↑ open up ↑
 234  235          struct queue    *sd_qhead;      /* Head of queues to be serviced. */
 235  236          struct queue    *sd_qtail;      /* Tail of queues to be serviced. */
 236  237          void            *sd_servid;     /* Service ID for bckgrnd schedule */
 237  238          ushort_t        sd_svcflags;    /* Servicing flags */
 238  239          short           sd_nqueues;     /* Number of queues in the list */
 239  240          kcondvar_t      sd_qcv;         /* Waiters for qhead to become empty */
 240  241          kcondvar_t      sd_zcopy_wait;
 241  242          uint_t          sd_copyflag;    /* copy-related flags */
 242  243          zoneid_t        sd_anchorzone;  /* Allow removal from same zone only */
 243  244          struct msgb     *sd_cmdblk;     /* reply from _I_CMD */
      245 +        list_t          sd_pid_list;
      246 +        kmutex_t        sd_pid_list_lock;
 244  247  } stdata_t;
 245  248  
 246  249  /*
 247  250   * stdata servicing flags.
 248  251   */
 249  252  #define STRS_WILLSERVICE        0x01
 250  253  #define STRS_SCHEDULED          0x02
 251  254  
 252  255  #define STREAM_NEEDSERVICE(stp) ((stp)->sd_qhead != NULL)
 253  256  
↓ open down ↓ 879 lines elided ↑ open up ↑
1133 1136  extern int strrput(queue_t *, mblk_t *);
1134 1137  extern int strrput_nondata(queue_t *, mblk_t *);
1135 1138  extern mblk_t *strrput_proto(vnode_t *, mblk_t *,
1136 1139      strwakeup_t *, strsigset_t *, strsigset_t *, strpollset_t *);
1137 1140  extern mblk_t *strrput_misc(vnode_t *, mblk_t *,
1138 1141      strwakeup_t *, strsigset_t *, strsigset_t *, strpollset_t *);
1139 1142  extern int getiocseqno(void);
1140 1143  extern int strwaitbuf(size_t, int);
1141 1144  extern int strwaitq(stdata_t *, int, ssize_t, int, clock_t, int *);
1142 1145  extern struct stdata *shalloc(queue_t *);
     1146 +extern void sh_insert_pid(struct stdata *, proc_t *);
     1147 +extern void sh_remove_pid(struct stdata *, proc_t *);
     1148 +extern conn_pid_node_list_hdr_t *sh_get_pid_list(struct stdata *);
1143 1149  extern void shfree(struct stdata *s);
1144 1150  extern queue_t *allocq(void);
1145 1151  extern void freeq(queue_t *);
1146 1152  extern qband_t *allocband(void);
1147 1153  extern void freeband(qband_t *);
1148 1154  extern void freebs_enqueue(mblk_t *, dblk_t *);
1149 1155  extern void setqback(queue_t *, unsigned char);
1150 1156  extern int strcopyin(void *, void *, size_t, int);
1151 1157  extern int strcopyout(void *, void *, size_t, int);
1152 1158  extern void strsignal(struct stdata *, int, int32_t);
↓ open down ↓ 195 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX