defs.h File Reference

Definitions used by both users of the ddl access api and the ddl/ui code. More...

#include <jnx/bits.h>

Data Structures

struct  ddl_ipprefix_s
 ddl_ipprefix_t: ip prefix type Native type for holding an ipv4 prefix More...

Defines

#define UNUSED
#define TYPEDEF(s, t)   struct s; typedef struct s t;
 Forward declarations of shared data types.
#define ACT_BIT(bitnum)   BITT(ddl_action_t, bitnum)
#define DDL_ACTION_ARGS   ddl_action_args_t *daap UNUSED
 Action functions being executed during database traversal have the following prototype.
#define DDL_ACTION_FUNCTION(_name)
#define MGD_EXIT_ERR   1
 Exit codes for mgd sync'ing - used by ksyncd General error exit.
#define MGD_EXIT_UNREACHABLE   100
 Soft errors are between.
#define MGD_EXIT_PEER_CREATE   101
 100 >= soft < 110
#define MGD_EXIT_CANT_CONNECT_REMOTE   102
#define MGD_EXIT_CANT_LOCK_REMOTE   103
#define MGD_EXIT_CANT_LOCK_LOCAL   104
#define MGD_EXIT_CANT_OBTAIN_CONFIG   110
 Hard errors are between.
#define MGD_EXIT_LOCAL_COMMIT   111
 110 >= hard < 120
#define MGD_EXIT_LOAD_FAILED   112
#define MGD_EXIT_COMMIT_FAILED   113
#define MGD_EXIT_SOFT_START   100
#define MGD_EXIT_SOFT_END   109
#define MGD_EXIT_HARD_START   110
#define MGD_EXIT_HARD_END   119
#define MGD_EXIT_PENDING_COMMIT   120
#define MGD_EXIT_SOFT_ERROR(x)   ((x) >= MGD_EXIT_SOFT_START && (x) <= MGD_EXIT_SOFT_END)
#define MGD_EXIT_HARD_ERROR(x)   ((x) >= MGD_EXIT_HARD_START && (x) <= MGD_EXIT_HARD_END)

Typedefs

typedef unsigned char ddl_toggle_t
 ddl_toggle_t: simple boolean toggle
typedef ddl_ipprefix_s ddl_ipprefix_t
 ddl_ipprefix_t: ip prefix type Native type for holding an ipv4 prefix
typedef flag_t ddl_action_t
 ddl_action_t: bitfield for actions
typedef int(* ddl_action_func_t )(DDL_ACTION_ARGS)

Enumerations

enum  ddl_action_enum {
  ACT_NONE = (0), ACT_EXECUTE = ACT_BIT(0), ACT_EXPAND = ACT_BIT(1), ACT_HELP = ACT_BIT(2),
  ACT_DELETE = ACT_BIT(3), ACT_PROPAGATE = ACT_BIT(4), ACT_ASSIGN = ACT_BIT(5), ACT_VALIDATE = ACT_BIT(6),
  ACT_PARSE = ACT_BIT(7), ACT_CHECKOUT = ACT_BIT(8), ACT_COMMIT = ACT_BIT(9), ACT_ACTIVATE = ACT_BIT(10),
  ACT_ACCEPTABLE = ACT_BIT(11), ACT_WARNING = ACT_BIT(12), ACT_RANGE = ACT_BIT(13), ACT_PRE_PARSE = ACT_BIT(14),
  ACT_DEACTIVATE = ACT_BIT(15), ACT_PRE_DEACTIVATE = ACT_BIT(16), ACT_PRE_DELETE = ACT_BIT(17), ACT_PRE_ASSIGN = ACT_BIT(18),
  ACT_PRE_ACTIVATE = ACT_BIT(19), ACT_MANDATORY = ACT_BIT(20), ACT_PROPAGATE_LCC = ACT_BIT(21), ACT_PRE_EXECUTE = ACT_BIT(22),
  NUM_ACTIONS = 23
}
enum  ddl_action_rc { DDL_ACT_RC_NONE = 0, DDL_ACT_RC_ERROR = -1, DDL_ACT_RC_NO_RECURSE = -2, DDL_ACT_RC_POST_ACTION = -3 }
 Action function return codes. More...
