See man page DLPI(7). Try NFSWATCH 4.2 for sample code using DLPI. It is available by ftp from: ftp.ecn.purdue.edu:/pub/davy/nfswatch4.3.tar.gz and gatekeeper.dec.com:/pub/net/ip/nfs/nfswatch4.3.tar.gz
Better yet, FTP the paper "How to Use DLPI in Solaris 2.x" by Neal Nuckolls of Sun Internet Engineering. Look in these FTP directories: opcom.sun.ca:/pub/drivers/dlpi
http://www.freebird.org/hints/papers/{dlpi,npi,tpi}.ps.Z