Commit Graph

553 Commits

Author SHA1 Message Date
sg
e171b4e3f0 Fixed usages of SYS_SEM_NULL after using pointers everywhere 2015-08-18 20:29:16 +02:00
goldsimon
bc4473b275 Fixed that netconn_thread_cleanup() did not call LWIP_NETCONN_THREAD_SEM_FREE() (!= vs ==) 2015-08-18 11:13:38 +02:00
sg
4edade8079 allow multicast socket options IP_MULTICAST_TTL, IP_MULTICAST_IF and IP_MULTICAST_LOOP to be used without IGMP 2015-08-05 22:52:23 +02:00
goldsimon
4b815eece9 added lwip_socket_thread_init/cleanup to use LWIP_NETCONN_SEM_PER_THREAD/LWIP_NETCONN_FULLDUPLEX without including anything but sockets.h 2015-08-03 10:15:29 +02:00
goldsimon
4dc3c7a6a0 Fixed warnings about NULL check not required (ip_addr_isany) and implicit conversion (~) 2015-08-03 08:35:01 +02:00
Erik Ekman
e448a9a4a9 err, debug: add missing ERR_ALREADY to lwip_strerr()
When ERR_ALREADY was added other error codes were renumbered.
The strerr function was not updated so it returned incorrect data
for ERR_CONN - ERR_IF.
2015-07-27 00:49:18 +02:00
goldsimon
232cf8c28b Fixed bug #45098 ip_addr_t type field not populated for socket address copies (patch by James Smith) 2015-05-21 15:51:47 +02:00
goldsimon
b51805b87e fixed bug #45135 getsockopt SO_SNDTIMEO, SO_RCVTIMEO broken 2015-05-21 15:47:21 +02:00
Sylvain Rochet
44af6978db netconn: api_msg.c, fixed warning about unused state variable by using it a little more 2015-04-23 23:31:41 +02:00
goldsimon
3f83556128 sockets: IPPROTO_RAW/IPV6_CHECKSUM must be disabled for LWIP_RAW==0;
help msvc to not warn about uninitialized variables
2015-04-23 09:14:42 +02:00
goldsimon
f9965b4967 some more compiler warning fixes 2015-04-23 08:44:44 +02:00
goldsimon
00a46f104a changed IP_IS_V6_VAL() to take an instance, not a pointer (to get the _val() functions the same) 2015-04-23 07:26:29 +02:00
goldsimon
e60bc69515 added more missing casts 2015-04-23 07:24:45 +02:00
goldsimon
634c438b50 sockets.c: added missing casts after changing storage type of 'err' member in sockets 2015-04-22 13:52:21 +02:00
goldsimon
beabd3c6b7 Added some macros with extension "_val" that work on actual instances and leave away the "if != NULL" check to get rid of gcc "-Waddress" warnings in the core code at least (I might not have caught all of them, yet) 2015-04-22 12:43:03 +02:00
goldsimon
902d190a11 Many const fixes throughout the stack (although these are not all, yet) 2015-04-22 10:29:43 +02:00
goldsimon
0142f113a3 fixed compiling netdb.c after LWIP_IPV4 changes 2015-04-22 09:17:31 +02:00
sg
6324068d34 Worked on IPv6-only stack: netdb should work 2015-04-13 21:29:04 +02:00
sg
c1c65777b6 worked on task #13480: added LWIP_IPV4 define - IPv4 can be disabled, leaving an IPv6-only stack (SNMP is still missing) 2015-04-12 10:43:46 +02:00
Sylvain Rochet
d6fdf7d4b1 PPP, PPPoL2TP, switched to dual stack IPv4/IPv6
Replaced ip4_addr_t to ip_addr_t in pppapi_pppol2tp_create() prototype,
now binding to UDPv6 or UDPv4 depending on the passed ip_addr_t type.

Removed pppol2tp_create_ip6() and pppapi_pppol2tp_create_ip6().
2015-04-11 13:15:06 +02:00
sg
ce7e31cd04 task #12722 (improve IPv4/v6 address handling): renamed ip_addr_t to ip4_addr_t, renamed ipX_addr_t to ip_addr_t and added IP version;
ip_addr_t is used for all generic IP addresses for the API, ip(4/6)_addr_t are only used internally or when initializing netifs or when calling version-related functions
2015-04-09 22:21:15 +02:00
goldsimon
c998faeeab fixed bug #44649 lwip_socket_drop_registered_memberships 2015-03-27 13:18:34 +01:00
Sylvain Rochet
ee752ab1ce PPP, PPPoS, renamed PPP_INPROC_MULTITHREADED to PPP_INPROC_IRQ_SAFE
Follow-up of the #44565 bug fix, renamed the misnamed
PPP_INPROC_MULTITHREADED to PPP_INPROC_IRQ_SAFE because it is
IRQ safe but not thread safe.

