yumapro  24.10-5
YumaPro SDK
Loading...
Searching...
No Matches
cap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_cap
13#define _H_cap
14/* FILE: cap.h
15*********************************************************************
16* *
17* P U R P O S E *
18* *
19*********************************************************************/
20
26/*********************************************************************
27* *
28* C H A N G E H I S T O R Y *
29* *
30*********************************************************************
31
32date init comment
33----------------------------------------------------------------------
3428-apr-05 abb Begun.
35*/
36#include <xmlstring.h>
37
38#ifndef _H_ncxtypes
39#include "ncxtypes.h"
40#endif
41
42#ifndef _H_status
43#include "status.h"
44#endif
45
46#ifndef _H_val
47#include "val.h"
48#endif
49
50#ifdef __cplusplus
51extern "C" {
52#endif
53
54
76/********************************************************************
77* *
78* C O N S T A N T S *
79* *
80*********************************************************************/
81
82
83#define MAX_STD_CAP_NAME_LEN 31
84
85#define CAP_VERSION_LEN 15
86
88#define CAP_BASE_URN ((const xmlChar *) \
89 "urn:ietf:params:netconf:base:1.0")
90
92#define CAP_BASE_URN11 ((const xmlChar *) \
93 "urn:ietf:params:netconf:base:1.1")
94
96#define CAP_URN ((const xmlChar *)"urn:ietf:params:netconf:capability:")
97
99#define CAP_REST_URN ((const xmlChar *)"urn:ietf:params:restconf:capability:")
100
102#define CAP_J_URN \
103 (const xmlChar *)"urn:ietf:params:xml:ns:netconf:capability:"
104
105#define CAP_JUNOS \
106 (const xmlChar *)"http://xml.juniper.net/netconf/junos/1.0"
107
108#define CAP_SEP_CH '/'
109
110
111/************************************************************
112 * *
113 * The following 2 sets of definitions must be kept aligned *
114 * *
115 ************************************************************/
116
117/* fast lookup -- standard capability bit ID */
118#define CAP_BIT_V1 bit0
119#define CAP_BIT_WR_RUN bit1
120#define CAP_BIT_CANDIDATE bit2
121#define CAP_BIT_CONF_COMMIT bit3
122#define CAP_BIT_ROLLBACK_ERR bit4
123#define CAP_BIT_VALIDATE bit5
124#define CAP_BIT_STARTUP bit6
125#define CAP_BIT_URL bit7
126#define CAP_BIT_XPATH bit8
127#define CAP_BIT_NOTIFICATION bit9
128#define CAP_BIT_INTERLEAVE bit10
129#define CAP_BIT_PARTIAL_LOCK bit11
130#define CAP_BIT_WITH_DEFAULTS bit12
131#define CAP_BIT_V11 bit13
132#define CAP_BIT_CONF_COMMIT11 bit14
133#define CAP_BIT_VALIDATE11 bit15
134#define CAP_BIT_DEPTH bit16
135#define CAP_BIT_FIELDS bit17
136#define CAP_BIT_FILTER bit18
137#define CAP_BIT_REPLAY bit19
138#define CAP_BIT_DEFAULTS bit20
139#define CAP_BIT_YANGPATCH bit21
140#define CAP_BIT_YANGLIB bit22
141#define CAP_BIT_YANGLIB11 bit23
142
143
144/* put the version numbers in the capability names for now */
145#define CAP_NAME_V1 ((const xmlChar *)"base:1.0")
146#define CAP_NAME_V11 ((const xmlChar *)"base:1.1")
147#define CAP_NAME_CANDIDATE ((const xmlChar *)"candidate:1.0")
148#define CAP_NAME_CONF_COMMIT ((const xmlChar *)"confirmed-commit:1.0")
149#define CAP_NAME_CONF_COMMIT11 ((const xmlChar *)"confirmed-commit:1.1")
150#define CAP_NAME_DEFAULTS ((const xmlChar *)"defaults:1.0")
151#define CAP_NAME_DEPTH ((const xmlChar *)"depth:1.0")
152#define CAP_NAME_FIELDS ((const xmlChar *)"fields:1.0")
153#define CAP_NAME_FILTER ((const xmlChar *)"filter:1.0")
154#define CAP_NAME_INTERLEAVE ((const xmlChar *)"interleave:1.0")
155#define CAP_NAME_NOTIFICATION ((const xmlChar *)"notification:1.0")
156#define CAP_NAME_PARTIAL_LOCK ((const xmlChar *)"partial-lock:1.0")
157#define CAP_NAME_REPLAY ((const xmlChar *)"replay:1.0")
158#define CAP_NAME_ROLLBACK_ERR ((const xmlChar *)"rollback-on-error:1.0")
159#define CAP_NAME_STARTUP ((const xmlChar *)"startup:1.0")
160#define CAP_NAME_URL ((const xmlChar *)"url:1.0")
161#define CAP_NAME_VALIDATE ((const xmlChar *)"validate:1.0")
162#define CAP_NAME_VALIDATE11 ((const xmlChar *)"validate:1.1")
163#define CAP_NAME_WITH_DEFAULTS ((const xmlChar *)"with-defaults:1.0")
164#define CAP_NAME_WR_RUN ((const xmlChar *)"writable-running:1.0")
165#define CAP_NAME_XPATH ((const xmlChar *)"xpath:1.0")
166#define CAP_NAME_YANGLIB ((const xmlChar *)"yang-library:1.0")
167#define CAP_NAME_YANGLIB11 ((const xmlChar *)"yang-library:1.1")
168#define CAP_NAME_YANGPATCH ((const xmlChar *)"yang-patch:1.0")
169
170
171
172/* some YANG capability details */
173#define CAP_REVISION_EQ (const xmlChar *)"revision="
174#define CAP_MODULE_EQ (const xmlChar *)"module="
175#define CAP_FEATURES_EQ (const xmlChar *)"features="
176#define CAP_DEVIATIONS_EQ (const xmlChar *)"deviations="
177#define CAP_SCHEME_EQ (const xmlChar *)"scheme="
178#define CAP_PROTOCOL_EQ (const xmlChar *)"protocol="
179#define CAP_BASIC_EQ (const xmlChar *)"basic-mode="
180#define CAP_SUPPORTED_EQ (const xmlChar *)"also-supported="
181#define CAP_MODULESETID_EQ (const xmlChar *)"module-set-id="
182#define CAP_CONTENTID_EQ (const xmlChar *)"content-id="
183
184#define CAP_YANGLIB_REVISION_PARAM (const xmlChar *)"revision=2016-06-21"
185#define CAP_YANGLIB_REVISION (const xmlChar *)"2016-06-21"
186
187#define CAP_YANGLIB_NMDA_REVISION_PARAM (const xmlChar *)"revision=2019-01-04"
188#define CAP_YANGLIB_NMDA_REVISION (const xmlChar *)"2019-01-04"
189
190/* yang-library module-set-id capability base string */
191#define CAP_YANGLIB_BASE_URN \
192 (const xmlChar *)"urn:ietf:params:netconf:capability:yang-library:1.0"
193
194/* NMDA yang-library content-id capability base string */
195#define CAP_YANGLIB_NMDA_BASE_URN \
196 (const xmlChar *)"urn:ietf:params:netconf:capability:yang-library:1.1"
197
198#define CAP_SCHEMA_RETRIEVAL \
199 (const xmlChar *)"urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"
200
201
202/********************************************************************
203* *
204* T Y P E S *
205* *
206*********************************************************************/
207
209typedef enum cap_subjtyp_t_ {
210 CAP_SUBJTYP_NONE,
216
217
219typedef enum cap_change_t_ {
220 CAP_CHANGE_NONE,
221 CAP_CHANGE_ADD,
222 CAP_CHANGE_DELETE,
223 CAP_CHANGE_MODIFY
225
226
228typedef enum cap_stdid_t_ {
231
234
237
240
243
246
249
252
255
258
261
264
267
270
273
276
279
282
285
288
291
294
296
298
299 CAP_STDID_LAST_MARKER
301
302
304typedef struct cap_list_t_ {
305 uint32 cap_std;
306 xmlChar *cap_schemes;
307 xmlChar *cap_defstyle;
308 xmlChar *cap_supported;
314 dlq_hdr_t capQ;
315} cap_list_t;
316
317
319typedef struct cap_rec_t_ {
320 dlq_hdr_t cap_qhdr;
321 cap_subjtyp_t cap_subject;
322 xmlChar *cap_uri;
323 xmlChar *cap_namespace;
324 xmlChar *cap_module;
325 xmlChar *cap_revision;
326 ncx_list_t cap_feature_list;
327 ncx_list_t cap_deviation_list;
328 boolean implemented;
329} cap_rec_t;
330
331
333typedef enum cap_yanglib_ver_t_ {
336
339
343
344
345/********************************************************************
346* *
347* F U N C T I O N S *
348* *
349*********************************************************************/
350
351
357extern cap_list_t *
358 cap_new_caplist (void);
359
360
367extern void
368 cap_init_caplist (cap_list_t *caplist);
369
370
377extern void
378 cap_clean_caplist (cap_list_t *caplist);
379
380
387extern void
388 cap_free_caplist (cap_list_t *caplist);
389
390
398extern status_t
399 cap_add_std (cap_list_t *caplist,
400 cap_stdid_t capstd);
401
402
412extern status_t
413 cap_add_stdval (val_value_t *caplist,
414 cap_stdid_t capstd,
415 boolean is_restconf);
416
417
429extern status_t
431 const xmlChar *uri,
432 boolean is_restconf);
433
434
442extern boolean
443 cap_is_module_string (const xmlChar *uri);
444
445
457extern status_t
459 const xmlChar *uri);
460
461
473extern status_t
475 const xmlChar *uri,
476 boolean implemented);
477
478
488extern status_t
490 const xmlChar *uri);
491
492
493
501extern status_t
502 cap_add_url (cap_list_t *caplist,
503 const xmlChar *scheme_list);
504
505
516extern status_t
517 cap_add_urlval (val_value_t *caplist,
518 const xmlChar *scheme_list,
519 boolean is_restconf);
520
521
529extern status_t
530 cap_add_withdef (cap_list_t *caplist,
531 const xmlChar *defstyle);
532
533
545extern status_t
547 const xmlChar *defstyle,
548 uint8 withdef_enabled,
549 boolean is_restconf);
550
551
560extern status_t
562 const xmlChar *defstyle);
563
564
572extern status_t
573 cap_add_ent (cap_list_t *caplist,
574 const xmlChar *uristr);
575
576
584extern status_t
585 cap_add_entval (val_value_t *caplist,
586 const xmlChar *urival);
587
588
596extern status_t
597 cap_add_modval (val_value_t *caplist,
598 ncx_module_t *mod);
599
600
609extern status_t
610 cap_add_mod (cap_list_t *caplist,
611 ncx_module_t *mod);
612
613
621extern void
622 cap_remove_mod (cap_list_t *caplist,
623 ncx_module_t *mod);
624
625
633extern status_t
635 ncx_module_t *mod);
636
637
638
646extern status_t
648 ncx_module_t *mod);
649
650
658extern status_t
660 ncx_save_deviations_t *savedev);
661
662
670extern boolean
671 cap_std_set (const cap_list_t *caplist,
672 cap_stdid_t capstd);
673
674
683extern boolean
684 cap_set (const cap_list_t *caplist,
685 const xmlChar *capuri);
686
687
699extern cap_rec_t *
700 cap_match (const cap_list_t *caplist,
701 const xmlChar *capuri);
702
703
715extern val_value_t *
716 cap_match_val (val_value_t *caplist,
717 const xmlChar *capuri);
718
719
727extern const xmlChar *
728 cap_get_protos (cap_list_t *caplist);
729
730
739extern void
740 cap_dump_stdcaps (const cap_list_t *caplist,
741 log_debug_t lvl,
742 FILE *outfile);
743
744
753extern void
754 cap_dump_modcaps (const cap_list_t *caplist,
755 log_debug_t lvl,
756 FILE *outfile);
757
758
766extern cap_rec_t *
767 cap_find_modcap (const cap_list_t *caplist,
768 const xmlChar *modname);
769
770
779extern void
780 cap_dump_entcaps (const cap_list_t *caplist,
781 log_debug_t lvl,
782 FILE *outfile);
783
784
793extern cap_rec_t *
794 cap_first_modcap (cap_list_t *caplist);
795
796
805extern cap_rec_t *
806 cap_next_modcap (cap_rec_t *curcap);
807
808
820extern void
822 const xmlChar **module,
823 const xmlChar **revision,
824 const xmlChar **namespacestr);
825
826
834extern xmlChar *
836
837
849extern status_t
850 cap_add_config_id (cap_list_t *caplist);
851
852
867extern status_t
869 boolean is_module_id,
870 cap_yanglib_ver_t yanglib_ver);
871
872
880extern status_t
881 cap_add_yanglib (cap_list_t *caplist,
882 cap_yanglib_ver_t yanglib_ver);
883
884
888#ifdef __cplusplus
889} /* end extern 'C' */
890#endif
891
892#endif /* _H_cap */
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:348
boolean cap_std_set(const cap_list_t *caplist, cap_stdid_t capstd)
fast search of standard protocol capability set
Definition: cap.c:2277
xmlChar * cap_make_moduri(ncx_module_t *mod)
Malloc and construct a module URI for the specified module make the module URI string (for sysCapabil...
Definition: cap.c:2905
status_t cap_add_stdval(val_value_t *caplist, cap_stdid_t capstd, boolean is_restconf)
Add a standard protocol capability to the list (val_value_t version)
Definition: cap.c:703
status_t cap_add_devmodval(val_value_t *caplist, ncx_save_deviations_t *savedev)
Add a deviation module capability to the list (val_value_t version)
Definition: cap.c:2232
cap_rec_t * cap_match(const cap_list_t *caplist, const xmlChar *capuri)
Check if the capability URI is set in the capslist.
Definition: cap.c:2382
cap_yanglib_ver_t
YANG library URI to use.
Definition: cap.h:333
cap_subjtyp_t
NETCONF capability subject types.
Definition: cap.h:209
boolean cap_set(const cap_list_t *caplist, const xmlChar *capuri)
Check if the capability URI is set in the capslist linear search of capability list,...
Definition: cap.c:2306
status_t cap_add_urlval(val_value_t *caplist, const xmlChar *scheme_list, boolean is_restconf)
Add the :url capability to the list; value struct version.
Definition: cap.c:1542
status_t cap_add_entval(val_value_t *caplist, const xmlChar *urival)
Add an enterprise capability to the list (val_value_t version)
Definition: cap.c:1935
status_t cap_add_modval(val_value_t *caplist, ncx_module_t *mod)
Add a module capability to the list (val_value_t version)
Definition: cap.c:1977
status_t cap_add_restdefval(val_value_t *caplist, const xmlChar *defstyle)
Add the :defaults capability to the RESTCONF caplist value struct version.
Definition: cap.c:1827
status_t cap_add_config_id(cap_list_t *caplist)
Add the :config-id capability to the list.
Definition: cap.c:2934
cap_rec_t * cap_find_modcap(const cap_list_t *caplist, const xmlChar *modname)
Find a specified module in the caplist.
Definition: cap.c:2712
status_t cap_add_withdef(cap_list_t *caplist, const xmlChar *defstyle)
Add the :with-defaults capability to the list.
Definition: cap.c:1610
cap_change_t
Capability Change Type.
Definition: cap.h:219
status_t cap_add_module_string2(cap_list_t *caplist, const xmlChar *uri, boolean implemented)
Add a standard protocol capability to the list by URI string and set the implemented flag.
Definition: cap.c:1477
status_t cap_add_mod(cap_list_t *caplist, ncx_module_t *mod)
Add a module capability to the list.
Definition: cap.c:2084
status_t cap_add_std_string(cap_list_t *caplist, const xmlChar *uri, boolean is_restconf)
Add a standard protocol capability to the list by URI string.
Definition: cap.c:866
void cap_dump_stdcaps(const cap_list_t *caplist, log_debug_t lvl, FILE *outfile)
debug function Printf the standard protocol capabilities list
Definition: cap.c:2504
cap_stdid_t
enumerated list of standard capability IDs
Definition: cap.h:228
void cap_free_caplist(cap_list_t *caplist)
Clean the fields in a pre-allocated cap_list_t struct Then free the caplist memory.
Definition: cap.c:649
const xmlChar * cap_get_protos(cap_list_t *caplist)
get the #url capability protocols list if it exists get the protocols field for the :url capability
Definition: cap.c:2460
void cap_split_modcap(cap_rec_t *cap, const xmlChar **module, const xmlChar **revision, const xmlChar **namespacestr)
Split the modcap string into 3 parts.
Definition: cap.c:2874
cap_rec_t * cap_first_modcap(cap_list_t *caplist)
Get the first module capability in the list.
Definition: cap.c:2795
status_t cap_add_url(cap_list_t *caplist, const xmlChar *scheme_list)
Add the #url capability to the list.
Definition: cap.c:1502
void cap_init_caplist(cap_list_t *caplist)
Initialize the fields in a pre-allocated cap_list_t struct memory for caplist already allocated – thi...
Definition: cap.c:568
boolean cap_is_module_string(const xmlChar *uri)
Check if the capability URI is a YANG module identifier.
Definition: cap.c:1040
status_t cap_add_withdefval(val_value_t *caplist, const xmlChar *defstyle, uint8 withdef_enabled, boolean is_restconf)
Add the :with-defaults capability to the list; value struct version.
Definition: cap.c:1667
status_t cap_add_std(cap_list_t *caplist, cap_stdid_t capstd)
Add a standard protocol capability to the list.
Definition: cap.c:673
void cap_clean_caplist(cap_list_t *caplist)
Clean the fields in a pre-allocated cap_list_t struct Memory for caplist not deallocated – this just ...
Definition: cap.c:593
status_t cap_add_yanglib(cap_list_t *caplist, cap_yanglib_ver_t yanglib_ver)
Add the :yang-library capability to the list.
Definition: cap.c:3145
cap_rec_t * cap_next_modcap(cap_rec_t *curcap)
Get the next module capability in the list.
Definition: cap.c:2831
status_t cap_remove_modval(val_value_t *caplist, ncx_module_t *mod)
Remove a module capability from the list (val_value_t version)
Definition: cap.c:2023
status_t cap_add_ent(cap_list_t *caplist, const xmlChar *uristr)
Add an enterprise capability to the list.
Definition: cap.c:1894
void cap_remove_mod(cap_list_t *caplist, ncx_module_t *mod)
Remove a module capability from the list.
Definition: cap.c:2120
status_t cap_add_module_string(cap_list_t *caplist, const xmlChar *uri)
Add a standard protocol capability to the list by URI string.
Definition: cap.c:1423
status_t cap_add_module_string_sorted(cap_list_t *caplist, const xmlChar *uri)
Add a standard protocol capability to the list by URI string and set the implemented flag AND SORT TH...
Definition: cap.c:1448
cap_list_t * cap_new_caplist(void)
Malloc and initialize the fields in a cap_list_t struct.
Definition: cap.c:543
void cap_dump_entcaps(const cap_list_t *caplist, log_debug_t lvl, FILE *outfile)
Printf the enterprise capabilities list debug function.
Definition: cap.c:2749
status_t cap_add_ids_val(val_value_t *caplist, boolean is_module_id, cap_yanglib_ver_t yanglib_ver)
Add the :config-id capability to the list.
Definition: cap.c:3013
status_t cap_add_netconf_modval(val_value_t *caplist, ncx_module_t *mod)
Add a module capability to the list (val_value_t version)
Definition: cap.c:2187
val_value_t * cap_match_val(val_value_t *caplist, const xmlChar *capuri)
Check if the capability URI is set in the capslist value_t tree.
Definition: cap.c:2422
void cap_dump_modcaps(const cap_list_t *caplist, log_debug_t lvl, FILE *outfile)
Printf the standard data model module capabilities list debug function.
Definition: cap.c:2599
@ CAP_YANGLIB_VER_NONE
not set
Definition: cap.h:335
@ CAP_YANGLIB_VER_11
Version 1.1 NMDA.
Definition: cap.h:341
@ CAP_YANGLIB_VER_10
Version 1.0 non-NMDA.
Definition: cap.h:338
@ CAP_SUBJTYP_OTHER
capability is other than prot or DM (ENT)
Definition: cap.h:213
@ CAP_SUBJTYP_CONFID
config-id capability
Definition: cap.h:214
@ CAP_SUBJTYP_PROT
capability is a protocol extension
Definition: cap.h:211
@ CAP_SUBJTYP_DM
capability is a data model
Definition: cap.h:212
@ CAP_STDID_DEFAULTS
RESTCONF defaults parameter.
Definition: cap.h:290
@ CAP_STDID_VALIDATE
:validate:1.0
Definition: cap.h:245
@ CAP_STDID_FIELDS
RESTCONF fields parameter.
Definition: cap.h:281
@ CAP_STDID_VALIDATE11
:validate:v1.1 (RFC 6241)
Definition: cap.h:272
@ CAP_STDID_XPATH
:xpath:1.0
Definition: cap.h:254
@ CAP_STDID_CONF_COMMIT11
:confirmed-commit:v1.1 (RFC 6241)
Definition: cap.h:275
@ CAP_STDID_WITH_DEFAULTS
:with-defaults:1.0 (RFC 6243)
Definition: cap.h:266
@ CAP_STDID_YANGPATCH
RESTCONF yangpatch parameter.
Definition: cap.h:293
@ CAP_STDID_DEPTH
RESTCONF depth parameter.
Definition: cap.h:278
@ CAP_STDID_FILTER
RESTCONF filter parameter.
Definition: cap.h:284
@ CAP_STDID_V1
NETCONF 1.0 (RFC 4741)
Definition: cap.h:230
@ CAP_STDID_CANDIDATE
:candidate:1.0
Definition: cap.h:236
@ CAP_STDID_YANGLIB
YANG-LIBRARY 1.0 capability.
Definition: cap.h:295
@ CAP_STDID_URL
:url:1.0
Definition: cap.h:251
@ CAP_STDID_WRITE_RUNNING
:writable-running:1.0
Definition: cap.h:233
@ CAP_STDID_NOTIFICATION
:notification:1.0 *(RFC 5277 )
Definition: cap.h:257
@ CAP_STDID_YANGLIB11
YANG-LIBRARY 1.1 capability.
Definition: cap.h:297
@ CAP_STDID_PARTIAL_LOCK
:partial-lock:1.0 (RFC 5717)
Definition: cap.h:263
@ CAP_STDID_CONF_COMMIT
:confirmed-commit:1.0
Definition: cap.h:239
@ CAP_STDID_STARTUP
:startup:v1.0
Definition: cap.h:248
@ CAP_STDID_REPLAY
RESTCONF replay parameter.
Definition: cap.h:287
@ CAP_STDID_V11
NETCONF v1.1 (RFC 6241)
Definition: cap.h:269
@ CAP_STDID_ROLLBACK_ERR
:rollback-on-error:1.0
Definition: cap.h:242
@ CAP_STDID_INTERLEAVE
:interleave:1.0 *(RFC 5277 )
Definition: cap.h:260
status_t
global error return code
Definition: status_enum.h:210
YANG module data structures Many internal representations of YANG module constructs.
Global error messages for status code enumerations.
one capabilities list
Definition: cap.h:304
xmlChar * cap_supported
with-defaults 'also-supported' parm
Definition: cap.h:308
xmlChar * cap_defstyle
with-defaults 'basic' parm
Definition: cap.h:307
xmlChar * cap_schemes
URL capability protocol list.
Definition: cap.h:306
xmlChar * cap_yanglib_rev
YANG-LIBRARY pointers, stored in the cap list.
Definition: cap.h:311
xmlChar * cap_yanglib_setid
yang-library module-set-id param
Definition: cap.h:312
dlq_hdr_t capQ
queue of cap_rec_t structs
Definition: cap.h:314
uint32 cap_std
bitset of std caps
Definition: cap.h:305
queue of this structure for list of enterprise capabilities
Definition: cap.h:319
header for a NCX List
Definition: ncxtypes.h:859
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1138
used with obj_deviation_t to defer object lookups
Definition: ncxtypes.h:1505
one value to match one type
Definition: val.h:912
Value Node Basic Support.