1 // 2 // Copyright (C) 2012 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_NL80211_ATTRIBUTE_H_ 18 #define SHILL_NET_NL80211_ATTRIBUTE_H_ 19 20 #include <string> 21 22 #include <base/macros.h> 23 24 #include "shill/net/netlink_attribute.h" 25 #include "shill/net/netlink_message.h" 26 27 struct nlattr; 28 29 namespace shill { 30 31 // U8. 32 33 class Nl80211AttributeDfsRegion : public NetlinkU8Attribute { 34 public: 35 static const int kName; 36 static const char kNameString[]; Nl80211AttributeDfsRegion()37 Nl80211AttributeDfsRegion() : NetlinkU8Attribute(kName, kNameString) {} 38 39 private: 40 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeDfsRegion); 41 }; 42 43 class Nl80211AttributeKeyIdx : public NetlinkU8Attribute { 44 public: 45 static const int kName; 46 static const char kNameString[]; Nl80211AttributeKeyIdx()47 Nl80211AttributeKeyIdx() : NetlinkU8Attribute(kName, kNameString) {} 48 49 private: 50 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeKeyIdx); 51 }; 52 53 class Nl80211AttributeMaxMatchSets : public NetlinkU8Attribute { 54 public: 55 static const int kName; 56 static const char kNameString[]; Nl80211AttributeMaxMatchSets()57 Nl80211AttributeMaxMatchSets() : NetlinkU8Attribute(kName, kNameString) {} 58 59 private: 60 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxMatchSets); 61 }; 62 63 class Nl80211AttributeMaxNumPmkids : public NetlinkU8Attribute { 64 public: 65 static const int kName; 66 static const char kNameString[]; Nl80211AttributeMaxNumPmkids()67 Nl80211AttributeMaxNumPmkids() : NetlinkU8Attribute(kName, kNameString) {} 68 69 private: 70 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxNumPmkids); 71 }; 72 73 class Nl80211AttributeMaxNumScanSsids : public NetlinkU8Attribute { 74 public: 75 static const int kName; 76 static const char kNameString[]; Nl80211AttributeMaxNumScanSsids()77 Nl80211AttributeMaxNumScanSsids() : NetlinkU8Attribute(kName, kNameString) {} 78 79 private: 80 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxNumScanSsids); 81 }; 82 83 class Nl80211AttributeMaxNumSchedScanSsids : public NetlinkU8Attribute { 84 public: 85 static const int kName; 86 static const char kNameString[]; Nl80211AttributeMaxNumSchedScanSsids()87 Nl80211AttributeMaxNumSchedScanSsids() 88 : NetlinkU8Attribute(kName, kNameString) {} 89 90 private: 91 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxNumSchedScanSsids); 92 }; 93 94 class Nl80211AttributeRegType : public NetlinkU8Attribute { 95 public: 96 static const int kName; 97 static const char kNameString[]; Nl80211AttributeRegType()98 Nl80211AttributeRegType() : NetlinkU8Attribute(kName, kNameString) {} 99 100 private: 101 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeRegType); 102 }; 103 104 class Nl80211AttributeWiphyCoverageClass : public NetlinkU8Attribute { 105 public: 106 static const int kName; 107 static const char kNameString[]; Nl80211AttributeWiphyCoverageClass()108 Nl80211AttributeWiphyCoverageClass() 109 : NetlinkU8Attribute(kName, kNameString) {} 110 111 private: 112 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyCoverageClass); 113 }; 114 115 class Nl80211AttributeWiphyRetryLong : public NetlinkU8Attribute { 116 public: 117 static const int kName; 118 static const char kNameString[]; Nl80211AttributeWiphyRetryLong()119 Nl80211AttributeWiphyRetryLong() : NetlinkU8Attribute(kName, kNameString) {} 120 121 private: 122 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyRetryLong); 123 }; 124 125 class Nl80211AttributeWiphyRetryShort : public NetlinkU8Attribute { 126 public: 127 static const int kName; 128 static const char kNameString[]; Nl80211AttributeWiphyRetryShort()129 Nl80211AttributeWiphyRetryShort() : NetlinkU8Attribute(kName, kNameString) {} 130 131 private: 132 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyRetryShort); 133 }; 134 135 // U16. 136 137 class Nl80211AttributeMaxScanIeLen : public NetlinkU16Attribute { 138 public: 139 static const int kName; 140 static const char kNameString[]; Nl80211AttributeMaxScanIeLen()141 Nl80211AttributeMaxScanIeLen() : NetlinkU16Attribute(kName, kNameString) {} 142 143 private: 144 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxScanIeLen); 145 }; 146 147 class Nl80211AttributeMaxSchedScanIeLen : public NetlinkU16Attribute { 148 public: 149 static const int kName; 150 static const char kNameString[]; Nl80211AttributeMaxSchedScanIeLen()151 Nl80211AttributeMaxSchedScanIeLen() 152 : NetlinkU16Attribute(kName, kNameString) {} 153 154 private: 155 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxSchedScanIeLen); 156 }; 157 158 class Nl80211AttributeReasonCode : public NetlinkU16Attribute { 159 public: 160 static const int kName; 161 static const char kNameString[]; Nl80211AttributeReasonCode()162 Nl80211AttributeReasonCode() : NetlinkU16Attribute(kName, kNameString) {} 163 164 private: 165 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeReasonCode); 166 }; 167 168 class Nl80211AttributeStatusCode : public NetlinkU16Attribute { 169 public: 170 static const int kName; 171 static const char kNameString[]; Nl80211AttributeStatusCode()172 Nl80211AttributeStatusCode() : NetlinkU16Attribute(kName, kNameString) {} 173 174 private: 175 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeStatusCode); 176 }; 177 178 // U32. 179 180 class Nl80211AttributeDuration : public NetlinkU32Attribute { 181 public: 182 static const int kName; 183 static const char kNameString[]; Nl80211AttributeDuration()184 Nl80211AttributeDuration() : NetlinkU32Attribute(kName, kNameString) {} 185 186 private: 187 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeDuration); 188 }; 189 190 class Nl80211AttributeDeviceApSme : public NetlinkU32Attribute { 191 public: 192 static const int kName; 193 static const char kNameString[]; Nl80211AttributeDeviceApSme()194 Nl80211AttributeDeviceApSme() : NetlinkU32Attribute(kName, kNameString) {} 195 196 private: 197 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeDeviceApSme); 198 }; 199 200 class Nl80211AttributeFeatureFlags : public NetlinkU32Attribute { 201 public: 202 static const int kName; 203 static const char kNameString[]; Nl80211AttributeFeatureFlags()204 Nl80211AttributeFeatureFlags() : NetlinkU32Attribute(kName, kNameString) {} 205 206 private: 207 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeFeatureFlags); 208 }; 209 210 class Nl80211AttributeGeneration : public NetlinkU32Attribute { 211 public: 212 static const int kName; 213 static const char kNameString[]; Nl80211AttributeGeneration()214 Nl80211AttributeGeneration() : NetlinkU32Attribute(kName, kNameString) {} 215 216 private: 217 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeGeneration); 218 }; 219 220 class Nl80211AttributeIfindex : public NetlinkU32Attribute { 221 public: 222 static const int kName; 223 static const char kNameString[]; Nl80211AttributeIfindex()224 Nl80211AttributeIfindex() : NetlinkU32Attribute(kName, kNameString) {} 225 226 private: 227 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeIfindex); 228 }; 229 230 class Nl80211AttributeIftype : public NetlinkU32Attribute { 231 public: 232 static const int kName; 233 static const char kNameString[]; Nl80211AttributeIftype()234 Nl80211AttributeIftype() : NetlinkU32Attribute(kName, kNameString) {} 235 236 private: 237 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeIftype); 238 }; 239 240 class Nl80211AttributeKeyType : public NetlinkU32Attribute { 241 public: 242 static const int kName; 243 static const char kNameString[]; Nl80211AttributeKeyType()244 Nl80211AttributeKeyType() : NetlinkU32Attribute(kName, kNameString) {} 245 246 private: 247 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeKeyType); 248 }; 249 250 class Nl80211AttributeMaxRemainOnChannelDuration : public NetlinkU32Attribute { 251 public: 252 static const int kName; 253 static const char kNameString[]; Nl80211AttributeMaxRemainOnChannelDuration()254 Nl80211AttributeMaxRemainOnChannelDuration() 255 : NetlinkU32Attribute(kName, kNameString) {} 256 257 private: 258 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxRemainOnChannelDuration); 259 }; 260 261 class Nl80211AttributeProbeRespOffload : public NetlinkU32Attribute { 262 public: 263 static const int kName; 264 static const char kNameString[]; Nl80211AttributeProbeRespOffload()265 Nl80211AttributeProbeRespOffload() 266 : NetlinkU32Attribute(kName, kNameString) {} 267 268 private: 269 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeProbeRespOffload); 270 }; 271 272 // Set SHILL_EXPORT to allow unit tests to instantiate these. 273 class SHILL_EXPORT Nl80211AttributeRegInitiator : public NetlinkU32Attribute { 274 public: 275 static const int kName; 276 static const char kNameString[]; Nl80211AttributeRegInitiator()277 Nl80211AttributeRegInitiator() : NetlinkU32Attribute(kName, kNameString) {} 278 bool InitFromValue(const ByteString& data) override; 279 280 private: 281 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeRegInitiator); 282 }; 283 284 class Nl80211AttributeWiphy : public NetlinkU32Attribute { 285 public: 286 static const int kName; 287 static const char kNameString[]; Nl80211AttributeWiphy()288 Nl80211AttributeWiphy() : NetlinkU32Attribute(kName, kNameString) {} 289 290 private: 291 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphy); 292 }; 293 294 class Nl80211AttributeWiphyAntennaAvailRx : public NetlinkU32Attribute { 295 public: 296 static const int kName; 297 static const char kNameString[]; Nl80211AttributeWiphyAntennaAvailRx()298 Nl80211AttributeWiphyAntennaAvailRx() 299 : NetlinkU32Attribute(kName, kNameString) {} 300 301 private: 302 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyAntennaAvailRx); 303 }; 304 305 class Nl80211AttributeWiphyAntennaAvailTx : public NetlinkU32Attribute { 306 public: 307 static const int kName; 308 static const char kNameString[]; Nl80211AttributeWiphyAntennaAvailTx()309 Nl80211AttributeWiphyAntennaAvailTx() 310 : NetlinkU32Attribute(kName, kNameString) {} 311 312 private: 313 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyAntennaAvailTx); 314 }; 315 316 class Nl80211AttributeWiphyAntennaRx : public NetlinkU32Attribute { 317 public: 318 static const int kName; 319 static const char kNameString[]; Nl80211AttributeWiphyAntennaRx()320 Nl80211AttributeWiphyAntennaRx() : NetlinkU32Attribute(kName, kNameString) {} 321 322 private: 323 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyAntennaRx); 324 }; 325 326 class Nl80211AttributeWiphyAntennaTx : public NetlinkU32Attribute { 327 public: 328 static const int kName; 329 static const char kNameString[]; Nl80211AttributeWiphyAntennaTx()330 Nl80211AttributeWiphyAntennaTx() : NetlinkU32Attribute(kName, kNameString) {} 331 332 private: 333 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyAntennaTx); 334 }; 335 336 class Nl80211AttributeWiphyFragThreshold : public NetlinkU32Attribute { 337 public: 338 static const int kName; 339 static const char kNameString[]; Nl80211AttributeWiphyFragThreshold()340 Nl80211AttributeWiphyFragThreshold() 341 : NetlinkU32Attribute(kName, kNameString) {} 342 343 private: 344 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyFragThreshold); 345 }; 346 347 class Nl80211AttributeWiphyFreq : public NetlinkU32Attribute { 348 public: 349 static const int kName; 350 static const char kNameString[]; Nl80211AttributeWiphyFreq()351 Nl80211AttributeWiphyFreq() : NetlinkU32Attribute(kName, kNameString) {} 352 353 private: 354 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyFreq); 355 }; 356 357 class Nl80211AttributeChannelType : public NetlinkU32Attribute { 358 public: 359 static const int kName; 360 static const char kNameString[]; Nl80211AttributeChannelType()361 Nl80211AttributeChannelType() : NetlinkU32Attribute(kName, kNameString) {} 362 363 private: 364 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeChannelType); 365 }; 366 367 class Nl80211AttributeChannelWidth : public NetlinkU32Attribute { 368 public: 369 static const int kName; 370 static const char kNameString[]; Nl80211AttributeChannelWidth()371 Nl80211AttributeChannelWidth() : NetlinkU32Attribute(kName, kNameString) {} 372 373 private: 374 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeChannelWidth); 375 }; 376 377 class Nl80211AttributeCenterFreq1 : public NetlinkU32Attribute { 378 public: 379 static const int kName; 380 static const char kNameString[]; Nl80211AttributeCenterFreq1()381 Nl80211AttributeCenterFreq1() : NetlinkU32Attribute(kName, kNameString) {} 382 383 private: 384 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeCenterFreq1); 385 }; 386 387 class Nl80211AttributeCenterFreq2 : public NetlinkU32Attribute { 388 public: 389 static const int kName; 390 static const char kNameString[]; Nl80211AttributeCenterFreq2()391 Nl80211AttributeCenterFreq2() : NetlinkU32Attribute(kName, kNameString) {} 392 393 private: 394 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeCenterFreq2); 395 }; 396 397 class Nl80211AttributeWiphyRtsThreshold : public NetlinkU32Attribute { 398 public: 399 static const int kName; 400 static const char kNameString[]; Nl80211AttributeWiphyRtsThreshold()401 Nl80211AttributeWiphyRtsThreshold() 402 : NetlinkU32Attribute(kName, kNameString) {} 403 404 private: 405 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyRtsThreshold); 406 }; 407 408 // U64. 409 410 class Nl80211AttributeCookie : public NetlinkU64Attribute { 411 public: 412 static const int kName; 413 static const char kNameString[]; Nl80211AttributeCookie()414 Nl80211AttributeCookie() : NetlinkU64Attribute(kName, kNameString) {} 415 416 private: 417 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeCookie); 418 }; 419 420 // Flag. 421 422 class Nl80211AttributeControlPortEthertype : public NetlinkFlagAttribute { 423 public: 424 static const int kName; 425 static const char kNameString[]; Nl80211AttributeControlPortEthertype()426 Nl80211AttributeControlPortEthertype() 427 : NetlinkFlagAttribute(kName, kNameString) {} 428 429 private: 430 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeControlPortEthertype); 431 }; 432 433 class Nl80211AttributeDisconnectedByAp : public NetlinkFlagAttribute { 434 public: 435 static const int kName; 436 static const char kNameString[]; Nl80211AttributeDisconnectedByAp()437 Nl80211AttributeDisconnectedByAp() : 438 NetlinkFlagAttribute(kName, kNameString) {} 439 440 private: 441 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeDisconnectedByAp); 442 }; 443 444 class Nl80211AttributeOffchannelTxOk : public NetlinkFlagAttribute { 445 public: 446 static const int kName; 447 static const char kNameString[]; Nl80211AttributeOffchannelTxOk()448 Nl80211AttributeOffchannelTxOk() 449 : NetlinkFlagAttribute(kName, kNameString) {} 450 451 private: 452 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeOffchannelTxOk); 453 }; 454 455 class Nl80211AttributeRoamSupport : public NetlinkFlagAttribute { 456 public: 457 static const int kName; 458 static const char kNameString[]; Nl80211AttributeRoamSupport()459 Nl80211AttributeRoamSupport() : NetlinkFlagAttribute(kName, kNameString) {} 460 461 private: 462 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeRoamSupport); 463 }; 464 465 class Nl80211AttributeSupportApUapsd : public NetlinkFlagAttribute { 466 public: 467 static const int kName; 468 static const char kNameString[]; Nl80211AttributeSupportApUapsd()469 Nl80211AttributeSupportApUapsd() 470 : NetlinkFlagAttribute(kName, kNameString) {} 471 472 private: 473 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeSupportApUapsd); 474 }; 475 476 class Nl80211AttributeSupportIbssRsn : public NetlinkFlagAttribute { 477 public: 478 static const int kName; 479 static const char kNameString[]; Nl80211AttributeSupportIbssRsn()480 Nl80211AttributeSupportIbssRsn() 481 : NetlinkFlagAttribute(kName, kNameString) {} 482 483 private: 484 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeSupportIbssRsn); 485 }; 486 487 class Nl80211AttributeSupportMeshAuth : public NetlinkFlagAttribute { 488 public: 489 static const int kName; 490 static const char kNameString[]; Nl80211AttributeSupportMeshAuth()491 Nl80211AttributeSupportMeshAuth() : 492 NetlinkFlagAttribute(kName, kNameString) {} 493 494 private: 495 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeSupportMeshAuth); 496 }; 497 498 class Nl80211AttributeTdlsExternalSetup : public NetlinkFlagAttribute { 499 public: 500 static const int kName; 501 static const char kNameString[]; Nl80211AttributeTdlsExternalSetup()502 Nl80211AttributeTdlsExternalSetup() 503 : NetlinkFlagAttribute(kName, kNameString) {} 504 505 private: 506 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeTdlsExternalSetup); 507 }; 508 509 class Nl80211AttributeTdlsSupport : public NetlinkFlagAttribute { 510 public: 511 static const int kName; 512 static const char kNameString[]; Nl80211AttributeTdlsSupport()513 Nl80211AttributeTdlsSupport() : NetlinkFlagAttribute(kName, kNameString) {} 514 515 private: 516 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeTdlsSupport); 517 }; 518 519 class Nl80211AttributeTimedOut : public NetlinkFlagAttribute { 520 public: 521 static const int kName; 522 static const char kNameString[]; Nl80211AttributeTimedOut()523 Nl80211AttributeTimedOut() : NetlinkFlagAttribute(kName, kNameString) {} 524 525 private: 526 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeTimedOut); 527 }; 528 529 // String. 530 531 class Nl80211AttributeRegAlpha2 : public NetlinkStringAttribute { 532 public: 533 static const int kName; 534 static const char kNameString[]; Nl80211AttributeRegAlpha2()535 Nl80211AttributeRegAlpha2() : NetlinkStringAttribute(kName, kNameString) {} 536 537 private: 538 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeRegAlpha2); 539 }; 540 541 class Nl80211AttributeWiphyName : public NetlinkStringAttribute { 542 public: 543 static const int kName; 544 static const char kNameString[]; Nl80211AttributeWiphyName()545 Nl80211AttributeWiphyName() : NetlinkStringAttribute(kName, kNameString) {} 546 547 private: 548 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyName); 549 }; 550 551 // Nested. 552 553 class Nl80211AttributeBss : public NetlinkNestedAttribute { 554 public: 555 static const int kName; 556 static const char kNameString[]; 557 // These are sorted alphabetically. 558 static const int kChallengeTextAttributeId; 559 static const int kChannelsAttributeId; 560 static const int kCountryInfoAttributeId; 561 static const int kDSParameterSetAttributeId; 562 static const int kErpAttributeId; 563 static const int kExtendedRatesAttributeId; 564 static const int kHtCapAttributeId; 565 static const int kHtInfoAttributeId; 566 static const int kPowerCapabilityAttributeId; 567 static const int kPowerConstraintAttributeId; 568 static const int kRequestAttributeId; 569 static const int kRsnAttributeId; 570 static const int kSsidAttributeId; 571 static const int kSupportedRatesAttributeId; 572 static const int kTpcReportAttributeId; 573 static const int kVendorSpecificAttributeId; 574 static const int kVhtCapAttributeId; 575 static const int kVhtInfoAttributeId; 576 577 Nl80211AttributeBss(); 578 579 private: 580 static bool ParseInformationElements(AttributeList* attribute_list, 581 size_t id, 582 const std::string& attribute_name, 583 ByteString data); 584 585 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeBss); 586 }; 587 588 class Nl80211AttributeCqm : public NetlinkNestedAttribute { 589 public: 590 static const int kName; 591 static const char kNameString[]; 592 Nl80211AttributeCqm(); 593 594 private: 595 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeCqm); 596 }; 597 598 class Nl80211AttributeRegRules : public NetlinkNestedAttribute { 599 public: 600 static const int kName; 601 static const char kNameString[]; 602 Nl80211AttributeRegRules(); 603 604 private: 605 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeRegRules); 606 }; 607 608 class Nl80211AttributeScanFrequencies : public NetlinkNestedAttribute { 609 public: 610 static const int kName; 611 static const char kNameString[]; 612 Nl80211AttributeScanFrequencies(); 613 614 private: 615 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeScanFrequencies); 616 }; 617 618 class Nl80211AttributeScanSsids : public NetlinkNestedAttribute { 619 public: 620 static const int kName; 621 static const char kNameString[]; 622 Nl80211AttributeScanSsids(); 623 624 private: 625 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeScanSsids); 626 }; 627 628 class Nl80211AttributeStaInfo : public NetlinkNestedAttribute { 629 public: 630 static const int kName; 631 static const char kNameString[]; 632 Nl80211AttributeStaInfo(); 633 634 private: 635 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeStaInfo); 636 }; 637 638 class Nl80211AttributeSupportedIftypes : public NetlinkNestedAttribute { 639 public: 640 static const int kName; 641 static const char kNameString[]; 642 Nl80211AttributeSupportedIftypes(); 643 644 private: 645 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeSupportedIftypes); 646 }; 647 648 class Nl80211AttributeWiphyBands : public NetlinkNestedAttribute { 649 public: 650 static const int kName; 651 static const char kNameString[]; 652 Nl80211AttributeWiphyBands(); 653 654 private: 655 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyBands); 656 }; 657 658 #if !defined(DISABLE_WAKE_ON_WIFI) 659 class Nl80211AttributeWowlanTriggers : public NetlinkNestedAttribute { 660 public: 661 static const int kName; 662 static const char kNameString[]; 663 explicit Nl80211AttributeWowlanTriggers( 664 NetlinkMessage::MessageContext context); 665 666 private: 667 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWowlanTriggers); 668 }; 669 670 class Nl80211AttributeWowlanTriggersSupported : public NetlinkNestedAttribute { 671 public: 672 static const int kName; 673 static const char kNameString[]; 674 Nl80211AttributeWowlanTriggersSupported(); 675 676 private: 677 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWowlanTriggersSupported); 678 }; 679 #endif // DISABLE_WAKE_ON_WIFI 680 681 // Raw. 682 683 class Nl80211AttributeCipherSuites : public NetlinkRawAttribute { 684 public: 685 static const int kName; 686 static const char kNameString[]; Nl80211AttributeCipherSuites()687 Nl80211AttributeCipherSuites() : NetlinkRawAttribute(kName, kNameString) {} 688 689 private: 690 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeCipherSuites); 691 }; 692 693 class Nl80211AttributeFrame : public NetlinkRawAttribute { 694 public: 695 static const int kName; 696 static const char kNameString[]; Nl80211AttributeFrame()697 Nl80211AttributeFrame() : NetlinkRawAttribute(kName, kNameString) {} 698 699 private: 700 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeFrame); 701 }; 702 703 class Nl80211AttributeHtCapabilityMask : public NetlinkRawAttribute { 704 public: 705 static const int kName; 706 static const char kNameString[]; Nl80211AttributeHtCapabilityMask()707 Nl80211AttributeHtCapabilityMask() 708 : NetlinkRawAttribute(kName, kNameString) {} 709 710 private: 711 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeHtCapabilityMask); 712 }; 713 714 class Nl80211AttributeKeySeq : public NetlinkRawAttribute { 715 public: 716 static const int kName; 717 static const char kNameString[]; Nl80211AttributeKeySeq()718 Nl80211AttributeKeySeq() : NetlinkRawAttribute(kName, kNameString) {} 719 720 private: 721 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeKeySeq); 722 }; 723 724 class Nl80211AttributeMac : public NetlinkRawAttribute { 725 public: 726 static const int kName; 727 static const char kNameString[]; Nl80211AttributeMac()728 Nl80211AttributeMac() : NetlinkRawAttribute(kName, kNameString) {} 729 virtual bool ToString(std::string* value) const; 730 731 // Stringizes the MAC address found in 'arg'. If there are problems (such 732 // as a NULL |arg|), |value| is set to a bogus MAC address. 733 static std::string StringFromMacAddress(const uint8_t* arg); 734 735 private: 736 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMac); 737 }; 738 739 class Nl80211AttributeRespIe : public NetlinkRawAttribute { 740 public: 741 static const int kName; 742 static const char kNameString[]; Nl80211AttributeRespIe()743 Nl80211AttributeRespIe() : NetlinkRawAttribute(kName, kNameString) {} 744 745 private: 746 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeRespIe); 747 }; 748 749 class Nl80211AttributeSurveyInfo : public NetlinkNestedAttribute { 750 public: 751 static const int kName; 752 static const char kNameString[]; 753 Nl80211AttributeSurveyInfo(); 754 755 private: 756 DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeSurveyInfo); 757 }; 758 759 } // namespace shill 760 761 #endif // SHILL_NET_NL80211_ATTRIBUTE_H_ 762