Commit Graph

491 Commits

Author SHA1 Message Date
goldsimon
6006e2f917 Changed some includes for loopif and added comments 2007-04-24 08:42:32 +00:00
goldsimon
02e194b15f fix bug #2595: "loopif results
in NULL reference for incoming TCP packets". Loopif has to be configured
(using LWIP_LOOPIF_MULTITHREADING) to directly call netif->input()
(multithreading environments, e.g. netif->input() = tcpip_input()) or
putting packets on a list that is fed to the stack by calling loopif_poll()
(single-thread / NO_SYS / polling environment where e.g.
netif->input() = ip_input).
2007-04-23 20:00:29 +00:00
jifl
eacac8ee1d * sockets.h: FD_SETSIZE needs to match number of sockets, which is
MEMP_NUM_NETCONN in sockets.c right now.
2007-04-17 14:50:08 +00:00
kieranm
79be888b6f * tcp.c, tcp_in.c, tcp_out.c, tcp.h: Modify way the retransmission
timer is reset to fix bug#19434, with help from Oleg Tyshev.
2007-04-12 14:56:07 +00:00
fbernon
9bc49b3268 opt.h: rename DBG_TYPES_ON & DBG_MIN_LEVEL with LWIP_ prefix. 2007-04-12 00:16:30 +00:00
goldsimon
e54f3fdaac 3rd fix for bug #11400 (arp-queuing): More pbufs than previously thought need to be copied (everything but PBUF_ROM!). Cleaned up pbuf.c: removed functions no needed any more (by etharp). 2007-04-11 18:50:45 +00:00
jifl
0c94f22ded * sys.h, api_lib.c: Provide new sys_mbox_tryfetch function.
Require ports to provide new sys_arch_mbox_tryfetch function to get
    a message if one is there, otherwise return with SYS_MBOX_EMPTY.
2007-04-11 15:41:03 +00:00
kieranm
05909d6fa7 Apply patch #5745: Fix "Constant is long" warnings with 16bit
compilers.  Contributed by avatar@mmlab.cse.yzu.edu.tw
2007-04-11 13:32:41 +00:00
jifl
712a22e18c Applied patch #5832 from Tai-hwa Liang to keep ipv6 building. 2007-04-10 13:18:14 +00:00
fbernon
35893e36dd opt.h, tcpip.h, tcpip.c, netifapi.h, netifapi.c: New configuration option LWIP_NETIF_API allow to use thread-safe functions to add/remove netif in list, and to start/stop dhcp clients, using new functions from netifapi.h. Disable as default (no port change to do). 2007-04-06 10:09:24 +00:00
goldsimon
f6bdd2cae4 Introduced #define LWIP_UNUSED_ARG(x) use this for and architecture-independent form to tell the compiler you intentionally are not using this variable. Can be overriden in cc.h. 2007-04-04 19:54:22 +00:00
goldsimon
34fcccc50b - Changed the names of some variables in SNMP module to avoid them shadowing each other (which produces a lot of warnings and makes the code hard to maintain)
- Added missing defines for 3 snmp-functions if LWIP_SNMP==0
2007-04-02 20:39:24 +00:00
fbernon
5368a760cf most of files: prefix all debug.h define with "LWIP_" to avoid any conflict with others environment defines (these were too "generic"). 2007-03-30 08:47:04 +00:00
fbernon
913a99dd35 api.h, api_lib.c, sockets.c: netbuf_ref doesn't check its internal pbuf_alloc call result and can cause a crash. lwip_send now check netbuf_ref result. 2007-03-28 17:26:06 +00:00
kieranm
01d9bd573e 2007-03-28 Kieran Mansley
* opt.h Change default PBUF_POOL_BUFSIZE (again) to accomodate default MSS +
    IP and TCP headers *and* physical link headers
