loopback.h 814 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _LOOPBACK_H_
  2. #define _LOOPBACK_H_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdint.h>
  7. /* Loopback test debug message printout enable */
  8. #define _LOOPBACK_DEBUG_
  9. /* DATA_BUF_SIZE define for Loopback example */
  10. #ifndef DATA_BUF_SIZE
  11. #define DATA_BUF_SIZE 2048
  12. #endif
  13. /************************/
  14. /* Select LOOPBACK_MODE */
  15. /************************/
  16. #define LOOPBACK_MAIN_NOBLOCK 0
  17. #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK
  18. /* TCP server Loopback test example */
  19. int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port);
  20. /* TCP client Loopback test example */
  21. int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport);
  22. /* UDP Loopback test example */
  23. int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port);
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. #endif