Re: [libvirt] [PATCH 2/5] First level of plumbing for virInterface*.

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

 



On Fri, May 08, 2009 at 01:52:24PM -0400, Laine Stump wrote:
> From: Laine Stump <laine@xxxxxxxxxx>
> 
> ---
>  include/libvirt/libvirt.h    |   18 ++
>  include/libvirt/libvirt.h.in |   18 ++
>  include/libvirt/virterror.h  |    4 +
>  src/datatypes.h              |   25 ++
>  src/driver.h                 |   60 ++++
>  src/libvirt.c                |  695 ++++++++++++++++++++++++++++++++++++++++++
>  src/util.h                   |    2 -
>  src/virterror.c              |   21 ++
>  8 files changed, 841 insertions(+), 2 deletions(-)
> 
> diff --git a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h
> index 91af6fd..b0d93a2 100644
> --- a/include/libvirt/libvirt.h
> +++ b/include/libvirt/libvirt.h
> @@ -433,6 +433,24 @@ extern virConnectAuthPtr virConnectAuthPtrDefault;
>  
>  #define VIR_UUID_STRING_BUFLEN (36+1)
>  
> +/**
> + * VIR_MAC_BUFLEN:
> + *
> + * This macro provides the length of the buffer required
> + * for an interface MAC address
> + */
> +
> +#define VIR_MAC_BUFLEN (6)
> +
> +/**
> + * VIR_MAC_STRING_BUFLEN:
> + *
> + * This macro provides the length of the buffer required
> + * for virInterfaceGetMACString()
> + */
> +
> +#define VIR_MAC_STRING_BUFLEN (VIR_MAC_BUFLEN * 3)
> +

Since this is now in our public API, I'm wondering whether we shouldn't
make the buflen longer. 6 bytes is fine with wired ethernet, but I'm
not sure its sufficient for all network device types  in general.

eg, my wmaster0 device has a rather longer hardware address

wmaster0  Link encap:UNSPEC  HWaddr 00-13-02-B9-F9-D3-F4-1F-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
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]