From: Robert W. <wrw...@us...> - 2006-12-11 18:01:14
|
Update of /cvsroot/linuxisns/iscsiClient/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30127/include Modified Files: isns.h parse.h util.h Added Files: config.h Removed Files: initiator.h target.h Log Message: create a common config file --- NEW FILE: config.h --- /* Authors: Tom McSweeney <rf4...@us...>, Curt du Laney <du...@us...> IBM Research Triangle Park * * Copyright (c) IBM Corporation 2001 * Licensed Material - Program Property of IBM * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 3. Neither the name of IBM Corporation 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 AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDERS 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. /***********************************************************************/ #ifndef __configuration_H #define __configuration_H typedef struct { char InitiatorName[256]; int DDS; struct listelement *link; } listelement; typedef struct { int hb_flag; char iscsiID[256]; char Alias[256]; char PortalIP[256]; int Port; char EntityID[256]; int portalFlag; int EntityPeriod; int DDmember; char DDAlias[256]; int DDSmember; char DDSAlias[256]; char Initiator[256]; listelement* listPtr; } configuration; void RegInitiator (configuration *); void InitiatorRegPortal (configuration *); void InitiatorRegISCSI (configuration *); void GetTargets (configuration *); void RegTarget (configuration *); void TargetRegISCSI (configuration *); int TargetRegDD (configuration *); int TargetRegDDS (configuration *); void TargetRegPortal (configuration *); void TargetAdd_DD_to_DDS (configuration *); void TargetAdd_ISCSI_to_DD (configuration *); void TargetAdd_ISCSI_to_DD2 (configuration *); void ReadFile (FILE*, configuration *, char*); int config_init (char * filename, configuration *, char[]); listelement * AddItem (listelement * listpointer, char[]); listelement * RemoveItem (listelement * listpointer); listelement * RemoveDDSItem (listelement * listpointer); void ClearDDSQueue (listelement * listpointer); void ClearQueue (listelement * listpointer); #endif --- initiator.h DELETED --- --- target.h DELETED --- Index: util.h =================================================================== RCS file: /cvsroot/linuxisns/iscsiClient/include/util.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** util.h 2 Apr 2002 02:57:40 -0000 1.1.1.1 --- util.h 11 Dec 2006 18:01:08 -0000 1.2 *************** *** 31,42 **** / /***********************************************************************/ - - /* Contribuing authors: - *Tom McSweeney <rf4...@us...>, - *Curt du Laney <du...@us...> - *IBM Research Triangle Park - * - /***********************************************************************/ - #ifndef __UTIL_H #define __UTIL_H --- 31,34 ---- *************** *** 45,67 **** DumpHex (void *data, int size); - void WaitForKey(void); - char * HexToAscii(char *srcbuffer, int size, char *dstbuffer); - void - GetHexTime(char *buffer); - - int - GetHexInput(char *cmdLine, char *prompt, char *cDefault, int c_size); - - int - GetInput(char *cmdLine, char *prompt, char *cDefault, int c_size); - - int - GetYesNo(char *cmdLine, char *prompt, int dvalue, int c_size); - - int GetCommand(void); - #endif --- 37,43 ---- Index: isns.h =================================================================== RCS file: /cvsroot/linuxisns/iscsiClient/include/isns.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** isns.h 11 Dec 2006 04:27:37 -0000 1.2 --- isns.h 11 Dec 2006 18:01:07 -0000 1.3 *************** *** 42,46 **** #define _isns_h - #ifdef SNS_LINUX #include <stdio.h> #include <sched.h> --- 42,45 ---- *************** *** 64,78 **** #define itoa(a,b,c) (((c)==10)?sprintf(b,"%d",a):sprintf(b,"%x",a)) - #else - // #include <windows.h> - #include <io.h> - #include <winsock2.h> - #include <Ws2tcpip.h> - #include <stdio.h> - - #define uint16_t unsigned short - #define uint32_t unsigned long - #endif - #include "iSNSdefs.h" #include <time.h> --- 63,66 ---- *************** *** 187,195 **** - #ifdef SNS_LINUX int - #else - DWORD WINAPI - #endif ESIListener(DWORD lparam); --- 175,179 ---- *************** *** 218,249 **** void ISNSAppendAttr(ISNS_CMD *cmd, ISNS_TAG tag, int len, char *ptr, int val); - int GetSrc(ISNS_CMD *p_cmd, int flags); - - void ParseDDSQuery(char *buffer); - - void GetDDS(void); - - void ParseDDQuery(char *buffer); - - void GetDD(void); - - void RegDDS(void); - - void UpdateDDS(void); - - void DeRegDDS(void); - - void Remove_DD_from_DDS(void); - - void RegDD(void); - - void UpdateDD(void); - - void DeRegDD(void); - - void Remove_Member_from_DD(void); - - void Add_DD_to_DDS(void); - void DisableESI(void); --- 202,205 ---- *************** *** 258,265 **** void Process_SCN(ISNS_CMD *p_msg, int size); - int RegSCN(void); - - void DeRegSCN(void); - void InitESITable(void); --- 214,217 ---- *************** *** 270,275 **** void GetNext(void); - void SaveDb(void); - #endif --- 222,225 ---- Index: parse.h =================================================================== RCS file: /cvsroot/linuxisns/iscsiClient/include/parse.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** parse.h 2 Apr 2002 02:57:40 -0000 1.1.1.1 --- parse.h 11 Dec 2006 18:01:07 -0000 1.2 *************** *** 31,43 **** / /***********************************************************************/ - - /* Contribuing authors: - *Tom McSweeney <rf4...@us...>, - *Curt du Laney <du...@us...> - *IBM Research Triangle Park - * - /***********************************************************************/ - - #ifndef __PARSE_H #define __PARSE_H --- 31,34 ---- *************** *** 51,57 **** char * errorText(int errorCode); - void - ParsePDU (char *buffer); - #endif --- 42,45 ---- |