blob: a8b16d9a404f638ad5ccd905c27b686624fc359f (
plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NDPD_H
#define _NDPD_H
#ifdef __cplusplus
extern "C" {
#endif
#define NDPD_SNMP_SOCKET "/var/run/in.ndpd_mib"
#define NDPD_SNMP_INFO_REQ 1
#define NDPD_SNMP_INFO_RESPONSE 2
#define NDPD_PHYINT_INFO 3
#define NDPD_PREFIX_INFO 4
#define NDPD_ROUTER_INFO 5
#define NDPD_SNMP_INFO_VER 1
#define NDPD_PHYINT_INFO_VER 1
#define NDPD_PREFIX_INFO_VER 1
#define NDPD_ROUTER_INFO_VER 1
/*
* Data structures used to handle configuration variables set in ndpd.conf.
* cf_notdefault is set for variables explicitly set in ndpd.conf.
*/
struct confvar {
uint_t cf_value;
boolean_t cf_notdefault;
};
extern struct confvar ifdefaults[];
/*
* Interfaces configuration variable indicies
*/
#define I_DupAddrDetectTransmits 0 /* From RFC 2462 */
#define I_AdvSendAdvertisements 1
#define I_MaxRtrAdvInterval 2 /* In seconds */
#define I_MinRtrAdvInterval 3 /* In seconds */
#define I_AdvManagedFlag 4
#define I_AdvOtherConfigFlag 5
#define I_AdvLinkMTU 6
#define I_AdvReachableTime 7 /* In milliseconds */
#define I_AdvRetransTimer 8 /* In milliseconds */
#define I_AdvCurHopLimit 9
#define I_AdvDefaultLifetime 10 /* In seconds */
#define I_StatelessAddrConf 11
#define I_TmpAddrsEnabled 12 /* From RFC 3041 */
#define I_TmpValidLifetime 13 /* In seconds */
#define I_TmpPreferredLifetime 14 /* In seconds */
#define I_TmpRegenAdvance 15 /* In seconds */
#define I_TmpMaxDesyncFactor 16 /* In seconds */
#define I_StatefulAddrConf 17
#define I_IFSIZE 18 /* # of variables */
typedef struct ndpd_info_s {
uint_t info_type;
uint_t info_version;
uint_t info_num_of_phyints;
} ndpd_info_t;
typedef struct ndpd_prefix_info_s {
uint_t prefix_info_type;
uint_t prefix_info_version;
struct in6_addr prefix_prefix; /* Used to indentify prefix */
uint_t prefix_len; /* Num bits valid */
uint_t prefix_flags; /* IFF_ flags */
uint_t prefix_phyint_index;
uint_t prefix_ValidLifetime; /* In ms w/ 2 hour rule */
uint_t prefix_PreferredLifetime; /* In millseconds */
uint_t prefix_OnLinkLifetime; /* ms valid w/o 2 hour rule */
boolean_t prefix_OnLinkFlag;
boolean_t prefix_AutonomousFlag;
} ndpd_prefix_info_t;
typedef struct ndpd_router_info_s {
uint_t router_info_type;
uint_t router_info_version;
struct in6_addr router_address; /* Used to identify router */
uint_t router_lifetime; /* In milliseconds */
uint_t router_phyint_index;
} ndpd_router_info_t;
typedef struct ndpd_phyint_info_s {
uint_t phyint_info_type;
uint_t phyint_info_version;
int phyint_index;
struct confvar phyint_config[I_IFSIZE];
#define phyint_DupAddrDetectTransmits \
phyint_config[I_DupAddrDetectTransmits].cf_value
#define phyint_AdvSendAdvertisements \
phyint_config[I_AdvSendAdvertisements].cf_value
#define phyint_MaxRtrAdvInterval \
phyint_config[I_MaxRtrAdvInterval].cf_value
#define phyint_MinRtrAdvInterval \
phyint_config[I_MinRtrAdvInterval].cf_value
#define phyint_AdvManagedFlag phyint_config[I_AdvManagedFlag].cf_value
#define phyint_AdvOtherConfigFlag \
phyint_config[I_AdvOtherConfigFlag].cf_value
#define phyint_AdvLinkMTU phyint_config[I_AdvLinkMTU].cf_value
#define phyint_AdvReachableTime phyint_config[I_AdvReachableTime].cf_value
#define phyint_AdvRetransTimer phyint_config[I_AdvRetransTimer].cf_value
#define phyint_AdvCurHopLimit phyint_config[I_AdvCurHopLimit].cf_value
#define phyint_AdvDefaultLifetime \
phyint_config[I_AdvDefaultLifetime].cf_value
#define phyint_StatelessAddrConf \
phyint_config[I_StatelessAddrConf].cf_value
#define phyint_TmpAddrsEnabled phyint_config[I_TmpAddrsEnabled].cf_value
#define phyint_TmpValidLifetime phyint_config[I_TmpValidLifetime].cf_value
#define phyint_TmpPreferredLifetime \
phyint_config[I_TmpPreferredLifetime].cf_value
#define phyint_TmpRegenAdvance phyint_config[I_TmpRegenAdvance].cf_value
#define phyint_TmpMaxDesyncFactor \
phyint_config[I_TmpMaxDesyncFactor].cf_value
#define phyint_StatefulAddrConf \
phyint_config[I_StatefulAddrConf].cf_value
uint_t phyint_num_of_prefixes;
uint_t phyint_num_of_routers;
} ndpd_phyint_info_t;
#ifdef __cplusplus
}
#endif
#endif /* _NDPD_H */
|