Skip to content

Tracing getipnodesXXXX calls

December 2, 2009

When I wrote the D script to decode gethostbyname() and gethostbyaddr() library calls I fully intended to proactive write the script to do getipnodebyname() and getipnodebyaddr() and for that matter all the getXbyY routines. However that spare five minutes never arrived so it was only today while investigating a real issue that I had need for a script to decode getipnodebyaddr(). Fortunately taking the other script and modifying to work with getipnodebyXXXX was not that hard.

It can only decode 5 addresses per call before it runs out of space for DIF as it has to do more than the gethostbyXXXX() version since it has to cope with both IPv4 and IPv6 addresses:

dhcp-10-18-9-247-gmp03# dtrace -32 -CZs gethostbyXXXX.d -c "getent ipnodes"
Look up:
      h_address[0]: 0:0:0:0:0:0:0:0:0:0:ff:ff:81:2a:11:67
      h_address[1]: 0:0:0:0:0:0:0:0:0:0:ff:ff:81:2a:12:67
      h_address[2]: 0:0:0:0:0:0:0:0:0:0:ff:ff:81:2a:10:67
dhcp-10-18-9-247-gmp03# dtrace -32 -CZs getipnodebyXXXX.d -c "smbadm list"
      [*] [CJG]
      [*] []
      [] []
      [*] [CJG]
      [S-1-5-21-1782774743-1218725973-889210084] [.]
      [DHCP-10-18-9-24] [S-1-5-21-277162072-319636157-2443625992]
Look up: x6250a-vbox10:

The script is here. Feel free to use it.


From → Solaris

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: