On 05/05/10 09:20, Jim Mauro wrote:
Hi Steffen - I actually think that code did change quite a bit
from s10 to nv.
I'm not sure what you need to do, but you may want to grab
Brendan's DTraceToolKit and have a look at tcptop and
tcpsnoop, and have a look at how Brendan did it for s10.
Hi Jim, thanks. I did. In the tcp_connect in tcptop he only used arg0.
The connections did not have anything that I could see.
Just tried to run the two, and neither works on 10/09 :(
Steffen
Thanks,
/jim
On May 5, 2010, at 8:21 AM, Steffen Weiberle wrote:
Using Solaris 10, so no IP provider, I am trying to figure out when a
connection attempt is failing in a client. The connect() statement takes
a file descriptor, which is an integer and has no connection details.
Since I don't know if the connect is closely preceded with a bind() or a new
connection may be attempted with the same socket, and thus I won't be capturing
the bin, I can't rely on it to get the sockaddr structure.
(The event happens very infrequently, maybe once a day)
So I am trying tcp_connect FBT probe.
fbt::tcp_connect:entry
{
printf("execname: %s \n", execname);
self->sockaddr = args[1];
printf("family: %x \n", self->sockaddr->sa_family);
}
However, I get
# /var/tmp/connect.d
dtrace: failed to compile script /var/tmp/connect.d: line 32: sa_family
is not a member of struct msgb
Note is says 'msgb', not 'sockaddr'.
I got the args[1] from the OpenSolaris source code (and maybe that is my
problem, since I am running on Solaris 10--did the code change that
much?--seems unlikely)
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/inet/tcp/tcp_socket.c#232
Any good way to grab the IPv4 address and port number on an entry so I
can have it in the situation the connect() fails?
Thanks
Steffen
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org