diff --git a/ChangeLog b/ChangeLog index a27c01c5a0b5a28e6867ea7d6965fd761d235508..7c9f79e5875b7151e0a4dd3d3e0e7d4fd449aa4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -440,5 +440,11 @@ * fseek() needs to discard bytes buffered by ungetc(). * Corrected ftell() return value. * Added fsetpos() and fgetpos(). - * NSH now supports 'test' and '[' commands + * NSH: Now supports 'test' and '[' commands + * Correct error in send() timeout logic. + * Correct error in multi-threaded socket handling in send() and sendto(). + Outgoing data could overwrite incoming data. + * Add support to uIP for application access to ICMP protocol stacks; Add + ping request logic. + * NSH: Add ping command diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index c96db7b607637d64ba0657fcdb578e63ce5659d1..f05fdc6ce906a9128867114e955b534b682ca89c 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@ <tr align="center" bgcolor="#e4e4e4"> <td> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> - <p>Last Updated: September 1, 2008</p> + <p>Last Updated: September 2, 2008</p> </td> </tr> </table> @@ -1067,7 +1067,13 @@ nuttx-0.3.14 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * fseek() needs to discard bytes buffered by ungetc(). * Corrected ftell() return value. * Added fsetpos() and fgetpos(). - * NSH now supports 'test' and '[' commands + * NSH: Now supports 'test' and '[' commands + * Correct error in send() timeout logic. + * Correct error in multi-threaded socket handling in send() and sendto(). + Outgoing data could overwrite incoming data. + * Add support to uIP for application access to ICMP protocol stacks; Add + ping request logic. + * NSH: Add ping command pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 939ba8bdcb96c11963fc5dafde93e1861a1a312f..2f29e0b013d5ba97bb94792652bfaafa48160ebb 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -1567,7 +1567,12 @@ The system can be re-made subsequently by just typing <code>make</code>. <code>CONFIG_NET_UDP_CONNS</code>: The maximum amount of concurrent UDP connections </li> <li> - <code>CONFIG_NET_ICMP</code>: ICMP ping support on or off + <code>CONFIG_NET_ICMP</code>: Enable minimal ICMP support. Includes built-in support + for sending replies to received ECHO (ping) requests. + </li> + <li> + <code>CONFIG_NET_ICMP_PING</code>: Provide interfaces to support application level + support for sending ECHO (ping) requests and associating ECHO replies. </li> <li> <code>CONFIG_NET_PINGADDRCONF</code>: Use "ping" packet for setting IP address diff --git a/configs/README.txt b/configs/README.txt index 2f8e7cbd5ec28d94ba72c7ea1922f5e0d18b9d53..9450d72a05936ebeb5c3c36ad8a1ace0c06a0d98 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -265,7 +265,11 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections - CONFIG_NET_ICMP - ICMP ping support on or off + CONFIG_NET_ICMP - Enable minimal ICMP support. Includes built-in support + for sending replies to received ECHO (ping) requests. + CONFIG_NET_ICMP_PING - Provide interfaces to support application level + support for sending ECHO (ping) requests and associating ECHO + replies. CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address CONFIG_NET_STATISTICS - uIP statistics on or off CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's diff --git a/configs/c5471evm/defconfig b/configs/c5471evm/defconfig index 6750e0a26521e9afe8098b5aa130d55ace464145..ea6b6cf976ee091387034883b03e4c2b93c18dcd 100644 --- a/configs/c5471evm/defconfig +++ b/configs/c5471evm/defconfig @@ -266,7 +266,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -287,6 +288,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/c5471evm/dhcpconfig b/configs/c5471evm/dhcpconfig index 47161aea814ce39d5793c2ee4f6949ca38dd999e..ca193d9a7c668360a4366d68e309b1444a0d537f 100644 --- a/configs/c5471evm/dhcpconfig +++ b/configs/c5471evm/dhcpconfig @@ -266,7 +266,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -287,6 +288,7 @@ CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/c5471evm/netconfig b/configs/c5471evm/netconfig index e4e4b6b72b5234650dfea7302b892dc8a661f856..0ff9025f9f7c1a1eef2b59b49e94d1d41dc58f49 100644 --- a/configs/c5471evm/netconfig +++ b/configs/c5471evm/netconfig @@ -266,7 +266,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -287,6 +288,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/c5471evm/nshconfig b/configs/c5471evm/nshconfig index 2e1e09ff47dfcb3f1618b9f6fcd03c4e96e9c8ec..5e65e59060a7c689282b561b999446377c6b42e3 100644 --- a/configs/c5471evm/nshconfig +++ b/configs/c5471evm/nshconfig @@ -266,7 +266,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -287,6 +288,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/ez80f910200kitg/ostest/defconfig b/configs/ez80f910200kitg/ostest/defconfig index 4205ff37eae3539bd74d7d606eed7552d092c43b..9832b48e0b6b23970b8b0b68527abb6efe8bc7b6 100644 --- a/configs/ez80f910200kitg/ostest/defconfig +++ b/configs/ez80f910200kitg/ostest/defconfig @@ -274,7 +274,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -294,6 +295,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/m68332evb/defconfig b/configs/m68332evb/defconfig index 0f904552c888dbfa8058dfcbe28da50a758fc861..29357a65aefdadfddcec3595413457adf8859da2 100644 --- a/configs/m68332evb/defconfig +++ b/configs/m68332evb/defconfig @@ -255,7 +255,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -275,6 +276,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/mcu123-lpc214x/defconfig b/configs/mcu123-lpc214x/defconfig index 86c5bb95d6e18aae11eb714b989cea9435b8893b..bb0ddeb02fa6c5db1b07fcb7a69f0a768013aa24 100644 --- a/configs/mcu123-lpc214x/defconfig +++ b/configs/mcu123-lpc214x/defconfig @@ -279,7 +279,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -299,6 +300,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/ntosd-dm320/nettest/defconfig b/configs/ntosd-dm320/nettest/defconfig index 0aa54bb64c537f1c87efa9a01b88e6f1c3077008..53207966a195022119e15f934def35cbd720cf46 100644 --- a/configs/ntosd-dm320/nettest/defconfig +++ b/configs/ntosd-dm320/nettest/defconfig @@ -264,7 +264,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -284,6 +285,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/ntosd-dm320/nsh/defconfig b/configs/ntosd-dm320/nsh/defconfig index fe13e3f2054e509b72cd304649ec7cdb35d75f2b..21b3164d4bc60f358ca96b2291f3ecdb4a6e8eee 100644 --- a/configs/ntosd-dm320/nsh/defconfig +++ b/configs/ntosd-dm320/nsh/defconfig @@ -1,5 +1,5 @@ ############################################################################ -# configs/ntosd-dm320/nsh/netconfig +# configs/ntosd-dm320/nsh/defconfig # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <spudmonkey@racsa.co.cr> @@ -270,7 +270,8 @@ CONFIG_FS_FAT=n # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -290,6 +291,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=y #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/ntosd-dm320/ostest/defconfig b/configs/ntosd-dm320/ostest/defconfig index 99230bd15809ea196a29393523c20b7e30c46a0b..286ed95801476966140f4426208a8688527a5d68 100644 --- a/configs/ntosd-dm320/ostest/defconfig +++ b/configs/ntosd-dm320/ostest/defconfig @@ -264,7 +264,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -284,6 +285,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/ntosd-dm320/udp/defconfig b/configs/ntosd-dm320/udp/defconfig index 2cf690898efb5485b8b9aa708bdf3521376c3226..7b0aa8578dfec273535c2f4979030dbe3c8e2ac1 100644 --- a/configs/ntosd-dm320/udp/defconfig +++ b/configs/ntosd-dm320/udp/defconfig @@ -264,7 +264,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -284,6 +285,7 @@ CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/ntosd-dm320/uip/defconfig b/configs/ntosd-dm320/uip/defconfig index cf948c98d103e99021e6f03d915b97a2fdeb8c6d..e283da1ac13cab3890468a73b0f4ca097b8a6e10 100644 --- a/configs/ntosd-dm320/uip/defconfig +++ b/configs/ntosd-dm320/uip/defconfig @@ -264,7 +264,8 @@ CONFIG_PREALLOC_TIMERS=8 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -284,6 +285,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=n #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/pjrc-8051/defconfig b/configs/pjrc-8051/defconfig index 154058ba7e50c4d1b37d9e4da2d78a50bb0084d8..4f3fd4100b9bd327f4580ac8ea3082ff44f2516c 100644 --- a/configs/pjrc-8051/defconfig +++ b/configs/pjrc-8051/defconfig @@ -252,7 +252,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -272,6 +273,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/sim/mount/defconfig b/configs/sim/mount/defconfig index 528ee6c4c164185f17af92bb9c9eb51f121c10d7..9796156521073e3c935d47bd9d629ba3686a9b50 100644 --- a/configs/sim/mount/defconfig +++ b/configs/sim/mount/defconfig @@ -225,7 +225,8 @@ CONFIG_FS_FAT=y # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -245,6 +246,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/sim/nettest/defconfig b/configs/sim/nettest/defconfig index b7c75b068381a2f5e88bf53d6e13744e3cdba0b2..73b2ae3f8f2894b2a6ce75ad951e7931145d401f 100644 --- a/configs/sim/nettest/defconfig +++ b/configs/sim/nettest/defconfig @@ -225,7 +225,8 @@ CONFIG_FS_FAT=y # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -245,6 +246,7 @@ CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/sim/ostest/defconfig b/configs/sim/ostest/defconfig index 95368af46db7302c173e48bf419e06e5365a9352..7acf0ef78a91ae116efaa4f976f1cc27f1292e8c 100644 --- a/configs/sim/ostest/defconfig +++ b/configs/sim/ostest/defconfig @@ -226,7 +226,8 @@ CONFIG_FS_FAT=y # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -246,6 +247,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/sim/pashello/defconfig b/configs/sim/pashello/defconfig index 264222ac0f181577c49840b460fa444eb341beb3..5c694d5b53860c7205d2c11644cf71aaf6236cdf 100644 --- a/configs/sim/pashello/defconfig +++ b/configs/sim/pashello/defconfig @@ -225,7 +225,8 @@ CONFIG_FS_FAT=y # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -245,6 +246,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/xtrs/nsh/defconfig b/configs/xtrs/nsh/defconfig index e3880e59d2b6a0b37e450d44c0e2bdc290932463..05a7f1e40f25c7c486f3d67249b6213125f92c29 100644 --- a/configs/xtrs/nsh/defconfig +++ b/configs/xtrs/nsh/defconfig @@ -250,7 +250,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -270,6 +271,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/xtrs/ostest/defconfig b/configs/xtrs/ostest/defconfig index e40f6db96f28dae5a8f70d9a2a2bb0ef7117eb85..becd9fb815e091c1f83fbd886f5aa9ef17af139f 100644 --- a/configs/xtrs/ostest/defconfig +++ b/configs/xtrs/ostest/defconfig @@ -250,7 +250,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -270,6 +271,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/xtrs/pashello/defconfig b/configs/xtrs/pashello/defconfig index 92b5af74746426a317af8ed42f8af6fd55f2ba6a..4ba48ccf29adf4e561135acc48ce4188341575d6 100644 --- a/configs/xtrs/pashello/defconfig +++ b/configs/xtrs/pashello/defconfig @@ -250,7 +250,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -270,6 +271,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/z16f2800100zcog/ostest/defconfig b/configs/z16f2800100zcog/ostest/defconfig index d4a8936d2d5cef179ff8d68ece994e5a9e15302f..ba218ca3b9a5bed6171e3a555491e7f15bfe11ca 100644 --- a/configs/z16f2800100zcog/ostest/defconfig +++ b/configs/z16f2800100zcog/ostest/defconfig @@ -269,7 +269,8 @@ CONFIG_PREALLOC_TIMERS=4 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -289,6 +290,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/z16f2800100zcog/pashello/defconfig b/configs/z16f2800100zcog/pashello/defconfig index e89d8acf47dd703773e5dd15c07152b0ebaabe37..24e33156bde778a45c1004109e9bafa2d74ea505 100644 --- a/configs/z16f2800100zcog/pashello/defconfig +++ b/configs/z16f2800100zcog/pashello/defconfig @@ -269,7 +269,8 @@ CONFIG_PREALLOC_TIMERS=4 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -289,6 +290,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/z80sim/nsh/defconfig b/configs/z80sim/nsh/defconfig index 59343f0f6b8671a232909aeafcc48fa2f1a4a38b..2fc1e10de6207d4bf1637dffbff113f5e60bfd75 100644 --- a/configs/z80sim/nsh/defconfig +++ b/configs/z80sim/nsh/defconfig @@ -241,7 +241,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -261,6 +262,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index 2bff6a578c0941176f259ee432df4b98868c68bd..dc4a173ba93a0cc6a6cbf15dfbe8cd9d44521344 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -241,7 +241,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -261,6 +262,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/z80sim/pashello/defconfig b/configs/z80sim/pashello/defconfig index fb4d0bb3682fe0c2b1ae4a6fe5badc612a650677..93f12315fa8cc505cb8a75d91e73d72a8638632f 100644 --- a/configs/z80sim/pashello/defconfig +++ b/configs/z80sim/pashello/defconfig @@ -242,7 +242,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -262,6 +263,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/z8encore000zco/ostest/defconfig b/configs/z8encore000zco/ostest/defconfig index e1f8cd9edcea4dda15b4c03c9a73d530770f1d05..0f0466a23914338ac7407bd52f64f05f6852c8ec 100644 --- a/configs/z8encore000zco/ostest/defconfig +++ b/configs/z8encore000zco/ostest/defconfig @@ -275,7 +275,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -295,6 +296,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/configs/z8f64200100kit/ostest/defconfig b/configs/z8f64200100kit/ostest/defconfig index 65148cb07c9b94c0b94ee56f3198e4f19b1464aa..c064b2e31971f5bb0d6688afaf9638b358d2634a 100644 --- a/configs/z8f64200100kit/ostest/defconfig +++ b/configs/z8f64200100kit/ostest/defconfig @@ -275,7 +275,8 @@ CONFIG_PREALLOC_TIMERS=0 # CONFIG_NET_UDP - UDP support on or off # CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off # CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections -# CONFIG_NET_ICMP - ICMP ping support on or off +# CONFIG_NET_ICMP - ICMP ping response support on or off +# CONFIG_NET_ICMP_PING - ICMP ping request support on or off # CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address # CONFIG_NET_STATISTICS - uIP statistics on or off # CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window @@ -295,6 +296,7 @@ CONFIG_NET_UDP=n CONFIG_NET_UDP_CHECKSUMS=y #CONFIG_NET_UDP_CONNS=10 CONFIG_NET_ICMP=n +CONFIG_NET_ICMP_PING=n #CONFIG_NET_PINGADDRCONF=0 CONFIG_NET_STATISTICS=y #CONFIG_NET_RECEIVE_WINDOW= diff --git a/include/net/uip/uip-icmp.h b/include/net/uip/uip-icmp.h index 816da04ab4a6bfe3a1e507f7b6a2170e3ab0151e..632653ab8dba7d3870acbd38724bebd2d09fb937 100644 --- a/include/net/uip/uip-icmp.h +++ b/include/net/uip/uip-icmp.h @@ -2,7 +2,7 @@ * net/uip/uip-icmp.h * Header file for the uIP ICMP stack. * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * This logic was leveraged from uIP which also has a BSD-style license: @@ -53,6 +53,56 @@ * Definitions ****************************************************************************/ +/* ICMP/ICMP6 definitions */ + +/* ICMP/ICMP6 Message Types */ + +#define ICMP_ECHO_REPLY 0 /* RFC 792 */ +#define ICMP_DEST_UNREACHABLE 3 /* RFC 792 */ +#define ICMP_SRC_QUENCH 4 /* RFC 792 */ +#define ICMP_REDIRECT 5 /* RFC 792 */ +#define ICMP_ALT_HOST_ADDRESS 6 +#define ICMP_ECHO_REQUEST 8 /* RFC 792 */ +#define ICMP_ROUTER_ADVERTISEMENT 9 /* RFC 1256 */ +#define ICMP_ROUTER_SOLICITATION 10 /* RFC 1256 */ +#define ICMP_TIME_EXCEEDED 11 /* RFC 792 */ +#define ICMP_PARAMETER_PROBLEM 12 +#define ICMP_TIMESTAMP_REQUEST 13 +#define ICMP_TIMESTAMP_REPLY 14 +#define ICMP_INFORMATION_REQUEST 15 +#define ICMP_INFORMATION_REPLY 16 +#define ICMP_ADDRESS_MASK_REQUEST 17 +#define ICMP_ADDRESS_MASK_REPLY 18 +#define ICMP_TRACEROUTE 30 +#define ICMP_CONVERSION_ERROR 31 +#define ICMP_MOBILE_HOST_REDIRECT 32 +#define ICMP_IPV6_WHEREAREYOU 33 +#define ICMP_IPV6_IAMHERE 34 +#define ICMP_MOBILE_REGIS_REQUEST 35 +#define ICMP_MOBILE_REGIS_REPLY 36 +#define ICMP_DOMAIN_NAME_REQUEST 37 +#define ICMP_DOMAIN_NAME_REPLY 38 +#define ICMP_SKIP_DISCOVERY_PROTO 39 +#define ICMP_PHOTURIS_SECURITY_FAIL 40 +#define ICMP_EXP_MOBILE_PROTO 41 /* RFC 4065 */ + +/* ICMP6 Message Types */ + +#define ICMP6_ECHO_REPLY 129 +#define ICMP6_ECHO_REQUEST 128 +#define ICMP6_NEIGHBOR_SOLICITATION 135 +#define ICMP6_NEIGHBOR_ADVERTISEMENT 136 + +#define ICMP6_FLAG_S (1 << 6) + +#define ICMP6_OPTION_SOURCE_LINK_ADDRESS 1 +#define ICMP6_OPTION_TARGET_LINK_ADDRESS 2 + +/* Header sizes */ + +#define UIP_ICMPH_LEN 4 /* Size of ICMP header */ +#define UIP_IPICMPH_LEN (UIP_ICMPH_LEN + UIP_IPH_LEN) /* Size of IP + ICMP header */ + /**************************************************************************** * Public Type Definitions ****************************************************************************/ @@ -91,19 +141,27 @@ struct uip_icmpip_hdr #endif /* CONFIG_NET_IPv6 */ - /* ICMP (echo) header */ + /* ICMP header */ + + uint8 type; /* Defines the format of the ICMP message */ + uint8 icode; /* Further qualifies the ICMP messsage */ + uint16 icmpchksum; /* Checksum of ICMP header and data */ - uint8 type; - uint8 icode; - uint16 icmpchksum; + /* Data following the ICMP header contains the data specific to the + * message type indicated by the Type and Code fields. + */ #ifndef CONFIG_NET_IPv6 - uint16 id; - uint16 seqno; + /* ICMP_ECHO_REQUEST and ICMP_ECHO_REPLY data */ + + uint16 id; /* Used to match requests with replies */ + uint16 seqno; /* " " "" " " " " " " " " */ #else /* !CONFIG_NET_IPv6 */ + /* ICMP6_ECHO_REQUEST and ICMP6_ECHO_REPLY data */ + uint8 flags; uint8 reserved1; uint8 reserved2; diff --git a/include/net/uip/uip-tcp.h b/include/net/uip/uip-tcp.h index 0fa12880cf8c3efab2728231991350ab3c10cc41..e0d696981704acbc1a83dea0bce7f5898b2f4505 100644 --- a/include/net/uip/uip-tcp.h +++ b/include/net/uip/uip-tcp.h @@ -59,6 +59,22 @@ * Definitions ****************************************************************************/ +/* TCP definitions */ + +#define TCP_FIN 0x01 +#define TCP_SYN 0x02 +#define TCP_RST 0x04 +#define TCP_PSH 0x08 +#define TCP_ACK 0x10 +#define TCP_URG 0x20 +#define TCP_CTL 0x3f + +#define TCP_OPT_END 0 /* End of TCP options list */ +#define TCP_OPT_NOOP 1 /* "No-operation" TCP option */ +#define TCP_OPT_MSS 2 /* Maximum segment size TCP option */ + +#define TCP_OPT_MSS_LEN 4 /* Length of TCP MSS option. */ + /* The TCP states used in the struct uip_conn tcpstateflags field */ #define UIP_CLOSED 0 /* The connection is not in use and available */ diff --git a/include/net/uip/uip.h b/include/net/uip/uip.h index 08f2c14a322f89be4ed2778586c1bfdeb4c82096..54a94bf988edbef0b59708579056a75014f2b396 100644 --- a/include/net/uip/uip.h +++ b/include/net/uip/uip.h @@ -98,6 +98,11 @@ * UIP_TIMEDOUT IN: The connection has been aborted due to too many * retransmissions. (TCP only) * OUT: Not used + * UIP_ECHOREPLY IN: An ICMP Echo Reply has been received. Used to support + * ICMP ping from applications. (ICMP only) + * OUT: Cleared (only) by the application logic to indicate + * that the reply was processed, suppressing further + * attempts to process the reply. */ #define UIP_ACKDATA (1 << 0) @@ -109,8 +114,8 @@ #define UIP_ABORT (1 << 6) #define UIP_CONNECTED (1 << 7) #define UIP_TIMEDOUT (1 << 8) +#define UIP_ECHOREPLY (1 << 9) -#define UIP_DATA_EVENTS (UIP_ACKDATA|UIP_NEWDATA|UIP_REXMIT|UIP_POLL) #define UIP_CONN_EVENTS (UIP_CLOSE|UIP_ABORT|UIP_CONNECTED|UIP_TIMEDOUT) /* The buffer size available for user data in the d_buf buffer. diff --git a/include/net/uip/uipopt.h b/include/net/uip/uipopt.h index 98a5f4fce490c16ea238e165d18d658bd50adbd9..e71ae00df8a916fdaf7bb86ca52bc7b2f1ca5d6e 100644 --- a/include/net/uip/uipopt.h +++ b/include/net/uip/uipopt.h @@ -98,6 +98,12 @@ #define UIP_REASS_MAXAGE (20*10) /* 20 seconds */ +/* ICMP configuration options */ + +#if !defined(CONFIG_NET_ICMP) || defined(CONFIG_DISABLE_CLOCK) +# undef CONFIG_NET_ICMP_PING +#endif + /* UDP configuration options */ /* The maximum amount of concurrent UDP connection, Default: 10 */