Print this page
XXXX adding PID information to netstat output

*** 44,53 **** --- 44,54 ---- #include <sys/types.h> #include <sys/stream.h> #include <sys/t_lock.h> #include <sys/cred.h> + #include <sys/pidnode.h> #include <sys/vnode.h> #include <sys/file.h> #include <sys/param.h> #include <sys/zone.h> #include <sys/sdt.h>
*** 242,251 **** --- 243,256 ---- uint_t so_filter_active; /* # of active fil */ uint_t so_filter_tx; /* pending tx ops */ struct sof_instance *so_filter_top; /* top of stack */ struct sof_instance *so_filter_bottom; /* bottom of stack */ clock_t so_filter_defertime; /* time when deferred */ + + /* pid tree */ + avl_tree_t so_pid_tree; + kmutex_t so_pid_tree_lock; }; #define SO_HAVE_DATA(so) \ /* \ * For the (tid == 0) case we must check so_rcv_{q_,}head \
*** 949,960 **** #endif /* * Internal structure for obtaining sonode information from the socklist. * These types match those corresponding in the sonode structure. ! * This is not a published interface, and may change at any time. */ struct sockinfo { uint_t si_size; /* real length of this struct */ short si_family; short si_type; ushort_t si_flag; --- 954,971 ---- #endif /* * Internal structure for obtaining sonode information from the socklist. * These types match those corresponding in the sonode structure. ! * This is not a published interface, and may change at any time. It is ! * used for passing information back up to the kstat consumers. By converting ! * kernel addresses to strings, we should be able to pass information from ! * the kernel to userland regardless of n-bit kernel we are using. */ + + #define ADRSTRLEN (2 * sizeof (uint64_t) + 1) + struct sockinfo { uint_t si_size; /* real length of this struct */ short si_family; short si_type; ushort_t si_flag;
*** 968,977 **** --- 979,993 ---- uint16_t si_faddr_family; char si_laddr_sun_path[MAXPATHLEN + 1]; /* NULL terminated */ char si_faddr_sun_path[MAXPATHLEN + 1]; boolean_t si_faddr_noxlate; zoneid_t si_szoneid; + char si_son_straddr[ADRSTRLEN]; + char si_lvn_straddr[ADRSTRLEN]; + char si_fvn_straddr[ADRSTRLEN]; + uint_t si_pn_cnt; + pid_t si_pids[1]; }; /* * Subcodes for sockconf() system call */