[libvirt] [PATCH 2/2] Include socket address in client probe data
Daniel Veillard
veillard at redhat.com
Thu Oct 21 20:05:42 UTC 2010
On Thu, Oct 21, 2010 at 07:19:33PM +0100, Daniel P. Berrange wrote:
> 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
Ah ... that's the reason of the big socket revamp :-)
> * 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
> ---
> configure.ac | 2 +-
> daemon/libvirtd.c | 82 +++++++++++++++++++++-------------------
> daemon/libvirtd.h | 15 +++++--
> daemon/libvirtd.stp | 2 +
> daemon/probes.d | 2 +-
> daemon/remote.c | 2 +-
> examples/systemtap/client.stp | 4 +-
> src/util/network.h | 6 +++
> 8 files changed, 66 insertions(+), 49 deletions(-)
[...]
> static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket *sock) {
> int fd;
> - struct sockaddr_storage addr;
> - socklen_t addrlen = (socklen_t) (sizeof addr);
> + virSocketAddr addr;
> + char *addrstr = NULL;
Patch looks fine, there is actually quite a bit of cleanup too
ACK,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list