Commit Graph

175 Commits

Author SHA1 Message Date
David van Moolenbroek
1c9e603299 netif: fix reset of IPv6 addresses in netif_add()
Previously, only the state of the first IPv6 address would be reset,
thus possibly keeping other addresses valid (even though zeroed).
2016-11-04 20:18:25 +01:00
Dirk Ziegelmeier
13fb616bb2 Cleanup hton*/ntoh* function handling and platform abstraction
Let lwip use functions/macros prefixed by lwip_ internally to avoid naming clashes with external #includes.
Remove over-complicated #define handling in def.h
Make functions easier to override in cc.h. The following is sufficient now (no more LWIP_PLATFORM_BYTESWAP):
#define lwip_htons(x) <your_htons>
#define lwip_htonl(x) <your_htonl>
2016-10-06 12:55:57 +02:00
Dirk Ziegelmeier
df5a79966d Fix bug #48886: raw pcbs are not handled on netif address change 2016-10-01 17:13:33 +02:00
Dirk Ziegelmeier
149701b347 Fix bug #49218: pbuf_clen() overflow as a result of tcp_write concatenation
Let pbuf_clen() return u16_t
2016-09-30 09:04:36 +02:00
Dirk Ziegelmeier
65796cd827 "Fix" bug #49078: lwip cannot establish ipv6 connection, because of failed to fill ipv6 source address in Neighbor Solicitation Message by adding a note to netif_add not to forget to create a link-local IPv6 address 2016-09-29 12:02:50 +02:00
Dirk Ziegelmeier
633696c153 Implement consistent IPx_ADDR_ANYx macro naming between IPv4 and IPv6
- rename IP4_ADDR_ANY to IP4_ADDR_ANY4
- IP4_ADDR_ANY (= IP_ADDR_ANY) is now IPv4 any address in ip_addr_t format
2016-09-28 12:56:57 +02:00
Dirk Ziegelmeier
97b774ceb9 Minor: Documentation updates 2016-09-26 21:45:29 +02:00
Dirk Ziegelmeier
c7c6b7ce93 Rework IGMP and MLD6 code to store group info per-netif.
Reasoning:
- Makes code in single-netif case perform better and smaller
- IGMP / MLD6 code is a little bit easier to read and understand
- Easier to get multicast groups per netif when implementing drivers

