node.h File Reference

Parse tree node and supporting types and structures. More...

#include <jnx/strextra.h>
#include "ddl/dtypes.h"
#include "ddl/defs.h"
#include "ddl/constraint.h"
#include <jnx/bitmap.h>
#include "ddl/daemon_map.h"
#include <jnx/interface_info_pub.h>
#include <ddl/node_priv.h>

Data Structures

struct  ddl_action_map_s
 ddl_action_map_t: provide a mapping between parsable item and code running in a daemon that cares about it. More...
struct  ddl_eaid_s
struct  ddl_execute_cmd_s
struct  ddl_shell_cmd_s
struct  ddl_interface_acceptable_s
struct  ddl_cmd_fwding_s
struct  ddl_sparse_field_s
struct  ddl_node_s
struct  ddl_feature_set_s
struct  ddl_schema_init_arg_s

Defines

#define DDL_APPLY_MACRO_NAME   "apply-macro"
#define DDL_APPLY_FLAGS_NAME   "apply-flags"
#define DDL_DYNAMIC_DB_NAME   "dynamic-db"
#define DDL_MAX_LEVELS   64
 Largest number of levels we handle.
#define DNF_BIT(bitnum)   BITT(ddl_flags_t, bitnum)
#define HID_BIT(bitnum)   BITT(ddl_hidden_t, bitnum)
#define EXEMP_BIT(bitnum)   BITT(ddl_exemps_t, bitnum)
#define DDL_FEATURE_ID_SEP   '\t'
#define NULL_ACTION_MAP_ENTRY   0, 0, NULL, -1
#define DDL_JUNIPER_CONFIG_NAME   "juniper-config"
#define DDL_JUNIPER_COMMAND_NAME   "juniper-command"
#define DDL_JUNIPER_CONFIG_COMMAND_NAME   "juniper-config-command"
#define DDL_JUNIPER_COMMAND_FORWARDING_NAME   "juniper-command-forwarding"
#define DNF_HELPFUL   DNF_BIT( 0)
 Use this attribute as help text.
#define DNF_MUSTQUOTE   DNF_BIT( 1)
 Value must be quoted on output.
#define DNF_IDENTMATCH   DNF_BIT( 2)
 Part of an identifier.
#define DNF_ALLOW_IFRANGE   DNF_BIT( 3)
 Accepts interface-range.
#define DNF_ONESET   DNF_BIT( 4)
 Set of one item.
#define DNF_SETOF   DNF_BIT( 5)
 Set of (allow multiple values).
#define DNF_ALLOW_MASK   DNF_BIT( 6)
 Allow mask to sub for /prefix-length.
#define DNF_LONG   DNF_BIT( 7)
 Support long identifiers (>255).
#define DNF_LIST   DNF_BIT( 8)
 Requires C linked list.
#define DNF_IDENTIFIER   DNF_BIT( 9)
 This is (part of)the identifier.
#define DNF_NOKEYWORD   DNF_BIT(10)
 User may (must?) omit keyword.
#define DNF_MANDATORY   DNF_BIT(11)
 Mandatory argument.
#define DNF_ADVANCED   DNF_BIT(12)
 Advanced feature: rarely used arcane.
#define DNF_RANGED   DNF_BIT(13)
 Has specified range.
#define DNF_POSITIONAL   DNF_BIT(14)
 Position matters (but size helps).
#define DNF_CONFIG   DNF_BIT(15)
 Related to configuration.
#define DNF_UNQUOTED   DNF_BIT(16)
 Don't quote to avoid whitespace Must be explicitly passed in commands and propagated in configs.
#define DNF_EXPLICIT   DNF_BIT(17)
#define DNF_IMPLICIT   DNF_BIT(18)
 Keyword cannot be explicit in command.
#define DNF_ONELINER   DNF_BIT(19)
 One line of input/output desired.
#define DNF_KILO   DNF_BIT(20)
 Use 'k', 'm', 'g' on output.
#define DNF_K1000   DNF_BIT(21)
 Use k=1000 m=1000000 etc.
