- 01 1月, 2011 1 次提交
-
-
由 Laine Stump 提交于
These functions work only for IPv4, becasue IPv6 doesn't have the same concept of "broadcast address" as IPv4. They merely OR the inverse of the netmask with the given host address, thus turning on all the host bits.
-
- 24 12月, 2010 1 次提交
-
-
由 Laine Stump 提交于
virSocketPrefixToNetmask: Given a 'prefix', which is the number of 1 bits in a netmask, fill in a virSocketAddr object with a netmask as an IP address (IPv6 or IPv4). virSocketAddrMask: Mask off the host bits in one virSocketAddr according to the netmask in another virSocketAddr. virSocketAddrMaskByPrefix, Mask off the host bits in a virSocketAddr according to a prefix (number of 1 bits in netmask). VIR_SOCKET_FAMILY: return the family of a virSocketAddr
-
- 02 11月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
They only popped up during --disable-nls build. Without this configure option, gcc wasn't able to detect them.
-
- 22 10月, 2010 5 次提交
-
-
由 Daniel P. Berrange 提交于
The virSocketParse method was not doing any error reporting which meant the true cause of the problem was lost. Remove all error reporting from callers, and push it into virSocketParse * src/util/network.c: Add error reporting to virSocketParse * src/conf/domain_conf.c, src/conf/network_conf.c, src/network/bridge_driver.c: Remove error reporting in callers of virSocketParse
-
由 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.
-
由 Daniel P. Berrange 提交于
There was a typo in the IPv6 path of virSocketCheckNetmask which caused it to never execute. * src/util/network.c: s/AF_INET/AF_INET6/ in virSocketCheckNetmask
-
由 Daniel P. Berrange 提交于
The virSocketParseAddr function was accepting any AF_* constant and using that to set the ai_flags field in struct addrinfo. This is invalid, since address families must go in the ai_family field of the struct. * src/util/network.c: Fix handling of address family * src/conf/network_conf.c, src/network/bridge_driver.c: Pass AF_UNSPEC instead of relying on it being 0.
-
由 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.
-
- 16 9月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* src/util/network.c (getIPv6Addr): Manually join s6_addr bytes, instead of assuming s6_addr16 shorts. Reported by Justin Clifton; solution suggested by Bruno Haible.
-
- 10 8月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
That way it can be used to verify a numeric address without storing the details * src/util/network.c: change virSocketParseAddr to allow a null @addr parameter
-
- 07 4月, 2010 1 次提交
-
-
由 Eric Blake 提交于
git grep found 12 of the former but 100 of the latter in src/. * src/remote/remote_driver.c (initialise_gnutls): Rename... (initialize_gnutls): ...to this. (doRemoteOpen): Adjust caller. * src/xen/xen_driver.c (xenUnifiedOpen): Adjust output string. * src/util/network.c: Adjust comments. Suggested by Matthias Bolte.
-
- 30 3月, 2010 1 次提交
-
-
由 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.
-
- 08 12月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
Fix this warning, there is no need to use an intermediate, different array pointer. network.c: In function 'getIPv6Addr': network.c:50: warning: dereferencing type-punned pointer will break strict-aliasing rules * src/util/network.c: avoid an intermediary pointer cast
-
- 07 11月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
* src/util/network.c: getIPv4Addr() got broken when the input network address value got converted from network to host byte order
-
- 06 11月, 2009 1 次提交
-
-
由 Matthew Booth 提交于
* src/util/network.c: Add htons and ntohs in virSocket(Get|Set)Port
-
- 02 11月, 2009 2 次提交
-
-
由 Matthias Bolte 提交于
__in6_u.__u6_addr16 is the private name for this struct member, s6_addr16 is the public one * src/util/network.c: dont use the private field, but the public one.
-
由 Matthew Booth 提交于
* src/util/network.[ch] Add functions for address->text and get/set port number * src/libvirt_private.syms: add new entry points
-
- 30 10月, 2009 2 次提交
-
-
由 Matthew Booth 提交于
* src/util/network.c: fix a few typo
-
由 Daniel Veillard 提交于
* src/util/network.h src/util/network.c: utilities to parse network addresses, check netmask and compute ranges
-