BA
/
BaBoRo1
Embed:
(wiki syntax)
Show/hide line numbers
DHCPv6_server_service.h
00001 /* 00002 * Copyright (c) 2014-2017, 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 /* Initialize dhcp Global address server. 00027 * 00028 * This instance needs to bee initialized once for each thread network interface. 00029 * if only one thread instance is supported this is needed to call only once. 00030 * 00031 * /param interface interface id of this thread instance. 00032 * /param guaPrefix Global prefix /64 00033 * /param serverDUID Server Device ID (64-bit MAC) 00034 * /param serverDUIDType 00035 * /param maxClientCnt 00036 * /param enableAddressMapping 00037 * 00038 */ 00039 int DHCPv6_server_service_init(int8_t interface, uint8_t guaPrefix[static 16], uint8_t serverDUID[static 8], uint16_t serverDUIDType); 00040 00041 /* Delete dhcp thread dhcp router ID server. 00042 * 00043 * When this is called it close selected service and free all allocated memory. 00044 * 00045 * /param interface interface id of this thread instance. 00046 * /param guaPrefix Prefix which will be removed 00047 * /param delete_gua_addresses Whether or not assigned addresses with the prefix should be removed from the interface. 00048 */ 00049 void DHCPv6_server_service_delete(int8_t interface, uint8_t guaPrefix[static 16], bool delete_gua_addresses); 00050 00051 00052 void DHCPv6_server_service_timeout_cb(uint32_t timeUpdateInSeconds); 00053 00054 //void DHCPv6_GUA64_ML64_route_control(int8_t interfaceId, uint8_t *allocatedGuaAddress, uint8_t *clientEUID64, uint8_t *meshLocalPrefix, bool deleteMapping); 00055 00056 /* Control GUA address for client by DUI.Default value is true 00057 * 00058 * 00059 * /param interface interface id of this thread instance. 00060 * /param guaPrefix Prefix which will be removed 00061 * /param mode true trig autonous mode, false define address by default suffics + client id 00062 */ 00063 int DHCPv6_server_service_set_address_autonous_flag(int8_t interface, uint8_t guaPrefix[static 16], bool mode); 00064 00065 00066 /* Enable or disable GUA64 Address mapping to ML64 00067 * 00068 * 00069 * /param interface interface id of this thread instance. 00070 * /param guaPrefix Prefix which will be removed 00071 * /param mode 00072 * /param meshLocalPrefix mesh local prefix for generate ML6 from client EUID64 00073 */ 00074 int DHCPv6_server_service_set_gua_address_mapping(int8_t interface, uint8_t guaPrefix[static 16], bool mode, uint8_t meshLocalPrefix[8]); 00075 00076 /* SET max accepted clients to server, Default is 200 00077 * 00078 * 00079 * /param interface interface id of this thread instance. 00080 * /param guaPrefix Prefix which will be removed 00081 * /param maxClientCount 00082 */ 00083 int DHCPv6_server_service_set_max_clients_accepts_count(int8_t interface, uint8_t guaPrefix[static 16], uint32_t maxClientCount); 00084 00085 00086 /* SET Address Valid Lifetime parameter for allocated address, Default is 7200 seconds 00087 * 00088 * 00089 * /param interface interface id of this thread instance. 00090 * /param guaPrefix Prefix which will be removed 00091 * /param validLifeTimne in seconds 00092 */ 00093 int DHCPv6_server_service_set_address_validlifetime(int8_t interface, uint8_t guaPrefix[static 16], uint32_t validLifeTimne); 00094 00095 00096 int DHCPv6_server_service_gua_target_mac_check(int8_t interfaceId, const uint8_t *targetGUA, uint8_t *targetEUI64); 00097 #endif /* DHCPV6_SERVER_SERVICE_H_ */
Generated on Tue Jul 12 2022 12:21:48 by