enum  ddl_action_opcode { DDL_ACT_OPCODE_NONE = 0, DDL_ACT_OPCODE_PRE_TRAVERSAL = 1, DDL_ACT_OPCODE_POST_TRAVERSAL = 2 }
 Action function opcodes. More...

Functions

 TYPEDEF (ddl_object_s, ddl_handle_t)
 ddl_handle_t: Opaque representation of an object as exposed to api users.
 TYPEDEF (ddax_context_s, ddax_context_t)
 ddax_context_t: Opaque representation of an dynamic context.
 TYPEDEF (ddl_action_args_s, ddl_action_args_t)
 ddl_action_args_t: Arguments passed to action functions.


Detailed Description

Definitions used by both users of the ddl access api and the ddl/ui code.


Define Documentation

#define DDL_ACTION_FUNCTION _name   ) 
 

Value:

int _name (DDL_ACTION_ARGS); \
int _name (DDL_ACTION_ARGS)


Enumeration Type Documentation

enum ddl_action_enum
 

Enumerator:
ACT_NONE  No action.
ACT_EXECUTE  Execute a command.
ACT_EXPAND  Expand list of choices/wildcard.
ACT_HELP  Provide help text.
ACT_DELETE  Delete an attribute/object.
ACT_PROPAGATE  Propagate to system config files.
ACT_ASSIGN  Assign a value to an attribute.
ACT_VALIDATE  Validate value at assignment time.
ACT_PARSE  As the token value is parsed.
ACT_CHECKOUT  During commit checkout.
ACT_COMMIT  During commit.
ACT_ACTIVATE  Activate an attribute/object.
ACT_ACCEPTABLE  Boolean: is acceptable input?
ACT_WARNING  Generate warning string.
ACT_RANGE  Dynamic range checking.
ACT_PRE_PARSE  Pre Parsing, before obj is made.
ACT_DEACTIVATE  Deactivate an attribute/object.
ACT_PRE_DEACTIVATE  Pre Deactivate an attribute/object.
ACT_PRE_DELETE  Pre Delete an attribute/object.
ACT_PRE_ASSIGN  Pre Assign a value to an attribute.
ACT_PRE_ACTIVATE  Pre Activate an attribute/object.
ACT_MANDATORY  Boolean: is a mandatory attr/obj?
ACT_PROPAGATE_LCC  Propagate config to lcc?
ACT_PRE_EXECUTE  Check prior to executing a cmd.
NUM_ACTIONS  Number of action enums.

enum ddl_action_opcode
 

Action function opcodes.

Enumerator:
DDL_ACT_OPCODE_NONE  Nothing, noop, nada.
DDL_ACT_OPCODE_PRE_TRAVERSAL  Action called before children traversed.
DDL_ACT_OPCODE_POST_TRAVERSAL  Action called after children traversed.

enum ddl_action_rc
 

Action function return codes.

Enumerator:
DDL_ACT_RC_NONE  No error.
DDL_ACT_RC_ERROR  Bad news, stop database traversal.
DDL_ACT_RC_NO_RECURSE  No error, do not recurse below this object.
DDL_ACT_RC_POST_ACTION  No error, call back after processing children.


Function Documentation

TYPEDEF ddl_action_args_s  ,
ddl_action_args_t 
 

ddl_action_args_t: Arguments passed to action functions.

Opaque to api users.

TYPEDEF ddax_context_s  ,
ddax_context_t 
 

ddax_context_t: Opaque representation of an dynamic context.

Used to store the callbacks/data associated with dynamic variable resolution.


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