#define DNF_ALLOW_NO   DNF_BIT(22)
 Allow no-$toggle form.
#define DNF_REMOVE_EMPTY   DNF_BIT(23)
 Remove if empty.
#define DNF_HOMOGENEOUS   DNF_BIT(24)
 A set with the tag outside.
#define DNF_ONELINER_PLUS   DNF_BIT(25)
 Oneliner if <= 1 attribute set.
#define DNF_SECRET   DNF_BIT(26)
 Don't display this field.
#define DNF_AUTOSORT   DNF_BIT(27)
 Sort as they go in.
#define DNF_STRICT_ORDER   DNF_BIT(28)
 Strictly order the help output.
#define DNF_NO_STRUCT   DNF_BIT(29)
 Don't make a structure.
#define DNF_PRUNE_UNCHANGED   DNF_BIT(30)
 Can skip export here if unchanged.
#define DNF_MULTICAST_ONLY   DNF_BIT(31)
 Allow multicast address only.
#define DNF_DATE_ONLY   DNF_BIT(32)
 Allow only date in time spec.
#define DNF_TIME_ONLY   DNF_BIT(33)
 Allow only time in time spec.
#define DNF_TEXT_CHOICE   DNF_BIT(34)
 String input in enum choice.
#define DNF_PRUNE_LCC   DNF_BIT(35)
 Hide from lcc config export.
#define DNF_ON_ALL_RE   DNF_BIT(36)
 Allow cmd on all/other re.
#define DNF_NO_FIPS   DNF_BIT(37)
 Do not allow in FIP mode.
#define DNF_NO_APPLY   DNF_BIT(38)
 Do not make apply-* statements.
#define DNF_ALLOW_ATMVPN   DNF_BIT(39)
 Allow parsing of atm vpn address.
#define DNF_ALLOW_ISO_ADDR   DNF_BIT(40)
 Allow parsing of iso address.
#define DNF_ALLOW_ISO_PREFIX   DNF_BIT(41)
 Allow parsing of iso prefix.
#define DNF_ALLOW_ISO_SYSID   DNF_BIT(42)
 Allow parsing of iso sysid.
#define DNF_DISALLOW_MARTIANS   DNF_BIT(43)
 Do not allow martian addresses.
#define DNF_PHANTOM   DNF_BIT(44)
 Not visible via ddl-access calls.
#define DNF_TWOSET   DNF_BIT(45)
 Two-set style (name <id>

).

#define DNF_DELTA_LIST   DNF_BIT(46)
 Container wants delta for items.
#define DNF_NO_RANGE_OUTPUT   DNF_BIT(47)
 No range should be output.
#define DNF_ALLOW_OAM_UNIT   DNF_BIT(48)
 Allow unit no 32767 for atm interface.
#define DNF_ISO8601   DNF_BIT(49)
 ISO 8601 date/time compatibility.
#define DNF_VSYS_OK   DNF_BIT(50)
 Can be run by LR admin.
#define DNF_MASTER_ONLY   DNF_BIT(51)
 Not available under LR hierarchy.
#define DNF_MASTER_WRITE   DNF_BIT(52)
 Not modifiable by LR admin.
#define DNF_ROOT   DNF_BIT(53)
 lr/vsys local root
#define DNF_TYPE_CHANGE   DNF_BIT(54)
 Can change its type.
#define DNF_NO_RECURSIVE_DELETE   DNF_BIT(55)
 Don't fire recursive delete action.
#define DNF_UNICAST_ONLY   DNF_BIT(56)
 Allow only unicast address.
#define DNF_ALLOW_STRUCT   DNF_BIT(57)
 Make a structure.
#define DNF_NO_AID   DNF_BIT(58)
 Do not generate aid.
#define DNF_PRUNE_SPU   DNF_BIT(59)
 Hide from spu config export.
#define DNF_DYN_DB_ATTRIB_OK   DNF_BIT(60)
 Permit a node to carry the "dynamic-db" attribute.
#define DNF_UNUSED   DNF_BIT(61)
 Vacancy.
