Home | History | Annotate | Download | only in net
      1 //
      2 // Copyright (C) 2013 The Android Open Source Project
      3 //
      4 // Licensed under the Apache License, Version 2.0 (the "License");
      5 // you may not use this file except in compliance with the License.
      6 // You may obtain a copy of the License at
      7 //
      8 //      http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unless required by applicable law or agreed to in writing, software
     11 // distributed under the License is distributed on an "AS IS" BASIS,
     12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 // See the License for the specific language governing permissions and
     14 // limitations under the License.
     15 //
     16 
     17 #ifndef SHILL_NET_CONTROL_NETLINK_ATTRIBUTE_H_
     18 #define SHILL_NET_CONTROL_NETLINK_ATTRIBUTE_H_
     19 
     20 #include <base/macros.h>
     21 
     22 #include "shill/net/netlink_attribute.h"
     23 
     24 struct nlattr;
     25 
     26 namespace shill {
     27 
     28 // Control.
     29 
     30 class ControlAttributeFamilyId : public NetlinkU16Attribute {
     31  public:
     32   static const int kName;
     33   static const char kNameString[];
     34   ControlAttributeFamilyId() : NetlinkU16Attribute(kName, kNameString) {}
     35 
     36  private:
     37   DISALLOW_COPY_AND_ASSIGN(ControlAttributeFamilyId);
     38 };
     39 
     40 class ControlAttributeFamilyName : public NetlinkStringAttribute {
     41  public:
     42   static const int kName;
     43   static const char kNameString[];
     44   ControlAttributeFamilyName() : NetlinkStringAttribute(kName, kNameString) {}
     45 
     46  private:
     47   DISALLOW_COPY_AND_ASSIGN(ControlAttributeFamilyName);
     48 };
     49 
     50 class ControlAttributeVersion : public NetlinkU32Attribute {
     51  public:
     52   static const int kName;
     53   static const char kNameString[];
     54   ControlAttributeVersion() : NetlinkU32Attribute(kName, kNameString) {}
     55 
     56  private:
     57   DISALLOW_COPY_AND_ASSIGN(ControlAttributeVersion);
     58 };
     59 
     60 class ControlAttributeHdrSize : public NetlinkU32Attribute {
     61  public:
     62   static const int kName;
     63   static const char kNameString[];
     64   ControlAttributeHdrSize() : NetlinkU32Attribute(kName, kNameString) {}
     65 
     66  private:
     67   DISALLOW_COPY_AND_ASSIGN(ControlAttributeHdrSize);
     68 };
     69 
     70 class ControlAttributeMaxAttr : public NetlinkU32Attribute {
     71  public:
     72   static const int kName;
     73   static const char kNameString[];
     74   ControlAttributeMaxAttr() : NetlinkU32Attribute(kName, kNameString) {}
     75 
     76  private:
     77   DISALLOW_COPY_AND_ASSIGN(ControlAttributeMaxAttr);
     78 };
     79 
     80 class ControlAttributeAttrOps : public NetlinkNestedAttribute {
     81  public:
     82   static const int kName;
     83   static const char kNameString[];
     84   ControlAttributeAttrOps();
     85 
     86  private:
     87   DISALLOW_COPY_AND_ASSIGN(ControlAttributeAttrOps);
     88 };
     89 
     90 class ControlAttributeMcastGroups : public NetlinkNestedAttribute {
     91  public:
     92   static const int kName;
     93   static const char kNameString[];
     94   ControlAttributeMcastGroups();
     95 
     96  private:
     97   DISALLOW_COPY_AND_ASSIGN(ControlAttributeMcastGroups);
     98 };
     99 
    100 }  // namespace shill
    101 
    102 #endif  // SHILL_NET_CONTROL_NETLINK_ATTRIBUTE_H_
    103