Skip to content

Commit d74d5ff

Browse files
author
Juha Heiskanen
authored
Merge pull request ARMmbed#1862 from ARMmbed/dhcp_client_generic_update
Dhcp client generic update
2 parents 2ec9b6e + 999bbc3 commit d74d5ff

23 files changed

+65
-513
lines changed

source/6LoWPAN/Thread/thread_bootstrap.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
#include "MPL/mpl.h"
8787
#include "MLE/mle.h"
8888
#include "MLE/mle_tlv.h"
89-
#include "thread_dhcpv6_client.h"
89+
#include "DHCPv6_client/dhcpv6_client_api.h"
9090
#include "thread_config.h"
9191
#include "thread_meshcop_lib.h"
9292
#include "multicast_api.h"
@@ -890,7 +890,7 @@ void thread_interface_init(protocol_interface_info_entry_t *cur)
890890
{
891891
thread_discovery_reset(cur->id);
892892
thread_routing_set_mesh_callbacks(cur);
893-
thread_dhcp_client_init(cur->id);
893+
dhcp_client_init(cur->id);
894894
thread_management_client_init(cur->id);
895895
thread_address_registration_init();
896896
cur->mpl_seed_id_mode = MULTICAST_MPL_SEED_ID_MAC_SHORT;
@@ -1837,7 +1837,7 @@ static void thread_dhcp_client_gua_error_cb(int8_t interface, uint8_t dhcp_addr[
18371837
tr_warn("Address Get fail: %s from: %s", trace_ipv6(prefix), trace_ipv6(dhcp_addr));
18381838
if (prefix && dhcp_addr) {
18391839
tr_debug("Delete Current Server data");
1840-
thread_dhcp_client_global_address_delete(interface, dhcp_addr, prefix);
1840+
dhcp_client_global_address_delete(interface, dhcp_addr, prefix);
18411841
}
18421842
}
18431843
}
@@ -2295,7 +2295,7 @@ void thread_bootstrap_stop(protocol_interface_info_entry_t *cur)
22952295
thread_leader_service_leader_data_free(cur->thread_info);
22962296
thread_bootstrap_all_nodes_multicast_unregister(cur);
22972297
thread_data_base_init(cur->thread_info, cur->id);
2298-
thread_dhcp_client_delete(cur->id);
2298+
dhcp_client_delete(cur->id);
22992299
thread_nd_service_delete(cur->id);
23002300
thread_child_id_request_entry_clean(cur);
23012301
thread_registered_mcast_addr_entry_clean(cur);
@@ -2544,7 +2544,7 @@ int thread_bootstrap_network_data_process(protocol_interface_info_entry_t *cur,
25442544
memcpy(&addr[8], ADDR_SHORT_ADR_SUFFIC, 6);
25452545
common_write_16_bit(genericService.routerID, &addr[14]);
25462546
tr_debug("Delete DHCPv6 given address");
2547-
thread_dhcp_client_global_address_delete(cur->id, addr, prefixTlv.Prefix);
2547+
dhcp_client_global_address_delete(cur->id, addr, prefixTlv.Prefix);
25482548
}
25492549
}
25502550

@@ -2840,8 +2840,8 @@ void thread_bootstrap_network_prefixes_process(protocol_interface_info_entry_t *
28402840
if (!thread_dhcpv6_address_entry_available(curPrefix->servicesPrefix, &cur->ip_addresses)) {
28412841
thread_addr_write_mesh_local_16(addr, curBorderRouter->routerID, cur->thread_info);
28422842
/* Do not allow multiple DHCP solicits from one prefix => delete previous */
2843-
thread_dhcp_client_global_address_delete(cur->id, NULL, curPrefix->servicesPrefix);
2844-
if (thread_dhcp_client_get_global_address(cur->id, addr, curPrefix->servicesPrefix, cur->mac, thread_dhcp_client_gua_error_cb) == 0) {
2843+
dhcp_client_global_address_delete(cur->id, NULL, curPrefix->servicesPrefix);
2844+
if (dhcp_client_get_global_address(cur->id, addr, curPrefix->servicesPrefix, cur->mac, thread_dhcp_client_gua_error_cb) == 0) {
28452845
tr_debug("GP Address Requested");
28462846
}
28472847
}

source/6LoWPAN/Thread/thread_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#include "6LoWPAN/Thread/thread_beacon.h"
4747
#include "6LoWPAN/Thread/thread_leader_service.h"
4848
#include "6LoWPAN/Thread/thread_routing.h"
49-
#include "6LoWPAN/Thread/thread_dhcpv6_client.h"
49+
#include "DHCPv6_client/dhcpv6_client_api.h"
5050
#include "6LoWPAN/Thread/thread_discovery.h"
5151
#include "6LoWPAN/Thread/thread_bootstrap.h"
5252
#include "6LoWPAN/Thread/thread_router_bootstrap.h"

0 commit comments

Comments
 (0)