#define DNF_TWIG_DYN_DB_OK   DNF_BIT(62)
 Permit twig to exist in dynamic DB.
#define DNF_CURRENT_PRODUCT_SUPPORT   DNF_BIT(63)
 Node is supported by current product.
#define NUM_FLAGS   64
 Number of DNF_ flags.
#define DNF_DDC_INHERIT_DYN_DB_OK   DNF_BIT(0)
 Inherit DNF_TWIG_DYN_DB_OK.
#define NUM_DDC_FLAGS   1
 Number of DNF_DDC_ flags.
#define NUM_PHANTOM_NODES   5
 {dynamic-db,apply-{groups{,-except}},macro,flags}}
#define DDL_PHANTOM_AIDMASK   ((1 << NUM_PHANTOM_NODES) - 1)
 The ddl compiler always places the phantom nodes side-by-side; except for 'juniper-conf', if the parent node is model simple, these phantom kids are always the first <n> kids.
#define HID_UNCONDITIONAL   HID_BIT(0)
 This is equivalent to flag hidden.
#define HID_FROM_XML   HID_BIT(1)
 hidden from XML, not visible in XML, visible in CLI
#define HID_FROM_CLI   HID_BIT(2)
 hidden from CLI , visible in XML, not visible in CLI
#define HID_DEPRECATED   HID_BIT(3)
 deprecated feature.
#define HID_DEFAULT   HID_BIT(4)
 default feature.
#define HID_DANGEROUS   HID_BIT(5)
 dangerous, some of these commands cause the router to drop packets.
#define HID_INTERNAL   HID_BIT(6)
 internal feature.
#define HID_UNRELEASED   HID_BIT(7)
 unreleased features.
#define HID_GURU   HID_BIT(8)
 advanced guru-ish features.
#define HID_SUPPORT   HID_BIT(9)
 for customer support.
#define HID_FROM_GUI   HID_BIT(10)
 hidden from GUI, visible in XML (special case handling for version and rcsid)
#define NUM_HIDDEN   11
 Number of HID_ flags.
#define MAX_IDENTIFIER_AID   16
 Max number of attributes w/ identifier on.
#define DDLAID_ONESET   0
 Attribute ID for 'oneset's.
