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(), I
can't rely on it to get the sockaddr structure.
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
_______________________________________________
networking-discuss mailing list
[email protected]