On 1/10/17 6:40 PM, David Miller wrote:
> From: David Ahern <d...@cumulusnetworks.com>
> Date: Mon,  9 Jan 2017 13:32:50 -0800
> 
>> diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
>> index 8c93ad1ef9ab..471384b72cea 100644
>> --- a/include/uapi/linux/rtnetlink.h
>> +++ b/include/uapi/linux/rtnetlink.h
>> @@ -319,6 +319,8 @@ enum rtattr_type_t {
>>      RTA_EXPIRES,
>>      RTA_PAD,
>>      RTA_UID,
>> +    RTA_ROUTE_GET,  /* nested attribute; route spec for RTM_GETROUTE */
>> +    RTA_ROUTE_GET_RTM, /* struct rtmsg for nested spec */
>>      __RTA_MAX
>>  };
> 
> The nested attribute and the attributes within that nested attribute
> live in two different attribute number namespaces.
> 
> So usually we allocate the nested attribute at the top level in the
> main enumeration.  Then the elements within the nested attribute
> get allocated with a new enumeration created specifically for items
> inside that nested attribute.
> 
> For example, RTA_METRICS --> RTAX_*
> 
> So please arrange things this way.

ok. I did it this way for code re-use since the nested attribute is a route 
spec. If separate attributes for the nest are desired I'll do that.

Reply via email to