:orphan: .. index:: pair: struct; dhcp_message .. _doxid-structdhcp__message: struct dhcp_message =================== .. toctree:: :hidden: Overview ~~~~~~~~ Structure of DHCP message :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct dhcp_message { // fields uint8_t :ref:`op`; uint8_t :ref:`htype`; uint8_t :ref:`hlen`; uint8_t :ref:`hops`; uint32_t :ref:`xid`; uint16_t :ref:`secs`; uint16_t :ref:`flags`; uint32_t :ref:`ciaddr`; uint32_t :ref:`yiaddr`; uint32_t :ref:`siaddr`; uint32_t :ref:`giaddr`; uint8_t :ref:`chaddr`[DHCPV4_HDR_CHADDR_SIZE]; uint8_t :ref:`sname`[DHCPV4_HDR_SNAME_SIZE]; uint8_t :ref:`file`[DHCPV4_HDR_FILE_SIZE]; bool :ref:`is_op_set`; bool :ref:`is_htype_set`; bool :ref:`is_hlen_set`; bool :ref:`is_hops_set`; bool :ref:`is_xid_set`; bool :ref:`is_secs_set`; bool :ref:`is_flags_set`; bool :ref:`is_ciaddr_set`; bool :ref:`is_yiaddr_set`; bool :ref:`is_siaddr_set`; bool :ref:`is_giaddr_set`; bool :ref:`is_chaddr_set`; bool :ref:`is_sname_set`; bool :ref:`is_file_set`; struct :ref:`dhcp_option`* :ref:`opts`; }; .. _details-structdhcp__message: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Structure of DHCP message Fields ------ .. index:: pair: variable; op .. _doxid-structdhcp__message_1ae567aa989adecc7649843bd70d7f45e0: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint8_t op Message op code .. index:: pair: variable; htype .. _doxid-structdhcp__message_1aa7b5f913c1d3f5c46e72d4b67b29e0f5: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint8_t htype Hardware address type .. index:: pair: variable; hlen .. _doxid-structdhcp__message_1afd0e692c861fcb897292b93466bc6ad5: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint8_t hlen Hardware address length .. index:: pair: variable; hops .. _doxid-structdhcp__message_1a73622c1e113a8d7a02839cd874e33c14: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint8_t hops Client sets to zero, optionally used by relay agents when booting via a relay agent .. index:: pair: variable; xid .. _doxid-structdhcp__message_1a82ffc99f16dff00c1b3fdd169ffd6d26: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint32_t xid Transaction ID .. index:: pair: variable; secs .. _doxid-structdhcp__message_1a60cc8f3fd13440415b1bd02e62ff1822: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint16_t secs Seconds elapsed since client began address acquisition or renewal process .. index:: pair: variable; flags .. _doxid-structdhcp__message_1a4eda184c77bcd306b22ee9314e67882e: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint16_t flags Flags .. index:: pair: variable; ciaddr .. _doxid-structdhcp__message_1afd09d8979bb68bcba8872d936abc9a02: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint32_t ciaddr Client IP address .. index:: pair: variable; yiaddr .. _doxid-structdhcp__message_1a24e0e6cca6e4efa65fd8d3e071003009: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint32_t yiaddr 'your' (client) IP address .. index:: pair: variable; siaddr .. _doxid-structdhcp__message_1a04713efcdb89aa25a3a056d60b19be3d: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint32_t siaddr IP address of next server to use in bootstrap .. index:: pair: variable; giaddr .. _doxid-structdhcp__message_1a3272424e382ca82cc8f8457e0cb9e74c: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint32_t giaddr Relay agent IP address, used in booting via a relay agent .. index:: pair: variable; chaddr .. _doxid-structdhcp__message_1acca3cb1f7f66165e2286f5ed1b56324f: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint8_t chaddr[DHCPV4_HDR_CHADDR_SIZE] Client hardware address .. index:: pair: variable; sname .. _doxid-structdhcp__message_1ad0b44b27461be0c1487a305a843f197e: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint8_t sname[DHCPV4_HDR_SNAME_SIZE] Server host name .. index:: pair: variable; file .. _doxid-structdhcp__message_1a7c654e2e54df333b47ff8e0f9219aa85: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint8_t file[DHCPV4_HDR_FILE_SIZE] Boot file name .. index:: pair: variable; is_op_set .. _doxid-structdhcp__message_1ac8279838e116fd99baf5d5c1624be29f: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_op_set Is message op code has been set .. index:: pair: variable; is_htype_set .. _doxid-structdhcp__message_1a1d916379d982500c398d5c6852b6393f: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_htype_set Is message htype has been set .. index:: pair: variable; is_hlen_set .. _doxid-structdhcp__message_1ab95162adc8bd7e1e3b6d84b387631a76: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_hlen_set Is message hlen has been set .. index:: pair: variable; is_hops_set .. _doxid-structdhcp__message_1a8effe059882fc79260e519f8c4214bc4: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_hops_set Is message hops has been set .. index:: pair: variable; is_xid_set .. _doxid-structdhcp__message_1aa734f42ba20196f786bc26f1e0252500: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_xid_set Is message xid has been set .. index:: pair: variable; is_secs_set .. _doxid-structdhcp__message_1acafada3c7df0d59de166e29e5ea9a210: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_secs_set Is message secs has been set .. index:: pair: variable; is_flags_set .. _doxid-structdhcp__message_1a73127eda3d5345c8386ded355fc41ed4: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_flags_set Is message flags has been set .. index:: pair: variable; is_ciaddr_set .. _doxid-structdhcp__message_1a8b7d312c53ab08b1680da9448ab12551: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_ciaddr_set Is message ciaddr has been set .. index:: pair: variable; is_yiaddr_set .. _doxid-structdhcp__message_1abd6f6fd469be66ceb85d224df909054c: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_yiaddr_set Is message yiaddr has been set .. index:: pair: variable; is_siaddr_set .. _doxid-structdhcp__message_1a95eb989cd32b13b3044fdd149d3cb199: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_siaddr_set Is message siaddr has been set .. index:: pair: variable; is_giaddr_set .. _doxid-structdhcp__message_1aa12ea3562595cbca388f8809bd001b47: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_giaddr_set Is message giaddr has been set .. index:: pair: variable; is_chaddr_set .. _doxid-structdhcp__message_1aa04209b45a39572f787f6577b5a41175: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_chaddr_set Is message chaddr has been set .. index:: pair: variable; is_sname_set .. _doxid-structdhcp__message_1a14288e7b347d0cd9ce5812355d9900fe: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_sname_set Is message sname has been set .. index:: pair: variable; is_file_set .. _doxid-structdhcp__message_1a3b0104cc1bc4a7384cf071339e1f87d9: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool is_file_set Is message file has been set .. index:: pair: variable; opts .. _doxid-structdhcp__message_1ab7b88d7b5b796191e32ad4346e97bd92: .. ref-code-block:: cpp :class: doxyrest-title-code-block struct :ref:`dhcp_option`* opts List of DHCP options