From: Robert W. <wrw...@us...> - 2006-11-03 20:22:35
|
Update of /cvsroot/linuxisns/isnsNT/isnsserver/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9512/include Modified Files: iSNSdb.h ndb.h Added Files: iSNSesi.h iSNSquery.h iSNSreg.h iSNSresponse.h iSNSscn.h Log Message: separate out include files --- NEW FILE: iSNSesi.h --- /*********************************************************************** Copyright (c) 2001, Nishan Systems, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Nishan Systems, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NISHAN SYSTEMS, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ /* * This file contains definitions related to iSNSreg * */ #ifndef _SNSesi_h_ #define _SNSesi_h_ int ISNS_SendESI(void); int ISNS_ProcessESI(ISNS_Msg_Descp* p_md); int ISNSdbExec(ISNS_Msg_Descp* p_md,ISNS_Msg_Descp* p_rsp_md); int ISNS_ProcessESI ( ISNS_Msg_Descp *p_md ); #endif --- NEW FILE: iSNSresponse.h --- /*********************************************************************** Copyright (c) 2001, Nishan Systems, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Nishan Systems, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NISHAN SYSTEMS, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ /* * This file contains definitions related to iSNSreg * */ #ifndef _SNSresponse_h_ #define _SNSresponse_h_ int ISNSFindTag (int start_indx, int key, char **attr_indx); ISNS_Attr * ISNSFindKeyInResponseMsg (int key, ISNS_Msg * msg); int ISNSAppendAttr (ISNS_Msg * msg, int tag, int size, char *p_value, int value); int ISNSAppendKey (ISNS_Msg * msg, int tag, int size, char *p_value, int value); #endif --- NEW FILE: iSNSquery.h --- /*********************************************************************** Copyright (c) 2001, Nishan Systems, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Nishan Systems, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NISHAN SYSTEMS, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ /* * This file contains definitions related to iSNSreg * */ #ifndef _SNSquery_h_ #define _SNSquery_h_ extern int SNSdbGetAttr (char **attr_indx, char **key_indx, char *src_attr, ISNS_Msg_Descp * md); extern ISNS_Msg_Descp * SNSdbGetPorts(char **attr_indx, ISNS_Msg_Descp *); extern int SNSdbGetPortName(IP_Address *ip, SOIP_Port_Id *id, SOIP_Port_Name *pn); ISNS_ATTR_VALS_CB * ISNSAttrGetList (ISNS_Msg_Descp *p_md); int ISNS_GetDD_ID_from_sym ( char *p_sym ); int ISNS_GetDDS_ID_from_sym ( char *p_sym ); int ISNSGetNextEntityPortal( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); int ISNSGetNextDDIscsiMember( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); int ISNSGetNextDDSMember( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); int ISNSdbGetAttr ( ISNS_Msg_Descp * p_md, ISNS_Msg_Descp * md ); int ISNSGetNextAttr( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); int IsDDActive(int dd_id, int exclude_dds_id); int IsDDSActive(int dds_id); int Get_Active_DD_List (ISNS_LIST *dd_list, ISNS_DD_LIST p_dlist, int flag); int ISNSdbProcessISCSIOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, SOIP_Iscsi * p_node); int ISNSdbProcessFCNodeOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, SOIP_Fc_Node * p_node); int Get_Active_DD_List_From_ISCSI_Node (char *nodename, ISNS_DD_LIST p_dlist, int flag); int Append_Nodes_From_DD_List (ISNS_DD_LIST p_dlist, SOIP_Dd_Member p_ddmem[], uint32_t type); int Get_Active_DD_List_From_IFCP_Node (char *nodename, ISNS_DD_LIST p_dlist, int flag); int Get_Active_DD_List_From_ENTITY_Node (char *p_entity_name, SOIP_Entity * p_entity, ISNS_DD_LIST p_list, int flag); int SNSProcessPortalOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, SOIP_Portal * p_portal); int ISNSdbProcessPortOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, SOIP_Ifcp * p_port); int ISNSdbProcessEntityOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, SOIP_Entity *p_entity); int ISNSdbProcessDDSOpAttr(ISNS_Msg *p_msg, ISNS_Attr **attr_indx, SOIP_Dds *p_dds); int ISNSdbProcessDDOpAttr(ISNS_Msg *p_msg, ISNS_Attr **attr_indx, SOIP_Dd *p_dd); int ISNSGetNextEntityPortal( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); int ISNSGetNextDDIscsiMember( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); int ISNSGetNextDDSMember( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); int ISNSdbGetAttr ( ISNS_Msg_Descp * p_md, ISNS_Msg_Descp * md ); int Get_Active_DD_List_From_IFCP_Node (char *nodename, ISNS_DD_LIST p_dlist, int flag); int SNSGet_Active_DD_List_From_Src (ISNS_Attr * src_attr, ISNS_DD_LIST p_dlist_src, int flag); int Get_Active_DD_List_From_ENTITY_Node (char *p_entity_name, SOIP_Entity * p_entity, ISNS_DD_LIST p_list, int flag); #endif Index: ndb.h =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/include/ndb.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ndb.h 2 Apr 2002 20:56:54 -0000 1.2 --- ndb.h 3 Nov 2006 20:22:29 -0000 1.3 *************** *** 66,68 **** --- 66,72 ---- extern datum ndb_nextkey __P((uint32_t key_type, datum)); + extern datum ndb_fetch_sns (); + extern datum ndb_firstkey_isns (uint32_t key_type, char *key); + extern datum ndb_nextkey_isns (uint32_t key_type, datum key, char *pkey); + #endif --- NEW FILE: iSNSscn.h --- /*********************************************************************** Copyright (c) 2001, Nishan Systems, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Nishan Systems, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NISHAN SYSTEMS, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ /* * This file contains definitions related to iSNSreg * */ #ifndef _SNSscn_h_ #define _SNSscn_h_ int send_iscsi_scn_on_dd_mem_change( SOIP_Iscsi * p_src_node, char *p_src_name, SOIP_Dd *p_dd, uint32_t dd_id, uint32_t event_bitmap); int send_scn_parameter_change_to_all( ISNS_Msg *p_msg, uint32_t bitmap ); int send_scn_object_change_to_all( uint32_t src_type, uint32_t src_len, void *src_val, uint32_t bitmap ); int send_dd_iscsi_scn( SOIP_Dd *p_dd, int dd_id, uint32_t scn_bitmap ); int Send_IFCP_SCN (SOIP_Ifcp * p_src_node, char *p_src_name, uint32_t event_bitmap); int send_iscsi_scn_to_members ( SOIP_Iscsi * p_src_node, char *p_src_name, ISNS_Msg *p_msg, uint32_t event_bitmap ); int SNSGet_Active_DD_List_From_Src (ISNS_Attr * src_attr, ISNS_DD_LIST p_dlist_src, int flag); int ISNS_Process_SCN_Event (ISNS_Msg *p_msg); int ISNS_Process_SCN_Event (ISNS_Msg *p_msg); int ISNS_Process_SCN(ISNS_Msg_Descp *p_md, ISNS_Msg *p_rsp_msg); #endif Index: iSNSdb.h =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/include/iSNSdb.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** iSNSdb.h 3 Nov 2006 18:55:41 -0000 1.3 --- iSNSdb.h 3 Nov 2006 20:22:29 -0000 1.4 *************** *** 42,46 **** #include <time.h> - #include "ndb.h" #include "iSNSmsg.h" --- 42,45 ---- *************** *** 82,289 **** ISNSdbClose (void); - extern int - SNSdbAddAttr (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md); - - extern int - SNSdbGetAttr (char **attr_indx, char **key_indx, - char *src_attr, ISNS_Msg_Descp * md); - - extern ISNS_Msg_Descp * - SNSdbGetPorts(char **attr_indx, ISNS_Msg_Descp *); - - extern int - SNSdbGetPortName(IP_Address *ip, SOIP_Port_Id *id, SOIP_Port_Name *pn); - - extern int - SNSDeRegisterSCN (char **attr_indx, char **key_indx, ISNS_Attr * src_attr, - ISNS_Msg * rspmsg); - - extern STATUS - SNSRemoveAllPortsFromNode(SOIP_Node_Name nn); - - extern void - ISNS_CheckEntities (void); - int ISNSdbLoad(void); int ISNSdbSave(ISNS_Msg *p_msg); - int ISNS_SendESI(void); - - int ISNS_ProcessESI(ISNS_Msg_Descp* p_md); - int ISNSdbExec(ISNS_Msg_Descp* p_md,ISNS_Msg_Descp* p_rsp_md); - int ISNS_RegisterSCNCallback(ISNS_Msg_Descp* p_md); - - int ISNSTouchEntity(ISNS_Attr* src_attr); - - ISNS_ATTR_VALS_CB * - ISNSAttrGetList (ISNS_Msg_Descp *p_md); - - int - ISNS_GetDD_ID_from_sym ( char *p_sym ); - - int - ISNS_GetDDS_ID_from_sym ( char *p_sym ); - - int - ISNSGetNextEntityPortal( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); - - int - ISNSGetNextDDIscsiMember( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); - - int - ISNSGetNextDDSMember( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); - - int - send_iscsi_scn_on_dd_mem_change( SOIP_Iscsi * p_src_node, char *p_src_name, - SOIP_Dd *p_dd, uint32_t dd_id, uint32_t event_bitmap); - - int - send_scn_parameter_change_to_all( ISNS_Msg *p_msg, uint32_t bitmap ); - - int - send_scn_object_change_to_all( uint32_t src_type, uint32_t src_len, - void *src_val, uint32_t bitmap ); - - int - change_dd_member_active_flag( SOIP_Dd *p_dd ); - - int - ISNS_DeRegisterSCN ( ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); - - int - ISNS_RegisterSCN (ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); - - int - ISNSdbRemoveAttr (ISNS_Msg_Descp * p_md); - - - int - ISNSdbGetAttr ( ISNS_Msg_Descp * p_md, ISNS_Msg_Descp * md ); - - int - ISNSGetNextAttr( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); - - int - ISNSdbRemoveAttrDD ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg ); - - int - ISNSdbRemoveAttrDDS ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg ); - - int - SNSdbFetchDD (int id, SOIP_Dd ** p_dd, SOIP_DB_Entry * p_entry); - - int - send_dd_iscsi_scn( SOIP_Dd *p_dd, int dd_id, uint32_t scn_bitmap ); - - int - IsDDActive(int dd_id, int exclude_dds_id); - - int - IsDDSActive(int dds_id); - - int - ISNSAddSCNEntry(uint32_t type, char *nodename, uint32_t bitmap, int sockfd); - - int - ISNSRemoveSCNEntry(uint32_t type, char *nodename); - - int - ISNSRemoveESIEntry(IP_Address *p_ip, uint32_t port, char *p_eid); - - int - ISNSAddESIEntry(IP_Address *p_ip, uint32_t port, char *p_eid); - - - int - Copy_DD_List(ISNS_LIST *dd_list, ISNS_DD_LIST p_dlist); - int ! Get_Active_DD_List (ISNS_LIST *dd_list, ISNS_DD_LIST p_dlist, int flag); ! ! ! int ! SNSRemovePortalEntry (char *portal_key, ISNS_Attr * src_attr, ! ISNS_Msg * p_rspmsg); ! ! int ! ISNSdbAddAttrPortal (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ! ISNS_Msg * p_rspmsg);\ ! ! int ! SNSdbAddAttrPort (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ! ISNS_Msg * p_rspmsg); ! ! int ! AddCert (void **ptr, int *size, void *p_cert, int cert_size); ! ! int ! RemoveCert (void **ptr); ! ! int ! SNSRemoveIFCPNodeEntry (char *ifcp_node_key, ISNS_Attr * src_attr, ! ISNS_Msg * p_rspmsg); ! ! int ! Activate_DD_Membership (uint32_t type, void *p_node); ! ! int ! SNSRemoveFCNodeEntry (char *p_key, ISNS_Msg * p_rspmsg); ! ! int ! ISNSdbProcessISCSIOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, ! SOIP_Iscsi * p_node); int - ISNSdbProcessFCNodeOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, - SOIP_Fc_Node * p_node); - int SNSdbFetchEntity (char *p_entity_id, SOIP_Entity ** p_entity, ! SOIP_DB_Entry * p_entry); ! ! ! int ! Get_Active_DD_List_From_ISCSI_Node (char *nodename, ISNS_DD_LIST p_dlist, ! int flag); ! ! int ! Append_Nodes_From_DD_List (ISNS_DD_LIST p_dlist, ! SOIP_Dd_Member p_ddmem[], uint32_t type); ! ! int ! Check_Overlap_DD (ISNS_DD_LIST p_dlist_src, ISNS_DD_LIST p_dlist_node); ! ! int ! Get_Active_DD_List_From_IFCP_Node (char *nodename, ISNS_DD_LIST p_dlist, ! int flag); ! ! ! int ! SNSRemoveISCSINodeEntry (char *iscsi_node_key, ISNS_Attr * src_attr, ! ISNS_Msg * p_rspmsg); ! ! int ! Send_IFCP_SCN (SOIP_Ifcp * p_src_node, char *p_src_name, ! uint32_t event_bitmap); ! ! int ! ISNSdbAddAttrNode (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ! ISNS_Msg * p_rspmsg); ! ! int ! send_iscsi_scn_to_members ( SOIP_Iscsi * p_src_node, char *p_src_name, ! ISNS_Msg *p_msg, uint32_t event_bitmap ); ! ! int ! SNSdbAddAttrEntity (char **attr_indx, char **key_indx, ! ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg); ! ! int ! Remove_DD_from_ISCSI_Node (SOIP_Dd *p_dd, char *p_node_name); int ! SNSdbGetNextOfKey (ISNS_Key * key); void --- 81,99 ---- ISNSdbClose (void); int ISNSdbLoad(void); int ISNSdbSave(ISNS_Msg *p_msg); int ISNSdbExec(ISNS_Msg_Descp* p_md,ISNS_Msg_Descp* p_rsp_md); int ! SNSdbGetNextOfKey (ISNS_Key * key); int SNSdbFetchEntity (char *p_entity_id, SOIP_Entity ** p_entity, ! SOIP_DB_Entry * p_entry); int ! SNSdbFetchDD (int id, SOIP_Dd ** p_dd, SOIP_DB_Entry * p_entry); void *************** *** 291,397 **** int - Add_dds_to_dd (SOIP_Dds *p_dds, int dd_id); - - int - Remove_DD_from_IFCP_Node (int id, char *p_node_name); - - int - Add_DD_to_ISCSI_Node (SOIP_Dd *p_dd, char *p_node_name); - - int - Add_DD_Member (SOIP_Dd * p_dd, char *ptr, int p_len, uint32_t type, uint32_t status, uint32_t index); - - int - Remove_DD_Member (SOIP_Dd *p_dd, char *ptr, uint32_t type); - - int - Add_DD_to_IFCP_Node (int id, char *p_node_name); - - int - SNSGet_Active_DD_List_From_Src (ISNS_Attr * src_attr, - ISNS_DD_LIST p_dlist_src, int flag); - - int - Get_Active_DD_List_From_ENTITY_Node (char *p_entity_name, - SOIP_Entity * p_entity, - ISNS_DD_LIST p_list, int flag); - - int - Remove_dd_from_dds (SOIP_Dds * p_dds, int id); - - int - SNSProcessPortalOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, - SOIP_Portal * p_portal); - - int - ISNSdbProcessPortOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, - SOIP_Ifcp * p_port); - - int - ISNSdbProcessEntityOpAttr (ISNS_Msg * p_msg, ISNS_Attr ** attr_indx, - SOIP_Entity *p_entity); - - int - ISNSdbAddAttrISCSINode (char **attr_indx, char **key_indx, - ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg); - - int - ISNSFindTag (int start_indx, int key, char **attr_indx); - - ISNS_Attr * - ISNSFindKeyInResponseMsg (int key, ISNS_Msg * msg); - - int - ISNS_Process_SCN_Event (ISNS_Msg *p_msg); - - int - ISNSAppendAttr (ISNS_Msg * msg, int tag, int size, char *p_value, int value); - - int - ISNSAppendKey (ISNS_Msg * msg, int tag, int size, char *p_value, int value); - - - int - SNSdbRemoveAttrEntity (char **key_indx, ISNS_Attr *src_attr, ISNS_Msg_Descp * md, - ISNS_Msg * rspmsg); - - int - SNSdbRemoveAttrNode (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); - - int - SNSdbRemoveAttrPort (char **key_indx, ISNS_Attr *src_attr, ISNS_Msg_Descp * p_md, - ISNS_Msg * rspmsg); - - int - ISNSdbRemoveAttrEntityEntry (char *p_entity_id, ISNS_Attr * src_attr, - ISNS_Msg * p_rspmsg); - - int - SNSdbRemoveAttrISCSI (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, - ISNS_Msg * rspmsg); - - int - SNSdbRemoveAttrNode (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); - - int - SNSdbRemoveAttrPortal (char **key_indx, ISNS_Attr *src_attr, ISNS_Msg_Descp * p_md, - ISNS_Msg * rspmsg); - - int - ISNS_Process_SCN_Event (ISNS_Msg *p_msg); - - int - ISNSdbAddAttrDDS ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg ); - - int - ISNSdbAddAttrDD ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg ); - - int - ISNS_Process_SCN(ISNS_Msg_Descp *p_md, ISNS_Msg *p_rsp_msg); - - int - ISNS_ProcessESI ( ISNS_Msg_Descp *p_md ); - - int ISNSdbRead (ISNS_Key *key, SOIP_DB_Entry *entry); --- 101,104 ---- *************** *** 402,413 **** ISNSdbDelete (ISNS_Key *key); - int - ISNSdbProcessDDSOpAttr(ISNS_Msg *p_msg, ISNS_Attr **attr_indx, - SOIP_Dds *p_dds); - - int - ISNSdbProcessDDOpAttr(ISNS_Msg *p_msg, ISNS_Attr **attr_indx, - SOIP_Dd *p_dd); - void * ISNSGetDataFromIdxHashTable(IDX_HASH_ENTRY **table, uint32_t index); --- 109,112 ---- *************** *** 421,486 **** int ISNS_GetNewDD_ID (void); - int Check_Unique_DDS_Sym (SOIP_Dds * p_dds, char *p_sym_name); - int Check_Unique_DD_Sym (SOIP_Dd * p_dd, char *p_sym_name); uint32_t ISNSGetNewEntityIdx(void); uint32_t ISNSGetNewISCSIIdx(void); uint32_t ISNSGetNewPortalIdx(void); - int SNSdbRemoveAttrDDS_Entry(int id, ISNS_Attr *src_attr, ISNS_Msg *p_rspmsg); - int SNSdbRemoveDD_Entry(int id, ISNS_Attr *src_attr, ISNS_Msg *p_rspmsg); - - int - SNSdbRemoveDD_Member (int id, char **attr_indx, ISNS_Attr * src_attr, - ISNS_Msg * p_rspmsg); - int - Disable_DD_Member (SOIP_Dd * p_dd, char *ptr, uint32_t type); void ISNSRemoveFromIdxHashTable(IDX_HASH_ENTRY **table, uint32_t index); - int - ISNSGetNextEntityPortal( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); - - int - ISNSGetNextDDIscsiMember( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); - - int - ISNSGetNextDDSMember( ISNS_Msg_Descp *p_md, ISNS_Msg * p_rspmsg ); - - int - ISNSdbGetAttr ( ISNS_Msg_Descp * p_md, ISNS_Msg_Descp * md ); - - int - Get_Active_DD_List_From_IFCP_Node (char *nodename, ISNS_DD_LIST p_dlist, - int flag); - - int - SNSdbGetNextOfKey (ISNS_Key * key); - - int - SNSGet_Active_DD_List_From_Src (ISNS_Attr * src_attr, - ISNS_DD_LIST p_dlist_src, int flag); - - int - Get_Active_DD_List_From_ENTITY_Node (char *p_entity_name, - SOIP_Entity * p_entity, - ISNS_DD_LIST p_list, int flag); - - int - SNSdbAddAttrPort (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, - ISNS_Msg * rspmsg); - - - int - SNSdbRemoveAttrISCSI (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, - ISNS_Msg * rspmsg); - - int - SNSdbRemoveAttrNode (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); - - int - SNSdbRemoveAttrPortal (char **key_indx, ISNS_Attr *src_attr, ISNS_Msg_Descp * p_md, - ISNS_Msg * rspmsg); - - int - Append_DD_to_List (ISNS_DD_LIST p_dlist, uint32_t id); - #endif --- 120,128 ---- --- NEW FILE: iSNSreg.h --- /*********************************************************************** Copyright (c) 2001, Nishan Systems, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Nishan Systems, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NISHAN SYSTEMS, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ /* * This file contains definitions related to iSNSreg * */ #ifndef _SNSreg_h_ #define _SNSreg_h_ #include <time.h> #include "iSNSmsg.h" extern int SNSdbAddAttr (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md); extern int SNSDeRegisterSCN (char **attr_indx, char **key_indx, ISNS_Attr * src_attr, ISNS_Msg * rspmsg); extern STATUS SNSRemoveAllPortsFromNode(SOIP_Node_Name nn); extern void ISNS_CheckEntities (void); int ISNS_RegisterSCNCallback(ISNS_Msg_Descp* p_md); int ISNSTouchEntity(ISNS_Attr* src_attr); int change_dd_member_active_flag( SOIP_Dd *p_dd ); int ISNS_DeRegisterSCN ( ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int ISNS_RegisterSCN (ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int ISNSdbRemoveAttr (ISNS_Msg_Descp * p_md); int ISNSdbRemoveAttrDD ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg ); int ISNSdbRemoveAttrDDS ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg ); int ISNSAddSCNEntry(uint32_t type, char *nodename, uint32_t bitmap, int sockfd); int ISNSRemoveSCNEntry(uint32_t type, char *nodename); int ISNSRemoveESIEntry(IP_Address *p_ip, uint32_t port, char *p_eid); int ISNSAddESIEntry(IP_Address *p_ip, uint32_t port, char *p_eid); int Copy_DD_List(ISNS_LIST *dd_list, ISNS_DD_LIST p_dlist); int SNSRemovePortalEntry (char *portal_key, ISNS_Attr * src_attr, ISNS_Msg * p_rspmsg); int ISNSdbAddAttr (ISNS_Msg_Descp * p_md, ISNS_Msg *rspMsg); int ISNSdbAddAttrPortal (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg);\ int SNSdbAddAttrPort (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg); int AddCert (void **ptr, int *size, void *p_cert, int cert_size); int RemoveCert (void **ptr); int SNSRemoveIFCPNodeEntry (char *ifcp_node_key, ISNS_Attr * src_attr, ISNS_Msg * p_rspmsg); int Activate_DD_Membership (uint32_t type, void *p_node); int SNSRemoveFCNodeEntry (char *p_key, ISNS_Msg * p_rspmsg); int Check_Overlap_DD (ISNS_DD_LIST p_dlist_src, ISNS_DD_LIST p_dlist_node); int SNSRemoveISCSINodeEntry (char *iscsi_node_key, ISNS_Attr * src_attr, ISNS_Msg * p_rspmsg); int ISNSdbAddAttrNode (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg); int SNSdbAddAttrEntity (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg); int Remove_DD_from_ISCSI_Node (SOIP_Dd *p_dd, char *p_node_name); int Add_dds_to_dd (SOIP_Dds *p_dds, int dd_id); int Remove_DD_from_IFCP_Node (int id, char *p_node_name); int Add_DD_to_ISCSI_Node (SOIP_Dd *p_dd, char *p_node_name); int Add_DD_Member (SOIP_Dd * p_dd, char *ptr, int p_len, uint32_t type, uint32_t status, uint32_t index); int Remove_DD_Member (SOIP_Dd *p_dd, char *ptr, uint32_t type); int Add_DD_to_IFCP_Node (int id, char *p_node_name); int Remove_dd_from_dds (SOIP_Dds * p_dds, int id); int ISNSdbAddAttrISCSINode (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg); int SNSdbRemoveAttrEntity (char **key_indx, ISNS_Attr *src_attr, ISNS_Msg_Descp * md, ISNS_Msg * rspmsg); int SNSdbRemoveAttrNode (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int SNSdbRemoveAttrPort (char **key_indx, ISNS_Attr *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int ISNSdbRemoveAttrEntityEntry (char *p_entity_id, ISNS_Attr * src_attr, ISNS_Msg * p_rspmsg); int SNSdbRemoveAttrISCSI (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int SNSdbRemoveAttrNode (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int SNSdbRemoveAttrPortal (char **key_indx, ISNS_Attr *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int ISNSdbAddAttrDDS ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg ); int ISNSdbAddAttrDD ( ISNS_Msg_Descp * p_md, ISNS_Msg * p_rspmsg ); int ISNSdbProcessDDOpAttr(ISNS_Msg *p_msg, ISNS_Attr **attr_indx, SOIP_Dd *p_dd); int ISNS_GetNewDDS_ID (void); int ISNS_GetNewDD_ID (void); int Check_Unique_DDS_Sym (SOIP_Dds * p_dds, char *p_sym_name); int Check_Unique_DD_Sym (SOIP_Dd * p_dd, char *p_sym_name); uint32_t ISNSGetNewEntityIdx(void); uint32_t ISNSGetNewISCSIIdx(void); uint32_t ISNSGetNewPortalIdx(void); int SNSdbRemoveAttrDDS_Entry(int id, ISNS_Attr *src_attr, ISNS_Msg *p_rspmsg); int SNSdbRemoveDD_Entry(int id, ISNS_Attr *src_attr, ISNS_Msg *p_rspmsg); int SNSdbRemoveDD_Member (int id, char **attr_indx, ISNS_Attr * src_attr, ISNS_Msg * p_rspmsg); int Disable_DD_Member (SOIP_Dd * p_dd, char *ptr, uint32_t type); int SNSdbAddAttrPort (char **attr_indx, char **key_indx, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int SNSdbRemoveAttrISCSI (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int SNSdbRemoveAttrNode (char **key_indx, char *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int SNSdbRemoveAttrPortal (char **key_indx, ISNS_Attr *src_attr, ISNS_Msg_Descp * p_md, ISNS_Msg * rspmsg); int Append_DD_to_List (ISNS_DD_LIST p_dlist, uint32_t id); #endif |