Source code of Windows XP (NT5)
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.

48 lines
1.3 KiB

  1. #ifndef _SSDPPARSER_
  2. #define _SSDPPARSER_
  3. #include "ssdp.h"
  4. const CHAR OKResponseHeader[40] = "HTTP/1.1 200 OK\r\n\r\n";
  5. BOOL InitializeSsdpRequest(SSDP_REQUEST *pRequest);
  6. BOOL ComposeSsdpRequest(const SSDP_REQUEST *Source, CHAR **pszBytes);
  7. BOOL FReplaceTokenInLocation(LPCSTR szIn, LPSTR szReplace, LPSTR *pszOut);
  8. BOOL ComposeSsdpResponse(const SSDP_REQUEST *Source, CHAR **pszBytes);
  9. BOOL ParseSsdpRequest(CHAR * szMessage, SSDP_REQUEST *Result);
  10. BOOL ParseSsdpResponse(CHAR *szMessage, SSDP_REQUEST *Result);
  11. char* ParseHeaders(CHAR *szMessage, SSDP_REQUEST *Result);
  12. BOOL CompareSsdpRequest(const SSDP_REQUEST * pRequestA, const SSDP_REQUEST * pRequestB);
  13. CHAR * ParseRequestLine(CHAR * szMessage, SSDP_REQUEST *Result);
  14. VOID FreeSsdpRequest(SSDP_REQUEST *pSsdpRequest);
  15. INT GetMaxAgeFromCacheControl(const CHAR *szValue);
  16. VOID PrintSsdpRequest(const SSDP_REQUEST *pssdpRequest);
  17. BOOL CopySsdpRequest(PSSDP_REQUEST Destination, const SSDP_REQUEST * Source);
  18. BOOL ConvertToByebyeNotify(PSSDP_REQUEST pSsdpRequest);
  19. BOOL ConvertToAliveNotify(PSSDP_REQUEST pSsdpRequest);
  20. CHAR* IsHeadersComplete(const CHAR *szHeaders);
  21. BOOL VerifySsdpHeaders(SSDP_REQUEST *Result);
  22. BOOL HasContentBody(PSSDP_REQUEST Result);
  23. BOOL ParseContent(const char *pContent, DWORD cbContent, SSDP_REQUEST *Result);
  24. #endif // _SSDPPARSER_