I am trying to capture send and recv system calls using dtrace. The data being sent over these systems is a mixture of ascii and non-ascii.
I would like to be able to print out all that data as hex, regardless of type; the script below does not achieve this. Also, printf terminates the string at the null byte, despite the actual data being sent/recv'd being longer!
Any thoughts? In C, I would just print the entire buffer to file as raw-binary, or iterate through the buffer char-by-char and use '%x'.