Skip to content

Commit

Permalink
Add missing license headers (#8630)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v authored Jul 9, 2022
1 parent 00f5f2a commit a2982f9
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 2 deletions.
22 changes: 22 additions & 0 deletions cores/esp8266/LwipIntf.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
LwipIntf.cpp
Arduino interface for lwIP generic callbacks and functions
Original Copyright (c) 2020 esp8266 Arduino All rights reserved.
This file is part of the esp8266 Arduino core environment.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

extern "C"
{
Expand Down
29 changes: 28 additions & 1 deletion cores/esp8266/LwipIntf.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
LwipIntf.h
Arduino interface for lwIP generic callbacks and functions
Original Copyright (c) 2020 esp8266 Arduino All rights reserved.
This file is part of the esp8266 Arduino core environment.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef _LWIPINTF_H
#define _LWIPINTF_H
Expand Down Expand Up @@ -28,16 +50,21 @@ class LwipIntf
IPAddress& netmask, IPAddress& dns1);

String hostname();
bool hostname(const String& aHostname)

bool hostname(const String& aHostname)
{
return hostname(aHostname.c_str());
}

bool hostname(const char* aHostname);

// ESP32 API compatibility
bool setHostname(const char* aHostName)
{
return hostname(aHostName);
}

// ESP32 API compatibility
const char* getHostname();

protected:
Expand Down
22 changes: 22 additions & 0 deletions cores/esp8266/LwipIntfCB.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
LwipIntfCB.cpp
network generic callback implementation
Original Copyright (c) 2020 esp8266 Arduino All rights reserved.
This file is part of the esp8266 Arduino core environment.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <LwipIntf.h>
#include <Schedule.h>
Expand Down
23 changes: 22 additions & 1 deletion cores/esp8266/LwipIntfDev.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
/*
LwipIntfDev.h
Arduino network template class for generic device
Original Copyright (c) 2020 esp8266 Arduino All rights reserved.
This file is part of the esp8266 Arduino core environment.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef _LWIPINTFDEV_H
#define _LWIPINTFDEV_H

// TODO:
// remove all Serial.print
// unchain pbufs

#include <netif/ethernet.h>
Expand Down

0 comments on commit a2982f9

Please sign in to comment.