igd_desc_parse.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* $Id: igd_desc_parse.h,v 1.12 2014/11/17 17:19:13 nanard Exp $ */
  2. /* Project : miniupnp
  3. * http://miniupnp.free.fr/
  4. * Author : Thomas Bernard
  5. * Copyright (c) 2005-2014 Thomas Bernard
  6. * This software is subject to the conditions detailed in the
  7. * LICENCE file provided in this distribution.
  8. * */
  9. #ifndef IGD_DESC_PARSE_H_INCLUDED
  10. #define IGD_DESC_PARSE_H_INCLUDED
  11. /* Structure to store the result of the parsing of UPnP
  12. * descriptions of Internet Gateway Devices */
  13. #define MINIUPNPC_URL_MAXSIZE (128)
  14. struct IGDdatas_service {
  15. char controlurl[MINIUPNPC_URL_MAXSIZE];
  16. char eventsuburl[MINIUPNPC_URL_MAXSIZE];
  17. char scpdurl[MINIUPNPC_URL_MAXSIZE];
  18. char servicetype[MINIUPNPC_URL_MAXSIZE];
  19. /*char devicetype[MINIUPNPC_URL_MAXSIZE];*/
  20. };
  21. struct IGDdatas {
  22. char cureltname[MINIUPNPC_URL_MAXSIZE];
  23. char urlbase[MINIUPNPC_URL_MAXSIZE];
  24. char presentationurl[MINIUPNPC_URL_MAXSIZE];
  25. int level;
  26. /*int state;*/
  27. /* "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1" */
  28. struct IGDdatas_service CIF;
  29. /* "urn:schemas-upnp-org:service:WANIPConnection:1"
  30. * "urn:schemas-upnp-org:service:WANPPPConnection:1" */
  31. struct IGDdatas_service first;
  32. /* if both WANIPConnection and WANPPPConnection are present */
  33. struct IGDdatas_service second;
  34. /* "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1" */
  35. struct IGDdatas_service IPv6FC;
  36. /* tmp */
  37. struct IGDdatas_service tmp;
  38. };
  39. void IGDstartelt(void *, const char *, int);
  40. void IGDendelt(void *, const char *, int);
  41. void IGDdata(void *, const char *, int);
  42. #ifdef DEBUG
  43. void printIGD(struct IGDdatas *);
  44. #endif /* DEBUG */
  45. #endif /* IGD_DESC_PARSE_H_INCLUDED */