fbernon
d4ecb23015
raw.c, udp.c, init.c, opt.h, ip.h, sockets.h: bug #26309 : Implement the SO(F)_BROADCAST filter for all API layers. Avoid the unindented reception of broadcast packets even when this option wasn't set. Port maintainers which want to enable this filter have to set IP_SOF_BROADCAST=1 in opt.h. If you want this option also filter broadcast on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1 in opt.h.
2009-04-29 12:42:43 +00:00
goldsimon
580f334274
patch #6808 : Add a utility function ip_hinted_output() (for smaller code mainly)
2009-04-15 19:32:01 +00:00
goldsimon
aa568727d1
patch #6699 : fixed some warnings on platform where sizeof(int) == 2
2008-12-19 18:08:29 +00:00
jifl
886cfbe12d
Minor spelling typos and formatting fixes.
2008-01-11 14:28:58 +00:00
goldsimon
b28cd02149
task #7497 : Sort lists (pcb, netif, ...) for faster access UDP: move a (connected) pcb selected for input to the front of the list of pcbs so that it is found faster next time. Same for RAW pcbs that have eaten a packet.
2007-11-30 09:44:18 +00:00
goldsimon
cedd5c21e6
first attempt to fix bug #21655 (DHCP doesn't work reliably with multiple netifs): if LWIP_DHCP is enabled, UDP packets to DHCP_CLIENT_PORT are passed to netif->dhcp->pcb only (if that exists) and not to any other pcb for the same port (only solution to let UDP pcbs 'bind' to a netif instead of an IP address)
2007-11-30 08:55:15 +00:00
goldsimon
b4741332e0
Implemented new function udp_sendto_if which takes the netif to send as an argument (to be able to send on netifs that are down).
2007-11-27 20:13:16 +00:00
goldsimon
1faf0ab9e3
Moved inet files into ipv4/ipv6 directory; splitted inet.c/inet.h into inet and chksum part; changed includes in all lwIP files as appropriate
2007-11-16 19:31:10 +00:00
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!
2007-10-09 19:59:56 +00:00
goldsimon
536f2e42d2
Fixed UDPLite receive: checksum was calculated wrong if checksum coverage != tot_len
2007-10-09 19:43:29 +00:00
goldsimon
2ca113a218
Fixed UDPLite SENDING: Checksum was always generated too short and also was generated wrong if checksum coverage != tot_len.
2007-10-07 20:19:23 +00:00
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.
2007-09-15 15:19:41 +00:00
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.
2007-09-07 23:01:59 +00:00
fbernon
ca866c0d7d
Integrate "task #7272 : LWIP_ICMP option". The new option LWIP_ICMP enable/disable ICMP module inside the IP stack (enable per default). Be careful, disabling ICMP make your product non-compliant to RFC1122, but help to reduce footprint, and to reduce "visibility" on the Internet.
2007-09-05 17:20:45 +00:00
fbernon
9152d6671c
Comments Fix for Doxygen documentation
2007-08-09 22:21:44 +00:00
fbernon
118331207b
udp.c: Fix for bug #20503 : IGMP Improvement. Enable to receive a multicast packet on a udp pcb binded on an netif's IP address, and not on "any".
2007-08-09 18:34:03 +00:00
goldsimon
eb875de67e
Added assertions where PBUF_RAM pbufs are used and an assumption is made that this pbuf is in one piece (i.e. not chained). These assumptions clash with the possibility of converting to fully pool-based pbuf implementations, where PBUF_RAM pbufs might be chained.
2007-07-03 20:28:35 +00:00
goldsimon
96e4ec4a15
Added option LWIP_NETIF_HWADDRHINT (default=off) to cache ARP table indices with each pcb instead of single-entry cache for the complete stack.
2007-07-02 20:41:22 +00:00
goldsimon
dcc2247a90
Fixed bug #20253 : icmp_dest_unreach was called with a wrong p->payload for udp packets with no matching pcb.
2007-06-25 17:30:16 +00:00
goldsimon
00b7aeb49b
Fixed bug #20220 : UDP PCB search in udp_input(): a non-local match could get udp input packets if the remote side matched.
2007-06-25 17:24:31 +00:00
goldsimon
6336279ce0
In udp_input, for UDP Lite, chksum_len_tx was used instead of chksum_len_rx
2007-06-12 07:03:32 +00:00
goldsimon
046a270156
Added UDP lite support for sockets
2007-06-11 18:43:16 +00:00
goldsimon
2f293d53ba
UDP Lite: corrected the use of chksum_len (based on RFC3828: if it's 0, create checksum over the complete packet. On RX, if it's < 8 (and not 0), discard the packet. Also removed the duplicate 'udphdr->chksum = 0' for both UDP & UDP Lite.
2007-06-11 18:03:57 +00:00
goldsimon
95f4c02381
Included switch LWIP_UDPLITE (enabled by default) to switch off UDP-Lite support if not needed (reduces udp.c code size)
2007-06-10 12:02:24 +00:00
goldsimon
3a429eabcd
Set q to NULL after freeing it before returning: cleaner code!
2007-06-04 10:42:03 +00:00
goldsimon
3639daa329
IPv6: #define IPH_PROTO(hdr) (iphdr->nexthdr) to remove #ifdef IPv6 in udp_input()
2007-06-03 18:10:33 +00:00
goldsimon
8fd6a61df6
Done some work on task #1549 (function documentation)
2007-06-03 18:05:52 +00:00
goldsimon
974cf08e5d
udp_input(): Input pbuf was not freed if pcb had no recv function registered, p->payload was modified without modifying p->len if sending icmp_dest_unreach() (had no negative effect but was definitively wrong).
2007-06-03 11:32:03 +00:00
goldsimon
874415a193
Added comments whether fields are host or network byte order (task #1568 )
2007-05-17 12:21:32 +00:00
goldsimon
2740a81103
If a udp_pcb has a local_ip set, check if it is the same as the one of the netif used for sending to prevent sending from old addresses after a netif address gets changed (partly fixes bug #3168 ).
2007-05-16 18:55:25 +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
kieranm
7294cb080b
* Fix all uses of pbuf_header to check the return value. In some
...
cases just assert if it fails as I'm not sure how to fix them, but
this is no worse than before when they would carry on regardless
of the failure.
2007-03-21 12:55:00 +00:00
kieranm
b290f0442d
udp.c: Only try and use pbuf_header() to make space for headers if
...
not a ROM or REF pbuf.
2007-03-20 16:58:08 +00:00
fbernon
e1b6a4cb21
udp.c: remove obsolete line "static struct udp_pcb *pcb_cache = NULL;"
...
Its is static, and never used in udp.c except udp_init().
2007-03-03 17:00:44 +00:00
christiaans
d4b6471d39
Replaced tabs with space.
2006-11-17 10:51:13 +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
7d16087789
Fixed bug #17200 , added check for broadcast destinations for PCBs bound to a unicast address.
2006-08-17 09:40:15 +00:00
christiaans
19f57bf810
Exported udp_pcbs in udp.h (for SNMP agent).
2006-08-11 14:09:48 +00:00
curtmcd
6158aa684b
udp_input() operated by removing the IP and UDP headers, putting back
...
the UDP header, then re-removing it. However, pbuf_header() can't add
back the UDP header on pbufs of type PBUF_REF, so these would all get
dropped for bad checksum. This change addresses the problem and
simplifies things by stripping each header just once.
2006-05-26 02:40:54 +00:00
curtmcd
047e3455f7
Improve formatting by fixing wrong indents and lines too long.
2006-05-26 01:36:16 +00:00
christiaans
6c8850698d
Small optimalization for udp_input().
2006-01-02 12:06:02 +00:00
christiaans
e1b215aa73
Introduced cc.h formatters and removed SO_REUSE from transport layers.
2005-11-25 12:03:38 +00:00
likewise
f9355136d8
2005-06-08 Leon Woestenberg <leon.woestenberg@gmx.net>
...
* udp.c: Fixed memory leak; when ip_route() failed, a possibly allocated q was never de-allocated. Fixed by called ip_route() before allocating q.
2005-06-08 18:35:00 +00:00
likewise
3b715f4602
3 January 2004, Leon Woestenberg <leon.woestenberg@gmx>
...
udp.c: pcb->recv() callback was called even when it was NULL.
2005-01-03 17:54:21 +00:00
likewise
fab107a9df
DECLINE message was unicast instead of broadcast
2004-11-25 11:10:53 +00:00
likewise
7524893802
Dependencies on C library memset() etc., so include <string.h>.
2004-07-04 23:43:38 +00:00
likewise
0be3598990
Style fixes.
2004-06-30 18:42:54 +00:00
jani
d36b723056
fix SO_REUSE ifdef fixes
2004-03-26 12:40:58 +00:00
kieranm
2c8aa6f6f4
Kieran Mansley - kjm25@cam.ac.uk - 23rd March 2003
...
- Changed all #ifdef SO_REUSE into #if SO_REUSE
2004-03-23 19:33:53 +00:00
likewise
6f7c8fb355
Made #ifdef's into #if's for SO_REUSE.
2004-03-23 00:19:38 +00:00