2007-03-28 12:27:38 +00:00
fbernon
c1fe7517ec opt.h, netif.h, dhcp.h, dhcp.c: New configuration option LWIP_NETIF_HOSTNAME allow to define a hostname in netif struct (this is just a pointer, so, you can use a hardcoded string, point on one of your's ethernetif field, or alloc a string you will free yourself). It will be used by DHCP to register a client hostname, but can also be use when you call snmp_set_sysname. 2007-03-28 09:39:12 +00:00
fbernon
cd1c96db56 netif.h, netif.c: A new NETIF_FLAG_ETHARP flag is defined in netif.h, to allow to initialize a network interface's flag with. It tell this interface is an ethernet device, and we can use ARP with it to do a "gratuitous ARP" (RFC 3220 "IP Mobility Support for IPv4" section 4.6) when interface is "up" with netif_set_up(). 2007-03-28 09:23:35 +00:00
fbernon
19338d2774 opt.h, tcpip.c: New configuration option LWIP_ARP allow to disable ARP init at build time if you only use PPP or SLIP. The default is enable. Note we don't have to call etharp_init in your port's initilization sequence if you use tcpip.c, because this call is done in tcpip_init function. 2007-03-26 16:13:46 +00:00
fbernon
e54cd23ecb stats.h, stats.c, msg_in.c: Stats counters can be change to u32_t if necessary with the new option LWIP_STATS_LARGE. If you need this option, define LWIP_STATS_LARGE to 1 in your lwipopts.h. More, unused counters are not defined in the stats structs, and not display by stats_display(). Note that some options (SYS_STATS and RAW_STATS) are defined but never used. Fix msg_in.c with the correct #if test for a stat display. 2007-03-22 16:36:45 +00:00
fbernon
544e469eeb api_msg.h, api_msg.c: Remove obsolete API_MSG_ACCEPT and do_accept (never used). 2007-03-22 09:34:18 +00:00
fbernon
766159e27e opt.h: Add LWIP_NETIF_CALLBACK (to avoid compiler warning) and set it to 0. 2007-03-21 15:35:02 +00:00
fbernon
bb34d8cfd1 api_msg.c, igmp.c, igmp.h: Fix C++ style comments 2007-03-21 14:47:52 +00:00
kieranm
e5147d5562 * netif.c, netif.h: Apply patch#4197 with some changes (originator: rireland@hmgsl.com).
Provides callback on netif up/down state change.
2007-03-21 13:24:20 +00:00
kieranm
d7ff85850c 2007-03-21 Kieran Mansley
* opt.h Change default PBUF_POOL_BUFSIZE to accomodate default MSS +
    IP and TCP headers
2007-03-21 13:05:51 +00:00
kieranm
b422864d5d sockets.c, igmp.c, igmp.h, memp.h: Fix C++ style comments and
comment out missing header include in icmp.c
2007-03-21 12:50:04 +00:00
fbernon
eab3667b61 memp.h, stats.c: Fix stats_display function where memp_names table wasn't synchronized with memp.h 2007-03-20 18:12:06 +00:00
fbernon
b035a6196a Add return types to tcpip_apimsg() and api_msg_post() to check ERR_MEM problems (api_lib.c can be change now). 2007-03-19 20:35:32 +00:00
fbernon
e4cd00b5ea Remove unimplemented "memp_realloc" function from memp.h. 2007-03-19 20:23:58 +00:00
fbernon
1af676385c Add igmp.h and igmp.c inside tree :
src/core/ipv4/igmp.c
src/include/ipv4/lwip/igmp.h
2007-03-11 19:45:32 +00:00
fbernon
a24a170b84 New configuration option LWIP_IGMP to enable IGMP processing. Based on only one filter per all network interfaces. Declare a new function in netif to enable to control the MAC filter (to reduce lwIP traffic processing).
Mace Gael for the upper layers, Steve Reynolds for lower ones...
2007-03-11 19:16:38 +00:00
goldsimon
bc4b3764fc Fixed bug #19251 (missing `const' qualifier in socket functions), to get more compatible to standard POSIX sockets. 2007-03-11 17:57:13 +00:00
fbernon
5c65d4733b Keepalive values can be configured at run time with LWIP_TCP_KEEPALIVE, but don't change this unless you know what you're doing (default are RFC1122 compliant). Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set in seconds.
Old TCP_KEEPALIVE can always be used, and its only difference with TCP_KEEPIDLE is this last use seconds and not milliseconds with setsockopt.

Some documentation (not perfect, but...):

http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.commtechref/doc/commtrf2/setsockopt.htm
2007-03-11 15:53:43 +00:00
fbernon
86cecd6700 Keepalive values can be configured at compile time, but don't change this unless you know what you're doing (default are RFC1122 compliant). 2007-03-08 21:02:39 +00:00
fbernon
fdcb87db19 Implement LWIP_SO_RCVTIMEO configuration option to enable/disable SO_RCVTIMEO on UDP sockets/netconn. 2007-03-08 20:58:46 +00:00
goldsimon
5eabd4591a SNMP UDP ports can be configured at compile time 2007-03-08 10:32:29 +00:00
goldsimon
ea7bdb8e9e Last change (reduce code size if not used) had a bug... 2007-03-06 19:37:32 +00:00
fbernon
7fd37d4e87 Implement SO_RCVTIMEO on UDP sockets/netconn. 2007-03-06 16:41:02 +00:00
goldsimon
874bfe19d2 Reduce code size: don't include code in those files if IP_FRAG == 0 and IP_REASSEMBLY == 0 2007-03-06 15:27:58 +00:00
fbernon
ed07d481d6 opt.h, ip_frag.h, tcpip.h, tcpip.c, ethernetif.c: add new configuration option named ETHARP_TCPIP_ETHINPUT, which enable the new tcpip_ethinput. Allow to do ARP processing for incoming packets inside tcpip_thread (protecting ARP layer against concurrent access). You can also disable old code using tcp_input with new define ETHARP_TCPIP_INPUT set to 0. Older ports have to use tcpip_ethinput. 2007-03-06 14:18:02 +00:00
goldsimon
7115975212 fixed compiler warning "initialization dircards qualifiers from pointer target type" 2007-03-06 07:28:22 +00:00
fbernon
ddf0982d0f opt.h, sockets.h: add new configuration options (LWIP_POSIX_SOCKETS_IO_NAMES, ETHARP_TRUST_IP_MAC, review SO_REUSE).
Also include directly tcp.h in sockets.h to improve application independancy from ip stack (avoid to include directly in application the "unknown" tcp.h if you need options like TCP_NODELAY and TCP_KEEPALIVE in application.
2007-03-05 14:43:11 +00:00
goldsimon
1f544e087b Fix BUG#11400 - don't corrupt existing pbuf chain when enqueuing multiple pbufs to a pending ARP request 2007-03-04 12:12:42 +00:00
kieranm
527d18a526 2007-02-28 Kieran Mansley (based on patch from Simon Goldschmidt)
* api_lib.c, tcpip.c, memp.c, memp.h: make API msg structs allocated
    on the stack and remove the API msg type from memp
2007-02-28 14:15:43 +00:00
jifl
1d22294974 * sockets.h, sockets.c: Move socket initialization to new
lwip_socket_init() function.
2007-02-26 20:01:04 +00:00
christiaans
a91374a916 Added MEM_LIBC_MALLOC option as workaround for failing mem_malloc(). 2006-12-01 15:38:56 +00:00
christiaans
b4f1deaa46 Accepted patch #5493 IP frag/reass config item tweak. 2006-11-27 14:48:21 +00:00
christiaans
77e0f77850 Added snmp_send_trap() parameter, caller must pass enterprise id for enterprise secific traps. 2006-11-27 08:43:10 +00:00
christiaans
d4b6471d39 Replaced tabs with space. 2006-11-17 10:51:13 +00:00
christiaans
bd86f95512 Cold case #9191 fixes for NC30 compiler for the M16 mcu, reported by Bjorn Sundman. 2006-10-25 07:51:17 +00:00
christiaans
bc182cab7c Removed EXPERIMENTAL status. 2006-10-13 12:00:35 +00:00
christiaans
b5f4672155 Partially accepted patch #5449 for ANSI C compatibility / build fixes. Fixed bug #17574 corrected UDP-Lite protocol identifier. 2006-10-11 12:04:04 +00:00
christiaans
cfb082a20b Added external mibnode panic closure functions, tobe called for error responses. 2006-10-02 10:13:04 +00:00
christiaans
64dab92c6b Redesign of snmp_msg_event() fsm, added SNMP SET to fsm. 2006-09-27 07:25:16 +00:00
christiaans
f576755b13 Added snmp_msg_event_loop() prototype. 2006-09-22 08:09:08 +00:00
christiaans
eabfb233b8 Moved SNMP_CONCURRENT_REQUESTS to opt.h, babysteps for external MIB nodes. 2006-09-20 13:33:50 +00:00
christiaans
960e724ad3 Improved mib node struct for external object access and moved get_object_def() calls to the message processing bit. 2006-09-14 15:08:54 +00:00
christiaans
320ea29861 Added some lines for SET command. 2006-09-12 10:03:46 +00:00
christiaans
a88d054d05 Improved TRAP interfacing. Varbinds maybe allocated at (external) trap source as wel. Added trap destination settings. 2006-09-07 14:17:03 +00:00
christiaans
6576802287 Fixed compilation for LWIP_SNMP 0. 2006-09-07 07:39:49 +00:00
christiaans
41ff80e5d3 First getnext succes, values are returned insead of NULLs, empty tables are skipped. Limitation: a single varbind per request, so 'snmptable' will fail. 2006-09-06 10:14:07 +00:00
christiaans
56c5fdbeaf Added newlines in debug output, small optimalisations, more work on 'getnext', fixed 'get' on udp table. 2006-09-04 09:22:48 +00:00
christiaans
130d39cc03 Changed index structs to mib_list_node structs to place the table index trees directly in the mib tree. 2006-09-01 07:14:50 +00:00
christiaans
1485edf8e1 Added index tree node structs and functions, e.g. to be used for ARP table indexes. 2006-08-29 11:28:28 +00:00
christiaans
c3f82acf7a Pacified GCC warnings. 2006-08-21 11:50:03 +00:00
christiaans
2dcbd016e6 Added tree expansion func protos for getnext. 2006-08-17 14:16:30 +00:00
christiaans
d734cd986c Moved noleafs_get_object_def() and noleafs_get_value() protos from mib2.c to snmp_structs.h 2006-08-15 07:28:43 +00:00
christiaans
8559f3e583 MIB-2 object values near to completion, just committing for keeping the flame alive. 2006-08-11 14:16:36 +00:00
christiaans
43bf9a8e46 Added SNMP counters, moved some defines. 2006-08-11 14:12:05 +00:00
christiaans
19f57bf810 Exported udp_pcbs in udp.h (for SNMP agent). 2006-08-11 14:09:48 +00:00
christiaans
469012b544 Added etharp_find_addr(), finds eth/IP address pair by interface ptr and IP address. 2006-08-08 15:10:42 +00:00
christiaans
d8922d0410 Added minimalistic SNMP GET functionality. 2006-07-14 12:54:38 +00:00
christiaans
54bb20b486 Added SNMP statistics to struct netif and changed SNMP macro glue. 2006-07-14 09:58:02 +00:00
christiaans
57a6eaae7b Added SNMP debug options. 2006-07-10 12:41:25 +00:00
christiaans
7a5cb21056 Fixed (experi)mental typo. 2006-07-07 11:33:36 +00:00
christiaans
333c3f18c0 Initial commit. Expirimental code, please note this is not yet fully functional. 2006-07-07 09:49:31 +00:00
christiaans
12f9adbdd3 Added ip_frag_init() prototype. 2006-07-04 08:24:55 +00:00
christiaans
cbe83f32b6 Honoured Pedro Alves namespace request, following lwip style struct naming. 2006-06-22 11:22:47 +00:00
christiaans
3bffb0a181 Added struct obj_id and a few system group access funcs. 2006-06-22 09:33:10 +00:00
christiaans
09dc9c89a8 Added mib-2 snmp group statistics prototypes. 2006-06-19 13:04:11 +00:00
christiaans
09707a3e81 Prepared some SNMP options. 2006-06-19 13:03:09 +00:00
christiaans
d821277430 Fixed cold case bug #1748, printing of mem_size_t and u16_t statistics. 2006-06-15 07:10:04 +00:00
curtmcd
b306594cad Remove unused mem_reallocm 2006-05-31 21:23:01 +00:00
curtmcd
b60b7cf8fe Use isprint() instead of isascii() as it's more common
Change return type of inet_aton from s8_t to int (standard)
Touch up comments and white space
2006-05-30 19:09:41 +00:00
curtmcd
076a884651 Add comment about purpose of struct ip_addr2.
Improve white space formatting, add parens in IP4_ADDR().
2006-05-26 18:52:27 +00:00
christiaans
94abf9d935 Added LWIP_PLATFORM_BYTESWAP optimalisation flag and macro glue. 2006-03-29 10:15:43 +00:00
christiaans
c55c375b0a Removed tabs, default LWIP_HAVE_LOOPIF to 0 to slim footprint. 2006-03-01 10:41:23 +00:00
christiaans
3aea7bc053 Removed timer dependency on sys.c (raw-API). Beautified indentation. 2006-02-13 08:12:07 +00:00
christiaans
39c35732de Code style fix, C++ into C comments. 2006-02-13 08:09:01 +00:00
likewise
02b575e9e4 Added Curt McDowell's platform-independent optimized checksum routine. 2005-12-14 22:51:35 +00:00
christiaans
e1b215aa73 Introduced cc.h formatters and removed SO_REUSE from transport layers. 2005-11-25 12:03:38 +00:00
likewise
0e0a7d82de Re-enabled ARP packet queueing. (Now that multi-packet queueing is disabled in etharp.c). 2004-12-27 14:45:12 +00:00
likewise
a549ec0382 Added inline source documentation. 2004-12-27 14:42:02 +00:00
likewise
15257f4524 Update comment on ETHARP_QUEUEING. Defaulted to being disabled. 2004-12-24 21:58:53 +00:00
christiaans
805f495d84 christiaans: Fixed SO_REUSE default to 0. Actually we should fix udp so it won't depend on the socket layer. 2004-12-06 11:50:53 +00:00
likewise
ed59dc1ada Prevented a race condition between a new ARP request and the ARP timer.
Timeouts stay the same (halved the ARP timer, doubled the counts), but
ETHARP_MAX_PENDING should be at least 2 to prevent it from reaching 0 right away,
giving too little time for any ARP responses to be noted.
2004-11-28 18:00:20 +00:00
likewise
fd49ee3c8d 2004-11-25 Leon Woestenberg <leon.woestenberg@gmx.net>
* ipv4/ip_addr.h: Renamed ip_addr_maskcmp() to _netcmp() as we are
    comparing network addresses (identifiers), not the network masks
    themselves.
  * ipv4/ip_addr.c: ip_addr_isbroadcast() now checks that the given
    IP address actually belongs to the network of the given interface.
2004-11-25 13:33:07 +00:00
likewise
fab107a9df DECLINE message was unicast instead of broadcast 2004-11-25 11:10:53 +00:00
kieranm
4e309b7992 Kieran Mansley - kjm25@cam.ac.uk - 24th Nov 2004
* Changed pcb->rttest from u16_t to u32_t - comparisons with tcp_ticks (which is u32_t) were failing after 9 hours of operation
2004-11-24 17:04:34 +00:00
likewise
791fa28817 Removed static declaration of dhcp_release(). 2004-11-04 19:19:29 +00:00
christiaans
3fab752640 Removed struct netif; forward decl. is already included from ip_addr.h.
Hit me if it breaks exsisting code.
2004-10-29 14:57:38 +00:00
likewise
252dcd8626 Reverted back the TCP_BETWEEN macro. It does not work on all archs. 2004-10-14 12:24:52 +00:00
kieranm
2ed5bc5195 Kieran Mansley - kjm25@cam.ac.uk - 12th September 2004
Applied patch from Sam Jansen as detailed in
http://lists.gnu.org/archive/html/lwip-users/2004-07/msg00106.html
to correctly handle retransmission after a retransmission timeout
2004-09-12 16:34:06 +00:00
kieranm
a3d27e30e0 Add TCP_SEQ_BETWEEN macro for comparing a range of sequence numbers 2004-09-12 15:56:12 +00:00
likewise
89abd1f58e Do no longer try to free pbuf when TCP_EVENT_RECV() is called without a callback handler, and without packet.
The standard HTTP server failed on this (as reported by three users).
2004-09-08 22:33:46 +00:00
likewise
22ac311496 Support for PACK_STRUCT_USE_INCLUDES was broken.
Added one missing PACK_STRUCT_END.
2004-08-10 14:50:44 +00:00
likewise
0e31ca73c0 Have PBUF_LINK_HLEN default to 14 bytes (for Ethernet). 2004-08-10 14:41:12 +00:00
softins
c4ef1e5c19 Add (int) cast in LWIP_DEBUGF() to avoid compiler warnings about comparison. 2004-07-27 16:19:16 +00:00
softins
42a6fa972d Corrected IPH_TOS() macro: returns a byte, so doesn't need htons(). 2004-07-27 14:46:24 +00:00
likewise
786cbee510 Support for learning DNS servers through DHCP. 2004-07-22 21:56:09 +00:00
likewise
ce0410b205 LWIP_TIMEVAL_PRIVATE must be defined in architecture cc.h file, either 1 or 0. Defaults to 1. 2004-07-04 23:42:14 +00:00
likewise
d11fcafad8 Added netif up/down basics. 2004-06-30 18:38:07 +00:00
likewise
6587efb3e8 Fixed #if ETHARP_QUEUEING to #if ARP_QUEUEING. 2004-05-07 01:20:28 +00:00
likewise
e4295396ac Re-instantiated the pack directives. Nested structs do break individual field natural alignment on arm-gcc. 2004-05-06 03:27:13 +00:00
likewise
2df9cd7262 Exported etharp_request(). 2004-05-06 02:43:47 +00:00
likewise
273612b251 Prevent non-unicast addresses from polluting the ARP cache. 2004-05-05 23:47:33 +00:00
likewise
e2bc8e86e2 Removed a closing bracket, left over after removing pack directives. 2004-05-05 23:04:17 +00:00
likewise
79110ba469 Removed all structure packing directives. Protocol header fields are naturally aligned by design.
(Earlier, the 14-byte ethernet header screwed this up, this had already been fixed by adding two pad bytes.)
Assumption is that compilers do not align with larger-than-sizeof(type) boundaries.
Pre-tag PRE_PACK_REMOVE. Post-tag POST_TAG_REMOVE.
2004-05-05 19:16:51 +00:00
likewise
29df95c514 As etharp already sends packets from the queue asynchronously, also make it send packet submitted through etharp_output().
etharp_output() now returns err_t.
etharp_query() now sends a packet directly if the IP address is stable.
2004-05-05 18:28:42 +00:00
likewise
015cb1a35d etharp_*_input() return value (pbuf) removed; it has not been used since the packet queue
implementation. Packets are always sent to the network interface on behalf of ARP.
2004-05-05 15:59:12 +00:00
likewise
b217b020a5 Changed PAD_ETH_SIZE into ETH_PAD_SIZE for consistency with de-facto lwIP naming convention. 2004-05-05 15:09:13 +00:00
likewise
0c960a82ce The recv callback has u8_t return type. Fixed theraw_pcb struct to reflect this. 2004-05-05 14:30:28 +00:00
likewise
c69b93b246 The recv callback has u8_t return type. Fixed the raw_recv() prototype to reflect this. 2004-05-05 14:21:05 +00:00
likewise
5e13b9528d Adpated comments to match Doxygen/JavaDoc style. 2004-05-05 14:12:28 +00:00
likewise
ed201c35d2 Made raw_input() more generic allowing multiple matches until someone eats the packet. 2004-05-05 13:27:27 +00:00
likewise
4eadc22a36 Some updates on "gratuitious ARP" from RFC3220. Cleanup of some code and comments. 2004-05-03 17:50:11 +00:00
jani
4e2260c74c by default there's no eth padding to preserve preious beahviour 2004-05-03 09:42:58 +00:00
likewise
955d6206ee Fixed hasty job prototype for pbuf_queue(). 2004-04-30 00:58:55 +00:00
likewise
5df22b3468 Added missing prototypes for pbuf_*queue(). 2004-04-30 00:57:20 +00:00
likewise
aef86ec5ef DHCP header used u32_t where struct ip_addr is more appropriate. 2004-04-30 00:51:49 +00:00
likewise
94d3b04d68 Applied cleaner new patch for bug #8708.
Implemented multiple packets on the outgoing queue in etharp.c.
Removed etharp.c specific queueing functions.
Fixed generic pbuf.c queueing functions.
2004-04-30 00:25:03 +00:00
likewise
8603e19516 Removed ETHARP_ALWAYS_INSERT. 2004-04-28 23:20:18 +00:00
likewise
7a2751043a Removed ETHARP_ALWAYS_INSERT. Whitespace cleanup. 2004-04-28 23:19:38 +00:00
likewise
5b12c61a81 Removed old broadcast check macro. 2004-04-28 23:18:20 +00:00
likewise
2db9551750 Patch of bug #8708 applied which should fix header alignment issues on 32-bit processors.
While this patch might need further clean-up, it is applied to make sure this gets attention.
2004-04-28 00:26:35 +00:00
jani
6d704c728e do not export struct timeval to external users of socket.h to avoid conflicts 2004-03-26 13:21:35 +00:00
jani
6c6f32f17f fix recursive inclusion by forward defining struct netif 2004-03-26 13:21:10 +00:00
jani
0e4ce326c2 warnign fixe for stat_display 2004-03-26 13:11:35 +00:00
jani
d27448da8a fix up stats_display which was added in previous commit 2004-03-26 12:47:57 +00:00
likewise
82f852abf3 Fix cyclic dependencies by careful re-ordering of #includes.
This is really nasty. Can we forward-declare pointers to structs?
2004-03-12 00:10:07 +00:00
likewise
239c6fe070 Removed offending #include. 2004-03-11 21:39:47 +00:00
likewise
579d2ad811 Disabling ip_addr_isbroadcast() due to recursive header dependencies.
Currently, patch #2679 is broken, but will be neatly fixed once this is solved.
2004-03-11 21:37:56 +00:00
likewise
0cb355cd7c Added netif #include. 2004-03-11 21:28:37 +00:00
likewise
86135d12b9 Fix prototype. 2004-03-11 21:25:28 +00:00
likewise
10d42c6fa3 Replaced ip_addr_isbroadcast() macro by function.
Overrides patch #2679, as this must be solved inside ip_addr_isbroadcast(), inspired by BSD.
2004-03-11 21:20:10 +00:00
likewise
bfdf19f56c Make udp_disconnect() clear its remote address association. 2004-03-11 20:45:09 +00:00
likewise
a916de3b66 Added udp_sendto(). 2004-03-11 19:41:22 +00:00
jani
30e5dfddb9 fix inet_ntoa prototype to be standard, and fix ppp code that used the non-standard version 2004-03-10 13:23:04 +00:00
jani
4ea55b1bbc only include sys.h once. Noted by Tom Barker 2004-03-09 14:03:11 +00:00
jani
33d0096b81 add switch for MEMP_SANITY_CHECK defaulting to off 2004-02-26 10:43:09 +00:00
jani
e85a892111 add default option for LWIP_RAW 2004-02-23 14:28:03 +00:00
lukem
4bf3359574 Added ability to disable checksum generation and checking at compile-time 2004-02-20 01:46:03 +00:00
jani
f75da2c393 ip_lookup and udp_lookup not use remove declarations 2004-02-09 10:23:41 +00:00
likewise
475576ec20 Updated some copyright notices to include 2004 (a few were forgotten earlier). 2004-02-07 23:24:09 +00:00
likewise
1ed40e7983 Applied alias.diff by Ian Wienand on lwip-devel on February 4th 2004.
Using union to make explicit either tcp_listen_pcb or tcp_pcb.
2004-02-06 23:48:40 +00:00
likewise
1b96391cdf Merged from DEVEL to main. Two TCP fixes and two NULL reference fixes. 2004-01-20 13:23:52 +00:00
uid67528
eed8ea5bc1 Merged from DEVEL. etharp prepared for queueing feature. DHCP fix. 2003-12-28 02:38:51 +00:00
likewise
3c71c378bc An overriden merge from DEVEL to main was needed as small changes had been made to main. 2003-11-14 14:56:30 +00:00
likewise
e4a6d199fe Merged from DEVEL into main tree. 2003-11-14 13:17:23 +00:00
likewise
bdfdc2bb83 Made hton/ntoh argument name in prototypes match those in functions. 2003-07-07 09:11:17 +00:00
marcbou
351e590e01 Merged from DEVEL. 2003-06-27 20:46:11 +00:00
marcbou
ec1c2a714e merged from DEVEL. 2003-06-19 11:35:26 +00:00
marcbou
506a57392c Merged from DEVEL 2003-06-19 11:08:57 +00:00
likewise
ba786dc49b Applied patch #1596 fixing wrongly cast LWIP_DEBUGF arguments.
(printf expects integers on the var args stack)
2003-06-11 22:11:42 +00:00
likewise
af384440f8 Applied patch #1597 2003-06-11 21:22:58 +00:00
kieranm
8014551908 Changed DEBUGF to LWIP_DEBUGF 2003-06-10 10:45:29 +00:00
likewise
df99ce9d98 Replaced all tabs with two spaces (regardless of indentation is correct). 2003-06-09 21:14:47 +00:00
jani
ea08652416 fixed sio_read_abort prototype 2003-06-02 11:30:47 +00:00
jani
26d9b28f77 sio and PPP updates from Marc 2003-06-02 11:12:56 +00:00
jani
2bfd55fd69 sys_msleep and sys_jiffies used by PPP code.From Marc 2003-06-02 11:10:20 +00:00
jani
39a6db4097 inet_ntoa and inet_aton from Marc 2003-06-02 11:09:01 +00:00
jani
6719f10034 put LWIP_MAX and LWIP_MIN macros in def.h and use these instead of locally declaring them in .c files 2003-05-27 13:44:08 +00:00
jani
cd65d36822 patches 1492, 1493 and 1494 from Marc 2003-05-19 14:41:54 +00:00
likewise
cda867d52b Applied patches posted by Marc Boucher on lwip-users May 18th 2003. 2003-05-18 22:29:10 +00:00
jani
24a9063721 add sio_read and sio_write to beused by PPP 2003-05-06 12:20:57 +00:00
jani
840953c0e3 empty lightweight protection macros defined not only for no_sys 2003-05-06 12:19:53 +00:00
jani
c3fa5819fd simplify MEM_ALIGN_SIZE macro 2003-05-06 11:24:42 +00:00
likewise
7e73e4728d Made pbuf flags unsigned. Added "incoming broadcast" flag. 2003-05-03 09:44:09 +00:00
jani
4c3f44b0d2 add PPP_DEBUG option and align all options to teh same colums using spaces and no tabs.closes patch #1306 too 2003-05-01 09:36:08 +00:00
likewise
b031be753a Patch #1308. Disabled, as one issue in dhcp.c (file field overloading) needs fix. 2003-05-01 09:03:20 +00:00
anderscarlman
084c45d3db Added dummy parameters for the empty macros snmp_add_ifinoctets and
snmp_add_ifoutoctets in order to avoid compiler warnings.
2003-04-27 09:51:59 +00:00
likewise
12bb78a425 Either first or last packet can be queued through ARP_QUEUE_FIRST option. 2003-04-22 15:09:56 +00:00
jani
1204e461c8 add definitions for PF_UNSPEC and IPPROTO_IP 2003-04-22 13:37:14 +00:00
likewise
9bc16878ea Fixed tabs into spaces. Fixed other stylos. 2003-04-16 07:39:48 +00:00
likewise
a1efd95d0f hexadecimal notation for NETIF_FLAGS_ 2003-04-15 12:44:15 +00:00
likewise
a8976fd367 Again accepted NULL to indicate IP_ADDR_ANY. 2003-04-15 09:16:39 +00:00
likewise
11e0cf6f40 Added NETIF_FLAG_LINK_UP. Not used yet. 2003-04-14 12:29:45 +00:00
likewise
dc1ac6107f Disabled pbuf_dechain() as it not currently in use. 2003-04-14 12:17:08 +00:00
likewise
4bcfd81923 Macro IP_ADDR_ are cast non-const as lots of functions miss const qualifier for arguments. 2003-04-11 08:45:15 +00:00
likewise
f6a8994521 ip_addr_any and _broadcast are type-declared as being const. 2003-04-11 08:10:17 +00:00
davidhaas
0bce6f8974 Fixed bug where tearing down a connection would cause loss of memory. 2003-04-09 20:12:12 +00:00
jani
a3087737bd initial PPP options 2003-04-07 08:54:18 +00:00
likewise
e36394e6cc Only changes to comments. 2003-04-03 19:11:02 +00:00
likewise
af8f280811 Fixed ip_addr_set() to deal with IP_ADDR_ANY. Added "ip_addr.h" include. 2003-04-01 15:00:26 +00:00
likewise
7842a0190a IP_ADDR_ANY is now a pointer to { 0UL } (see IP_ADDR_BROADCAST).
For easier debugging of IP addresses.
2003-04-01 14:50:00 +00:00
likewise
1a72feb128 etharp_query() has error return type now. Matched dhcp.c with this change.
Added debug messages in other places.
2003-04-01 14:02:50 +00:00
likewise
a70f478ef1 Fixed pbuf_dechain() assertion. Removed old documentation from pbuf.h. 2003-03-31 11:39:48 +00:00
likewise
6c147709b6 Documentation changes. Added missing trailing newlines to debug messages. 2003-03-31 10:32:35 +00:00
likewise
c50f80da92 Corrected more pbuf.c functions to comply with pbuf->ref and ->tot_len invariant. 2003-03-30 22:24:10 +00:00
davidhaas
c4ff244c4e Fixed minor compile issues. 2003-03-28 19:45:37 +00:00
likewise
002998cf49 Fixed bugs #2968 (ref count) and #2670 (total length).
Name of pbuf_unref() falsely suggests to undo pbuf_ref(), renamed to pbuf_take().
2003-03-28 08:49:05 +00:00
likewise
cf188ba15c Brackets around debug in DEBUGF. Cleaned comments. 2003-03-26 00:31:24 +00:00
likewise
fa34d51b7e Added documentation and comments. 2003-03-25 12:59:42 +00:00
jani
c60d0de919 Add sio.h containing interface to platform specific serial layer.Make slipif use it instead of defining extern functions.This is in preparation for PPP 2003-03-24 10:54:03 +00:00
likewise
6457b93a1f Made some flag defines unsigned. 2003-03-24 10:30:12 +00:00
jani
84697ce713 Add priority argument to thread sys_thread_new.Patch from floriZ but slightly modfied 2003-03-19 15:27:56 +00:00
jani
0846206bc0 rename STATS to LWIP_STATS and make it checked by #if not #ifdef.The rest of the _STATS defines should follow 2003-03-19 12:37:46 +00:00
jani
441e9b8431 add tcpip_callback patch from Marc 2003-03-19 11:23:46 +00:00
davidhaas
2673568cfd Added default settings for DBG_MIN_LEVEL and definitions for the possible
levels.
2003-03-17 16:59:22 +00:00
likewise
d47ef79c04 Moved DBG_MIN_LEVEL out of here to lwipopts.h 2003-03-11 14:16:27 +00:00
likewise
400ff200ee Added comments on some ARP options. 2003-03-11 13:57:25 +00:00
likewise
aa84869fdb Fixed cyclic dependency by including netif.h. Not sure if this breaks other compilers? 2003-03-10 16:09:41 +00:00
likewise
bd6b1a0237 DBG_TYPES_ON added (must be overridden in lwipopts.h). 2003-03-10 16:08:52 +00:00
likewise
adf088e575 DBG_TYPES_ON removed (must be in lwipopts.h instead). 2003-03-10 16:07:50 +00:00
jani
8613f2a48e factor out netif_set_addr so address of netif can be changed 2003-03-07 10:55:58 +00:00
jani
f308f7cc80 Add sys_untimeout stub in case of NO_SYS 2003-03-07 10:29:25 +00:00
jani
eb1a41f3c9 socket functions use socklen_t, patch from floriZ.Also set/getsockopt use void * instead of char * as fourth arg 2003-03-03 10:29:21 +00:00
davidhaas
ee2c049518 Fixed build for coldfire after last debug.h and opt.h changes. 2003-02-25 21:46:04 +00:00
jani
bcfc7173f3 default value for NO_SYS 2003-02-24 13:57:39 +00:00
jani
d390ca7056 cleaned up opt.h a bit, added more option defaults ad changed SYS_LIGHTWEIGHT_PROT to be a 0/1 define.The same for COMPAT_SOCKET 2003-02-24 10:49:05 +00:00
jani
18df3961e9 byte-order handling functions are in inet.c now and the uperrcase counterparts are gone. opt.h has all the
configurable items debug does not need to be directly included.
2003-02-21 16:43:46 +00:00
jani
d372121d6e dhcp.h and ip.h declare struct netif and don't include netif.h to avoid warnings. 2003-02-20 17:16:30 +00:00
jani
8e9aa84070 do not directly include lwipopts.h but lwip/opt.h instead 2003-02-20 16:32:22 +00:00
jani
6319ffbcb8 delete ethernetif.h 2003-02-20 15:23:04 +00:00
likewise
d1c03cbd69 Fixed some issues open after merging 'leon-dhcp'. 2003-02-20 14:35:40 +00:00
likewise
37629fc1b6 Fixed some issues open after merging 'leon-dhcp'. Added new debugging. 2003-02-20 13:13:51 +00:00
jani
cc31bb9358 make netif->init return err_t instead of void.Patch from David Le Corfec 2003-02-20 11:51:53 +00:00
jani
35ef1e1b86 fix compiler error 2003-02-20 11:48:13 +00:00
likewise
d8d787545e Merged with leon-dhcp branch. Tagged as POST_leon-dhcp afterwards. 2003-02-20 08:41:59 +00:00
likewise
0a51d72098 Removed Id: fields as they give conflicts while merging to leon-dhcp branch. 2003-02-19 22:07:42 +00:00
davidhaas
e13c78820f Fixed SYS_ARCH_PROTECT macros when NO_SYS is not defined.
Added documentation for lightweight protection.

Fixed debug statement in ip.c.

Removed tabs in files I changed.
2003-02-18 21:14:16 +00:00
davidhaas
7f1becc682 Allow minimal unix target to build in cygwin (but not necessarily run).
Applied a patch from Marc Boucher which has the following changes:

1) Fixed sys_arch.txt documentation to have new return type from
   sys_thread_new.

2) Removed unnecessary casts on calling sys_timeout() in certain files.

