Re: [PATCHv5 2/5] domifaddr: Implement the remote protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



-- 
Nehal J Wani
UG3, BTech CS+MS(CL)
IIIT-Hyderabad
http://commandlinewani.blogspot.com

Attachment: 2.diff
Description: Binary data

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]