tftp_opts.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /****************************************************************//**
  2. *
  3. * @file tftp_opts.h
  4. *
  5. * @author Logan Gunthorpe <logang@deltatee.com>
  6. *
  7. * @brief Trivial File Transfer Protocol (RFC 1350) implementation options
  8. *
  9. * Copyright (c) Deltatee Enterprises Ltd. 2013
  10. * All rights reserved.
  11. *
  12. ********************************************************************/
  13. /*
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification,are permitted provided that the following conditions are met:
  16. *
  17. * 1. Redistributions of source code must retain the above copyright notice,
  18. * this list of conditions and the following disclaimer.
  19. * 2. Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * 3. The name of the author may not be used to endorse or promote products
  23. * derived from this software without specific prior written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  26. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  27. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  28. * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
  30. * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  31. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  32. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  33. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  34. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. *
  36. * Author: Logan Gunthorpe <logang@deltatee.com>
  37. *
  38. */
  39. #ifndef LWIP_HDR_APPS_TFTP_OPTS_H
  40. #define LWIP_HDR_APPS_TFTP_OPTS_H
  41. #include <rtthread.h>
  42. /**
  43. * @defgroup tftp_opts Options
  44. * @ingroup tftp
  45. * @{
  46. */
  47. /**
  48. * Enable TFTP debug messages
  49. */
  50. #if !defined TFTP_DEBUG
  51. #define TFTP_DEBUG LWIP_DBG_ON
  52. #endif
  53. /**
  54. * TFTP server port
  55. */
  56. #if defined NETUTILS_TFTP_PORT
  57. #define TFTP_PORT NETUTILS_TFTP_PORT
  58. #elif !defined TFTP_PORT
  59. #define TFTP_PORT 69
  60. #endif
  61. /**
  62. * TFTP timeout
  63. */
  64. #if !defined TFTP_TIMEOUT_MSECS
  65. #define TFTP_TIMEOUT_MSECS 10000
  66. #endif
  67. /**
  68. * Max. number of retries when a file is read from server
  69. */
  70. #if !defined TFTP_MAX_RETRIES
  71. #define TFTP_MAX_RETRIES 5
  72. #endif
  73. /**
  74. * TFTP timer cyclic interval
  75. */
  76. #if !defined TFTP_TIMER_MSECS
  77. #define TFTP_TIMER_MSECS 50
  78. #endif
  79. /**
  80. * Max. length of TFTP filename
  81. */
  82. #if !defined TFTP_MAX_FILENAME_LEN
  83. #define TFTP_MAX_FILENAME_LEN 20
  84. #endif
  85. /**
  86. * Max. length of TFTP mode
  87. */
  88. #if !defined TFTP_MAX_MODE_LEN
  89. #define TFTP_MAX_MODE_LEN 7
  90. #endif
  91. /**
  92. * @}
  93. */
  94. #endif /* LWIP_HDR_APPS_TFTP_OPTS_H */