Commit Graph

1911 Commits

Author SHA1 Message Date
goldsimon
6ffd29507c Free recv_data when TF_RXCLOSED is set 2010-05-16 13:12:15 +00:00
goldsimon
a880709776 Let FIN come through although TF_RXCLOSED is set, send RST when data is received although TF_RXCLOSED is set, added TCP_EVENT_CLOSED for clearer code 2010-05-15 18:12:37 +00:00
goldsimon
874d1641df Fix compilation for LWIP_EVENT_API==1 (unused args) 2010-05-15 18:10:55 +00:00
goldsimon
d8d964d09e udp_input/SO_REUSE_RXTOALL: only call pbuf_header if there is a 2nd pcb to pass the data to 2010-05-15 17:11:41 +00:00
goldsimon
46b3cb580d Removed unused SOF_* flags, ip_pcb.so_options can now be an u8_t instead of an u16_t (saves 3 bytes per pcb on a 32-bit platform) 2010-05-15 17:10:08 +00:00
goldsimon
02f5e19420 udp_input: use SO_REUSE && SO_REUSE_RXTOALL to copy incoming (broad-/multicast) data to additional pcbs 2010-05-15 16:46:53 +00:00
goldsimon
a945bf07af SO_REUSE: tcp_input: correctly handle multiple pcbs listening on the same port (but different address): first search for a specific address an only pass to ANY if no specific address has been found listening 2010-05-15 16:45:43 +00:00
goldsimon
7e5b0a9eb6 SO_REUSE: tcp_listen/tcp_connect: make sure that the 5-tuple is unique 2010-05-15 16:44:09 +00:00
goldsimon
a56795c149 Added new option SO_REUSE_RXTOALL to pass received UDP broadcast/multicast packets to more than one pcb 2010-05-15 14:52:39 +00:00
goldsimon
baeb41f5f4 SO_REUSEADDR / SO_REUSE is implemented and safe to use 2010-05-12 22:34:06 +00:00
goldsimon
d0348e0c60 task #6995: Implement SO_REUSEADDR (correctly) 2010-05-12 22:29:58 +00:00
goldsimon
ef0a7ecbcd Remove uused SOF_* flags, define inherited flags in ip.h, not in tcp_in.c 2010-05-12 22:26:06 +00:00
goldsimon
778c65d27c CHECKSUM_GEN_IP_INLINE: Use defines to access the u32_t part of an IP address 2010-05-12 08:11:45 +00:00
goldsimon
f3face9f0c Fix printf-formatter for sio_fd_t/size_t 2010-05-12 07:48:30 +00:00
goldsimon
2edd5230c9 auth_withpeer_fail(): call lcp_close(), like pppd 2.4.5 does 2010-05-11 18:11:46 +00:00
goldsimon
1551bb702d Fixed bug #29855: PPP: Backport a bugfix in LcpSendEchoRequest from pppd 2010-05-11 16:53:41 +00:00
goldsimon
d656e9f28e Added option LWIP_ARP_FILTER_NETIF to use multiple IPs on one hardware interface (by using multiple netifs, each with its own IP) 2010-05-10 14:10:46 +00:00
goldsimon
597764e35b Minor: source code layout 2010-05-10 14:02:52 +00:00
goldsimon
f9f77876a1 .. and deleted NAT again as Christian obviously didn't have the copyright on the code he sent us... THANKS!!! 2010-05-05 19:49:40 +00:00
goldsimon
67d8c7999a Free NAT entries on remove (fixes a memory leak) 2010-05-05 19:39:29 +00:00
goldsimon
a7fdb67e8f task #7506: added NAT support 2010-05-05 19:34:23 +00:00
goldsimon
71f5fdef42 Fixed bug #29769 (sys_check_timeouts: sys_now() may overflow) 2010-05-04 19:27:42 +00:00
goldsimon
abc36471d9 Fixed bug #29763 (CHECKSUM_GEN_IP_INLINE), added macro LWIP_MAKE_U16() that's improved for endianess 2010-05-04 18:59:52 +00:00
goldsimon
4b7288e8f4 use checksum-on-copy for sending UDP data for LWIP_NETIF_TX_SINGLE_PBUF==1 2010-05-02 17:25:33 +00:00
goldsimon
108ed3c81a struct netbuf: reorder members to save some space 2010-05-02 09:10:58 +00:00
goldsimon
f98e5717e5 task #6849: added udp_send(_to/_if) functions that take a precalculated checksum, added pbuf_fill_chksum() to copy data into a pbuf and at the same time calculating the checksum for that data 2010-04-30 20:39:45 +00:00
goldsimon
3685bc4828 fixed a type 2010-04-30 20:37:22 +00:00
goldsimon
72c580236e Create overridable macros for copying 2-byte-aligned IP addresses and MAC addresses 2010-04-29 04:57:31 +00:00
goldsimon
01d2a87f5d Inline generating IP checksum to save a function call 2010-04-28 19:36:51 +00:00
goldsimon
51061fb61e Fixed bug #29617 (sometime cause stall on delete listening connection) 2010-04-21 19:59:40 +00:00
goldsimon
49e8e28cf6 Check that tcp_abort/tcp_abandon isn't called for listen-pcbs 2010-04-21 19:55:14 +00:00
goldsimon
d2c632fb18 patch #7145: Various typos in SNMP files 2010-04-14 19:13:35 +00:00
goldsimon
3562be2188 tabs -> spaces 2010-04-14 07:03:31 +00:00
goldsimon
2e18a9be63 Added an overridable define to get informed when the tcpip_thread processes messages or timeouts to implement a watchdog. 2010-04-14 07:02:26 +00:00
goldsimon
3347762df3 MEMP_OVERFLOW_CHECK: dump the element's pool's index and name when an overflow/underflow is detected 2010-04-12 11:08:11 +00:00
goldsimon
f1bc73c3ed Fixed compilation errors 2010-04-02 16:48:53 +00:00
goldsimon
a96fa7d221 Fixed compilation of debug log code (that is currently commented out) 2010-04-02 16:17:51 +00:00
goldsimon
cc3e01a9f5 Fixed compilation (removed extra tokens after #endif) 2010-03-28 18:47:37 +00:00
goldsimon
6caa389c48 Check IP_FRAG && IP_FRAG_USES_STATIC_BUF && LWIP_NETIF_TX_SINGLE_PBUF 2010-03-28 10:50:05 +00:00
goldsimon
e86446b785 patch #7143: Add a few missing const qualifiers 2010-03-28 10:28:32 +00:00
goldsimon
a00448c35a create a new (contiguous) PBUF_RAM for every outgoing fragment if LWIP_NETIF_TX_SINGLE_PBUF==1 2010-03-28 10:22:48 +00:00
goldsimon
82b9152b8d Removed checking ARP_TABLE_SIZE, this is done by the etharp module itself 2010-03-27 17:12:48 +00:00
goldsimon
d778fbb24f Speedup TX by moving code from find_entry to etharp_output/etharp_query to prevent unnecessary function calls (inspired by patch #7135). 2010-03-27 16:51:27 +00:00
goldsimon
3803a0021d patch #7130: remove meaningless const qualifiers 2010-03-27 16:25:35 +00:00
goldsimon
3c96819a2c Make LWIP_NETIF_TX_SINGLE_PBUF work for TCP, too 2010-03-26 16:54:15 +00:00
goldsimon
846a2fb933 Fixed compiling with different options disabled (TCP/UDP), triggered by bug #29345; don't allocate acceptmbox if LWIP_TCP is disabled 2010-03-26 16:09:02 +00:00
goldsimon
7e9eb55350 Added printf format modifier for mem_size_t depending on heap size 2010-03-26 15:38:01 +00:00
goldsimon
46b7bd6ec3 Make functions static where applicable, add default cases to switches where applicable, prevent old-style function prototypes (without arguments) 2010-03-26 14:07:05 +00:00
goldsimon
8bbe3d2fe0 Correctly cast pointers when assigning from void* 2010-03-26 14:05:56 +00:00
goldsimon
25f59761b3 fixed bug #29346 (removed comma after last enum member) 2010-03-26 14:05:22 +00:00
goldsimon
4b038f13de sys_thread_new: name is a const pointer 2010-03-26 14:04:03 +00:00
goldsimon
5ef976aed5 Fixed bug #29332: lwip_select() processes readset incorrectly 2010-03-25 12:19:39 +00:00
goldsimon
cf0b831971 Fixed bug #29080: Correctly handle remote side overrunning our rcv_wnd in ooseq case. 2010-03-25 06:39:01 +00:00
goldsimon
d861daeb4e Removed function prototype that had no corresponding implementation (pbuf_ref_chain) 2010-03-22 15:46:09 +00:00
goldsimon
0a2eb3fdc8 minor: fixed coding style 2010-03-22 15:45:34 +00:00
goldsimon
6fb248c9e0 task #10088: Fixed a bug in RST-on-close-when-not-all-data-acked implementation (plus removed some unnecessary casts) 2010-03-22 12:32:05 +00:00
goldsimon
40946a79d3 Removed duplicate TCP_REG/TCP_RMV macros, fixed debug macro implementation 2010-03-22 12:27:38 +00:00
goldsimon
124ca0fed2 tcp_listen() did not copy the pcb's prio 2010-03-22 10:06:49 +00:00
goldsimon
5d153ca1b3 Fixed compilation for MEM_USE_POOLS under MSVC (where ++ doesn't work for enums) 2010-03-22 08:38:28 +00:00
goldsimon
a5b0ea97d6 Updated netconn_write doc/comment about api_flags 2010-03-21 12:19:56 +00:00
goldsimon
0a49f2e068 Corrected spelling of ERR_WOULDBLOCK (D was missing) 2010-03-20 12:56:47 +00:00
goldsimon
57594ad7b6 tcp_write: moved initial checks to an own static function for clarity 2010-03-20 12:08:07 +00:00
goldsimon
75bb43698c Disable MEMP_TCPIP_MSG_INPKT pool for LWIP_TCPIP_CORE_LOCKING_INPUT==1 2010-03-20 11:57:34 +00:00
goldsimon
f70014b8ea Added an option to disable tcpip_(un)timeout code since the linker cannot do this automatically to save space. 2010-03-20 11:55:41 +00:00
goldsimon
5fd410db4b Added support for static ARP table entries (added option ETHARP_SUPPORT_STATIC_ENTRIES) (+ added test); refactored the etharp code a bit 2010-03-20 11:45:25 +00:00
goldsimon
385d044f7d Corrected spelling of milliseconds (my dictionary tells me to use two l's :) 2010-03-20 11:34:50 +00:00
goldsimon
d0f1c552e2 Fixed bug #29256: SNMP Trap address was not correctly set 2010-03-19 20:49:13 +00:00
goldsimon
a54bb7205d Added missing casts, use strlen + MEMCPY instead of strcpy (as that might overrun the buffer) 2010-03-16 15:14:14 +00:00
goldsimon
7466474365 Fixed compiler warnings when casting where we know the source is aligned (by casting to void-pointer first) 2010-03-15 10:44:19 +00:00
goldsimon
c4bc9ce59a Fixed alignment warnings when we know alignment is correct (by using LWIP_MEM_ALIGN) 2010-03-15 09:57:03 +00:00
goldsimon
e25c9f7951 Fixed compiler warning when LWIP_SNMP==0 2010-03-15 09:47:43 +00:00
goldsimon
94cbed5096 Corrected comment 2010-03-14 12:35:30 +00:00
goldsimon
f83ace2034 task #6849: Calculate checksum when creating TCP segments, not when (re-)transmitting them. 2010-03-14 11:26:05 +00:00
goldsimon
84ed9de21a Prepared for checksum-on-copy (task #6849):
- Added option LWIP_CHECKSUM_ON_COPY;
- Added function + define lwip_chksum_copy to create checksum when copying data
2010-03-14 11:23:37 +00:00
goldsimon
4e764017c1 Fixed bug #29148 (Incorrect PBUF_POOL_BUFSIZE for ports where ETH_PAD_SIZE > 0) by moving definition of ETH_PAD_SIZE to opt.h and basing PBUF_LINK_HLEN on it. 2010-03-14 10:16:43 +00:00
goldsimon
67f5e17588 Bug #29210: check alignment of struct sockaddr vs. struct sockaddr_in 2010-03-14 09:54:47 +00:00
goldsimon
d13ac66cc4 Fixed sending one byte of data in tcp_zero_window_probe (which I accidentally broke with v1.103) 2010-03-14 09:43:10 +00:00
goldsimon
9f0b7261e5 Fix calculation of tcp_mss(): when timestamps are on, this is pcb->mss - 12 or else NOCOPY-apps might generate unperformant PBUF_REF chains 2010-03-13 15:04:08 +00:00
goldsimon
ad4a869b94 Some fixes to the TCP_OVERSIZE code:
- fix compiling with TCP_OVERSIZE==0;
- fix segment-size calculation when options are used;
2010-03-13 14:29:13 +00:00
goldsimon
79d3b41e13 Reverted the change in struct sockaddr since it wasn't compatible to the standard (bug #29210) 2010-03-13 14:09:52 +00:00
goldsimon
839befe68a Corrected comment 2010-03-12 16:06:08 +00:00
goldsimon
097e8c8eb4 Fixed some issues in the TCP_OVERSIZE code:
- reset tcp_pcb.unsent_oversize when last_unsent is changed;
- added TCP_OVERSIZE_DBGCHECK: check tcp_pcb.unsent_oversize vs. (debug-only) tcp_seg.oversize_left to ensure the pcb counter is correct;
- fixed a memory leak in tcp_write;
2010-03-12 15:40:01 +00:00
goldsimon
90c7d3aaff Temporary upgrade helper: define format string for u8_t as hex if not defined in cc.h 2010-03-10 16:18:12 +00:00
goldsimon
2621e3fa19 Use a union to let struct sockaddr have the same alignment requirements as struct sockaddr_in 2010-03-10 10:53:14 +00:00
goldsimon
36d7f50d77 Renamed tcp_output_set_header to tcp_output_alloc_header and included more code common to all callers 2010-03-09 16:29:19 +00:00
goldsimon
ffbb582dde ip_output: assert for p->ref == 1 to catch TCP retransmissions where the netif hasn't freed the pbuf yet 2010-03-09 16:24:38 +00:00
goldsimon
3bfc07eb92 Added comment, use braces for single-line if-blocks 2010-03-09 15:49:57 +00:00
goldsimon
d91caf1cd3 ip_input: better check for old link-local-address (explicitly check for autoip->llipaddr instead of letting all link-local-addresses through) 2010-03-08 18:24:23 +00:00
goldsimon
2a2be49d2c task #10241 (AutoIP: don't break existing connections when assiging routable address): when checking incoming packets and aborting existing connection on address change, filter out link-local addresses. 2010-03-08 18:17:52 +00:00
goldsimon
d47a04456b bug #29105: Review printf formatters 2010-03-08 17:07:35 +00:00
goldsimon
b9499d07c2 bug #29105: Review printf formatters: added X8_F to cc.h and use it in etharp.c 2010-03-08 17:04:27 +00:00
goldsimon
5d20e690fd Added/corrected casts 2010-03-08 12:17:29 +00:00
goldsimon
1c23bfdc7f Only add hostname if it's not empty (strlen > 0) 2010-03-08 12:15:58 +00:00
goldsimon
d5531a239b bug #28775 (select/event_callback: only check select_cb_list on change) plus use SYS_LIGHTWEIGHT_PROT to protect the select code. This should speed up receiving data on sockets as the select code in event_callback is only executed when select is waiting. 2010-03-07 18:40:54 +00:00
goldsimon
9e37d70163 Create mem_mutext at the end of mem_init. This enables sys_mutex_new to use the heap if required. 2010-03-07 16:50:08 +00:00
goldsimon
99ff7efe80 Use braces for if-blocks 2010-03-06 12:26:20 +00:00
goldsimon
43a08bef14 tcp_accepted(): check pcb state to verify it isn't called on a connection-pcb 2010-03-06 12:06:27 +00:00
goldsimon
92beddd72f task #7013 (Create option to have all packets delivered to netif->output in one piece): Always copy to try to create single pbufs in tcp_write. 2010-03-06 11:55:00 +00:00
goldsimon
f5b783d107 Fixed LWIP_NETIF_TX_SINGLE_PBUF for LWIP_TCPIP_CORE_LOCKING 2010-03-06 11:52:55 +00:00
goldsimon
a5a870c683 LWIP_NETIF_TX_SINGLE_PBUF needs TCP_OVERSIZE >= TCP_MSS for TCP 2010-03-06 11:51:31 +00:00