Downside: In multi-netif mode, there are two more pointers on each netif, even if IGMP/MLD6 is not used on it. But these systems should not be so memory-constrained that this will matter.
2016-09-21 13:33:33 +02:00
Dirk Ziegelmeier
d66442ba91 Fix compile when TCP, UDP and RAW are disabled 2016-09-07 08:11:30 +02:00
Dirk Ziegelmeier
0d510dd66d Add API macros for netif client data handling and update documentation accordingly 2016-08-26 11:21:49 +02:00
Dirk Ziegelmeier
57468b8a30 Minor: Several documentation updates 2016-08-25 22:04:04 +02:00
sg
4c390ad39c update netif address change triggers to tpc & udp to work with IPv6, too 2016-08-24 20:51:05 +02:00
Erik Ekman
a1db05c11e Fix const argument warning in netif_ip6_addr_set
../../../../../lwip/src/netif/ppp/ppp.c:1276:37: error: passing
      'const ip6_addr_t *' (aka 'const struct ip6_addr *') to parameter of type
      'ip6_addr_t *' (aka 'struct ip6_addr *') discards qualifiers
      [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  netif_ip6_addr_set(pcb->netif, 0, IP6_ADDR_ANY6);
                                    ^~~~~~~~~~~~~
../../../../../lwip/src/include/lwip/ip_addr.h:340:24: note: expanded from macro
      'IP6_ADDR_ANY6'
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../lwip/src/include/lwip/netif.h:436:73: note: passing argument to
      parameter 'addr6' here
void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, ip6_addr_t *addr6);
2016-08-24 14:41:48 +02:00
goldsimon
298ec340e5 set netif IPv6 address & state via function to implement change triggers (task #13517) 2016-08-24 09:19:53 +02:00
Dirk Ziegelmeier
8eb9db18a2 Reduce usage of netif/ethernet.h header, mostly lwip/prot/ethernet.h is sufficient 2016-08-19 08:36:00 +02:00
Dirk Ziegelmeier
7f60cb3889 Improve netif client data API for lwIP internal clients - these can use a compile-time constant to access their data now 2016-08-18 12:37:21 +02:00
Dirk Ziegelmeier
ebf7959880 Coding style fixes in netif.c 2016-08-18 11:44:19 +02:00
Dirk Ziegelmeier
c62bfd8146 Port AUTOIP to new netif client data API 2016-08-17 21:26:08 +02:00
Dirk Ziegelmeier
1db9631e7d Port DHCP to new netif client data API 2016-08-17 21:04:44 +02:00
Dirk Ziegelmeier
c28fb298b7 Introduce an API to store arbitrary data pointers in struct netif
Let MDNS to use the new API
TODO: AutoIP, DHCP
2016-08-17 16:37:15 +02:00
Dirk Ziegelmeier
efb7b3d5f8 Rename LWIP_MDNS to LWIP_MDNS_RESPONDER 2016-08-17 12:07:38 +02:00
Erik Ekman
4919932c49 Apply patch #8755: Multicast DNS responder support from Erik Ekman 2016-08-14 15:07:45 +02:00
Axel Lin
0a7db8a9a5 PPP: remove double include for lwip/sys.h
Including it once is enough.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-08-07 12:35:50 +02:00
Dirk Ziegelmeier
8d07629b71 Some documentation cleanups and include more comments that have been already in code into doxygen docs 2016-08-07 10:05:34 +02:00
goldsimon
018294d287 remove doubled include (tcpip.h) 2016-08-01 09:44:18 +02:00
Dirk Ziegelmeier
2f7e6d0661 Remove hard reference from netif.c to tcpip.c - avoids pulling in unnecessary code 2016-08-01 09:32:54 +02:00
Dirk Ziegelmeier
2c2d11fa4d Update documentation of netif_input function 2016-07-30 10:40:36 +02:00
Dirk Ziegelmeier
4cb7e31d2d Add missing #include in netif.c 2016-07-30 10:36:11 +02:00
Dirk Ziegelmeier
0c7d015ec4 Further improvement to netif input function autoselection: Select between netif_input() and tcpip_input() depending on NO_SYS setting 2016-07-30 10:29:14 +02:00
Dirk Ziegelmeier
4b67c582f6 Create netif_input function that decides according to netif flags where to pass an incoming packet.
Allow to pass a NULL pointer to netif_add() input function - if so, use the function mentioned above as input function.
2016-07-30 10:19:16 +02:00
Dirk Ziegelmeier
8a9de94b1f Restructure documentation. Create two top-level sections for thread-safe and callback-style APIs. 2016-07-26 18:39:53 +02:00
Dirk Ziegelmeier
0fea2bc02e Document netconn API in doxygen module style 2016-07-26 17:40:55 +02:00
Dirk Ziegelmeier
8643782e5d Document netif and lwIP in doxygen module style 2016-07-26 16:53:27 +02:00
sg
97b8e88e69 netif_set_addr(): when removing an address (setting address to ANY), we have to remove it *before* changing netmask/gw to ensure that tcp RST segment can be sent correctly 2016-07-19 22:34:22 +02:00
Dirk Ziegelmeier
7037b340c1 Move etharp to core/ipv4, which is a more appropriate place for it 2016-07-19 09:29:51 +02:00
Jan Breuer
ac21a5f370 nd6: add cleanup function 2016-05-23 09:44:27 +02:00
Dirk Ziegelmeier
6203737093 Rename snmp_mib2.h to snmp.h so source compatibility for user netif implementations is preserved 2015-11-12 21:25:42 +01:00
sg
c12fa7b4c4 started to move "private" header files containing implementation details to "lwip/priv/" include directory to seperate the API from the implementation. 2015-10-09 21:58:58 +02:00
goldsimon
77f906376e minor: fixed coding style (lwip style) 2015-10-07 10:36:50 +02:00
goldsimon
b401f42520 minor: fixed coding style (lwip style) 2015-10-07 10:03:12 +02:00
sg
2b971400fa minor: coding style 2015-10-06 21:57:40 +02:00
sg
490581a0eb minor/coding style: removed spaces before line ending 2015-10-06 21:08:28 +02:00
Erik Ekman
f80d0dab08 Remove old comments about DHCP setting netif up 2015-10-03 21:31:48 +02:00
Dirk Zigelmeier
3f4d75c8d6 netif_get_ip6_addr_match/netif_add_ip6_address must take a const ip6addr to be usable 2015-09-30 20:55:08 +02:00
goldsimon
0fbdd5e56e fixed compiling LWIP_HAVE_LOOPIF after changing struct netif.ip6_addr to ip_addr_t 2015-09-24 07:58:29 +02:00
sg
db76671d4d task #13729: Convert netif addresses (IPv4 & IPv6) to ip_addr_t (so they can be used without conversion/temporary storage) 2015-09-23 22:09:37 +02:00
Dirk Ziegelmeier
e00e4a6c13 make netif_ip4_* get accessors return const pointers 2015-09-23 13:19:56 +02:00
sg
4f9bcc5ecc fixed compiler warnings reported by mingw-64 2015-09-17 22:00:16 +02:00
goldsimon
7702ed66a0 fixed compiler warning (stray 'a ' in code) - why is this a warning only??? 2015-09-08 09:52:22 +02:00
goldsimon
8a0fb03e21 Separate mib2 counter/table callbacks from snmp agent. This both cleans up the code and should allow integration of a 3rd party agent/mib2. 2015-09-08 09:47:30 +02:00