#define DNF_COMMUNICABLE
#define DNF_UNCOMMUNICABLE   (DNF_ALLOW_NO | DNF_HOMOGENEOUS)
#define DDL_PRODUCTS_TO_PLINE_INDEX(x)   (BITMAP_MAX_VALUES - (x))
#define EAID_MAP_BIT(bitnum)   BITT(ddl_eaid_map_t, bitnum)
#define DSF_BIT(bitnum)   BITT(ddl_sparse_bits_t, bitnum)
#define DSFF_LAST_ITEM   (1)
#define DDL_SHELL_CMD_ARG_MAX   10
#define DDL_INTERFACE_ACCEPTABLE_MAX   5
#define DCFF_BIT(bitnum)   BITT(ddl_cmd_fwding_flags_t, (bitnum))
#define DCFF_CHASSIS_SELECTOR   DCFF_BIT(0)
#define DCFF_RE_SELECTOR   DCFF_BIT(1)
#define DCFF_LR_SELECTOR   DCFF_BIT(2)
#define DCFF_VC_SELECTOR   DCFF_BIT(3)
#define DCFF_EXCLUDE_MULTI_CHASSIS   DCFF_BIT(4)
#define DCFF_EXCLUDE_MULTI_RE   DCFF_BIT(5)
#define DCFF_EXCLUDE_SCC   DCFF_BIT(6)
#define DCFF_EXCLUDE_MULTI_LR   DCFF_BIT(7)
#define DCFF_EXCLUDE_CHASSIS_SELECTOR   DCFF_BIT(8)
#define DCFF_EXCLUDE_CLUSTER   DCFF_BIT(9)
#define DCFF_EXCLUDE_HOBSON   DCFF_BIT(10)
#define DCFF_EXCLUDE_RSD   DCFF_BIT(11)
#define DCFF_EXCLUDE_SYSTEM_DOMAIN   DCFF_BIT(12)
#define DCFF_EXCLUDE_PSD   DCFF_BIT(13)
#define DCFF_EXCLUDE_ALL_MEMBERS   DCFF_BIT(14)
#define DCFF_EXCLUDE_SFC   DCFF_BIT(15)
#define DCFF_EXCLUDE_ABSOLUT   DCFF_BIT(16)
#define DCFF_FLAG_DAEMON_PROCESSED   DCFF_BIT(20)
#define DCFF_FLAG_ASYNC   DCFF_BIT(21)
#define DCFF_FLAG_PRIMARY_LAST   DCFF_BIT(22)
#define DCFF_FLAG_HIDDEN   DCFF_BIT(23)
#define DCFF_FLAG_FORWARD_TO_RSD   DCFF_BIT(24)
#define DCFF_FLAG_ALLOW_FROM_RSD   DCFF_BIT(25)
#define DCFF_FLAG_ALLOW_FROM_PSD   DCFF_BIT(26)
#define DCFF_FLAG_INCLUDE_RSD_ON_PSD   DCFF_BIT(27)
#define DCFF_FLAG_DISALLOW_ON_GLOBAL_MASTER   DCFF_BIT(28)
#define DCFF_HIDDEN_SELECTOR_RE   DCFF_BIT(30)
#define DSCHEMA_FLAG_BIT(bitnum)   BITT(ddl_schema_flag_t, (bitnum))
#define DDL_SF_ORDER   DSCHEMA_FLAG_BIT(0)
#define DDL_SF_CORE   DSCHEMA_FLAG_BIT(1)
#define DDL_SCHEMA_ORDINAL_DEFAULT   1000
#define EMPTY_NODE_ENTRY(name)
#define INVALID_NODEID_NULL_ENTRY   EMPTY_NODE_ENTRY(NULL)

Typedefs

typedef flag64_t ddl_flags_t
typedef flag_t ddl_hidden_t
typedef flag_t ddl_exemps_t
typedef ddl_action_map_s ddl_action_map_t
 ddl_action_map_t: provide a mapping between parsable item and code running in a daemon that cares about it.
typedef bitmap_t ddl_products_t
 ddl_products_t: bit map of products, as represented in <product.h>.
typedef bitmap_t ddl_package_map_t
typedef bitmap_t ddl_licenses_t
typedef long long ddl_eaid_map_t
typedef flag_t ddl_sparse_bits_t
typedef ddl_eaid_s ddl_eaid_t
typedef ddl_execute_cmd_s ddl_execute_cmd_t
typedef ddl_shell_cmd_s ddl_shell_cmd_t
typedef ddl_interface_acceptable_s ddl_interface_acceptable_t
typedef flag_t ddl_cmd_fwding_flags_t
typedef ddl_cmd_fwding_s ddl_cmd_fwding_t
typedef unsigned long ddl_schema_flag_t
typedef ddl_sparse_field_s ddl_sparse_field_t
typedef ddl_feature_set_s ddl_feature_set_t
typedef ddl_schema_init_arg_s ddl_schema_init_arg_t

Enumerations

