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., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, 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_BYEBYE_MESSAGE \
63 "NOTIFY * HTTP/1.1\r\n" \
64 "Host: " SSDP_ADDR ":" SSDP_PORT_STR "\r\n" \
65 "NTS: ssdp:byebye\r\n" \
69 #define SSDP_SEARCH_METHOD "M-SEARCH"
70 #define GENA_NOTIFY_METHOD "NOTIFY"
72 #define SSDP_ALIVE_NTS "ssdp:alive"
73 #define SSDP_BYEBYE_NTS "ssdp:byebye"
75 #define SSDP_DEFAULT_MAX_AGE 1800
76 #define SSDP_DEFAULT_MX 3
80 #endif /* __GSSDP_PROTOCOL_H__ */