On 03/09/13 15:00, Nehal J Wani wrote:
On Mon, Sep 2, 2013 at 5:11 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
On Sun, Sep 01, 2013 at 07:13:32PM +0530, Nehal J Wani wrote:
daemon/remote.c
* Define remoteSerializeDomainInterface, remoteDispatchDomainInterfaceAddresses
src/remote/remote_driver.c
* Define remoteDomainInterfaceAddresses
src/remote/remote_protocol.x
* New RPC procedure: REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES
* Define structs remote_domain_ip_addr, remote_domain_interface,
remote_domain_interfaces_addresse_args, remote_domain_interface_addresses_ret
* Introduce upper bounds (to handle DDoS attacks):
REMOTE_DOMAIN_INTERFACE_MAX = 2048
REMOTE_DOMAIN_IP_ADDR_MAX = 2048
Restrictions on the maximum number of aliases per interface were
removed after kernel v2.0, and theoretically, at present, there
are no upper limits on number of interfaces per virtual machine
and on the number of IP addresses per interface.
src/remote_protocol-structs
* New structs added
---
daemon/remote.c | 131 +++++++++++++++++++++++++++++++++++++++++++
src/remote/remote_driver.c | 99 ++++++++++++++++++++++++++++++++
src/remote/remote_protocol.x | 40 ++++++++++++-
src/remote_protocol-structs | 24 ++++++++
4 files changed, 293 insertions(+), 1 deletion(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 6ace7af..7091cab 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -5144,7 +5144,138 @@ cleanup:
+
+static int
+remoteDispatchDomainInterfaceAddresses(
+ virNetServerPtr server ATTRIBUTE_UNUSED,
+ virNetServerClientPtr client,
+ virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessageErrorPtr rerr,
+ remote_domain_interface_addresses_args *args,
+ remote_domain_interface_addresses_ret *ret)
Normal practice for this file is to layout args thus:
static int
remoteDispatchDomainInterfaceAddresses(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr,
remote_domain_interface_addresses_args *args,
remote_domain_interface_addresses_ret *ret)
ACK if the style issue is fixed
Style issue fix (File attached):
diff --git a/daemon/remote.c b/daemon/remote.c
index 7091cab..d46e3ea 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -5230,13 +5230,12 @@ cleanup:
}
static int
-remoteDispatchDomainInterfaceAddresses(
- virNetServerPtr server ATTRIBUTE_UNUSED,
- virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
- virNetMessageErrorPtr rerr,
- remote_domain_interface_addresses_args *args,
- remote_domain_interface_addresses_ret *ret)
+remoteDispatchDomainInterfaceAddresses(virNetServerPtr server ATTRIBUTE_UNUSED,
+ virNetServerClientPtr client,
+ virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessageErrorPtr rerr,
+
remote_domain_interface_addresses_args *args,
+
remote_domain_interface_addresses_ret *ret)
{
size_t i;
int rv = -1;
PS: IMO, other functions like remoteDispatchDomainCreateWithFiles,
remoteDispatchDomainCreateXMLWithFiles,
remoteDispatchDomainMigrateFinish3Params, etc also need same style
change
I don't see problem with the diff applied. Patch is welcomed for the other
style problems.
Osier
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list