Tomato 1.28
[tomato.git] / release / src / router / miniupnpd / upnpreplyparse.h
blobfb7d4535cd509a1d7d17f35ced4e3ca22c30911d
1 /* $Id: upnpreplyparse.h,v 1.10 2009/07/09 16:01:50 nanard Exp $ */
2 /* MiniUPnP project
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4 * (c) 2006-2009 Thomas Bernard
5 * This software is subject to the conditions detailed
6 * in the LICENCE file provided within the distribution */
8 #ifndef __UPNPREPLYPARSE_H__
9 #define __UPNPREPLYPARSE_H__
11 #if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__)
12 #include "bsdqueue.h"
13 #else
14 #include <sys/queue.h>
15 #endif
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 struct NameValue {
22 LIST_ENTRY(NameValue) entries;
23 char name[64];
24 char value[64];
27 struct NameValueParserData {
28 LIST_HEAD(listhead, NameValue) head;
29 char curelt[64];
32 /* ParseNameValue() */
33 void
34 ParseNameValue(const char * buffer, int bufsize,
35 struct NameValueParserData * data);
37 /* ClearNameValueList() */
38 void
39 ClearNameValueList(struct NameValueParserData * pdata);
41 /* GetValueFromNameValueList() */
42 char *
43 GetValueFromNameValueList(struct NameValueParserData * pdata,
44 const char * Name);
46 /* GetValueFromNameValueListIgnoreNS() */
47 char *
48 GetValueFromNameValueListIgnoreNS(struct NameValueParserData * pdata,
49 const char * Name);
51 /* DisplayNameValueList() */
52 #ifdef DEBUG
53 void
54 DisplayNameValueList(char * buffer, int bufsize);
55 #endif
57 #ifdef __cplusplus
59 #endif
61 #endif