utils_tcp.h 687 B

12345678910111213141516171819202122
  1. /* Header file for utils_tcp */
  2. #define NP_MATCH_ALL 0x1
  3. #define NP_MATCH_EXACT 0x2
  4. #define NP_MATCH_VERBOSE 0x4
  5. /*
  6. * The NP_MATCH_RETRY state indicates that matching might succeed if
  7. * np_expect_match() is called with a longer input string. This allows the
  8. * caller to decide whether it makes sense to wait for additional data from the
  9. * server.
  10. */
  11. enum np_match_result {
  12. NP_MATCH_FAILURE,
  13. NP_MATCH_SUCCESS,
  14. NP_MATCH_RETRY
  15. };
  16. enum np_match_result np_expect_match(char *status,
  17. char **server_expect,
  18. int server_expect_count,
  19. int flags);