216 Commits (2d5908f4dedeac4ae2f568bd6f06ea218de5a125)

Author SHA1 Message Date
fbernon 7077d51f1f api.h, api_lib.c, api_msg.c: Add macro API_EVENT in the same spirit than TCP_EVENT_xxx macros to get a code more readable. It could also help to remove some code (like we have talk in "patch #5919 : Create compile switch to remove select code"), but it could be done later. 19 years ago
goldsimon 270c7c1110 Removed check for conn->err for functions whose counterparts in api_msg.c also do the check (1. remove redundant code, 2. check is better done in tcpip thread context) 19 years ago
goldsimon 2d3a64815f Minor coding style fixes, added comment 19 years ago
fbernon 649d43c2c5 Minor change (define DHCP_COARSE_TIMER_MSECS - using DHCP_COARSE_TIMER_SECS - to use milliseconds like all others timers) 19 years ago
fbernon cf998b7bf8 Minor fix (remove warning) 19 years ago
goldsimon 199648ff37 Changed initialization: many init functions are not needed any more since we now rely on the compiler initializing global and static variables to zero! 19 years ago
goldsimon b1a4b00091 Preprocessor statements have to start at the beginning of a line for old compilers! 19 years ago
goldsimon c1c9983cfe Removed <warning: potential uninitialized reference to 19 years ago
fbernon 87e16a8f47 sockets.c, api.h, api_lib.c: First step to fix "bug #20900 : Potential crash error problem with netconn_peer & netconn_addr". VERY IMPORTANT: this change cause an API breakage for netconn_peer, since a parameter type change. Any compiler should cause an error without any changes in yours netconn_peer calls (so, it can't be a "silent change"). It also reduce a little bit the footprint for socket layer (lwip_getpeername & lwip_getsockname use now a common lwip_getaddrname function since netconn_peer & netconn_addr have the same parameters). 19 years ago
goldsimon cb71d6d393 Moved ethernet_input from tcpip.c to etharp.c so all netifs (or ports) can use it. 19 years ago
fbernon 79c00be516 netifapi.h, netifapi.c: add function netifapi_netif_set_default. Change the common function to reduce a little bit the footprint (for all functions using only the "netif" parameter). 19 years ago
fbernon 949efb414a netifapi.h, netifapi.c: add functions netifapi_netif_set_up, netifapi_netif_set_down, netifapi_autoip_start and netifapi_autoip_stop. Use a common function to reduce a little bit the footprint (for all functions using only the "netif" parameter). 19 years ago
fbernon 2bdd916b06 udp.h, udp.c, sockets.c: Changes for "#20503 IGMP Improvement". Add IP_MULTICAST_IF option in socket API, and a new field "multicast_ip" in "struct udp_pcb" (for netconn and raw API users), only if LWIP_IGMP=1. Add getsockopt processing for IP_MULTICAST_TTL and IP_MULTICAST_IF. 19 years ago
fbernon 95f2d48ac4 Avoid to lost previous error codes in sockets.c and api_lib.c. 19 years ago
fbernon c265fa3331 Add missing #if/#endif to fix build problems with: 19 years ago
fbernon 1c6e31173d Add missing include files. 19 years ago
fbernon 8205737fdb sockets.c, ip.h, api.h, tcp.h: declare a "struct ip_pcb" which only contains IP_PCB. Add in the netconn's "pcb" union a "struct ip_pcb *ip;" (no size change). Use this new field to access to common pcb fields (ttl, tos, so_options, etc...). Enable to access to these fields with LWIP_TCP=0. 19 years ago
fbernon e3cd1ac1f9 Minor changes (but in lot of files): add #if/#endif for options where they could miss. #if LWIP_xxx if always put after #include "lwip/opt.h" (note this one indirectly include cc.h). Move others includes inside #if/#endif block. 19 years ago
fbernon 90a3f88c08 Change parameters list for sys_thread_new (see "task #7252 : Create sys_thread_new_ex()"). Two new parameters have to be provided: a task name, and a task stack size. For this one, since it's platform dependant, you could define the best one for you in your lwipopts.h. For port maintainers, you can just add these new parameters in your sys_arch.c file, and but it's not mandatory, use them in your OS specific functions. 19 years ago
fbernon 62b4741b19 Changes for "#20503 IGMP Improvement". Initialize igmp_mac_filter to NULL in netif_add (this field should be set in the netif's "init" function). Use the "imr_interface" field (for socket layer) and/or the "interface" field (for netconn layer), for join/leave operations. The igmp_join/leavegroup first parameter change from a netif to an ipaddr. This field could be a netif's ipaddr, or "any" (same meaning than ip_addr_isany). 19 years ago
fbernon 245bce04d1 Add netbuf.h, netbuf.c, Change api.h, api_lib.c: #7249 "Split netbuf functions from api/api_lib". Now netbuf API is independant of netconn, and can be used with other API (application based on raw API, or future "socket2" API). Ports maintainers just have to add src/api/netbuf.c in their makefile/projects. 19 years ago
fbernon cd208314e0 igmp.h, igmp.c, tcpip.c, init.c, netif.c: change igmp_init and add igmp_start. igmp_start is call inside netif_add. Now, igmp initialization is in the same spirit than the others modules. Modify some IGMP debug traces. 19 years ago
fbernon da7b5135de Minor Fix (ident) 19 years ago
fbernon 48db3a3e92 Add init.h, init.c, Change opt.h, tcpip.c: Task #7213 "Add a lwip_init function" Add lwip_init function to regroup all modules initializations, and to provide a place to add code for task #7142 "Sanity check user-configurable values". Ports maintainers should remove direct initializations calls from their code, and add init.c in their makefiles. Note that lwip_init() function is called inside tcpip_init, but can also be used by raw api users since all calls are disabled when matching options are disabled. Also note that their is new options in opt.h, you should configure in your lwipopts.h (they are enabled per default). 19 years ago
fbernon 7182fb8fb0 tcpip.c: Fix TCPIP_MSG_INPKT processing: now, tcpip_input can be used for any kind of packets. These packets are considered like Ethernet packets (payload pointing to ethhdr) if the netif got the NETIF_FLAG_ETHARP flag. Else, packets are considered like IP packets (payload pointing to iphdr). 19 years ago
fbernon 54c1025ec0 First fix for "bug #20900 : Potential crash error problem with netconn_peer & netconn_addr". Introduce NETCONN_LISTEN netconn_state and remove obsolete ones (NETCONN_RECV & NETCONN_ACCEPT). 19 years ago
marcbou 180e6d2c75 Reset the callbacks and arg (conn) to NULL in do_close_internal(), because 19 years ago
fbernon 42f3c24fc4 tcpip.h, tcpip.c, ethernetif.c, opt.h: remove options ETHARP_TCPIP_INPUT & ETHARP_TCPIP_ETHINPUT, now, only "ethinput" code is supported, even if the name is tcpip_input (we keep the name of 1.2.0 function). 19 years ago
fbernon c4b97a1710 Forget to rename this line (pbuf->flgs->pbuf->flags) 19 years ago
fbernon 885695fa67 Minor changes (tabs) 19 years ago
fbernon e0bf309bb5 Add raw_init in tcpip_init + minor changes (tabs, ident, coding style...) 19 years ago
marcbou d907bcd57a lwip_recvfrom() tweaks. 19 years ago
marcbou 0167bbb89a Per Frederic's suggestion, renamed 19 years ago
fbernon 2be122875a Minor changes (tabs, ident, coding style...) 19 years ago
marcbou c517f6daf9 Backed out lwip_close() change after discussion with Frederic. 19 years ago
marcbou 07223bf5ef Backed out last change to netconn_delete() after discussion with Frederic. 19 years ago
marcbou c81d0f3393 fix ethernet_input() return code warning. 19 years ago
marcbou 4236699052 Split pbuf flags in pbuf type and flgs. 19 years ago
marcbou a3c3f47e17 lwip_close(): call netconn_delete() under socksem to properly handle 19 years ago
marcbou 17f07a36ef netconn_delete(): unblock potentially waiting recv. 19 years ago
marcbou 1b98df4a0d Added distinct memp (MEMP_TCPIP_MSG_INPUT) for input packets to prevent 19 years ago
marcbou 58bfb0458e Added PPPoE support to ethernet_input() 19 years ago
marcbou 0b4402ebc8 lwip_accept(): check netconn_peer() error return. 19 years ago
marcbou d64b3f21e6 Initialize newconn->state to NETCONN_NONE in accept_function; 19 years ago
marcbou 931fcfd0f5 Added PPPoE support and various PPP improvements. 19 years ago
fbernon 9152d6671c Comments Fix for Doxygen documentation 19 years ago
fbernon 11c94b6566 Minor fix (spaces) 19 years ago
fbernon fdc4c25e67 Minor fix (warnings on unused args, wrong type, cast u32_t to u16_t...) 19 years ago
fbernon 083134bc12 Minor fix (warning when LWIP_DEBUG is undefined) 19 years ago
fbernon b8b04271b5 Minor fix (warning, linker helper) signaled by Bill Florac 19 years ago