3) Removed some unnecessary break statements after return statements.

4) Changed sys_timeout_remove() to sys_untimeout().

5) Added some forgotten #ifndef SYS_LIGHTWEIGHT_PROT to memp.c

6) Changed LWIP_DIAG and LWIP_PLATFORM_ASSERT to have do while().
2003-02-18 19:27:48 +00:00
likewise
1660e800e0 Made UDP flag defines unsigned (by adding the U suffix). 2003-02-18 12:41:52 +00:00
jani
da40fbd054 move FD_SET defines to sockets.h from arch.h .Last arg of select is not a const according to linux and openBSD manpages 2003-02-17 11:34:48 +00:00
likewise
90bc698a40 Lightweight protection macros were not defined if NO_SYS was defined. 2003-02-17 10:13:00 +00:00
davidhaas
de29a0818e By request: moved lightweight protection to macros. 2003-02-12 22:00:18 +00:00
davidhaas
4fc309b1dd Made sys_arch_prot() interface more generic by returning sys_prot_t instead
of u32_t.
2003-02-12 16:38:46 +00:00
jani
ea66eb6c23 one more C++ comment changed two prototypes added for the SNMP = 1 case 2003-02-12 08:06:50 +00:00
davidhaas
7b3e158c92 sys_thread_new() now returns the thread (request from Marc Boucher).
Removed some unused .h files in coldfire port.

