[lttng-dev] how to get the sockaddr struct from its pointer in kernel tracing

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Jul 31 12:29:08 EDT 2012


* Rui Han (r.han at umiami.edu) wrote:
> Hi,
> 
> In the sys_connect and sys_bind kernel tracing, a pointer to the socdaddr
> struct has been dumped. (i.e. the second argument in sys_bind: { cpu_id = 0
> }, { fd = 39, umyaddr = 0x7FE18E3D0B80, addrlen = 0xC }). What if I want to
> access the struct for the IP and port number related to the socket? Is
> there an easy way to do this? Please give me some hints. Thank you very
> much.

current, none.

A "quick" way to do this might be to add a tracepoint into these system
calls.

Eventually, we might look into supporting writing complex data
structures into lttng-modules, but this would require close integration
with the Linux kernel sources.

Thanks,

Mathieu

> 
> Regards,
> Rui

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list