forked from Netgear/wsdd2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
wsd.h
62 lines (51 loc) · 1.59 KB
/
wsd.h
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
/*
Unix SMB/CIFS implementation.
Web Services for Devices (WSD) helper functions (header)
https://msdn.microsoft.com/library/windows/desktop/aa826001(v=vs.85).aspx
https://msdn.microsoft.com/library/windows/hardware/jj123472.aspx
Copyright (C) Tobias Waldvogel 2013
Copyright (C) Jose M. Prieto 2015
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef WSD_H
#define WSD_H
#include <sys/types.h> // size_t
#define WSD_PORT 3702
#define WSD_HTTP_PORT WSD_PORT
#define WSD_MCAST_ADDR ("239.255.255.250")
#define WSD_MCAST6_ADDR ("FF02::C")
#define WSD_HTTP_TIMEOUT 120
#define WSD_RANDOM_DELAY 50000
enum wsd_action {
WSD_ACTION_NONE,
WSD_ACTION_HELLO,
WSD_ACTION_BYE,
WSD_ACTION_PROBE,
WSD_ACTION_PROBEMATCH,
WSD_ACTION_RESOLVE,
WSD_ACTION_RESOLVEMATCH,
WSD_ACTION_GET,
WSD_ACTION_GETRESPONSE
};
struct wsd_req_info {
char *action;
char *msgid;
char *address;
struct {
struct xmlns_qname *types[64];
size_t types_length;
} probe;
struct {
char *endpoint;
} resolve;
};
#endif