Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
DHCPv6_server_service.h
00001 /* 00002 * Copyright (c) 2014-2018, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 /* 00019 * \file DHCPv6_server_service.h 00020 * \brief Add short description about this file!!! 00021 * 00022 */ 00023 00024 #ifndef DHCPV6_SERVER_SERVICE_H_ 00025 #define DHCPV6_SERVER_SERVICE_H_ 00026 #ifdef HAVE_DHCPV6_SERVER 00027 #include "libDHCPv6/libDHCPv6.h" 00028 #include "libDHCPv6/libDHCPv6_server.h" 00029 00030 /* Initialize dhcp Global address server. 00031 * 00032 * This instance needs to bee initialized once for each thread network interface. 00033 * if only one thread instance is supported this is needed to call only once. 00034 * 00035 * /param interface interface id of this thread instance. 00036 * /param guaPrefix Global prefix /64 00037 * /param serverDUID Server Device ID (64-bit MAC) 00038 * /param serverDUIDType 00039 * /param maxClientCnt 00040 * /param enableAddressMapping 00041 * 00042 */ 00043 int DHCPv6_server_service_init(int8_t interface, uint8_t guaPrefix[static 16], uint8_t serverDUID[static 8], uint16_t serverDUIDType); 00044 00045 00046 void DHCPv6_server_service_callback_set(int8_t interface, uint8_t guaPrefix[static 16], dhcp_address_prefer_remove_cb *remove_cb, dhcp_address_add_notify_cb *add_cb); 00047 00048 int DHCPv6_server_service_duid_update(int8_t interface, uint8_t guaPrefix[static 16], uint8_t *duid_ptr, uint16_t duid_type, uint8_t duid_length); 00049 00050 /* Delete dhcp thread dhcp router ID server. 00051 * 00052 * When this is called it close selected service and free all allocated memory. 00053 * 00054 * /param interface interface id of this thread instance. 00055 * /param guaPrefix Prefix which will be removed 00056 * /param delete_gua_addresses Whether or not assigned addresses with the prefix should be removed from the interface. 00057 */ 00058 void DHCPv6_server_service_delete(int8_t interface, uint8_t guaPrefix[static 8], bool delete_gua_addresses); 00059 00060 00061 void DHCPv6_server_service_timeout_cb(uint32_t timeUpdateInSeconds); 00062 00063 /* Control GUA address for client by DUI.Default value is true 00064 * 00065 * 00066 * /param interface interface id of this thread instance. 00067 * /param guaPrefix Prefix which will be removed 00068 * /param mode true trig autonous mode, false define address by default suffics + client id 00069 */ 00070 int DHCPv6_server_service_set_address_autonous_flag(int8_t interface, uint8_t guaPrefix[static 16], bool mode); 00071 00072 00073 /* SET max accepted clients to server, Default is 200 00074 * 00075 * 00076 * /param interface interface id of this thread instance. 00077 * /param guaPrefix Prefix which will be removed 00078 * /param maxClientCount 00079 */ 00080 int DHCPv6_server_service_set_max_clients_accepts_count(int8_t interface, uint8_t guaPrefix[static 16], uint32_t maxClientCount); 00081 00082 00083 /* SET Address Valid Lifetime parameter for allocated address, Default is 7200 seconds 00084 * 00085 * 00086 * /param interface interface id of this thread instance. 00087 * /param guaPrefix Prefix which will be removed 00088 * /param validLifeTimne in seconds 00089 */ 00090 int DHCPv6_server_service_set_address_validlifetime(int8_t interface, uint8_t guaPrefix[static 16], uint32_t validLifeTimne); 00091 #else 00092 #define DHCPv6_server_service_delete(interface, guaPrefix, delete_gua_addresses) 00093 #endif 00094 #endif /* DHCPV6_SERVER_SERVICE_H_ */
Generated on Tue Jul 12 2022 13:54:16 by
1.7.2