PDA

View Full Version : Using strace for sendto()



DBQ
October 31st, 2012, 11:01 AM
Hi everybody.

I am using strace to trace my UDP client and server (written in C).

I want to be able to see (using strace) what target port the client specifies in sendto() system call. Is there a way of doing this?

Thanks in advance!

Tony Flury
October 31st, 2012, 02:54 PM
Hi everybody.

I am using strace to trace my UDP client and server (written in C).

I want to be able to see (using strace) what target port the client specifies in sendto() system call. Is there a way of doing this?

Thanks in advance!

According to "man strace" - strace will print the arguments to systems calls - have you actually tried it ?