> Hi,
> 
> I got this problem in the closed source Solaris 5.10 127128-11. I need to 
> dump out the tcp_t of a process, here is what I do:
> 
> 1. do " ::pid2proc | ::pfiles" to get the file descritpor of the tcp 
> connection
> 2. do " ::pid2prod | ::fd | ::print file_t f_vnode | ::print vnode_t v_stream 
> | ::stream" to get the "tail" of the stream:
> > 0t6701 ::pid2proc | ::fd 5 | ::print file_t f_vnode| ::print vnode_t 
> > v_stream
> | ::stream
> 
> +-----------------------+-----------------------+
> | 0xffffffff854efde0 | 0xffffffff854efce8 |
> | strwhead | strrhead |
> | | |
> | cnt = 0t0 | cnt = 0t0 |
> | flg = 0x00004022 | flg = 0x00044030 |
> +-----------------------+-----------------------+
> | ^
> v |
> +-----------------------+-----------------------+
> | 0xffffffff8a650638 | 0xffffffff8a650540 |
> | tcp | tcp |
> | | |
> | cnt = 0t0 | cnt = 0t0 |
> | flg = 0x20244022 | flg = 0x20204032 |
> +-----------------------+-----------------------+
> 
> In opensolaris, this would be a 'conn_t' structure (0xffffffff8a650638) and I 
> can get tcp_t from conn_t->conn_proto_priv.cp_tcp.
> 
> In regular Solaris, the tcp_t points to NULL and is no conn_proto_priv in 
> conn_t. So the question is how do I get tcp_t in regular Solaris?

Look at the box that says 'tcp' - this is the queue of the tcp module. In your 
case it is 0xffffffff8a650638. You should be able to print

0xffffffff8a650638::print queue_t q_ptr

This will show you the conn_t pointer. From here you can get conn_tcp field 
which is the address of tcp_t structure. Note that conn_tcp structure is not 
present in OpenSolaris and you need to use  conn_proto_priv.cp_tcp instead.

- akolb




Reply via email to