/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* 61haes_r714 src/43haes/inc/cluster/clinfo.h 1.34 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* Restricted Materials of IBM */ /* */ /* COPYRIGHT International Business Machines Corp. 1990,2011 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ /* sccsid = "@(#)77 1.34 src/43haes/inc/cluster/clinfo.h, hacmp.clinclude, 61haes_r714 11/28/11 15:04:25"; */ /* * COMPONENT_NAME: INCCLUSTER * * FUNCTIONS: none * */ /* * Source Module: clinfo.h * * Purpose: This is the Cluster Client Application Toolkit Library * include file. Client application programs utilizing lib_client.a * should include this file for the appropriate typedefs and #defines. * */ #ifndef CLINFO_H #define CLINFO_H 1 #ifndef _H_IN #include #endif #ifndef MAXNODES #include #endif /* * Room enough for large names */ #define CL_MAXNAMELEN 257 #include /* for NLS */ extern int maxNodes, maxInterfaces, maxClusters; extern int superMaxInterfaces, maxLocalInterfaces; extern int maxGroups, maxNets, maxSites; /* define error message length */ #define CL_ERRMSG_LEN 128 /* * max clusters */ #define CL_MAXCLUSTERS maxClusters /* * max nodes */ #define CL_MAXNODES maxNodes /* * max resource groups */ #define CL_MAXGROUPS maxGroups /* * max networks */ #define CL_MAXNETS maxNets /* * max sites */ #define CL_MAXSITES maxSites /* * max interfaces per node */ #define CL_MAXNETIFS maxInterfaces /* * cl_wait() time values. */ #define CLS_DEFAULT 30 #define CLS_BLOCK 604800 /* one week */ /* Message queue parameters */ #ifdef __HAES__ #define CL_MSGQ_PATH "/usr/es/sbin/cluster/clinfo" #endif #define CL_MSGQ_C_KEY_ID 'C' #define CL_MSGQ_A_KEY_ID 'A' #define CL_MSG_SIZE 1024 #define CL_MAX_EN_REQS 10 #define CL_ENREG_MSG 1 #define CL_ENUNREG_MSG 2 /* * Event ids - these correspond to the events logged in hacmp.out */ #define CL_SWAP_ADAPTER 0 #define CL_SWAP_ADAPTER_COMPLETE 1 #define CL_NETWORK_UP 2 #define CL_NETWORK_DOWN 3 #define CL_NETWORK_UP_COMPLETE 4 #define CL_NETWORK_DOWN_COMPLETE 5 #define CL_NODE_UP 6 #define CL_NODE_DOWN 7 #define CL_NODE_UP_COMPLETE 8 #define CL_NODE_DOWN_COMPLETE 9 #define CL_JOIN_INTERFACE 10 #define CL_FAIL_INTERFACE 11 /* * the next 5 events are generated by clinfo and have no corresponding event * in hacmp.out */ #define CL_NEW_PRIMARY 12 #define CL_UNSTABLE 13 #define CL_STABLE 14 #define CL_CONFIG_STARTING 15 #define CL_CONFIG_COMPLETE 16 #define CL_CONFIG_TOO_LONG 17 #define CL_EVENT_ERROR 19 #define CL_DARE_TOPOLOGY 20 #define CL_DARE_TOPOLOGY_START 21 #define CL_DARE_TOPOLOGY_COMPLETE 22 #define CL_DARE_RESOURCE 23 #define CL_DARE_RESOURCE_RELEASE 24 #define CL_DARE_RESOURCE_ACQUIRE 25 #define CL_DARE_RESOURCE_COMPLETE 26 #define CL_RESOURCE_CHANGE_EVENT 27 #define CL_WAIT 28 #define CL_WAIT_COMPLETE 29 #define CL_MIGRATE 30 #define CL_MIGRATE_COMPLETE 31 #define CL_RG_MOVE 32 #define CL_SERVER_RESTART 33 #define CL_SERVER_DOWN 34 #define CL_ALL -1 /* * Event ids - for backwards compatability only */ #define CL_SWAPPING_ADAPTER CL_SWAP_ADAPTER #define CL_SWAPPED_ADAPTER CL_SWAP_ADAPTER_COMPLETE #define CL_JOINING_NETWORK CL_NETWORK_UP #define CL_FAILING_NETWORK CL_NETWORK_DOWN #define CL_JOINED_NETWORK CL_NETWORK_UP_COMPLETE #define CL_FAILED_NETWORK CL_NETWORK_DOWN_COMPLETE #define CL_JOINING_NODE CL_NODE_UP #define CL_FAILING_NODE CL_NODE_DOWN #define CL_JOINED_NODE CL_NODE_UP_COMPLETE #define CL_FAILED_NODE CL_NODE_DOWN_COMPLETE #define CL_JOINING_STANDBY CL_JOIN_INTERFACE #define CL_FAILING_STANDBY CL_FAIL_INTERFACE /* * Enum containing state information. */ enum cls_state { CLS_INVALID=0, CLS_VALID, CLS_UP, CLS_DOWN, CLS_UNKNOWN, CLS_GRACE, CLS_JOINING, CLS_LEAVING, CLS_IN_USE, CLS_PRIMARY }; /* * Enum containing substate information */ enum cls_substate { CLSS_UNKNOWN, CLSS_UNSTABLE, CLSS_STABLE, CLSS_ERROR, CLSS_RECONFIG, CLSS_NOT_CONFIGURED }; /* * Enumeration of Resource Group Node States. These must match hacmp.my */ enum cl_resource_states { CL_RGNS_INVALID=1, CL_RGNS_ONLINE=2, CL_RGNS_OFFLINE=4, CL_RGNS_ACQUIRING=16, CL_RGNS_RELEASING=32, CL_RGNS_ERROR=64, /* note that the mib does not yet support these, but they are here */ CL_RGNS_TEMP_ERROR_STATE=128, CL_RGNS_ONLINE_SECONDARY_STATE=256, CL_RGNS_ONLINE_PEER_STATE = 512, CL_RGNS_ACQUIRING_SECONDARY_STATE = 1024, CL_RGNS_ACQUIRING_PEER_STATE = 2048, CL_RGNS_RELEASING_SECONDARY_STATE = 4096, CL_RGNS_RELEASING_PEER_STATE = 8192, CL_RGNS_TEMP_ERROR_SECONDARY_STATE = 16384, CL_RGNS_ERROR_SECONDARY_STATE = 32768 }; /* * Enumeration of Interface Roles. */ enum cl_interface_role { CL_INT_ROLE_INVALID = 0, CL_INT_ROLE_SERVICE = 16, CL_INT_ROLE_STANDBY = 32, /* depracated */ CL_INT_ROLE_BOOT = 64, CL_INT_ROLE_SH_SERVICE = 128, /* depracated */ CL_INT_ROLE_PERSISTENT }; /* * Enumeration of Network types */ enum cl_network_type { CL_NET_TYPE_INVALID = 0, /* these are IP based network types */ CL_NET_TYPE_ETHERNET = 1, CL_NET_TYPE_HPS = 2, CL_NET_TYPE_ATM = 4, CL_NET_TYPE_TOKEN = 8, CL_NET_TYPE_FDDI = 16, /* these are non-IP based (serial) network types */ CL_NET_TYPE_RS232 = 32, CL_NET_TYPE_TMSCSI = 64, CL_NET_TYPE_TMSSA = 128, CL_NET_TYPE_DISKHB = 256, /* Any user supplied network types are listed as */ CL_NET_TYPE_CUSTOM = 4096 }; /* * Enumeration of Network attributes. Note that the public/private attribute * is for use by Oracle only - PowerHA SystemMirror does not use this attribute. */ enum cl_network_attribute { CL_NET_ATTR_INVALID = 0, /* IP networks can be public or private */ CL_NET_TYPE_PUBLIC = 1, CL_NET_TYPE_PRIVATE = 2, /* non-IP (serial) networks are always */ CL_NET_TYPE_SERIAL = 4 }; /* * Enumeration of Resource Group Policies */ enum cl_rg_policies { CL_RGP_INVALID = 0, CL_RGP_ONLINE_ON_HOME_NODE = 1, CL_RGP_ONLINE_ONFIRST_AVAILBLE_NODE = 2, CL_RGP_ONLINE_USING_DISTRIBUTION_POLICY = 3, CL_RGP_ONLINE_ALL_NODES = 4, CL_RGP_FALLOVER_TO_PRIORITY_NODE = 5, CL_RGP_FALLOVER_USING_DNP = 6, CL_RGP_BRING_OFFLINE = 7, CL_RGP_NEVER_FALLBACK = 8, CL_RGP_FALLBACK_TO_HIGHER_PRIORITY_NODE = 9, CL_RGP_PREFER_PRIMARY_SITE = 10, CL_RGP_ONLINE_ON_EITHER_SITE = 11, CL_RGP_ONLINE_ON_BOTH_SITES = 12, CL_RGP_IGNORE_SITES = 13 }; /* * Enumeration of Site Priorities */ enum cl_site_priority { CL_SITE_PRI_NONE = 0, CL_SITE_PRI_PRIMARY = 1, CL_SITE_PRI_SECONDARY = 2, CL_SITE_PRI_TERTIARY = 4 }; /* * Enumeration of Site Backup Communication Options */ enum cl_site_backup { CL_SITE_BACKUP_NONE = 0, CL_SITE_BACKUP_DBFS = 1, CL_SITE_BACKUP_SGN = 2 }; /* * Enumeration of Resource Types */ enum cl_resource_types { CL_REST_serviceLabel=1000, CL_REST_htyServiceLabel=1001, CL_REST_fileSystem=1002, CL_REST_volumeGroup=1003, CL_REST_disk=1004, CL_REST_aixConnectionServices=1005, CL_REST_application=1006, CL_REST_concurrentVolumeGroup=1007, CL_REST_haCommunicationLinks=1008, CL_REST_haFastConnectServices=1009, /* note that the mib does not yet support these, but they are here */ CL_REST_tape=1010, CL_REST_gmd=1011, CL_REST_pprc=1012 }; /* * Enumeration of Network family */ enum cl_net_family { CL_INET_INVALID = 0, /* Uninitialized/Unknown/Invalid network family */ CL_INET4 = 1, /* All boot comm. intf. belong to AF_INET family */ CL_INET6 = 2, /* All boot comm. intf. belong to AF_INET6 family */ CL_INET_HYBRID = 3, /* comm. intf. belong to AF_INET and AF_INET6 family, so far this attribute is not used. */ }; /* * Structure containing information relating to a network. */ struct cl_net { int clnet_clusterid; /* Cluster Id */ char clnet_name[CL_MAXNAMELEN];/* Cluster network name */ int clnet_id; /* Cluster Network Id */ char clnet_type[CL_MAXNAMELEN]; /* ether, token, etc */ enum cl_network_attribute clnet_attr; /* public/serial */ enum cls_state clnet_state; /* Cluster Network State */ /* Note that this is the cluster wide or "global" network state */ /* which may be different than the state of the network on any */ /* particular node */ int clnet_numnodes; /* Number of nodes connected to this Network */ int clnet_node_ids[MAXNODES]; /* Node ids connected to this Network */ enum cls_state clnet_node_states[MAXNODES]; /* Network State per Node */ int clnet_vrmf; /* version of this client */ enum cl_net_family clnet_family; /* v4/v6/mixed network */ }; /* * Structure containing information relating to a network interface. */ struct cl_netif { int cli_clusterid; /* Cluster Id */ int cli_nodeid; /* Cluster node Id - used internally only */ char cli_nodename[CL_MAXNAMELEN];/* Cluster node name */ int cli_interfaceid; /* Cluster Node Interface Id */ enum cls_state cli_state; /* Cluster Node Interface State */ char cli_name[CL_MAXNAMELEN]; /* Cluster Node Interface Name */ struct sockaddr_in cli_addr; /* Cluster Node Interface IP Address */ int cli_active_nodeid; /* Cluster node Id where addr is up */ enum cl_interface_role cli_role; /* Role of interface (boot/service)*/ int cli_networkid; /* Cluster Network ID for this Interface */ int cli_vrmf; /* version of this client */ struct sockaddr_storage cli_addr6; /* Cluster node intf IP (v4/v6) address */ }; /* * Structure containing information relating to a node. */ struct cl_node { int cln_clusterid; /* Cluster Id */ int cln_nodeid; /* Cluster node Id */ char cln_nodename[CL_MAXNAMELEN]; /* Cluster node name */ enum cls_state cln_state; /* Cluster Node State */ int cln_nif; /* Cluster Node Number of Interfaces */ struct cl_netif *cln_if; /* Cluster Node interfaces */ int cln_glidle; /* CPU.glidle */ int cln_real_mem_free; /* Paging space utilitization */ int cln_disk_busy; /* disk busy */ int cln_vrmf; /* version of this client */ }; /* * Structure containing information relating to a site */ struct cl_site { int clsite_clusterid; /* Cluster Id */ int clsite_id; char clsite_name[CL_MAXNAMELEN]; enum cl_site_priority clsite_priority; enum cl_site_backup clsite_backup; enum cls_state clsite_state; /* Cluster Site State */ int clsite_numnodes; int clsite_nodeids[MAXNODES]; /* list of nodes (ids) in this group */ int clsite_vrmf; /* version of this client */ }; /* * Structure containing information relating to a cluster. */ struct cl_cluster { int clc_clusterid; /* Cluster Id */ enum cls_state clc_state; /* Cluster State */ enum cls_substate clc_substate; /* Cluster Substate */ char clc_primary[CL_MAXNAMELEN]; /* Cluster Primary Node */ char clc_name[CL_MAXNAMELEN]; /* Cluster Name */ int clc_number_of_nodes; /* number of cluster nodes */ int clc_number_of_groups; /* number of resource groups */ int clc_number_of_networks; /* number of networks */ int clc_number_of_sites; /* number of sites */ int clc_vrmf; /* version of this client */ }; /* * Structure containing information relating to a resource group */ struct cl_group { int clg_clusterid; int clg_group_id; char clg_name[CL_MAXNAMELEN]; enum cl_rg_policies clg_policy; /* depracated */ enum cl_rg_policies clg_startup_policy; enum cl_rg_policies clg_fallover_policy; enum cl_rg_policies clg_fallback_policy; enum cl_rg_policies clg_site_policy; char clg_user_policy_name[CL_MAXNAMELEN]; int clg_num_nodes; int clg_node_ids[MAXNODES]; /* list of nodes (ids) in this group */ enum cl_resource_states clg_node_states[MAXNODES]; /* state on each */ int clg_num_resources; int clg_resource_id[MAXRESOURCES]; /* list of resources (id) group */ enum cl_resource_states clg_res_state[MAXRESOURCES]; /* state */ int clg_vrmf; /* version of this client */ }; /* * Structure containing event notification registration request */ typedef struct cli_enr_req_t { int event_id; int cluster_id; int node_id; char node_name[CL_MAXNAMELEN]; int net_id; int signal_id; int vrmf; }; /* * Structure containing event notification message */ typedef struct cli_en_msg_t { int event_id; int cluster_id; int node_id; char node_name[CL_MAXNAMELEN]; int net_id; int vrmf; }; /* * Structure containing message queue message */ typedef struct cli_msgbuf_t { long mtype; char mtext[CL_MSG_SIZE]; int vrmf; }; /* * error codes * If these change, the error message code in the API must be updated also */ #define CLE_OK 0 #define CLE_BADARGS -1 /* Missing or invalid parameter(s) */ #define CLE_SYSERR -2 /* System error */ #define CLE_NOCLINFO -3 /* No cluster information available */ #define CLE_IVCLUSTERID -4 /* Invalid cluster ID */ #define CLE_IVCLUSTERNAME -5 /* Invalid cluster name */ #define CLE_IVCLUSTER -6 /* Cluster not available */ #define CLE_IVNODENAME -7 /* Invalid node name */ #define CLE_IVNODE -8 /* Node not available */ #define CLE_IVNETIFID -9 /* Invalid network interface ID */ #define CLE_IVNETIFNAME -10 /* Invalid network interface name */ #define CLE_IVNETIF -11 /* Network interface not available */ #define CLE_IVADDRESS -12 /* Invalid network interface address */ #define CLE_NOROUTE -13 /* No route to destination */ #define CLE_NOTINITIALIZED -14 /* Initialized not called */ #define CLE_NOPRIMARY -15 /* No primary defined */ #define CLE_IVSHMEM -16 /* Invalid shared memory operation */ #define CLE_IVSEM -17 /* Invalid semaphore operation */ #define CLE_IVMODEL -18 /* Invalid shared memory segment */ #define CLE_STABLE -19 /* Cluster is stable */ #define CLE_UNSTABLE -20 /* Cluster is not stable */ #define CLE_IVREQNUM -21 /* Invalid number of event notify reqs */ #define CLE_IVSIGNALID -22 /* Invalid signal id */ #define CLE_IVNETID -23 /* Invalid net id */ #define CLE_IVEVENTID -24 /* Invalid event id */ #define CLE_NOSERVICE -25 /* Service unavailable on this node */ #define CLE_SHMCANTGROW -26 /* Attempt to resize shm failed */ #define CLE_SHMRESIZE -27 /* shared memory has been resized */ #define CLE_IVGROUPID -28 /* Invalid resource group ID */ #define CLE_IVGROUPNAME -29 /* Invalid resource group name */ #define CLE_IVGROUP -30 /* resource group not available */ #define CLE_IVSITEID -31 /* site not available */ #define CLE_IVSITENAME -32 /* site not available */ #define CLE_IVNETNAME -33 /* Invalid network name */ /* * This defines the version of the struct defined in this version of * clinfo.h: when a client is compiled with this version, the vrmf will * be passed to the library on every call to the api. */ #define CLINFO_H_VERSION (5) #define CLINFO_H_RELEASE (5) #define CLINFO_H_MAINTENANCE (0) #define CLINFO_H_FIXLEVEL (0) #define CLINFO_H_VRMF ((CLINFO_H_VERSION << 24 | \ CLINFO_H_RELEASE << 16 | \ CLINFO_H_MAINTENANCE << 8 | \ CLINFO_H_FIXLEVEL)) #define CLINFO_H_5300_VRMF ( 5 << 24 | \ 3 << 16 | \ 0 << 8 | \ 0) /* * This set of defines allows for version compatability between updates * without requiring the client program to be recompiled. */ #define cl_alloc_clustermap(a) (_cl_alloc_clustermap5300(CLINFO_H_VRMF, a)) #define cl_free_clustermap(a) (_cl_free_clustermap5300(CLINFO_H_VRMF, a)) #define cl_getcluster(a,b) (_cl_getcluster5300(CLINFO_H_VRMF, a, b)) #define cl_getclusters(a) (_cl_getclusters5300(CLINFO_H_VRMF, a)) #define cl_getlocalcluster(a) (_cl_getlocalcluster5300(CLINFO_H_VRMF, a)) #define cl_getclusteridbyifaddr(a) (_cl_getclusteridbyifaddr5300(CLINFO_H_VRMF, a)) #define cl_getclusteridbyifname(a) (_cl_getclusteridbyifname5300(CLINFO_H_VRMF, a)) #define cl_getclusterid(a) (_cl_getclusterid5300(CLINFO_H_VRMF, a)) #define cl_alloc_groupmap(a) (_cl_alloc_groupmap5300(CLINFO_H_VRMF, a)) #define cl_free_groupmap(a) (_cl_free_groupmap5300(CLINFO_H_VRMF, a)) #define cl_alloc_nodemap(a) (_cl_alloc_nodemap5300(CLINFO_H_VRMF, a)) #define cl_free_nodemap(a) (_cl_free_nodemap5300(CLINFO_H_VRMF, a)) #define cl_getnodemap(a,b) (_cl_getnodemap5300(CLINFO_H_VRMF, a, b)) #define cl_isclusteravail(a) (_cl_isclusteravail5300 (CLINFO_H_VRMF, a)) #define cl_getnode(a,b,c) (_cl_getnode5300(CLINFO_H_VRMF, a, b, c)) #define cl_getifname(a,b,c) (_cl_getifname5300(CLINFO_H_VRMF, a, b, c)) #define cl_getifaddr(a,b,c) (_cl_getifaddr5300(CLINFO_H_VRMF, a, b, c)) #define cl_getnodeaddr(a,b,c) (_cl_getifaddr5300(CLINFO_H_VRMF, a, b, c)) #define cl_bestroute(a,b,c,d) (_cl_bestroute5300(CLINFO_H_VRMF, a, b, c, d)) #define cl_getlocalid(a,b) (_cl_getlocalid5300(CLINFO_H_VRMF, a, b)) #define cl_getprimary(a,b) (_cl_getprimary5300(CLINFO_H_VRMF, a, b)) #define cl_node_free(a) (_cl_node_free5300(CLINFO_H_VRMF, a)) #define cl_isnodeavail(a,b) (_cl_isnodeavail5300(CLINFO_H_VRMF, a, b)) #define cl_isaddravail(a,b,c) (_cl_isaddravail5300(CLINFO_H_VRMF, a, b, c)) #define cl_getgroup(a,b,c) (_cl_getgroup5300(CLINFO_H_VRMF, a, b, c)) #define cl_getgroupmap(a,b) (_cl_getgroupmap5300(CLINFO_H_VRMF, a, b)) #define cl_getgroupsbynode(a,b,c,d) (_cl_getgroupsbynode5300(CLINFO_H_VRMF, a, b, c, d)) #define cl_getgroupnodestate(a,b,c) (_cl_getgroupnodestate5300(CLINFO_H_VRMF, a, b, c)) #define cl_alloc_netmap(a) (_cl_alloc_netmap5300(CLINFO_H_VRMF, a)) #define cl_free_netmap(a) (_cl_free_netmap5300(CLINFO_H_VRMF, a)) #define cl_getnetmap(a,b) (_cl_getnetmap5300(CLINFO_H_VRMF, a, b)) #define cl_getnet(a,b,c) (_cl_getnet5300(CLINFO_H_VRMF, a, b, c)) #define cl_getnetbyname(a,b,c) (_cl_getnetbyname5300(CLINFO_H_VRMF, a, b, c)) #define cl_getnetsbyattr(a,b,c,d) (_cl_getnetsbyattr5300(CLINFO_H_VRMF, a, b, c, d)) #define cl_getnetsbytype(a,b,c,d) (_cl_getnetsbytype5300(CLINFO_H_VRMF, a, b, c, d)) #define cl_getnetstatebynode(a,b,c,d) (_cl_getnetstatebynode5300(CLINFO_H_VRMF, a, b, c, d)) #define cl_alloc_sitemap(a) (_cl_alloc_sitemap5300(CLINFO_H_VRMF, a)) #define cl_free_sitemap(a) (_cl_free_sitemap5300(CLINFO_H_VRMF, a)) #define cl_getsitemap(a,b) (_cl_getsitemap5300(CLINFO_H_VRMF, a, b)) #define cl_getsite(a,b,c) (_cl_getsite5300(CLINFO_H_VRMF, a, b, c)) #define cl_getsitebyname(a,b,c) (_cl_getsitebyname5300(CLINFO_H_VRMF, a, b, c)) #define cl_getsitebypriority(a,b,c) (_cl_getsitebypriority5300(CLINFO_H_VRMF, a, b, c)) #define cl_registereventnotify(a,b) (_cl_registereventnotify5300(CLINFO_H_VRMF, a, b)) #define cl_unregistereventnotify(a,b) (_cl_unregistereventnotify5300(CLINFO_H_VRMF, a, b)) #define cl_getevent(a) (_cl_getevent5300(CLINFO_H_VRMF, a)) #define cl_getifnamebynodename(a,b,c,d) (_cl_getifnamebynodename5300(CLINFO_H_VRMF, a, b, c, d)) #define cl_getnodenamebyifname(a,b,c) (_cl_getnodenamebyifname5300(CLINFO_H_VRMF, a, b, c)) #define cl_getnodenamebyifaddr(a,b,c) (_cl_getnodenamebyifaddr5300(CLINFO_H_VRMF, a, b, c)) /* v6 capable CLINFO APIs introduced in PowerHA SystemMirror 5.5 */ #define cl_getclusteridbyifaddr6(a, b) (_cl_getclusteridbyifaddr6(CLINFO_H_VRMF, a, b)) #define cl_getnodeaddr6(a, b, c, d) (_cl_getifaddr6(CLINFO_H_VRMF, a, b, c, d)) #define cl_getnodenamebyifaddr6(a, b, c, d) (_cl_getnodenamebyifaddr6(CLINFO_H_VRMF, a, b, c, d)) #define cl_isaddravail6(a, b, c, d) (_cl_isaddravail6(CLINFO_H_VRMF, a, b, c, d)) #define cl_bestroute6(a, b, c, d, e, f) (_cl_bestroute6(CLINFO_H_VRMF, a, b, c, d, e, f)) #define cl_getifname6(a, b, c, d) (_cl_getifname6(CLINFO_H_VRMF, a, b, c, d)) #define cl_getifaddr6(a, b, c, d) (_cl_getifaddr6(CLINFO_H_VRMF, a, b, c, d)) /* * Function declarations */ #ifdef _NO_PROTO int _cl_getcluster5300 (); int _cl_getclusteridbyifaddr5300 (); int _cl_getnodemap5300 (); int _cl_alloc_nodemap5300 (); void _cl_free_nodemap5300 (); int _cl_alloc_groupmap5300 (); void _cl_free_groupmap5300 (); int _cl_getgroupmap5300 (); int _cl_isclusteravail5300 (); int _cl_getclusterid5300 (); int _cl_getclusteridbyifname5300 (); int _cl_getclusters5300 (); int _cl_getifaddr5300 (); int _cl_getifname5300 (); int _cl_getlocalcluster5300 (); int _cl_getnode5300 (); int _cl_alloc_clustermap5300 (); void _cl_free_clustermap5300 (); int _cl_bestroute5300 (); int _cl_getlocalid5300 (); int _cl_isaddravail5300 (); int _cl_node_free5300 (); int _cl_getprimary5300 (); int _cl_isnodeavail5300 (); int _cl_getgroup5300(); int _cl_getgroup5300(); int _cl_getgroupsbynode5300(); enum cl_resource_states _cl_getgroupnodestate5300(); int _cl_alloc_netmap5300 (); void _cl_free_netmap5300 (); int _cl_getnetmap5300(); int _cl_getnet5300(); int _cl_getnetbyname5300(); int _cl_getnetsbytype5300(); int _cl_getnetsbyattr5300(); int _cl_getnetstatebynode5300(); int _cl_alloc_sitemap5300 (); void _cl_free_sitemap5300 (); int _cl_getsitemap5300 (); int _cl_getsite5300(); int _cl_getsitebyname5300(); int _cl_getsitebypriority5300(); int _cl_registereventnotify5300(); int _cl_unregistereventnotify5300(); int _cl_getevent5300(); int _cl_getnodenamebyifaddr5300 (); int _cl_getnodenamebyifname5300 (); int _cl_getifnamebynodename5300 (); /* v6 capable CLINFO APIs introduced in PowerHA SystemMirror 5.5 */ int _cl_getclusteridbyifaddr6 (); int _cl_getifaddr6 (); int _cl_getifname6 (); int _cl_getnodenamebyifaddr6 (); int _cl_isaddravail6 (); int _cl_bestroute6 (); /* These are the pre 5.3 release apis */ int cl_deadman (); char *cl_errmsg (); int cl_initialize (); void cl_perror (); enum cls_state cl_mapstate (); enum cls_substate cl_mapsubstate (); int cl_mapstatus (); int cl_matchaddr (); int cl_matchname (); #else /* _NO_PROTO */ #ifdef __cplusplus #define CPPEXT extern "C" #else #define CPPEXT #endif /* __cplusplus */ /* CPPEXT int cl_deadman (int, int); */ CPPEXT int _cl_getcluster5300 (int, int, struct cl_cluster *); CPPEXT int _cl_getclusterid5300 (int, char *); CPPEXT int _cl_getclusteridbyifaddr5300 (int, struct sockaddr_in *); CPPEXT int _cl_bestroute5300 (int, int, char *, struct sockaddr_in *, struct sockaddr_in *); CPPEXT int _cl_getclusteridbyifname5300 (int, char *); CPPEXT int _cl_getclusters5300 (int, struct cl_cluster *); CPPEXT int _cl_getlocalcluster5300 (int, struct cl_cluster *); CPPEXT int _cl_getifaddr5300 (int, int, char *, struct sockaddr_in *); CPPEXT int _cl_getifname5300 (int, int, struct sockaddr_in *, char *); CPPEXT int _cl_getlocalid5300 (int, int *, char *); CPPEXT int _cl_getnode5300 (int, int, char *, struct cl_node *); CPPEXT int _cl_node_free5300 (int, struct cl_node *); CPPEXT int _cl_getnodemap5300 (int, int, struct cl_node *); CPPEXT int _cl_getprimary5300 (int, int, char *); CPPEXT int _cl_isaddravail5300 (int, int, char *, struct sockaddr_in *); CPPEXT int _cl_isclusteravail5300 (int, int); CPPEXT int _cl_isnodeavail5300 (int, int, char *); CPPEXT int _cl_alloc_clustermap5300 (int, struct cl_cluster **); CPPEXT void _cl_free_clustermap5300 (int, struct cl_cluster *); CPPEXT int _cl_alloc_nodemap5300 (int, struct cl_node **); CPPEXT void _cl_free_nodemap5300 (int, struct cl_node *); CPPEXT int _cl_alloc_groupmap5300 (int, struct cl_group **); CPPEXT void _cl_free_groupmap5300 (int, struct cl_group *); CPPEXT int _cl_getgroupmap5300 (int, int, struct cl_group *); CPPEXT int _cl_getgroup5300 (int, int, char *, struct cl_group *); CPPEXT int _cl_getgroupsbynode5300 (int, int, int, struct cl_group **, int *); CPPEXT enum cl_resource_states _cl_getgroupnodestate5300 (int, int, char *, int); CPPEXT int _cl_alloc_netmap5300 (int, struct cl_net **); CPPEXT void _cl_free_netmap5300 (int, struct cl_net *); CPPEXT int _cl_getnetmap5300 (int, int, struct cl_net *); CPPEXT int _cl_getnet5300(int, int, int, struct cl_net *); CPPEXT int _cl_getnetbyname5300 (int, int, char *, struct cl_net *); CPPEXT int _cl_getnetsbytype5300 (int, int, char *, struct cl_net **, int *); CPPEXT int _cl_getnetsbyattr5300 (int, int, enum cl_network_attribute, struct cl_net **, int *); CPPEXT int _cl_getnetstatebynode5300 (int, int, int, int, enum cls_state *); CPPEXT int _cl_alloc_sitemap5300 (int, struct cl_site **); CPPEXT void _cl_free_sitemap5300 (int, struct cl_site *); CPPEXT int _cl_getsitemap5300 (int, int, struct cl_site *); CPPEXT int _cl_getsite5300(int, int, int, struct cl_site *); CPPEXT int _cl_getsitebyname5300(int, int, char *, struct cl_site *); CPPEXT int _cl_getsitebypriority5300(int, int, enum cl_site_priority, struct cl_site *); CPPEXT int _cl_registereventnotify5300(int, int, struct cli_enr_req_t *); CPPEXT int _cl_unregistereventnotify5300(int, int, struct cli_enr_req_t *); CPPEXT int _cl_getevent5300(int, struct cli_en_msg_t *); CPPEXT int _cl_getnodenamebyifaddr5300 (int, int, struct sockaddr_in *, char *); CPPEXT int _cl_getnodenamebyifname5300 (int, int, char *, char *); CPPEXT int _cl_getifnamebynodename5300 (int, int, char *, struct sockaddr_in *, char *); /* v6 capable CLINFO APIs introduced in PowerHA SystemMirror 5.5 */ CPPEXT int _cl_getclusteridbyifaddr6 (int, struct sockaddr*, size_t); CPPEXT int _cl_getifaddr6 (int, int, char*, struct sockaddr*, size_t); CPPEXT int _cl_getnodenamebyifaddr6 (int, int, struct sockaddr*, size_t, char*); CPPEXT int _cl_getifname6(int, int, struct sockaddr*, size_t, char*); CPPEXT int _cl_isaddravail6 (int, int, char*, struct sockaddr*, size_t); CPPEXT int _cl_bestroute6 (int, int, char*, struct sockaddr*, size_t, struct sockaddr*, size_t); /* pre 53 apis */ CPPEXT int cl_initialize (); CPPEXT char *cl_errmsg (int); CPPEXT void cl_perror (int, char *); CPPEXT enum cls_state cl_mapstate (/* enum State_Values */); CPPEXT enum cls_substate cl_mapsubstate (/* enum SubState_Values */); CPPEXT int cl_mapstatus (/* enum model_errors */); CPPEXT int cl_matchaddr (/* struct sockaddr_in *, struct Interface_Cell * */); CPPEXT int cl_matchname (/* char *, struct Interface_Cell * */); #endif /* _NO_PROTO */ #endif /* !CLINFO_H */