enum  ddl_sparse_enum_t {
  DSF_CONTAINS = 0, DSF_PATH_REF = 1, DSF_UNITS = 2, DSF_MATCH = 3,
  DSF_MATCH_MESSAGE = 4, DSF_TEXT = 5, DSF_CONTAINS_NODE = 6, DSF_CONFIRM = 7,
  DSF_OPTION = 8, DSF_DEFAULT = 9, DSF_ALIAS = 10, DSF_XML_NAME = 11,
  DSF_MAX_ELEMENTS = 12, DSF_PRODUCTS = 13, DSF_HIDDEN = 14, DSF_LICENSES = 15,
  DSF_NOTIFY = 16, DSF_RANGE = 17, DSF_MUST = 18, DSF_EAID = 19,
  DSF_EAID_MAP = 20, DSF_EXECUTE_CMD = 21, DSF_SHELL_CMD = 22, DSF_INTERFACE_ACCEPTABLE = 23,
  DSF_ENABLE_PROCESS_MAP = 24, DSF_CMD_FWDING = 25, DSF_XML_PROP_FILE = 26, DSF_PACKAGE_MAP = 27,
  DSF_FEATURE_ID = 28, DSF_PRODUCTS_EXCLUDE = 29, NUM_SPARSE = 30, DSF_INVALID = NUM_SPARSE + 1
}
enum  ddl_default_chassis_target_t { DDCT_NONE = 0, DDCT_LOCAL = 1, DDCT_PRIMARY = 2, DDCT_ALL = 3 }
enum  ddl_default_re_target_t { DDRT_NONE = 0, DDRT_LOCAL = 1, DDRT_ALL = 3 }
enum  ddl_default_lr_target_t { DDLT_NONE = 0, DDLT_MAIN = 1, DDLT_ALL = 2 }
enum  ddl_default_vc_target_t { DDVT_NONE = 0, DDVT_LOCAL = 1, DDVT_VC_MEMBER = 2, DDVT_ALL = 3 }
enum  ddl_schema_init_enum_t {
  SIA_INVALID = 0, SIA_MAJOR_VERSION, SIA_MINOR_VERSION, SIA_NODES,
  SIA_NODE_COUNT, SIA_AFUNCS, SIA_AFUNC_COUNT, SIA_ROOT,
  SIA_PKG_NAME, SIA_SEQNUM, SIA_DAEMON_NAMES, SIA_REQUIRE_NAMES,
  SIA_FEATURE_SETS
}

Functions

ddl_boolean_t dcff_is_multi_chassis_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_multi_re_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_multi_lr_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_scc_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_chassis_selector_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_hobson_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_cluster_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_rsd_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_system_domain_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_psd_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_all_members_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_sfc_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_absolut_excluded (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_chassis_selector_enabled (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_re_selector_enabled (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_lr_selector_enabled (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_vc_selector_enabled (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_daemon_processed (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_async (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_primary_last (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_include_rsd_on_psd (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_hidden (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_forward_to_rsd (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_allow_from_rsd (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_allow_from_psd (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_disallowed_on_global_master (ddl_cmd_fwding_t *dcf)
ddl_boolean_t dcff_is_selector_re_hidden (ddl_cmd_fwding_t *dcf)


Detailed Description

Parse tree node and supporting types and structures.


Define Documentation

#define DNF_COMMUNICABLE
 

Value:

#define EMPTY_NODE_ENTRY name   ) 
 

Value:

INVALID_NODEID, 0, name, 0, 0, DNF_VSYS_OK, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

#define HID_DANGEROUS   HID_BIT(5)
 

dangerous, some of these commands cause the router to drop packets.

It is placed under the undocumented tag in XML, and hidden in CLI

#define HID_DEFAULT   HID_BIT(4)
 

default feature.

It is placed under the undocumented tag in XML, and hidden in CLI

#define HID_DEPRECATED   HID_BIT(3)
 

deprecated feature.

It is placed under the undocumented tag in XML, and hidden in CLI

#define HID_GURU   HID_BIT(8)
 

advanced guru-ish features.

It is placed under the undocumented tag in XML, and hidden in CLI

#define HID_INTERNAL   HID_BIT(6)
 

internal feature.

It is placed under the undocumented tag in XML, and hidden in CLI

#define HID_SUPPORT   HID_BIT(9)
 

for customer support.

It is placed under the undocumented tag in XML, and hidden in CLI

#define HID_UNCONDITIONAL   HID_BIT(0)
 

This is equivalent to flag hidden.

It is placed under the undocumented tag in XML, and hidden in CLI

#define HID_UNRELEASED   HID_BIT(7)
 

unreleased features.

It is placed under the undocumented tag in XML, and hidden in CLI


Typedef Documentation

typedef bitmap_t ddl_products_t
 

ddl_products_t: bit map of products, as represented in <product.h>.

This is indexed by (1<<MODEL_*).


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:23:19 2010 for libddl-access by Doxygen 1.4.5