Odamex
Setting the Standard in Multiplayer Doom
libminiupnpc/upnpreplyparse.h
Go to the documentation of this file.
00001 /* $Id: upnpreplyparse.h,v 1.11 2011/02/07 16:17:06 nanard Exp $ */
00002 /* MiniUPnP project
00003  * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
00004  * (c) 2006-2011 Thomas Bernard 
00005  * This software is subject to the conditions detailed
00006  * in the LICENCE file provided within the distribution */
00007 
00008 #ifndef __UPNPREPLYPARSE_H__
00009 #define __UPNPREPLYPARSE_H__
00010 
00011 #if defined(NO_SYS_QUEUE_H) || defined(WIN32) || defined(__HAIKU__) 
00012 #include "bsdqueue.h"
00013 #else
00014 #include <sys/queue.h>
00015 #endif
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 struct NameValue {
00022     LIST_ENTRY(NameValue) entries;
00023     char name[64];
00024     char value[64];
00025 };
00026 
00027 struct NameValueParserData {
00028     LIST_HEAD(listhead, NameValue) head;
00029     char curelt[64];
00030         char * portListing;
00031         int portListingLength;
00032 };
00033 
00034 /* ParseNameValue() */
00035 void
00036 ParseNameValue(const char * buffer, int bufsize,
00037                struct NameValueParserData * data);
00038 
00039 /* ClearNameValueList() */
00040 void
00041 ClearNameValueList(struct NameValueParserData * pdata);
00042 
00043 /* GetValueFromNameValueList() */
00044 char *
00045 GetValueFromNameValueList(struct NameValueParserData * pdata,
00046                           const char * Name);
00047 
00048 /* GetValueFromNameValueListIgnoreNS() */
00049 char *
00050 GetValueFromNameValueListIgnoreNS(struct NameValueParserData * pdata,
00051                                   const char * Name);
00052 
00053 /* DisplayNameValueList() */
00054 #ifdef DEBUG
00055 void
00056 DisplayNameValueList(char * buffer, int bufsize);
00057 #endif
00058 
00059 #ifdef __cplusplus
00060 }
00061 #endif
00062 
00063 #endif
00064 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends