hi

in update 3 the ip_fanout_tcp changed to (I think) ipst->ips_ipcl_conn_fanout. 
This makes pidentd and lsof non-function as those look up this symbol in 
/dev/kmem and map user names (uids) to socket connections using the 
ip_fanout_tcp list of tcp  connections in CONNECTED state.

so I'd like to know if there's any way I can hack pidentd to look this up in 
/dev/kmem now. or alternatively I think this (in-kernel) code snippet should 
work. so if there's no way I'll go in this direction

get_ucred_for_connection(...) {
netstack_handle_t nh;
netstack_t *ns;
connt_t conn;

netstack_next_init(&nh);
while ((ns = netstack_next(&nh)) != NULL) {
   conn = ipcl_lookup_listener_v4(LPORT, LADDR, PROTOCOL, getzoneid(), 
ns->netstat_tcp);
   netstack_rele(ns);
   if (conn != NULL) {
      netstack_next_fini(&nh);
      return conn;
   }
}
netstack_next_fini(&nh);

return NULL;
}

I hope you can comment on whether I can easily list connections by reading 
/dev/kmem in post update3 solaris or if my kernel-module approach (accessed via 
syscall I guess) is correct.

thnx, Roman Divacky
 
 
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to