From: Robert W. <wrw...@us...> - 2006-12-18 19:02:51
|
Update of /cvsroot/linuxisns/isnsNT/isnsserver/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10355/include Modified Files: iSNSdb.h iSNStypes.h Log Message: Correct struct(s) in iSNStypes.h Index: iSNStypes.h =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/include/iSNStypes.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** iSNStypes.h 15 Dec 2006 18:17:18 -0000 1.9 --- iSNStypes.h 18 Dec 2006 19:02:46 -0000 1.10 *************** *** 156,160 **** char v[ISNS_NODE_NAME_SIZE]; ! } SOIP_Node_Name; --- 156,160 ---- char v[ISNS_NODE_NAME_SIZE]; ! } SOIP_Node_Name, SOIP_Node_Key; *************** *** 176,180 **** char v[PORT_NAME_SIZE]; ! } SOIP_Port_Name; --- 176,180 ---- char v[PORT_NAME_SIZE]; ! } SOIP_Port_Name, SOIP_Port_Key; *************** *** 254,276 **** /* ! * Definition of Device Attribute Keys. SoIP device attributes ! * are stored in the service database using these keys. * */ typedef enum { ! START_SNS_DEVI_KEY = 1, /* 1 */ ! NODE_NAME_KEY = START_SNS_DEVI_KEY, PORT_NAME_KEY, - IP_ADDR_KEY, - PORT_TYPE_KEY, - FC4_TYPE_KEY, /* 5 */ - ZONE_TAG_KEY, - RSCN_TYPE_KEY, - NX_PORT_TYPE_KEY, ENTITY_ID_KEY, ! PORTAL_ID_KEY, /* 10 */ ! SPACE_ID_KEY, ! AREA_ID_KEY, DDS_ID_KEY, DD_ID_KEY, --- 254,266 ---- /* ! * Definition of Database Key. * */ typedef enum { ! NODE_NAME_KEY = 1, PORT_NAME_KEY, ENTITY_ID_KEY, ! PORTAL_ID_KEY, DDS_ID_KEY, DD_ID_KEY, *************** *** 280,288 **** ISCSI_IDX_KEY, PORTAL_IDX_KEY, ! LIST_KEY, ! ! END_SNS_DEVI_KEY ! } ISNS_Devi_Key; --- 270,276 ---- ISCSI_IDX_KEY, PORTAL_IDX_KEY, ! LIST_KEY ! } ISNS_Database_Key; *************** *** 293,296 **** --- 281,285 ---- * */ + typedef enum { *************** *** 333,336 **** --- 322,326 ---- } SNS_Devi_Attr; + /* RSCN_Types (defined to fit in one byte) */ *************** *** 390,396 **** } SOIP_Entity_Id; - typedef struct soip_entity_key { - char id[ ENTITY_ID_SIZE ]; - } SOIP_Entity_Key; /* * Definition of Node Name record stored in the SoIP --- 380,383 ---- *************** *** 420,424 **** - /* * Definition of Port Name record stored in the SoIP --- 407,410 ---- *************** *** 480,490 **** } SOIP_Port_List; - typedef struct soip_esi_entry { - IP_Address ip_addr; - uint32_t ip_port; - SOIP_Entity_Id eid; - } SOIP_Esi_Entry; - - typedef struct soip_scn_entry { uint32_t type; --- 466,469 ---- *************** *** 503,515 **** } SOIP_Zone; - typedef struct soip_san { - - uint32_t san_tag; - IP_Address ip_addr; - char sym_name[ SAN_SYM_NAME_SIZE ]; - int sym_name_len; - - } SOIP_San; - typedef enum { --- 482,485 ---- *************** *** 547,559 **** } SOIP_Entity; ! typedef struct soip_db_portal { ! IP_Address ip_addr; ! uint32_t ip_port; ! } SOIP_DB_Portal; ! ! typedef struct portal_list_entry { ! SOIP_DB_Portal portal_ip_port; ! uint32_t portal_idx; ! } PORTAL_LIST_ENTRY; typedef struct entity_list_entry { --- 517,523 ---- } SOIP_Entity; ! typedef struct soip_entity_key { ! char id[ ENTITY_ID_SIZE ]; ! } SOIP_Entity_Key; typedef struct entity_list_entry { *************** *** 583,587 **** uint32_t esiSent; time_t esi_timer; - void *ptr_cert; uint32_t cert_size; --- 547,550 ---- *************** *** 595,598 **** --- 558,571 ---- } SOIP_Portal_Key; + typedef struct soip_db_portal { + IP_Address ip_addr; + uint32_t ip_port; + } SOIP_DB_Portal; + + typedef struct portal_list_entry { + SOIP_DB_Portal portal_ip_port; + uint32_t portal_idx; + } PORTAL_LIST_ENTRY; + typedef struct soip_portal_group { SOIP_ISCSI_Node_Id id; *************** *** 613,626 **** /* - * switch ids - */ - typedef struct SOIP_switch_id { - - char space_id[SPACE_ID_SIZE]; - int area_id; - - } SOIP_Switch_Id; - - /* * Entities that communicate with the SOIP service * agent --- 586,589 ---- *************** *** 670,673 **** --- 633,640 ---- } SOIP_Iscsi; + typedef struct _soip_iscsi_node_name_key { + char v[MAX_ISCSI_NODE_ID_SIZE]; + } SOIP_ISCSI_Node_Id_Key; + /* ids for identifying which list */ typedef enum { *************** *** 692,700 **** int list_index; union { /* The key to which the list belongs */ ! SOIP_Entity_Id entity_id; ! SOIP_Dds dds; ! SOIP_Dd dd; ! SOIP_ISCSI_Node_Id node_name; ! SOIP_DB_Portal portal; } key; } SOIP_LIST_Key; --- 659,667 ---- int list_index; union { /* The key to which the list belongs */ ! SOIP_Entity_Key entity_id; ! SOIP_DDS_Key dds; ! SOIP_DD_Key dd; ! SOIP_Node_Key node_name; ! SOIP_Portal_Key portal; } key; } SOIP_LIST_Key; *************** *** 705,713 **** int prev_index; union { ! SOIP_Entity_Id entity_id; ! SOIP_Dds dds; ! SOIP_Dd dd; ! SOIP_Node_Name node_name; ! ENTITY_LIST_ENTRY portal; } key; } SOIP_DB_List; --- 672,680 ---- int prev_index; union { ! SOIP_Entity_Key entity_id; ! SOIP_DDS_Key dds; ! SOIP_DD_Key dd; ! SOIP_Node_Key node_name; ! SOIP_Portal_Key portal; } key; } SOIP_DB_List; *************** *** 721,729 **** * data associated with a database key. */ ! ISNS_Devi_Key data_type; union { SOIP_Entity entity; SOIP_Portal portal; SOIP_Fc_Node ifcp_node; SOIP_Iscsi scsi_node; --- 688,697 ---- * data associated with a database key. */ ! ISNS_Database_Key data_type; union { SOIP_Entity entity; SOIP_Portal portal; + SOIP_Portal_Group portal_group; SOIP_Fc_Node ifcp_node; SOIP_Iscsi scsi_node; *************** *** 737,746 **** SOIP_DB_Portal portal_idx; SOIP_DB_List list; - SOIP_Portal_Group portal_group; } data; } SOIP_DB_Entry; ! typedef struct ISNS_key { int tag; --- 705,713 ---- SOIP_DB_Portal portal_idx; SOIP_DB_List list; } data; } SOIP_DB_Entry; ! typedef struct ISNS_dbkey { int tag; *************** *** 748,752 **** --- 715,737 ---- union { + SOIP_Entity_Key entity_key; + SOIP_Node_Key node_key; + SOIP_Port_Key port_name; + SOIP_DD_Key dd_key; + SOIP_DD_Key dds_key; + SOIP_Portal_Key portal_key; + SOIP_Portal_Group_Key portal_group_key; + SOIP_IDX_Key idx; + SOIP_LIST_Key list; + } val; + + } ISNS_DBKey; + + typedef struct ISNS_key { + + int tag; + uint32_t len; + union { uint32_t index; uint32_t ip_port; *************** *** 756,773 **** SOIP_Dd dd; SOIP_Entity_Id entity_id; - SOIP_Entity_Key entity_key; SOIP_Node_Name node_name; SOIP_Port_Name port_name; IP_Address ip_addr; - SOIP_DD_Key dd_key; - SOIP_DD_Key dds_key; - uint32_t scn_bitmap; - SOIP_Prot_Ver prot_ver; - SOIP_Port_Type port_type; - SOIP_IDX_Key idx; - SOIP_LIST_Key list; } val; ! } ISNS_Key, ISNS_DBKey; /* --- 741,750 ---- SOIP_Dd dd; SOIP_Entity_Id entity_id; SOIP_Node_Name node_name; SOIP_Port_Name port_name; IP_Address ip_addr; } val; ! } ISNS_Key; /* *************** *** 790,816 **** SOIP_Node_Name node_name; char sym_node_name[NODE_SYM_NAME_SIZE]; ! ! SOIP_Port_Name port_name; ! SOIP_Port_Name fabric_port_name; ! char sym_port_name[PORT_SYM_NAME_SIZE]; ! SOIP_Port_Id port_id; ! IP_Address ip_addr; ! SOIP_Port_Type port_type; ! FC4_Types fc4_types; ! SOIP_COS cos; ! uint32_t portal_group; ! ! int priority; ! ! SOIP_Node_IPA ipa; ! SOIP_Hard_Addr hard_addr; ! ! char sym_san_name[SAN_SYM_NAME_SIZE]; ! ! uint32_t remote; ! SOIP_Device_Type dev_type; ! SOIP_Time timestamp; ! void (*scn_callback)(ISNS_ATTR_VALS_CB *attr_vals_sptr); ! SOIP_Entity_Id entity_id; } val; --- 767,788 ---- SOIP_Node_Name node_name; char sym_node_name[NODE_SYM_NAME_SIZE]; ! SOIP_Port_Name port_name; ! SOIP_Port_Name fabric_port_name; ! char sym_port_name[PORT_SYM_NAME_SIZE]; ! SOIP_Port_Id port_id; ! IP_Address ip_addr; ! SOIP_Port_Type port_type; ! FC4_Types fc4_types; ! SOIP_COS cos; ! uint32_t portal_group; ! int priority; ! SOIP_Node_IPA ipa; ! SOIP_Hard_Addr hard_addr; ! char sym_san_name[SAN_SYM_NAME_SIZE]; ! uint32_t remote; ! SOIP_Device_Type dev_type; ! SOIP_Time timestamp; ! void (*scn_callback)(ISNS_ATTR_VALS_CB *attr_vals_sptr); ! SOIP_Entity_Id entity_id; } val; Index: iSNSdb.h =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/include/iSNSdb.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** iSNSdb.h 15 Dec 2006 18:17:18 -0000 1.7 --- iSNSdb.h 18 Dec 2006 19:02:46 -0000 1.8 *************** *** 89,93 **** int ! SNSdbGetNextOfKey (ISNS_Key * key); int --- 89,93 ---- int ! SNSdbGetNextOfKey (ISNS_DBKey * key); int *************** *** 102,112 **** int ! ISNSdbRead (ISNS_Key *key, SOIP_DB_Entry *entry); int ! ISNSdbWrite (ISNS_Key *key, SOIP_DB_Entry entry); int ! ISNSdbDelete (ISNS_Key *key); uint32_t ISNSGetNewPortalIdx(void); --- 102,112 ---- int ! ISNSdbRead (ISNS_DBKey *key, SOIP_DB_Entry *entry); int ! ISNSdbWrite (ISNS_DBKey *key, SOIP_DB_Entry entry); int ! ISNSdbDelete (ISNS_DBKey *key); uint32_t ISNSGetNewPortalIdx(void); |