Support LWIP_DIAG and LWIP_ASSERT in coldfire (sort of).

Fix to last api fix to make sure select() is triggered, even when there has
been a FIN.

Allow build of unixsim from cygwin by specifying "make ARCH=cygwin" or from
linux by specifying "make ARCH=linux".
2003-02-11 21:00:14 +00:00
jani
16833de1cf remove list.h 2003-02-11 09:10:10 +00:00
likewise
0cb0cd6611 C instead of C++ style comments. 2003-02-10 23:51:06 +00:00
davidhaas
dc49999124 Fixed some build issues regarding snmp.h 2003-02-10 21:58:34 +00:00
likewise
daebdd1d77 Removed my #error. 2003-02-10 19:55:35 +00:00
likewise
c68ee2b2ed SNMP functions are now unconditionally called and defined empty if LWIP_SNMP == 0
This removes a lot of #if #endif cluttering the source code.
2003-02-10 13:47:47 +00:00
likewise
32fbec2e48 Include arch/cc.h first, as architecture headers might #define NULL itself. 2003-02-10 13:20:33 +00:00
jani
c13e08a7f5 make debugs and asserts platform independent.No more use of abort and printf.delete 2 references to arch/cpu.h and arch/lib.h 2003-02-10 11:15:19 +00:00
jani
1868b2d244 tcp_timer_needed should be a noop when using the raw API.Fix link error bug #2489 2003-02-07 10:13:51 +00:00
davidhaas
dd2fa15e8a Add the following features and bugfixes:
Added select() functionality to sockets library.
Support for errno in sockets library.
Byte ordering fixes.
basic lwip_ioctl(), FIONREAD, get/setsockopt() etc. support

