upnpreplyparse.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* $Id: upnpreplyparse.h,v 1.19 2014/10/27 16:33:19 nanard Exp $ */
  2. /* MiniUPnP project
  3. * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
  4. * (c) 2006-2013 Thomas Bernard
  5. * This software is subject to the conditions detailed
  6. * in the LICENCE file provided within the distribution */
  7. #ifndef UPNPREPLYPARSE_H_INCLUDED
  8. #define UPNPREPLYPARSE_H_INCLUDED
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. struct NameValue {
  13. struct NameValue * l_next;
  14. char name[64];
  15. char value[128];
  16. };
  17. struct NameValueParserData {
  18. struct NameValue * l_head;
  19. char curelt[64];
  20. char * portListing;
  21. int portListingLength;
  22. int topelt;
  23. const char * cdata;
  24. int cdatalen;
  25. };
  26. /* ParseNameValue() */
  27. void
  28. ParseNameValue(const char * buffer, int bufsize,
  29. struct NameValueParserData * data);
  30. /* ClearNameValueList() */
  31. void
  32. ClearNameValueList(struct NameValueParserData * pdata);
  33. /* GetValueFromNameValueList() */
  34. char *
  35. GetValueFromNameValueList(struct NameValueParserData * pdata,
  36. const char * Name);
  37. #if 0
  38. /* GetValueFromNameValueListIgnoreNS() */
  39. char *
  40. GetValueFromNameValueListIgnoreNS(struct NameValueParserData * pdata,
  41. const char * Name);
  42. #endif
  43. /* DisplayNameValueList() */
  44. #ifdef DEBUG
  45. void
  46. DisplayNameValueList(char * buffer, int bufsize);
  47. #endif
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif