Merge pull request #3329 from efuss/fix-3311
[collectd.git] / src / network.h
1 /**
2  * collectd - src/network.h
3  * Copyright (C) 2005-2008  Florian octo Forster
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  *
23  * Authors:
24  *   Florian octo Forster <octo at collectd.org>
25  **/
26
27 #ifndef NETWORK_H
28 #define NETWORK_H
29
30 /*
31  * From RFC2365: Administratively Scoped IP Multicast
32  *
33  * The IPv4 Organization Local Scope -- 239.192.0.0/14
34  *
35  * 239.192.0.0/14 is defined to be the IPv4 Organization Local Scope, and is
36  * the space from which an organization should allocate sub-ranges when
37  * defining scopes for private use.
38  *
39  * Port 25826 is not assigned as of 2005-09-12
40  */
41
42 /*
43  * From RFC2373: IP Version 6 Addressing Architecture
44  *
45  * 2.7 Multicast Addresses
46  *
47  *  |   8    |  4 |  4 |          80 bits          |     32 bits     |
48  *  +--------+----+----+---------------------------+-----------------+
49  *  |11111111|flgs|scop|   reserved must be zero   |    group ID     |
50  *  +--------+----+----+---------------------------+-----------------+
51  *
52  * flgs = 1 => non-permanently-assigned ("transient") multicast address.
53  * scop = 8 => organization-local scope
54  *
55  * group = efc0:4a42 = 239.192.74.66
56  */
57
58 #define NET_DEFAULT_V4_ADDR "239.192.74.66"
59 #define NET_DEFAULT_V6_ADDR "ff18::efc0:4a42"
60 #define NET_DEFAULT_PORT "25826"
61
62 #define TYPE_HOST 0x0000
63 #define TYPE_TIME 0x0001
64 #define TYPE_TIME_HR 0x0008
65 #define TYPE_PLUGIN 0x0002
66 #define TYPE_PLUGIN_INSTANCE 0x0003
67 #define TYPE_TYPE 0x0004
68 #define TYPE_TYPE_INSTANCE 0x0005
69 #define TYPE_VALUES 0x0006
70 #define TYPE_INTERVAL 0x0007
71 #define TYPE_INTERVAL_HR 0x0009
72
73 /* Types to transmit notifications */
74 #define TYPE_MESSAGE 0x0100
75 #define TYPE_SEVERITY 0x0101
76
77 #define TYPE_SIGN_SHA256 0x0200
78 #define TYPE_ENCR_AES256 0x0210
79
80 #endif /* NETWORK_H */