Print this page
XXXX adding PID information to netstat output

@@ -42,10 +42,11 @@
 #include <sys/kstat.h>
 #include <sys/uio.h>
 #include <sys/proc.h>
 #include <sys/netstack.h>
 #include <sys/modhash.h>
+#include <sys/pidnode.h>
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 

@@ -239,10 +240,15 @@
         kcondvar_t      sd_qcv;         /* Waiters for qhead to become empty */
         kcondvar_t      sd_zcopy_wait;
         uint_t          sd_copyflag;    /* copy-related flags */
         zoneid_t        sd_anchorzone;  /* Allow removal from same zone only */
         struct msgb     *sd_cmdblk;     /* reply from _I_CMD */
+        /*
+         * pids associated with this stream head.
+         */
+        avl_tree_t      sd_pid_tree;
+        kmutex_t        sd_pid_tree_lock;
 } stdata_t;
 
 /*
  * stdata servicing flags.
  */

@@ -1138,10 +1144,13 @@
     strwakeup_t *, strsigset_t *, strsigset_t *, strpollset_t *);
 extern int getiocseqno(void);
 extern int strwaitbuf(size_t, int);
 extern int strwaitq(stdata_t *, int, ssize_t, int, clock_t, int *);
 extern struct stdata *shalloc(queue_t *);
+extern void sh_insert_pid(struct stdata *, pid_t);
+extern void sh_remove_pid(struct stdata *, pid_t);
+extern mblk_t *sh_get_pid_mblk(struct stdata *);
 extern void shfree(struct stdata *s);
 extern queue_t *allocq(void);
 extern void freeq(queue_t *);
 extern qband_t *allocband(void);
 extern void freeband(qband_t *);