PcapPlusPlus  19.12
DhcpLayer.h
Go to the documentation of this file.
1 #ifndef PACKETPP_DHCP_LAYER
2 #define PACKETPP_DHCP_LAYER
3 
4 #include "Layer.h"
5 #include "TLVData.h"
6 #include "IpAddress.h"
7 #include "MacAddress.h"
8 #include <string.h>
9 
11 
16 namespace pcpp
17 {
18 
23  #pragma pack(push, 1)
24  struct dhcp_header {
26  uint8_t opCode;
28  uint8_t hardwareType;
32  uint8_t hops;
34  uint32_t transactionID;
36  uint16_t secondsElapsed;
38  uint16_t flags;
40  uint32_t clientIpAddress;
42  uint32_t yourIpAddress;
44  uint32_t serverIpAddress;
46  uint32_t gatewayIpAddress;
48  uint8_t clientHardwareAddress[16];
50  uint8_t serverName[64];
52  uint8_t bootFilename[128];
54  uint32_t magicNumber;
55  };
56  #pragma pack(pop)
57 
58 
63  {
68  };
69 
85  DHCP_ACK = 5,
87  DHCP_NAK = 6,
92  };
93 
305  DHCPOPT_URL = 114,
319  DHCPOPT_CCC = 122,
390  };
391 
392 
398  class DhcpOption : public TLVRecord
399  {
400  public:
401 
406  DhcpOption(uint8_t* optionRawData) : TLVRecord(optionRawData) { }
407 
411  virtual ~DhcpOption() { }
412 
418  {
419  uint32_t addrAsInt = getValueAs<uint32_t>();
420  return IPv4Address(addrAsInt);
421  }
422 
430  void setValueIpAddr(const IPv4Address& addr, int valueOffset = 0)
431  {
432  setValue<uint32_t>(addr.toInt(), valueOffset);
433  }
434 
442  std::string getValueAsString(int valueOffset = 0) const
443  {
444  if (m_Data->recordLen - valueOffset < 1)
445  return "";
446 
447  return std::string((const char*)m_Data->recordValue + valueOffset, (int)m_Data->recordLen - valueOffset);
448  }
449 
458  void setValueString(const std::string& stringValue, int valueOffset = 0)
459  {
460  std::string val = stringValue;
461  if (stringValue.length() > (size_t)m_Data->recordLen - (size_t)valueOffset)
462  val = stringValue.substr(0, (size_t)m_Data->recordLen - valueOffset);
463 
464  memcpy(m_Data->recordValue + valueOffset, val.c_str(), val.length());
465  }
466 
467 
468  // implement abstract methods
469 
470  size_t getTotalSize() const
471  {
472  if (m_Data->recordType == (uint8_t)DHCPOPT_END || m_Data->recordType == (uint8_t)DHCPOPT_PAD)
473  return sizeof(uint8_t);
474 
475  return sizeof(uint8_t)*2 + (size_t)m_Data->recordLen;
476  }
477 
478  size_t getDataSize() const
479  {
480  if (m_Data->recordType == (uint8_t)DHCPOPT_END || m_Data->recordType == (uint8_t)DHCPOPT_PAD)
481  return 0;
482 
483  return m_Data->recordLen;
484  }
485  };
486 
487 
494  {
495  public:
496 
504  DhcpOptionBuilder(DhcpOptionTypes optionType, const uint8_t* optionValue, uint8_t optionValueLen) :
505  TLVRecordBuilder((uint8_t)optionType, optionValue, optionValueLen) { }
506 
513  DhcpOptionBuilder(DhcpOptionTypes optionType, uint8_t optionValue) :
514  TLVRecordBuilder((uint8_t)optionType, optionValue) { }
515 
522  DhcpOptionBuilder(DhcpOptionTypes optionType, uint16_t optionValue) :
523  TLVRecordBuilder((uint8_t)optionType, optionValue) { }
524 
531  DhcpOptionBuilder(DhcpOptionTypes optionType, uint32_t optionValue) :
532  TLVRecordBuilder((uint8_t)optionType, optionValue) { }
533 
540  DhcpOptionBuilder(DhcpOptionTypes optionType, const IPv4Address& optionValue) :
541  TLVRecordBuilder((uint8_t)optionType, optionValue) { }
542 
549  DhcpOptionBuilder(DhcpOptionTypes optionType, const std::string& optionValue) :
550  TLVRecordBuilder((uint8_t)optionType, optionValue) { }
551 
557  TLVRecordBuilder(other) { }
558 
563  DhcpOption build() const;
564  };
565 
566 
567 
572  class DhcpLayer : public Layer
573  {
574  public:
575 
583  DhcpLayer(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet);
584 
591  DhcpLayer(DhcpMessageType msgType, const MacAddress& clientMacAddr);
592 
596  DhcpLayer();
597 
601  virtual ~DhcpLayer() {}
602 
607  dhcp_header* getDhcpHeader() const { return (dhcp_header*)m_Data; }
608 
613 
618 
623  void setClientIpAddress(const IPv4Address& addr);
624 
629 
634  void setServerIpAddress(const IPv4Address& addr);
635 
640 
645  void setYourIpAddress(const IPv4Address& addr);
646 
651 
656  void setGatewayIpAddress(const IPv4Address& addr);
657 
663 
669  void setClientHardwareAddress(const MacAddress& addr);
670 
676 
685  bool setMesageType(DhcpMessageType msgType);
686 
692 
700  DhcpOption getNextOptionData(DhcpOption dhcpOption) const;
701 
709 
713  size_t getOptionsCount() const;
714 
721  DhcpOption addOption(const DhcpOptionBuilder& optionBuilder);
722 
730  DhcpOption addOptionAfter(const DhcpOptionBuilder& optionBuilder, DhcpOptionTypes prevOption);
731 
737  bool removeOption(DhcpOptionTypes optionType);
738 
743  bool removeAllOptions();
744 
745  // implement abstract methods
746 
750  void parseNextLayer() {}
751 
755  size_t getHeaderLen() const { return m_DataLen; }
756 
766  void computeCalculateFields();
767 
768  std::string toString() const;
769 
771 
772  private:
773 
774  uint8_t* getOptionsBasePtr() const { return m_Data + sizeof(dhcp_header); }
775 
776  TLVRecordReader<DhcpOption> m_OptionReader;
777 
778  void initDhcpLayer(size_t numOfBytesToAllocate);
779 
780  DhcpOption addOptionAt(const DhcpOptionBuilder& optionBuilder, int offset);
781  };
782 }
783 
784 #endif /* PACKETPP_DHCP_LAYER */
pcpp::DHCPOPT_TRAILER_ENCAPSULATION
Definition: DhcpLayer.h:169
pcpp::DHCPOPT_BCMCS_CONTROLLER_IPV4_ADDRESS
Definition: DhcpLayer.h:277
pcpp::DhcpLayer::getServerIpAddress
IPv4Address getServerIpAddress() const
pcpp::DHCPOPT_OPTION_IPV4_ADDRESS_ANDSF
Definition: DhcpLayer.h:339
pcpp::OsiModelLayer
OsiModelLayer
Definition: ProtocolType.h:224
pcpp::DHCPOPT_NDS_TREE_NAME
Definition: DhcpLayer.h:271
pcpp::TLVRecord
Definition: TLVData.h:23
pcpp::DhcpLayer::getFirstOptionData
DhcpOption getFirstOptionData() const
pcpp::DHCPOPT_URL
Definition: DhcpLayer.h:305
pcpp::DHCPOPT_STATUS_CODE
Definition: DhcpLayer.h:347
pcpp::IPv4Address
Definition: IpAddress.h:119
pcpp::DHCPOPT_RAPID_COMMIT
Definition: DhcpLayer.h:261
pcpp::Packet
Definition: Packet.h:26
pcpp::DHCPOPT_OPTION_PANA_AGENT
Definition: DhcpLayer.h:327
pcpp::DHCPOPT_TCODE
Definition: DhcpLayer.h:299
pcpp::DHCPOPT_DHCP_MESSAGE_TYPE
Definition: DhcpLayer.h:207
pcpp::DHCPOPT_FQDN
Definition: DhcpLayer.h:263
pcpp::DHCPOPT_DATA_SOURCE
Definition: DhcpLayer.h:359
pcpp::DhcpLayer::getGatewayIpAddress
IPv4Address getGatewayIpAddress() const
pcpp::dhcp_header::magicNumber
uint32_t magicNumber
Definition: DhcpLayer.h:54
pcpp::DHCPOPT_OPTION_MUD_URL_V4
Definition: DhcpLayer.h:367
pcpp::DHCP_REQUEST
Definition: DhcpLayer.h:81
pcpp::DhcpLayer::getNextOptionData
DhcpOption getNextOptionData(DhcpOption dhcpOption) const
pcpp::OsiModelApplicationLayer
Definition: ProtocolType.h:239
pcpp::DHCPOPT_PCODE
Definition: DhcpLayer.h:297
pcpp::DHCPOPT_OPTION_V4_LOST
Definition: DhcpLayer.h:329
pcpp::DHCPOPT_AUTHENTICATION
Definition: DhcpLayer.h:279
pcpp::DHCPOPT_NWIP_SUBOPTIONS
Definition: DhcpLayer.h:227
pcpp::DHCP_BOOTREPLY
Definition: DhcpLayer.h:67
pcpp::DhcpLayer::~DhcpLayer
virtual ~DhcpLayer()
Definition: DhcpLayer.h:601
pcpp::DHCPOPT_DHCP_MESSAGE
Definition: DhcpLayer.h:213
pcpp::DHCPOPT_POLICY_FILTER
Definition: DhcpLayer.h:143
pcpp::dhcp_header::clientIpAddress
uint32_t clientIpAddress
Definition: DhcpLayer.h:40
Layer.h
pcpp::TLVRecord::TLVRawData::recordType
uint8_t recordType
Definition: TLVData.h:31
pcpp::DHCPOPT_OPTION_IPV4_FQDN_MOS
Definition: DhcpLayer.h:335
pcpp::DHCPOPT_ROUTERS
Definition: DhcpLayer.h:107
pcpp::DHCPOPT_DHCP_STATE
Definition: DhcpLayer.h:357
pcpp::DHCPOPT_SIP_SERVERS
Definition: DhcpLayer.h:315
pcpp::dhcp_header::hardwareAddressLength
uint8_t hardwareAddressLength
Definition: DhcpLayer.h:30
pcpp::DHCPOPT_QUERY_END_TIME
Definition: DhcpLayer.h:355
pcpp::DHCPOPT_NON_LOCAL_SOURCE_ROUTING
Definition: DhcpLayer.h:141
pcpp::DhcpLayer::addOption
DhcpOption addOption(const DhcpOptionBuilder &optionBuilder)
pcpp::DhcpLayer::computeCalculateFields
void computeCalculateFields()
pcpp::DhcpLayer::setClientHardwareAddress
void setClientHardwareAddress(const MacAddress &addr)
pcpp::DEFAULT_IP_TTL
Definition: DhcpLayer.h:147
pcpp::DHCPOPT_CONFIGURATION_FILE
Definition: DhcpLayer.h:375
pcpp::DHCPOPT_GEOLOC
Definition: DhcpLayer.h:341
pcpp::DHCPOPT_OPTION_V4_ACCESS_DOMAIN
Definition: DhcpLayer.h:383
pcpp::DhcpOptionBuilder::DhcpOptionBuilder
DhcpOptionBuilder(DhcpOptionTypes optionType, uint16_t optionValue)
Definition: DhcpLayer.h:522
pcpp::DhcpLayer::getYourIpAddress
IPv4Address getYourIpAddress() const
pcpp::DhcpOption
Definition: DhcpLayer.h:398
pcpp::DHCP_RELEASE
Definition: DhcpLayer.h:89
pcpp::DHCPOPT_FORCERENEW_NONCE_CAPABLE
Definition: DhcpLayer.h:343
pcpp::DHCPOPT_ALL_SUBNETS_LOCAL
Definition: DhcpLayer.h:155
pcpp::dhcp_header::gatewayIpAddress
uint32_t gatewayIpAddress
Definition: DhcpLayer.h:46
pcpp::DHCPOPT_SUBNET_SELECTION
Definition: DhcpLayer.h:311
pcpp::DhcpOptionTypes
DhcpOptionTypes
Definition: DhcpLayer.h:97
pcpp::DHCPOPT_FINGER_SERVER
Definition: DhcpLayer.h:247
pcpp::DHCPOPT_BOOT_SIZE
Definition: DhcpLayer.h:127
pcpp::DhcpLayer::removeAllOptions
bool removeAllOptions()
MacAddress.h
pcpp::DHCPOPT_CLASSLESS_STATIC_ROUTE
Definition: DhcpLayer.h:317
pcpp::DHCPOPT_OPTION_V4_PORTPARAMS
Definition: DhcpLayer.h:363
pcpp::DHCP_OFFER
Definition: DhcpLayer.h:79
pcpp::DHCPOPT_DHCP_RENEWAL_TIME
Definition: DhcpLayer.h:217
pcpp::DhcpOption::getTotalSize
size_t getTotalSize() const
Definition: DhcpLayer.h:470
pcpp::DHCPOPT_NWIP_DOMAIN_NAME
Definition: DhcpLayer.h:225
pcpp::DHCP_ACK
Definition: DhcpLayer.h:85
pcpp::DHCPOPT_DHCP_LEASE_TIME
Definition: DhcpLayer.h:203
pcpp::DHCPOPT_REBOOT_TIME
Definition: DhcpLayer.h:379
pcpp::DHCPOPT_OPTION_IPV4_ADDRESS_MOS
Definition: DhcpLayer.h:333
pcpp::DHCPOPT_SUBNET_ALLOCATION
Definition: DhcpLayer.h:385
pcpp::DhcpLayer::setYourIpAddress
void setYourIpAddress(const IPv4Address &addr)
pcpp::DHCPOPT_OPTION_V4_PCP_SERVER
Definition: DhcpLayer.h:361
pcpp::DHCPOPT_CCC
Definition: DhcpLayer.h:319
pcpp::DHCPOPT_QUOTES_SERVERS
Definition: DhcpLayer.h:117
pcpp::DHCPOPT_OPTION_6RD
Definition: DhcpLayer.h:381
pcpp::DHCPOPT_NNTP_SERVER
Definition: DhcpLayer.h:243
pcpp::DhcpOptionBuilder::DhcpOptionBuilder
DhcpOptionBuilder(DhcpOptionTypes optionType, const uint8_t *optionValue, uint8_t optionValueLen)
Definition: DhcpLayer.h:504
pcpp::dhcp_header::secondsElapsed
uint16_t secondsElapsed
Definition: DhcpLayer.h:36
pcpp::dhcp_header
Definition: DhcpLayer.h:24
pcpp::DHCPOPT_CLIENT_SYSTEM
Definition: DhcpLayer.h:285
pcpp::DHCPOPT_RESOURCE_LOCATION_SERVERS
Definition: DhcpLayer.h:123
pcpp::DHCPOPT_BROADCAST_ADDRESS
Definition: DhcpLayer.h:157
pcpp::DHCPOPT_DHCP_AGENT_OPTIONS
Definition: DhcpLayer.h:265
pcpp::DHCPOPT_END
Definition: DhcpLayer.h:389
pcpp::DHCPOPT_MAX_DGRAM_REASSEMBLY
Definition: DhcpLayer.h:145
pcpp::DhcpOptionBuilder
Definition: DhcpLayer.h:493
pcpp::DhcpLayer::getHeaderLen
size_t getHeaderLen() const
Definition: DhcpLayer.h:755
pcpp::DHCPOPT_POP3_SERVER
Definition: DhcpLayer.h:241
pcpp::DhcpLayer::getOptionsCount
size_t getOptionsCount() const
pcpp::DHCPOPT_DIRECTORY_AGENT
Definition: DhcpLayer.h:257
pcpp::DhcpLayer::getDhcpHeader
dhcp_header * getDhcpHeader() const
Definition: DhcpLayer.h:607
pcpp::MacAddress
Definition: MacAddress.h:27
pcpp::BootpOpCodes
BootpOpCodes
Definition: DhcpLayer.h:62
pcpp::dhcp_header::transactionID
uint32_t transactionID
Definition: DhcpLayer.h:34
pcpp::DHCPOPT_START_TIME_OF_STATE
Definition: DhcpLayer.h:351
TLVData.h
pcpp::dhcp_header::opCode
uint8_t opCode
Definition: DhcpLayer.h:26
pcpp::DHCPOPT_NIS_SERVER_ADDRESS
Definition: DhcpLayer.h:231
pcpp::DHCPOPT_CLIENT_LAST_TXN_TIME
Definition: DhcpLayer.h:281
pcpp::DhcpLayer::parseNextLayer
void parseNextLayer()
Definition: DhcpLayer.h:750
pcpp::dhcp_header::clientHardwareAddress
uint8_t clientHardwareAddress[16]
Definition: DhcpLayer.h:48
pcpp::DHCPOPT_TCP_KEEPALIVE_GARBAGE
Definition: DhcpLayer.h:179
pcpp::DHCPOPT_ISNS
Definition: DhcpLayer.h:267
pcpp::DHCPOPT_DHCP_OPTION_OVERLOAD
Definition: DhcpLayer.h:205
pcpp::DHCP_UNKNOWN_MSG_TYPE
Definition: DhcpLayer.h:75
pcpp::DHCPOPT_X_DISPLAY_MANAGER
Definition: DhcpLayer.h:199
pcpp::PATH_MTU_PLATEAU_TABLE
Definition: DhcpLayer.h:151
pcpp::DHCPOPT_PATH_MTU_AGING_TIMEOUT
Definition: DhcpLayer.h:149
pcpp::dhcp_header::flags
uint16_t flags
Definition: DhcpLayer.h:38
pcpp::DHCPOPT_DHCP_REQUESTED_ADDRESS
Definition: DhcpLayer.h:201
pcpp::DHCPOPT_IEEE802_3_ENCAPSULATION
Definition: DhcpLayer.h:173
pcpp::dhcp_header::hops
uint8_t hops
Definition: DhcpLayer.h:32
pcpp::DHCPOPT_NDS_SERVERS
Definition: DhcpLayer.h:269
pcpp::DhcpOption::DhcpOption
DhcpOption(uint8_t *optionRawData)
Definition: DhcpLayer.h:406
pcpp::DHCPOPT_SUBNET_MASK
Definition: DhcpLayer.h:103
pcpp::DHCPOPT_QUERY_START_TIME
Definition: DhcpLayer.h:353
pcpp::DHCPOPT_IMPRESS_SERVERS
Definition: DhcpLayer.h:121
pcpp::DhcpOptionBuilder::DhcpOptionBuilder
DhcpOptionBuilder(DhcpOptionTypes optionType, uint32_t optionValue)
Definition: DhcpLayer.h:531
pcpp::DhcpOptionBuilder::build
DhcpOption build() const
pcpp::DhcpOption::getValueAsIpAddr
IPv4Address getValueAsIpAddr() const
Definition: DhcpLayer.h:417
pcpp::DHCPOPT_GEOCONF_CIVIC
Definition: DhcpLayer.h:295
pcpp::DHCPOPT_NAME_SERVERS
Definition: DhcpLayer.h:111
pcpp::DhcpLayer::getOptionData
DhcpOption getOptionData(DhcpOptionTypes option) const
pcpp::DHCPOPT_IP_FORWARDING
Definition: DhcpLayer.h:139
pcpp::DHCPOPT_NETBIOS_SCOPE
Definition: DhcpLayer.h:195
pcpp::DHCPOPT_PXELINUX_MAGIC
Definition: DhcpLayer.h:373
pcpp::IPv4Address::toInt
uint32_t toInt() const
pcpp::DhcpLayer::toString
std::string toString() const
pcpp::DhcpMessageType
DhcpMessageType
Definition: DhcpLayer.h:73
pcpp::DHCPOPT_USER_CLASS
Definition: DhcpLayer.h:255
pcpp::DHCPOPT_UUID_GUID
Definition: DhcpLayer.h:291
pcpp::DhcpLayer::setServerIpAddress
void setServerIpAddress(const IPv4Address &addr)
pcpp::DHCPOPT_IP_TELEPHONE
Definition: DhcpLayer.h:371
pcpp::DHCPOPT_BOOTFILE_NAME
Definition: DhcpLayer.h:235
pcpp::DHCPOPT_PERFORM_MASK_DISCOVERY
Definition: DhcpLayer.h:159
pcpp::DhcpLayer::setClientIpAddress
void setClientIpAddress(const IPv4Address &addr)
pcpp::DHCPOPT_NAME_SERVICE_SEARCH
Definition: DhcpLayer.h:309
pcpp::DhcpOptionBuilder::DhcpOptionBuilder
DhcpOptionBuilder(DhcpOptionTypes optionType, const IPv4Address &optionValue)
Definition: DhcpLayer.h:540
pcpp::dhcp_header::serverIpAddress
uint32_t serverIpAddress
Definition: DhcpLayer.h:44
pcpp::DHCPOPT_DHCP_CLIENT_IDENTIFIER
Definition: DhcpLayer.h:223
pcpp::DHCPOPT_ETHERBOOT
Definition: DhcpLayer.h:369
pcpp::DHCPOPT_V_I_VENDOR_OPTS
Definition: DhcpLayer.h:325
pcpp::DHCPOPT_ROOT_PATH
Definition: DhcpLayer.h:135
pcpp::DhcpLayer::getOpCode
BootpOpCodes getOpCode() const
Definition: DhcpLayer.h:612
pcpp::DHCPOPT_VENDOR_CLASS_IDENTIFIER
Definition: DhcpLayer.h:221
pcpp::DHCPOPT_VIRTUAL_SUBNET_SELECTION
Definition: DhcpLayer.h:387
pcpp::DHCPOPT_PAD
Definition: DhcpLayer.h:101
pcpp::dhcp_header::bootFilename
uint8_t bootFilename[128]
Definition: DhcpLayer.h:52
IpAddress.h
pcpp::DhcpLayer::getClientHardwareAddress
MacAddress getClientHardwareAddress() const
pcpp
The main namespace for the PcapPlusPlus lib.
pcpp::DHCPOPT_TIME_OFFSET
Definition: DhcpLayer.h:105
pcpp::DHCPOPT_DHCP_PARAMETER_REQUEST_LIST
Definition: DhcpLayer.h:211
pcpp::DHCPOPT_EXTENSIONS_PATH
Definition: DhcpLayer.h:137
pcpp::DHCPOPT_MERIT_DUMP
Definition: DhcpLayer.h:129
pcpp::DhcpOptionBuilder::DhcpOptionBuilder
DhcpOptionBuilder(DhcpOptionTypes optionType, const std::string &optionValue)
Definition: DhcpLayer.h:549
pcpp::TLVRecordBuilder
Definition: TLVData.h:351
pcpp::DHCPOPT_SMTP_SERVER
Definition: DhcpLayer.h:239
pcpp::DHCPOPT_LPR_SERVERS
Definition: DhcpLayer.h:119
pcpp::DhcpOption::getValueAsString
std::string getValueAsString(int valueOffset=0) const
Definition: DhcpLayer.h:442
pcpp::DHCPOPT_BASE_TIME
Definition: DhcpLayer.h:349
pcpp::DHCPOPT_FONT_SERVERS
Definition: DhcpLayer.h:197
pcpp::DhcpOption::~DhcpOption
virtual ~DhcpOption()
Definition: DhcpLayer.h:411
pcpp::DhcpOption::getDataSize
size_t getDataSize() const
Definition: DhcpLayer.h:478
pcpp::dhcp_header::serverName
uint8_t serverName[64]
Definition: DhcpLayer.h:50
pcpp::DHCPOPT_NTP_SERVERS
Definition: DhcpLayer.h:185
pcpp::DHCPOPT_NIS_DOMAIN
Definition: DhcpLayer.h:181
pcpp::DHCPOPT_DHCP_SERVER_IDENTIFIER
Definition: DhcpLayer.h:209
pcpp::DHCP_DECLINE
Definition: DhcpLayer.h:83
pcpp::DhcpLayer::addOptionAfter
DhcpOption addOptionAfter(const DhcpOptionBuilder &optionBuilder, DhcpOptionTypes prevOption)
pcpp::DHCPOPT_IRC_SERVER
Definition: DhcpLayer.h:249
pcpp::DHCP_BOOTREQUEST
Definition: DhcpLayer.h:65
pcpp::DhcpLayer
Definition: DhcpLayer.h:572
pcpp::DHCPOPT_RDNSS_SELECTION
Definition: DhcpLayer.h:345
pcpp::Layer
Definition: Layer.h:70
pcpp::DHCPOPT_CLIENT_NDI
Definition: DhcpLayer.h:287
pcpp::DHCPOPT_NIS_DOMAIN_NAME
Definition: DhcpLayer.h:229
pcpp::dhcp_header::hardwareType
uint8_t hardwareType
Definition: DhcpLayer.h:28
pcpp::DhcpOption::setValueString
void setValueString(const std::string &stringValue, int valueOffset=0)
Definition: DhcpLayer.h:458
pcpp::DHCPOPT_AUTO_CONFIG
Definition: DhcpLayer.h:307
pcpp::DHCPOPT_WWW_SERVER
Definition: DhcpLayer.h:245
pcpp::DhcpLayer::setMesageType
bool setMesageType(DhcpMessageType msgType)
pcpp::DHCPOPT_PATH_PREFIX
Definition: DhcpLayer.h:377
pcpp::DHCPOPT_TIME_SERVERS
Definition: DhcpLayer.h:109
pcpp::DHCPOPT_NETINFO_TAG
Definition: DhcpLayer.h:303
pcpp::DHCPOPT_TCP_KEEPALIVE_INTERVAL
Definition: DhcpLayer.h:177
pcpp::DHCPOPT_DOMAIN_SEARCH
Definition: DhcpLayer.h:313
pcpp::DHCPOPT_SWAP_SERVER
Definition: DhcpLayer.h:133
pcpp::DHCPOPT_DEFAULT_TCP_TTL
Definition: DhcpLayer.h:175
pcpp::DHCPOPT_NETBIOS_NAME_SERVERS
Definition: DhcpLayer.h:189
pcpp::DHCPOPT_SIP_UA_CONFIG
Definition: DhcpLayer.h:337
pcpp::DHCPOPT_GEOCONF
Definition: DhcpLayer.h:321
pcpp::DhcpLayer::getClientIpAddress
IPv4Address getClientIpAddress() const
pcpp::DHCPOPT_DOMAIN_NAME
Definition: DhcpLayer.h:131
pcpp::TLVRecord::TLVRawData::recordValue
uint8_t recordValue[]
Definition: TLVData.h:35
pcpp::DHCPOPT_USER_AUTH
Definition: DhcpLayer.h:293
pcpp::DHCPOPT_BCMCS_CONTROLLER_DOMAIN_NAME_LIST
Definition: DhcpLayer.h:275
pcpp::DHCPOPT_VENDOR_ENCAPSULATED_OPTIONS
Definition: DhcpLayer.h:187
pcpp::DHCPOPT_HOME_AGENT_ADDRESS
Definition: DhcpLayer.h:237
pcpp::DHCPOPT_LOG_SERVERS
Definition: DhcpLayer.h:115
pcpp::DHCP_NAK
Definition: DhcpLayer.h:87
pcpp::DHCPOPT_CAPTIVE_PORTAL
Definition: DhcpLayer.h:365
pcpp::DHCPOPT_HOST_NAME
Definition: DhcpLayer.h:125
pcpp::DhcpLayer::removeOption
bool removeOption(DhcpOptionTypes optionType)
pcpp::DHCPOPT_NETINFO_ADDRESS
Definition: DhcpLayer.h:301
pcpp::DHCPOPT_DOMAIN_NAME_SERVERS
Definition: DhcpLayer.h:113
pcpp::DhcpOptionBuilder::DhcpOptionBuilder
DhcpOptionBuilder(const DhcpOptionBuilder &other)
Definition: DhcpLayer.h:556
pcpp::DHCPOPT_ROUTER_SOLICITATION_ADDRESS
Definition: DhcpLayer.h:165
pcpp::DHCPOPT_NETBIOS_NODE_TYPE
Definition: DhcpLayer.h:193
pcpp::DHCPOPT_TFTP_SERVER_NAME
Definition: DhcpLayer.h:233
pcpp::DHCPOPT_STDA_SERVER
Definition: DhcpLayer.h:253
pcpp::DHCPOPT_SERVICE_SCOPE
Definition: DhcpLayer.h:259
pcpp::DHCPOPT_NIS_SERVERS
Definition: DhcpLayer.h:183
pcpp::DhcpLayer::getOsiModelLayer
OsiModelLayer getOsiModelLayer() const
Definition: DhcpLayer.h:770
pcpp::DHCPOPT_ASSOCIATED_IP
Definition: DhcpLayer.h:283
pcpp::DHCPOPT_DHCP_MAX_MESSAGE_SIZE
Definition: DhcpLayer.h:215
pcpp::DHCPOPT_UNKNOWN
Definition: DhcpLayer.h:99
pcpp::TLVRecord::TLVRawData::recordLen
uint8_t recordLen
Definition: TLVData.h:33
pcpp::DHCPOPT_ROUTER_DISCOVERY
Definition: DhcpLayer.h:163
pcpp::DHCP_INFORM
Definition: DhcpLayer.h:91
pcpp::DhcpOption::setValueIpAddr
void setValueIpAddr(const IPv4Address &addr, int valueOffset=0)
Definition: DhcpLayer.h:430
pcpp::DhcpOptionBuilder::DhcpOptionBuilder
DhcpOptionBuilder(DhcpOptionTypes optionType, uint8_t optionValue)
Definition: DhcpLayer.h:513
pcpp::DHCPOPT_STATIC_ROUTES
Definition: DhcpLayer.h:167
pcpp::DHCPOPT_NETBIOS_DD_SERVER
Definition: DhcpLayer.h:191
pcpp::DHCPOPT_DHCP_REBINDING_TIME
Definition: DhcpLayer.h:219
pcpp::DHCPOPT_INTERFACE_MTU
Definition: DhcpLayer.h:153
pcpp::DhcpLayer::DhcpLayer
DhcpLayer()
pcpp::DHCPOPT_NDS_CONTEXT
Definition: DhcpLayer.h:273
pcpp::DhcpLayer::setGatewayIpAddress
void setGatewayIpAddress(const IPv4Address &addr)
pcpp::DHCPOPT_STREETTALK_SERVER
Definition: DhcpLayer.h:251
pcpp::DHCPOPT_ARP_CACHE_TIMEOUT
Definition: DhcpLayer.h:171
pcpp::DHCP_DISCOVER
Definition: DhcpLayer.h:77
pcpp::DhcpLayer::getMesageType
DhcpMessageType getMesageType() const
pcpp::DHCPOPT_MASK_SUPPLIER
Definition: DhcpLayer.h:161
pcpp::DHCPOPT_OPTION_CAPWAP_AC_V4
Definition: DhcpLayer.h:331
pcpp::DHCPOPT_LDAP
Definition: DhcpLayer.h:289
pcpp::dhcp_header::yourIpAddress
uint32_t yourIpAddress
Definition: DhcpLayer.h:42
pcpp::DHCPOPT_V_I_VENDOR_CLASS
Definition: DhcpLayer.h:323