[libvirt] [PATCH V1 1/3] Implement virMacAddrIsBroadcastRaw

Stefan Berger stefanb at linux.vnet.ibm.com
Fri Aug 31 10:37:29 UTC 2012


On 08/30/2012 11:33 PM, Daniel Veillard wrote:
> On Thu, Aug 30, 2012 at 02:29:49PM -0400, Stefan Berger wrote:
>> Index: libvirt-acl/src/util/virmacaddr.h
>> ===================================================================
>> --- libvirt-acl.orig/src/util/virmacaddr.h
>> +++ libvirt-acl/src/util/virmacaddr.h
>> @@ -52,4 +52,6 @@ int virMacAddrParse(const char* str,
>>                       virMacAddrPtr addr) ATTRIBUTE_RETURN_CHECK;
>>   bool virMacAddrIsUnicast(const virMacAddrPtr addr);
>>   bool virMacAddrIsMulticast(const virMacAddrPtr addr);
>> +bool virMacAddrIsBroadcastRaw(const unsigned char s[VIR_MAC_BUFLEN]);
>> +
>    Humpf, we really ought to add virMacAddrIsBroadcast instead, but
> I understand from patch 3/3 that you don't have the structure handy
> at that point (and doing a pointer cast to an inexistant structure
> would be ugly), so okay for the purpose of fixing that bug, but
> I would expect a followup patch with a proper
>
>    bool virMacAddrIsBroadcast(const virMacAddrPtr addr);
>
> added too

Yes, had thought of that but since there's no caller at the moment, I 
skipped it.

>
>>   #endif /* __VIR_MACADDR_H__ */
>> Index: libvirt-acl/src/libvirt_private.syms
>> ===================================================================
>> --- libvirt-acl.orig/src/libvirt_private.syms
>> +++ libvirt-acl/src/libvirt_private.syms
>> @@ -1329,6 +1329,7 @@ virMacAddrCompare;
>>   virMacAddrFormat;
>>   virMacAddrGenerate;
>>   virMacAddrGetRaw;
>> +virMacAddrIsBroadcastRaw;
>>   virMacAddrIsMulticast;
>>   virMacAddrIsUnicast;
>>   virMacAddrParse;
> ACK,
>
> Daniel
>

Thanks. Will push.




More information about the libvir-list mailing list