lwip: Add client's MAC addr to dhcp server cb

* Extended storage for staipassigned events to pass client's MAC address.
* Added client's MAC to dhcp server callback
* Posting the staipassigned events with clients IP and MAC address
This commit is contained in:
David Cermak
2021-09-12 08:47:14 +02:00
parent ef5cfb217c
commit e3d71c984a
5 changed files with 21 additions and 38 deletions
+6 -14
View File
@@ -1,16 +1,8 @@
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
//#include "esp_common.h"
#include <stdlib.h>
#include <string.h>
@@ -690,7 +682,7 @@ static void send_ack(struct dhcps_msg *m, u16_t len)
#endif
if (SendAck_err_t == ERR_OK) {
dhcps_cb(m->yiaddr);
dhcps_cb(m->yiaddr, m->chaddr);
}
if (p->ref != 0) {