On 09/17/10 07:40, goinsane wrote: > Helle Krishnan, > > thank you! I thought it's not possible to store an address of a struct. > Do you know how to extract the current size of the struct? >>From accept(3socket): > > " The argument addrlen is a value-result parameter. Initially, > it contains the amount of space pointed to by addr; on > return it contains the length in bytes of the address > returned. " > > Unfortunately, D returns an error at the copyin: > > dtrace: error on enabled probe ID 2 (ID 28357: fbt:sockfs:accept:return): out > of scratch space in action #1 at DIF offset 52 > > > If I print the value of arg2, it shows incredible 4290770780 .
That's because (just like the accept() call itself), it's actually a pointer to the value, not the value itself. You have to do a copyin(arg2, 4) first. -- James Carlson 42.703N 71.076W <carls...@workingcode.com> _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org