libvirt/daemon/libvirtd.stp
Daniel P. Berrange 4b16b9c77f Include socket address in client probe data
It is useful to know where the client is connecting from,
so include the socket address in probe data.

* daemon/libvirtd.h: Use virSocketAddr for storing client
  address and keep printable address handy for logging
* daemon/libvirtd.c: Include socket address in client
  connect/disconnect probes
* daemon/probes.d: Add socket address to probes
* examples/systemtap/client.stp: Print socket address
* src/util/network.h: Add sockaddr_un to virSocketAddr union
2010-10-22 12:00:45 +01:00

66 lines
1.4 KiB
Plaintext

probe libvirt.daemon.client.connect = process("libvirtd").mark("client_connect")
{
fd = $arg1;
readonly = $arg2;
localAddr = user_string($arg3);
remoteAddr = user_string($arg4);
}
probe libvirt.daemon.client.disconnect = process("libvirtd").mark("client_disconnect")
{
fd = $arg1;
}
probe libvirt.daemon.client.tls_allow = process("libvirtd").mark("client_tls_allow")
{
fd = $arg1;
x509dname = user_string($arg2);
}
probe libvirt.daemon.client.tls_deny = process("libvirtd").mark("client_tls_deny")
{
fd = $arg1;
x509dname = user_string($arg2);
}
probe libvirt.daemon.client.tls_fail = process("libvirtd").mark("client_tls_fail")
{
fd = $arg1;
}
function authtype_to_string(authtype) {
if (authtype == 0)
return "none"
if (authtype == 1)
return "sasl"
if (authtype == 2)
return "polkit"
return "unknown"
}
probe libvirt.daemon.client.auth_allow = process("libvirtd").mark("client_auth_allow")
{
fd = $arg1;
authtype = $arg2;
authname = authtype_to_string($arg2);
identity = user_string($arg3);
}
probe libvirt.daemon.client.auth_deny = process("libvirtd").mark("client_auth_deny")
{
fd = $arg1;
authtype = $arg2;
authname = authtype_to_string($arg2);
identity = user_string($arg3);
}
probe libvirt.daemon.client.auth_fail = process("libvirtd").mark("client_auth_fail")
{
fd = $arg1;
authtype = $arg2;
authname = authtype_to_string($arg2);
}