DHCP address in lwip
Re: DHCP address in lwip
Certainly be interested to see an alternative to LWIP. I've not looked in detail yet, but a potential downside for picoTcp is that it is GPL-licensed (same as WolfSSL) which is going to make it significantly less attractive than Lwip for some.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: DHCP address in lwip
Yes, it is GPL only, still good for the FOSS users.
If you guys think it is worth the effort we may try to contact them to discuss additional licensing options.
Giovanni
If you guys think it is worth the effort we may try to contact them to discuss additional licensing options.
Giovanni
- danielinux
- Posts: 20
- Joined: Sat Nov 04, 2017 12:38 pm
- Location: Amsterdam, The Netherlands
- Has thanked: 4 times
- Been thanked: 2 times
Re: DHCP address in lwip
Sorry about the delay, due to FOSDEM weekend etc.
About the wolfSSL integration:
yes, picoTCP is supported natively by wolfSSL, and I've already worked on industrial production projects using wolfSSL TLS sockets on top of picoTCP (on Cortex-M3/M4 devices).
About the license:
picoTCP is owned by Altran Belgium, and AFAIK they provide non-GPL licenses (at user's option) to integrate into non-Free projects. It's basically the same licensing model as wolfSSL
About the wolfSSL integration:
yes, picoTCP is supported natively by wolfSSL, and I've already worked on industrial production projects using wolfSSL TLS sockets on top of picoTCP (on Cortex-M3/M4 devices).
About the license:
picoTCP is owned by Altran Belgium, and AFAIK they provide non-GPL licenses (at user's option) to integrate into non-Free projects. It's basically the same licensing model as wolfSSL
Re: DHCP address in lwip
Found a way to get the address as set by DHCP, so no need for patch:
Works OK on a quick check
Code: Select all
#include "lwip/def.h"
#include "lwip/netif.h"
/*
* https://techoverflow.net/2015/03/16/accessing-lwip-struct-netif-instance-in-chibios/
*/
uint32_t getCurrentNetworkAddress(uint8_t addrType)
{
if (netif_default == NULL)
return 0;
switch (addrType)
{
case 1 :
return ntohl(netif_default->netmask.addr);
case 2 :
return ntohl(netif_default->gw.addr);
case 0 :
default :
return ntohl(netif_default->ip_addr.addr);
}
}
Works OK on a quick check
Return to “Development and Feedback”
Who is online
Users browsing this forum: No registered users and 47 guests