1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
/*
* Copyright (C) 2006, 2007 OpenedHand Ltd.
*
* Author: Jorn Baayen <jorn@openedhand.com>
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*
*/
#ifndef GSSDP_PROTOCOL_H
#define GSSDP_PROTOCOL_H
G_BEGIN_DECLS
#define SSDP_ADDR "239.255.255.250"
#define SSDP_V6_LL "FF02::C"
#define SSDP_V6_SL "FF05::C"
#define SSDP_V6_GL "FF0E::C"
#define SSDP_PORT 1900
#define SSDP_PORT_STR "1900"
#define SSDP_DISCOVERY_REQUEST \
"M-SEARCH * HTTP/1.1\r\n" \
"Host: %s:" SSDP_PORT_STR "\r\n" \
"Man: \"ssdp:discover\"\r\n" \
"ST: %s\r\n" \
"MX: %d\r\n" \
"User-Agent: %s\r\n" \
#define SSDP_DISCOVERY_RESPONSE \
"HTTP/1.1 200 OK\r\n" \
"Location: %s\r\n" \
"%s" \
"Ext:\r\n" \
"USN: %s\r\n" \
"Server: %s\r\n" \
"Cache-Control: max-age=%d\r\n" \
"ST: %s\r\n" \
"Date: %s\r\n" \
"Content-Length: 0\r\n"
#define SSDP_ALIVE_MESSAGE \
"NOTIFY * HTTP/1.1\r\n" \
"Host: %s:" SSDP_PORT_STR "\r\n" \
"Cache-Control: max-age=%d\r\n" \
"Location: %s\r\n" \
"%s" \
"Server: %s\r\n" \
"NTS: ssdp:alive\r\n" \
"NT: %s\r\n" \
"USN: %s\r\n"
#define SSDP_BYEBYE_MESSAGE \
"NOTIFY * HTTP/1.1\r\n" \
"Host: %s:" SSDP_PORT_STR "\r\n" \
"NTS: ssdp:byebye\r\n" \
"NT: %s\r\n" \
"USN: %s\r\n"
#define SSDP_UPDATE_MESSAGE \
"NOTIFY * HTTP/1.1\r\n" \
"Host: %s:" SSDP_PORT_STR "\r\n" \
"Location: %s\r\n" \
"NT: %s\r\n" \
"NTS: ssdp:update\r\n" \
"USN: %s\r\n" \
"NEXTBOOTID.UPNP.ORG: %u\r\n"
#define SSDP_SEARCH_METHOD "M-SEARCH"
#define GENA_NOTIFY_METHOD "NOTIFY"
#define SSDP_ALIVE_NTS "ssdp:alive"
#define SSDP_BYEBYE_NTS "ssdp:byebye"
#define SSDP_UPDATE_NTS "ssdp:update"
#define SSDP_DEFAULT_MAX_AGE 1800
#define SSDP_DEFAULT_MX 3
G_END_DECLS
#endif /* GSSDP_PROTOCOL_H */
|