2 * Copyright (C) 2006, 2007 OpenedHand Ltd.
4 * Author: Jorn Baayen <jorn@openedhand.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GSSDP_PROTOCOL_H__
23 #define __GSSDP_PROTOCOL_H__
27 #define SSDP_ADDR "239.255.255.250"
28 #define SSDP_PORT 1900
29 #define SSDP_PORT_STR "1900"
31 #define SSDP_DISCOVERY_REQUEST \
32 "M-SEARCH * HTTP/1.1\r\n" \
33 "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
34 "Man: \"ssdp:discover\"\r\n" \
37 "User-Agent: %s GSSDP/" VERSION "\r\n\r\n" \
39 #define SSDP_DISCOVERY_RESPONSE \
40 "HTTP/1.1 200 OK\r\n" \
46 "Cache-Control: max-age=%d\r\n" \
49 "Content-Length: 0\r\n\r\n"
51 #define SSDP_ALIVE_MESSAGE \
52 "NOTIFY * HTTP/1.1\r\n" \
53 "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
54 "Cache-Control: max-age=%d\r\n" \
58 "NTS: ssdp:alive\r\n" \
62 #define SSDP_ALIVE_MESSAGE_WITH_VERSION \
63 "NOTIFY * HTTP/1.1\r\n" \
64 "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
65 "Cache-Control: max-age=%d\r\n" \
69 "NTS: ssdp:alive\r\n" \
73 #define SSDP_BYEBYE_MESSAGE \
74 "NOTIFY * HTTP/1.1\r\n" \
75 "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
76 "NTS: ssdp:byebye\r\n" \
80 #define SSDP_BYEBYE_MESSAGE_WITH_VERSION \
81 "NOTIFY * HTTP/1.1\r\n" \
82 "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
83 "NTS: ssdp:byebye\r\n" \
87 #define SSDP_SEARCH_METHOD "M-SEARCH"
88 #define GENA_NOTIFY_METHOD "NOTIFY"
90 #define SSDP_ALIVE_NTS "ssdp:alive"
91 #define SSDP_BYEBYE_NTS "ssdp:byebye"
93 #define SSDP_DEFAULT_MAX_AGE 1800
94 #define SSDP_DEFAULT_MX 3
98 #endif /* __GSSDP_PROTOCOL_H__ */