0

I want to trace bytes written to a socket.

I know I can get fileinfo_t from fds[arg0].

Is there a way to get type of a socket in syscall::write:?

How can I safely transfer this information from syscall::write:entry to syscall::write:return to count bytes written?

techraf
  • 64,883
  • 27
  • 193
  • 198
Andrey
  • 1
  • Why do you need to transfer information to `syscall::write:return` to get the number of bytes written? The return value of all the `syscall:::return` probes is passed in both `arg0` and `arg1`. See http://docs.oracle.com/cd/E19253-01/817-6223/chp-syscall-6/index.html – Andrew Henle Mar 16 '16 at 10:54
  • I meant I need to pass socket type information to return call to construct trace message. – Andrey Mar 21 '16 at 06:34
  • You see I can handle entry and return calls separately. E.g. I can have such log records //entry trace message Google Chrome 600 bytes writing /* some info about socket to which application is writing */ //return trace message Google Chrome 567 bytes written What I want is to have single record Google Chrome 567 bytes written /* some info about socket to which application is writing */ So I need to somehow get socket information in entry call and pass it to return call. – Andrey Mar 21 '16 at 06:45

0 Answers0