1. 22 10月, 2010 3 次提交
    • D
      Include socket address in client probe data · 4b16b9c7
      Daniel P. Berrange 提交于
      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
      4b16b9c7
    • D
      Expand virSocketFormat to be more flexible · 497adba2
      Daniel P. Berrange 提交于
      The getnameinfo() function is more flexible than inet_ntop()
      avoiding the need to if/else the code based on socket family.
      Also make it support UNIX socket addrs and allow inclusion
      of a port (service) address. Finally do proper error reporting
      via normal APIs.
      
      * src/conf/domain_conf.c, src/nwfilter/nwfilter_ebiptables_driver.c,
        src/qemu/qemu_conf.c: Fix error handling with virSocketFormat
      * src/util/network.c: Rewrite virSocketFormat to use getnameinfo
        and cope with UNIX socket addrs.
      497adba2
    • D
      Include length with virSocketAddr data · af3d4eec
      Daniel P. Berrange 提交于
      Some operations on socket addresses need to know the length of
      the sockaddr struct for the particular address family. This
      info was being discarded when passing around virSocketAddr
      instances. Turn it from a union into a struct containing
      union+socklen_t fields, so length is always kept around.
      
      * src/util/network.h: Add socklen_t field to virSocketAddr
      * src/util/network.c, src/network/bridge_driver.c,
        src/conf/domain_conf.c: Update to take account of new
        struct definition.
      af3d4eec
  2. 30 3月, 2010 1 次提交
    • S
      Use libvirt's existing ipv6/ipv4 parser/printer rather than self-written ones · 0e0f6021
      Stefan Berger 提交于
      This patch changes the network filtering code to use libvirt's existing
      IPv4 and IPv6 address parsers/printers rather than my self-written ones.
      
      I am introducing a new function in network.c that counts the number of
      bits in a netmask and ensures that the given address is indeed a netmask,
      return -1 on error or values of 0-32 for IPv4 addresses and 0-128 for
      IPv6 addresses. I then based the function checking for valid netmask
      on invoking this function.
      0e0f6021
  3. 10 3月, 2010 1 次提交
  4. 23 12月, 2009 1 次提交
  5. 02 11月, 2009 1 次提交
    • M
      More network utility functions · c3cc4f8b
      Matthew Booth 提交于
      * src/util/network.[ch] Add functions for address->text and get/set
        port number
      * src/libvirt_private.syms: add new entry points
      c3cc4f8b
  6. 30 10月, 2009 1 次提交