- added additional argument to netif_add to pass state pointer so that the
if_init function has access to context information before
the interface is added, without accessing globals.

- added netif_remove()

- to conserve cpu load the tcpip_tcp_timer should only be active
when tcbs that need it exist.

- pass length of available data to callbacks for NETCONN_EVT_RCV events

- added tcpip_link_input(), a hack to allow processing of PPP
packets in tcpip_thread() context. This saves threads and context
switches.

- renamed incompatible ASSERT() macro to LWIP_ASSERT() to avoid name
collision.

- changed a bunch of %d's to %u's in format strings for unsigned values.

- added ip_frag to lwip_stats.

- changed IP_REASS_MAXAGE and IP_REASS_TMO defaults to more realistic
values.

- added sys_timeout_remove() function to cancel timeouts (needed by PPP
amongst other things).

- tolerate NULL returns from sys_arch_timeouts() since some threads might
not need to use or have timeouts.

- added sys_sem_wait_timeout()

- moved mem_malloc() function to end of mem.c to work around tasking
compiler bug.

- automatically bind to local tcp port if 0.

- allow customization of port ranges for automatic local bindings.

- corrected various typos, spelling errors, etc..

Thanks to Marc Boucher for many of these changes.
2003-02-06 22:18:56 +00:00
davidhaas
98fbb855fb Added lightweight protection. In coldfire this is implemented by disabling
interrupts. In unixsim this is implemented by using a mutex. Uses #define
SYS_LIGHTWEIGHT_PROT to enable. It is enabled in coldfire by default, but
disabled in unixsim.

Fixes bug 2005 if you enable SYS_LIGHTWEIGHT_PROT. So the bug is closed.
2003-02-04 22:52:22 +00:00
likewise
987e9df948 Fixed comment typo. 2003-02-04 18:50:30 +00:00
likewise
70d54479a1 Changed some comments into JavaDoc format. 2003-02-04 18:49:46 +00:00