Updated PPP documentation which now clearly state when and how
this feature can be used.
2015-03-19 21:43:55 +01:00
sg
9eb900c448 fixed race conditions in assigning netconn->last_err (fixed bugs #38121 and #37676) 2015-03-19 21:20:29 +01:00
Sylvain Rochet
0e919d25e9 PPP, PPPoS, improved tcpip input path, fixed bug #44565
New input type TCPIP_MSG_INPKT_PPPOS. Removed the netif input pointer usage
which was actually broken by design.

Fixed bug #44565.
2015-03-19 21:04:21 +01:00
Ivan Delamer
e0fe83740a fixed bug #44565: PPPOS support in tcpip thread breaks SLIP 2015-03-18 10:16:14 -06:00
Sylvain Rochet
9778b1411c PPP, PPPoS, TCPIP: add packet input path for point to point interfaces (only PPPoS for now) through the TCPIP API
!NO_SYS users may now use as well the TCPIP API for PPPoS input data,
this way they can disable PPP_INPROC_MULTITHREADED and run pppos_input()
inside the lwIP thread, which fixes, at least for them, all the
threading issues related to PPP_INPROC_MULTITHREADED.
2015-03-11 00:58:09 +01:00
Sylvain Rochet
969306f0f1 API: netdb: replaced deprecated ip_ntoa() to ipaddr_ntoa() 2015-03-08 13:57:13 +01:00
Sylvain Rochet
3ce6dd166c PPP, L2TP, added link-level IPv6 support 2015-03-01 22:04:24 +01:00
Sylvain Rochet
2731976a95 PPP, renamed ppp_open to ppp_connect
Makes it clear we are initiating the PPP session with ppp_connect
(i.e. acting as a PPP client) so there is no confusion possible
between ppp_connect and ppp_listen.
2015-03-01 10:53:08 +01:00
Sylvain Rochet
371bc91d73 PPP, SERVER: added PPPoS server support
New function: ppp_listen(), listen for an incoming PPP connection.
2015-02-28 22:41:18 +01:00
Joel Cunningham
9004554da3 fixed bug #43028 (IP_MULTICAST_TTL affects unicast datagrams) 2015-02-25 21:59:21 +01:00
sg
83740d81f2 fixed comment 2015-02-25 21:32:33 +01:00
sg
c8581e4cd9 fixed bug #38165 (socket with mulicast): ensure igmp membership are dropped when socket (not netconn!) is closed. 2015-02-25 21:30:22 +01:00
sg
3e8ac30940 Fixed bug #44297 (CORE_LOCKING was broken some days ago); fixed that netconn_connect still used message passing for LWIP_TCPIP_CORE_LOCKING==1 2015-02-25 20:34:18 +01:00
Sylvain Rochet
00bb70a62d PPP, CORE, functions ppp_set_netif_statuscallback() and ppp_set_netif_linkcallback() replaced with defines
PPP is now pointerful for a while, we don't need anymore accessor functions
for the unique PPP local and static control block. Replaced
ppp_set_netif_statuscallback() and ppp_set_netif_linkcallback() functions to
defines.

Removed pppapi_do_ppp_set_netif_statuscallback() and
pppapi_do_ppp_set_netif_linkcallback(), they were useless because
netif_set_status_callback() and netif_set_link_callback() can be
safely called while PPP status is in dead (= non open) state
and even before the PPP session is actually created at all.
2015-02-24 20:41:47 +01:00
sg
03159254ce added proper accessor functions for pcb->multicast_ip (previously used by get/setsockopt only) 2015-02-22 21:49:46 +01:00
sg
ec5cf8593e Continued chrysn's work: changed nearly all functions taking 'ip(X)_addr_t' pointer to take const pointers (changed user callbacks: raw_recv_fn, udp_recv_fn; changed port callbacks: netif_output_fn, netif_igmp_mac_filter_fn) 2015-02-22 21:46:35 +01:00
Sylvain Rochet
4be7fccad3 PPP, CORE, ppp_close() and ppp_sighup() ended up sharing almost everything, merged
Merged ppp_sighup() to ppp_close() using an optional argument  "nocarrier"
on ppp_close().
2015-02-22 14:25:36 +01:00
Sylvain Rochet
dc2e700057 PPP, CORE, using u8_t on ioctl command instead of int
We don't need an int here, all commands are between 0 and 255.
2015-02-21 21:37:08 +01:00
Sylvain Rochet
6b4db944dd PPP, using err_t return code instead of PPPERR_
Standardised PPP API to follow lwIP already used return codes.
PPPERR_ are now used only on link status callback.
2015-02-20 21:24:58 +01:00
Sylvain Rochet
0a761d238a PPP, using err_t return type on ppp_ioctl() 2015-02-20 21:01:24 +01:00
sg
730529353d fixed bug #37958 "netconn API doesn't handle correctly connections half-closed by peer" 2015-02-18 22:21:26 +01:00
sg
2cfc9e286e "Not connected" shouldn't be fatal (as opposed to "closed") 2015-02-18 20:39:20 +01:00
sg
998ed99288 Fixed select not reporting received FIN as 'readable' in certain rare cases (bug #43779: select(), close(), and TCP retransmission error) 2015-02-18 20:38:42 +01:00
Sylvain Rochet
ee2936ffbf PPP, all protocols, uniformised naming
Uniformised fonction naming between and inside PPPoS, PPPoE, PPPoL2TP.
2015-02-17 23:22:14 +01:00
Sylvain Rochet
9c15ffbb74 PPP: Moved PPPoS from ppp.c to pppos.c
Started removing from PPP core most of low level protocol PPPoS
handling to separate files, using the new low level PPP callbacks.
2015-02-17 23:22:13 +01:00
Sylvain Rochet
ee85aaccd2 PPP, removed low level create functions from PPP core
ppp_over_ethernet_create() moved from ppp.c to pppoe.c
ppp_over_l2tp_create() moved from ppp.c to pppol2tp.c
2015-02-17 23:22:13 +01:00
Sylvain Rochet
17c6be6a9b PPP: removed ppp_delete(), merged with ppp_free()
The only benefit of ppp_delete() call was about having a persistent
netif interface. netif was moved out of PPP pcb so we don't need
ppp_delete() anymore, second step in simplifying the weird
new/open/free/delete PPP API.
2015-02-17 23:22:12 +01:00
Sylvain Rochet
318e752fd6 PPP: removed ppp_new(), merged with ppp_over_X_create()
The only benefit of ppp_new() call was about having a persistent netif
interface. netif was moved out of PPP pcb so we don't need ppp_new()
anymore, first step in simplifying the weird new/open/free/delete PPP
API.
2015-02-17 23:22:12 +01:00