A clone of btpd with my configuration changes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef BTPD_BENC_H
  2. #define BTPD_BENC_H
  3. int benc_validate(const char *p, size_t len);
  4. size_t benc_length(const char *p);
  5. size_t benc_nelems(const char *p);
  6. const char *benc_first(const char *p);
  7. const char *benc_next(const char *p);
  8. int benc_str(const char *p, const char **mem, size_t *len, const char**next);
  9. int benc_stra(const char *p, char **out, size_t *len, const char **next);
  10. int benc_strz(const char *p, char **out, size_t *len, const char **next);
  11. int benc_int64(const char *p, int64_t *out, const char **next);
  12. int benc_uint32(const char *p, uint32_t *out, const char **next);
  13. #define benc_off benc_int64
  14. int benc_dget_any(const char *p, const char *key, const char **val);
  15. int benc_dget_lst(const char *p, const char *key, const char **val);
  16. int benc_dget_dct(const char *p, const char *key, const char **val);
  17. int benc_dget_str(const char *p, const char *key,
  18. const char **val, size_t *len);
  19. int benc_dget_stra(const char *p, const char *key, char **val, size_t *len);
  20. int benc_dget_strz(const char *p, const char *key, char **val, size_t *len);
  21. int benc_dget_int64(const char *p, const char *key, int64_t *val);
  22. int benc_dget_uint32(const char *p, const char *key, uint32_t *val);
  23. #define benc_dget_off benc_dget_int64
  24. int benc_islst(const char *p);
  25. int benc_isdct(const char *p);
  26. int benc_isint(const char *p);
  27. int benc_isstr(const char *p);
  28. #endif