:orphan: .. index:: pair: group; DHCP server .. _doxid-group__tapi__conf__dhcp__serv: DHCP server =========== .. toctree:: :hidden: Overview ~~~~~~~~ Configure the DHCP server running on a Test Agent: subnets, hosts, groups and the options handed out to clients. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions int :ref:`tapi_cfg_dhcps_add_subnet`(const char* ta, const struct sockaddr* subnet, int prefix_len, :ref:`cfg_handle`* handle); int :ref:`tapi_cfg_dhcps_add_host`(const char* ta, const char* name, const char* group, const struct sockaddr* chaddr, const void* client_id, int client_id_len, const struct sockaddr* fixed_ip, const char* next_server, const char* filename, const char* flags, :ref:`cfg_handle`* handle); int :ref:`tapi_cfg_dhcps_add_host_gen`(const char* ta, const char* name, const char* group, const struct sockaddr* chaddr, const void* client_id, int client_id_len, const struct sockaddr* fixed_ip, const char* next_server, const char* filename, const char* flags, const void* host_id, int host_id_len, const char* prefix6, :ref:`cfg_handle`* handle); .. _details-group__tapi__conf__dhcp__serv: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Configure the DHCP server running on a Test Agent: subnets, hosts, groups and the options handed out to clients. Global Functions ---------------- .. index:: pair: function; tapi_cfg_dhcps_add_subnet .. _doxid-group__tapi__conf__dhcp__serv_1ga19625563998a7cdb9e7a073a82c4c50f: .. ref-code-block:: cpp :class: doxyrest-title-code-block int tapi_cfg_dhcps_add_subnet(const char* ta, const struct sockaddr* subnet, int prefix_len, :ref:`cfg_handle`* handle) Add subnet declaration in DHCP server on the Test Agent. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent * - subnet - Subnet address * - prefix_len - Subnet prefix length * - handle - Location for handle of the created instance or NULL .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_dhcps_add_host .. _doxid-group__tapi__conf__dhcp__serv_1ga79b5565bf07ecf56d343ab5303e5d066: .. ref-code-block:: cpp :class: doxyrest-title-code-block int tapi_cfg_dhcps_add_host(const char* ta, const char* name, const char* group, const struct sockaddr* chaddr, const void* client_id, int client_id_len, const struct sockaddr* fixed_ip, const char* next_server, const char* filename, const char* flags, :ref:`cfg_handle`* handle) Add host definition in DHCP server on the Test Agent. .. attention:: In the case of failure, configuration changes are not rolled back. It is assumed that test fails and configuration backup will be restored. .. note:: Ideally the function must used local set operations and, then, commit. However, it does not work :( .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent * - name - Name of the host for human or NULL (unique name will be generated by TAPI) * - group - Name of the group the host belongs to or NULL * - chaddr - Hardware address * - client_id - Client identifier or NULL * - client_id_len - Client identifier length if ID is in binary format or -1 if ID is a string * - fixed_ip - Fixed IP address or NULL * - next_server - Next server or NULL * - filename - File name or NULL * - flags - Flags for Solaris 'dhcp' server lease type (bootp) * - handle - Location for handle of the created instance or NULL .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_dhcps_add_host_gen .. _doxid-group__tapi__conf__dhcp__serv_1ga1acae84f75387dddfa4512c174dd0091: .. ref-code-block:: cpp :class: doxyrest-title-code-block int tapi_cfg_dhcps_add_host_gen(const char* ta, const char* name, const char* group, const struct sockaddr* chaddr, const void* client_id, int client_id_len, const struct sockaddr* fixed_ip, const char* next_server, const char* filename, const char* flags, const void* host_id, int host_id_len, const char* prefix6, :ref:`cfg_handle`* handle) Add host definition in DHCP server on the Test Agent, host identifier and prefix delegation are supported. .. attention:: In the case of failure, configuration changes are not rolled back. It is assumed that test fails and configuration backup will be restored. .. note:: Ideally the function must used local set operations and, then, commit. However, it does not work :( .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent * - name - Name of the host for human or NULL (unique name will be generated by TAPI) * - group - Name of the group the host belongs to or NULL * - chaddr - Hardware address * - client_id - Client identifier or NULL * - client_id_len - Client identifier length if ID is in binary format or -1 if ID is a string * - fixed_ip - Fixed IP address or NULL * - next_server - Next server or NULL * - filename - File name or NULL * - flags - Flags for Solaris 'dhcp' server lease type (bootp) * - host_id - DHCPv6 host identifier or NULL * - host_id_len - Host identifier length if ID is in binary format or -1 if ID is a string * - prefix6 - DHCPv6 prefix delegation in string format or NULL * - handle - Location for handle of the created instance or NULL .. rubric:: Returns: Status code