On Thu, Oct 21, 2010 at 10:05:42PM +0200, Daniel Veillard wrote:
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,
Ok, pushed this and the other dtrace patch
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://deltacloud.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|