diff options
Diffstat (limited to 'TAO/utils')
33 files changed, 0 insertions, 1859 deletions
diff --git a/TAO/utils/IOR-parser/IOR_Parser.dsp b/TAO/utils/IOR-parser/IOR_Parser.dsp deleted file mode 100644 index 35a4bc8dfc7..00000000000 --- a/TAO/utils/IOR-parser/IOR_Parser.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="IOR Parser" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=IOR Parser - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "IOR_Parser.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "IOR_Parser.mak" CFG="IOR Parser - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "IOR Parser - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "IOR Parser - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "IOR Parser - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x407 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /out:"Release/parseIor.exe" /libpath:"..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "IOR Parser - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"parseIor.exe" /pdbtype:sept /libpath:"..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "IOR Parser - Win32 Release"
-# Name "IOR Parser - Win32 Debug"
-# Begin Source File
-
-SOURCE="ior-handler.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE="ior-handler.h"
-# End Source File
-# Begin Source File
-
-SOURCE="ior-parser.cpp"
-# End Source File
-# End Target
-# End Project
diff --git a/TAO/utils/IOR-parser/IOR_Parser.dsw b/TAO/utils/IOR-parser/IOR_Parser.dsw deleted file mode 100644 index 14ece8c7c41..00000000000 --- a/TAO/utils/IOR-parser/IOR_Parser.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "IOR_Parser"="IOR_Parser.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/utils/IOR-parser/Makefile b/TAO/utils/IOR-parser/Makefile deleted file mode 100644 index 47b17b31281..00000000000 --- a/TAO/utils/IOR-parser/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Makefile for the IOR Parser -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = ior-parser - -FILES = ior-handler - -SRC = $(addsuffix .cpp,$(FILES)) -OBJ = $(addsuffix .o,$(FILES)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/ior-handler.o .obj/ior-handler.so .shobj/ior-handler.o .shobj/ior-handler.so: ior-handler.cpp ior-handler.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/utils/IOR-parser/Orbix.IOR b/TAO/utils/IOR-parser/Orbix.IOR deleted file mode 100644 index 7731ac20965..00000000000 --- a/TAO/utils/IOR-parser/Orbix.IOR +++ /dev/null @@ -1 +0,0 @@ -IOR:000000000000001249444c3a4563686f54657374733a312e3000000000000001000000000000005600010000000000146c616d6264612e6563652e756373622e6564750006220000000000323a5c6c616d6264612e6563652e756373622e6564753a4563686f5365727665723a303a3a49523a4563686f5465737473003a diff --git a/TAO/utils/IOR-parser/README b/TAO/utils/IOR-parser/README deleted file mode 100644 index 44ca61a2fad..00000000000 --- a/TAO/utils/IOR-parser/README +++ /dev/null @@ -1,23 +0,0 @@ -// FILENAME : README -// AUTHOR : Priya Narasimhan <priya@alpha.ece.ucsb.edu> -// LAST MODIFIED : September 18, 1998 -// DESCRIPTION : Description of the IOR Parser - -The "ior-parser" utility parses IORs generated by most ORBs. It has been -tested with Orbix, VisiBroker and TAO so far. - -USAGE: ior-parser <IOR filename> - -There are sample IORs (Tao.IOR, Orbix.IOR and Visibroker.IOR) in this -directory. You can run the "ior-parser" utility against these to see -what the normal output looks like. - -RELEASE NOTES: - -The "ior-parser" does not currently work if multi-component profiles are -embedded in the IOR. Since Visibroker IORs normally contain -multi-component (LIOP and IIOP) profiles, this version of the IOR Parser -will work only if the Visibroker server is forced to generate a -single-component (IIOP) profile by passing it the command-line option -"-OAlocalIPC 0". - diff --git a/TAO/utils/IOR-parser/Tao.IOR b/TAO/utils/IOR-parser/Tao.IOR deleted file mode 100644 index 830ed119a9c..00000000000 --- a/TAO/utils/IOR-parser/Tao.IOR +++ /dev/null @@ -1 +0,0 @@ -IOR:000000000000001649444c3a73696d706c655f6f626a6563743a312e3000000000000001000000000000003600010000000000036d750000aada00000000002250333564623666626130303062383766612f6368696c645f706f612f736572766572
\ No newline at end of file diff --git a/TAO/utils/IOR-parser/TaoSimple.IOR b/TAO/utils/IOR-parser/TaoSimple.IOR deleted file mode 100644 index 830ed119a9c..00000000000 --- a/TAO/utils/IOR-parser/TaoSimple.IOR +++ /dev/null @@ -1 +0,0 @@ -IOR:000000000000001649444c3a73696d706c655f6f626a6563743a312e3000000000000001000000000000003600010000000000036d750000aada00000000002250333564623666626130303062383766612f6368696c645f706f612f736572766572
\ No newline at end of file diff --git a/TAO/utils/IOR-parser/VisiBroker.IOR b/TAO/utils/IOR-parser/VisiBroker.IOR deleted file mode 100644 index 168d2418032..00000000000 --- a/TAO/utils/IOR-parser/VisiBroker.IOR +++ /dev/null @@ -1 +0,0 @@ -IOR:002020200000001049444c3a4163636f756e743a312e300000000001000000000000004e00010020000000103132382e3131312e3139332e31323000842920200000002e00504d43000000000000001049444c3a4163636f756e743a312e30000000000e4a61636b20422e20517569636b00 diff --git a/TAO/utils/IOR-parser/ior-handler.cpp b/TAO/utils/IOR-parser/ior-handler.cpp deleted file mode 100644 index b6ef51a0ab3..00000000000 --- a/TAO/utils/IOR-parser/ior-handler.cpp +++ /dev/null @@ -1,610 +0,0 @@ -// $Id$ - -#include "ior-handler.h" - -IorHandler::IorHandler (void) -{ -} - -int -IorHandler::hexChar2int (char thisChar) -{ - switch (thisChar) - { - case '0': return (0); - case '1': return (1); - case '2': return (2); - case '3': return (3); - case '4': return (4); - case '5': return (5); - case '6': return (6); - case '7': return (7); - case '8': return (8); - case '9': return (9); - case 'a': return (10); - case 'b': return (11); - case 'c': return (12); - case 'd': return (13); - case 'e': return (14); - case 'f': return (15); - } - return -1; -} - -u_long -IorHandler::getOctet8Field (char *readPtr, int *hexCharsRead) -{ - char octet8Holder[8]; - u_long value; - int i; - - for (i = 0; i < 8; i++) - octet8Holder[i] = * (readPtr + i); - - *hexCharsRead = 8; - - value = 16*hexChar2int (octet8Holder[6]) + hexChar2int (octet8Holder[7]); - return (value); -} - -u_long -IorHandler::getOctet4Field (char *readPtr, int *hexCharsRead) -{ - char octet4Holder[4]; - u_long value; - int i; - - for (i = 0; i < 4; i++) - octet4Holder[i] = * (readPtr + i); - - *hexCharsRead = 4; - -#ifdef ACE_BIG_ENDIAN - // On a big endian platform, the MSB is first and the LSB is next - value = 16*16*16* hexChar2int (octet4Holder[0]) + - 16*16* hexChar2int (octet4Holder[1]) + - 16* hexChar2int (octet4Holder[2]) + - hexChar2int (octet4Holder[3]); -#endif - - -#ifdef ACE_LITTLE_ENDIAN - // On a little endian platform, the LSB is first and the MSB is next - value = 16*16*16* hexChar2int (octet4Holder[2]) + - 16*16* hexChar2int (octet4Holder[3]) + - 16* hexChar2int (octet4Holder[0]) + - hexChar2int (octet4Holder[1]); -#endif - - - return (value); -} - -u_long -IorHandler::getOctet2Field (char *readPtr, int *hexCharsRead) -{ - char octet2Holder[2]; - u_long value; - int i; - - for (i = 0; i < 2; i++) - octet2Holder[i] = * (readPtr + i); - - *hexCharsRead = 2; - - value = 16 * hexChar2int (octet2Holder[0]) + hexChar2int (octet2Holder[1]); - return (value); -} - -void -IorHandler::skipSpaceIfAny(char *readPtr, int *hexCharsRead) -{ - char nullOctet[2]; - int offset; - - *hexCharsRead = 0; - offset = 0; - - // Some ORBs tend to insert a single space character, ie, ASCII - // equivalent 20, at the end of certain fields in the IOR. Use - // skipSpaceIfAny() with care since in certain cases, it might - // actually represent an unsigned long. - - nullOctet[0] = *(readPtr + offset); - nullOctet[1] = *(readPtr + offset + 1); - - if ((nullOctet[0] == '2') && (nullOctet[1] == '0')) - offset += 2; - - *hexCharsRead = offset; -} - -void -IorHandler::skipNullOctets (char *readPtr, int *hexCharsRead, int expectingStr) -{ - char nullOctet[4]; - int offset; - - *hexCharsRead = 0; - offset = 0; - - // There sometimes occurs a null padding of 2 octets after strings - // such as the type_id in order to ensure even number of octets. - - while (1) - { - nullOctet[0] = *(readPtr + offset); - nullOctet[1] = *(readPtr + offset + 1); - nullOctet[2] = *(readPtr + offset + 2); - nullOctet[3] = *(readPtr + offset + 3); - - // Some ORBs tend to pad the IORs with double space characters, - // ie., 2020 in ASCII equivalent - - if ((nullOctet[0] == '2') && (nullOctet[1] == '0') && - (nullOctet[2] == '2') && (nullOctet[3] == '0')) - { - offset += 4; - continue; - } - - if ((nullOctet[0] == '0') && (nullOctet[1] == '0')) - offset += 2; - else - if ((expectingStr) && (hexChar2int(nullOctet[0]) >= 8)) - offset += 2; - else - break; - } - - *hexCharsRead = offset; -} - -int -IorHandler::findIfVisiIor(char *readPtr, int *hexCharsRead) -{ - int offset; - int hasVisiPreamble = 0; - - *hexCharsRead = 0; - offset = 0; - - if ((getCharacter(readPtr, &offset) == 'P') && - (getCharacter(readPtr, &offset) == 'M') && - (getCharacter(readPtr, &offset) == 'C')) - { - hasVisiPreamble = 1; - *hexCharsRead = offset; - } - - return (hasVisiPreamble); -} - -char -IorHandler::getCharacter (char *readPtr, int *offset) -{ - char octetPair[2]; - int intEquiv; - - octetPair[0] = *(readPtr + *offset); - octetPair[1] = *(readPtr + *offset + 1); - - intEquiv = 16 * hexChar2int(octetPair[0]) + hexChar2int(octetPair[1]); - *offset += 2; - - return ((char) intEquiv); -} - -char * -IorHandler::getString (char *readPtr, int givenLen) -{ - char parsedStr[MAX_IOR_FIELD_LEN]; - char octetPair[2]; - char parsedOctetPair[2]; - int intEquiv; - int i = 0; - int j = 0; - - // i indexes hexChars while j indexes octet pairs - - while (i <= (givenLen - 2)) - { - octetPair[0] = * (readPtr + i); - octetPair[1] = * (readPtr + i + 1); - - intEquiv = 16 * hexChar2int (octetPair[0]) + hexChar2int (octetPair[1]); - sprintf (parsedOctetPair, "%c", intEquiv); - parsedStr[j] = parsedOctetPair[0]; - j ++; - - i += 2; - } - - return (parsedStr); -} - -void -IorHandler::interpretIor (char *thisIor, struct IOR *thisIorInfo) -{ - int numCharsToSkip; - int validTypeId = 0; - int isVisiIor = 0; - int ulongValue; - - // Skip the prefix "IOR:" - int numHexCharsRead = 4; - - // Type ID must be at least 4 bytes in length since type_id is prefixed - // by the string "IDL:" - int validTypeIdLen = 0; - - while (!validTypeIdLen) - { - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 1); - numHexCharsRead += numCharsToSkip; - - // Read the length of the type_id field - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue == 0) - { - ACE_DEBUG ((LM_DEBUG, - "type_id len seems to be 0 \n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - - if (ulongValue > 4) - { - validTypeIdLen = 1; - thisIorInfo->typeIdLen = ulongValue; - } - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 1); - numHexCharsRead += numCharsToSkip; - - // Read the Type ID - ACE_OS::strncpy (thisIorInfo->typeId, - getString((char *)(thisIor + numHexCharsRead), - 2 * thisIorInfo->typeIdLen), - thisIorInfo->typeIdLen); - - // Confirm that this is a valid TypeId by looking for the IDL - // interface. Additionally, the IDL interface could be extracted - // and used for other purposes. - getIdlInterface(thisIorInfo->typeId, &validTypeId); - - if (!validTypeId) - { - validTypeIdLen = 0; - numHexCharsRead -= numCharsToSkip; - } - } - - numHexCharsRead += 2 * thisIorInfo->typeIdLen; - - ACE_DEBUG ((LM_DEBUG, - "\nTypeId\t\t: %s (%d bytes)\n", - thisIorInfo->typeId, - thisIorInfo->typeIdLen)); - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 0); - numHexCharsRead += numCharsToSkip; - - // Read the 4 octets, which should equal 1 (numTaggedProfiles = 1) - // for a single-component profile. - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue != 1) - { - ACE_DEBUG ((LM_DEBUG, - "numTaggedProfiles = %d\n", - ulongValue)); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - - // Read the 4 octets, which should equal 0 (TAG_INTERNET_IOP = 0) - ulongValue = getOctet8Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue != 0) - { - ACE_DEBUG ((LM_DEBUG, - "TAG_INTERNET_IOP != 0\n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 0); - numHexCharsRead += numCharsToSkip; - - // Read the 4 octets, which represent the length of the ProfileBody - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue == 0) - { - ACE_DEBUG ((LM_DEBUG, - "ProfileBody len equals 0\n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - thisIorInfo->profileBodyLen = ulongValue; - - ACE_DEBUG ((LM_DEBUG, - "\nTAG_INTERNET_IOP Profile (%d bytes):\n", - ulongValue)); - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 1); - numHexCharsRead += numCharsToSkip; - - // Read the 4 octets, which represent the IIOP version number = 1 - // Read the major number of the IIOP Version (should be 1) - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue != 1) - { - ACE_DEBUG ((LM_DEBUG, - "IIOP major version != 1\n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - ACE_DEBUG ((LM_DEBUG, - "IIOP Version: %d.", - ulongValue)); - - // Read the minor number of the IIOP Version (can be 0 or 1) - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if ((ulongValue != 0) && (ulongValue != 1)) - { - ACE_DEBUG ((LM_DEBUG, - "IIOP minor version != 0 or 1\n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - ACE_DEBUG ((LM_DEBUG, - "%d\n", - ulongValue)); - - skipSpaceIfAny((char *)(thisIor + numHexCharsRead), &numCharsToSkip); - numHexCharsRead += numCharsToSkip; - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 0); - numHexCharsRead += numCharsToSkip; - - // Read the 2 octets, which represent the length of the hostname - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue == 0) - { - ACE_DEBUG ((LM_DEBUG, - "hostLen equals 0\n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - thisIorInfo->hostLen = ulongValue; - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 1); - numHexCharsRead += numCharsToSkip; - - // Read the hostname and store it - ACE_OS::strncpy (thisIorInfo->HostName, - getString((char *)(thisIor + numHexCharsRead), - 2 * thisIorInfo->hostLen), thisIorInfo->hostLen); - numHexCharsRead += 2 * thisIorInfo->hostLen; - - ACE_DEBUG ((LM_DEBUG, - " HostName : %s (%d bytes)\n", - thisIorInfo->HostName, - thisIorInfo->hostLen)); - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 0); - numHexCharsRead += numCharsToSkip; - - // Read the port number and store it - ulongValue = getOctet4Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue == 0) - { - ACE_DEBUG ((LM_DEBUG, - "port number equals 0\n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - thisIorInfo->portNum = ulongValue; - - ACE_DEBUG ((LM_DEBUG, - " Port Number: %d\n", - thisIorInfo->portNum)); - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 0); - numHexCharsRead += numCharsToSkip; - - // Read the object key length - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue == 0) - { - ACE_DEBUG ((LM_DEBUG, - "objectKeyLen equals 0\n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - thisIorInfo->objectKeyLen = ulongValue; - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 1); - numHexCharsRead += numCharsToSkip; - - // VisiBroker tends to insert the preamble "PMC" (=> Post Modern - // Computing), before the "real" object key actually starts. Identify - // if this is the case. - isVisiIor = findIfVisiIor((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - if (isVisiIor) - { - numHexCharsRead += numCharsToSkip; - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 0); - numHexCharsRead += numCharsToSkip; - - ACE_DEBUG ((LM_DEBUG, - " ObjectKey : PMC")); - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 0); - numHexCharsRead += numCharsToSkip; - - // Read the real object key length and then the real object key - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue == 0) - { - ACE_DEBUG ((LM_DEBUG, - "VisiBroker IOR - real objectKeyLen equals 0\n")); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - - ACE_OS::strncpy (thisIorInfo->objectKey, - getString((char *)(thisIor + numHexCharsRead), - 2 * ulongValue), ulongValue); - - numHexCharsRead += 2 * ulongValue; - - ACE_DEBUG ((LM_DEBUG, - "%s", - thisIorInfo->objectKey, - ulongValue)); - - skipNullOctets((char *)(thisIor + numHexCharsRead), &numCharsToSkip, 1); - numHexCharsRead += numCharsToSkip; - - // Read the object name length and then the object name - ulongValue = getOctet2Field((char *)(thisIor + numHexCharsRead), - &numCharsToSkip); - - if (ulongValue == 0) - { - ACE_DEBUG ((LM_DEBUG, - "\n[No object name] (%d bytes)\n\n", - thisIorInfo->objectKeyLen)); - ACE_OS::exit (1); - } - - numHexCharsRead += numCharsToSkip; - - ACE_OS::strncpy (thisIorInfo->objectKey, - getString((char *)(thisIor + numHexCharsRead), - 2 * ulongValue), ulongValue); - - numHexCharsRead += 2 * ulongValue; - - ACE_DEBUG ((LM_DEBUG, - "[object name: %s] (%d bytes)\n\n", - thisIorInfo->objectKey, - thisIorInfo->objectKeyLen)); - } - - else - { - // Non-VisiBroker IOR - Read the object_key and store it - ACE_OS::strncpy (thisIorInfo->objectKey, - getString((char *)(thisIor + numHexCharsRead), - 2 * thisIorInfo->objectKeyLen), - thisIorInfo->objectKeyLen); - - numHexCharsRead += 2 * thisIorInfo->objectKeyLen; - - ACE_DEBUG ((LM_DEBUG, - " ObjectKey : %s (%d bytes)\n\n", - thisIorInfo->objectKey, - thisIorInfo->objectKeyLen)); - } - -} - - -char * -IorHandler::getIdlInterface (char *typeId, int *validTypeId) -{ - char idlInterface[MAX_TYPE_ID_LEN]; - int lenInterface; - - // A sample type_id for an IDL interface name "EchoTests" is - // IDL:EchoTests:1.0 => the trick is to isolate the parts between - // the two colons. - if ((*typeId != 'I') && (*(typeId+1) != 'D') && (*(typeId+2) != 'L')) - { - *validTypeId = 0; - return ((char *)typeId); - } - - char *readStart = strchr(typeId, ':'); - - if (readStart == NULL) - { - ACE_DEBUG ((LM_DEBUG, - "getIdlInterface: type_id contains no starting :\n")); - ACE_OS::exit (1); - } - - - char *readEnd = strrchr (typeId, ':'); - - if (readEnd == NULL) - { - ACE_DEBUG ((LM_DEBUG, - "getIdlInterface: type_id contains no ending:\n")); - ACE_OS::exit (1); - } - - // Now, count the number of bytes between the two colons. - lenInterface = readEnd - readStart - 1; - - // Copy the IDL interface part of the type_id. - ACE_OS::strncpy ((char *)idlInterface, - readStart+1, - lenInterface); - idlInterface[lenInterface] = '\0'; - - *validTypeId = 1; - return (char *) idlInterface; -} - -void -IorHandler::readIorFromFile (char *filename) -{ - FILE *fp = ACE_OS::fopen (filename, "r"); - - // Read the real IOR from the file REAL_IOR_FILE. - if (fp == NULL) - { - ACE_ERROR ((LM_ERROR, - "%p\n", - "Unable to open file")); - ACE_OS::exit (1); - } - - fscanf (fp, - "%s", - stringIOR); - ACE_OS::fclose (fp); - - interpretIor (stringIOR, &parsedIOR); -} diff --git a/TAO/utils/IOR-parser/ior-handler.h b/TAO/utils/IOR-parser/ior-handler.h deleted file mode 100644 index f1d6eb4f263..00000000000 --- a/TAO/utils/IOR-parser/ior-handler.h +++ /dev/null @@ -1,132 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/utils/IOR-parser -// -// = FILENAME -// ior-handler.h -// -// = DESCRIPTION -// Provides the definition of a class that parses real (valid) IORs. -// -// = AUTHORS -// Priya Narasimhan <priya@lambda.ece.ucsb.edu> -// -// ============================================================================ - -#if !defined (__IORPARSER_H__) -#define __IORPARSER_H__ - -#include "ace/OS.h" -#include "ace/Basic_Types.h" // To determine BYTE_ORDER - -// Maximum length of the stringified IOR, the type_id, and the -// object_key and hostname fields. Tentatively assigned. -#define MAX_IOR_LEN 600 -#define MAX_IOR_FIELD_LEN 200 -#define MAX_TYPE_ID_LEN 100 -#define MAX_OBJ_KEY_LEN 100 -#define MAX_HOSTNAME_LEN 64 - - -class IOR -{ - // = TITLE - // This is the useful information obtained from parsing an IOR. - // - // = DESCRIPTION - // This structure assumes that the profile_id is - // TAG_INTERNET_IOP and that there is only one TaggedProfile in - // the IOR. -public: - u_long typeIdLen; - // The length of the type_id field of the IOR - - char typeId[MAX_TYPE_ID_LEN]; - // The string in the type_id field of the IOR - - char idlInterface[MAX_TYPE_ID_LEN]; - // The IDL interface of the server that published the IOR (can be extracted - // from the type_id field) - - u_long profileBodyLen; - // The length of the body of the profile field of the IOR - - u_long hostLen; - // The length of the hostname embedded in the IOR - - char HostName[MAX_HOSTNAME_LEN]; - // The server's hostname embedded in the IOR - - u_long portNum; - // The server's port number embedded in the IOR - - u_long objectKeyLen; - // The length of the object_key field of the IOR - - char objectKey[MAX_OBJ_KEY_LEN]; - // The object_key field of the IOR -}; - -class IorHandler -{ - // = TITLE - // This is the class that takes in a real (valid) IOR and - // parses it. - // - // = DESCRIPTION - // This class prints out the useful information in the - // IORs generated by VisiBroker, Orbix and TAO -public: - IorHandler (void); - // Constructor - - void interpretIor (char *thisIor, struct IOR *thisIorInfo); - // The main IOR parsing routine - - char *getIdlInterface (char *typeId, int *validTypeId); - // Extracts the IDL interface from the type_id field in the IOR - - void readIorFromFile (char *filename); - // Reads in the IOR from a specified file - - char stringIOR[MAX_IOR_LEN]; - // Holds the stringified IOR during parsing - - struct IOR parsedIOR; - // Holds the parsed IOR - -private: - int hexChar2int (char thisChar); - // Converts a pair of hexadecimal-encoded characters in the stringified - // IOR into their integer value - - u_long getOctet8Field (char *readPtr, int *hexCharsRead); - // Interpret the next 8 octets into an unsigned long - - u_long getOctet4Field (char *readPtr, int *hexCharsRead); - // Interpret the next 4 octets into an unsigned long - - u_long getOctet2Field (char *readPtr, int *hexCharsRead); - // Interpret the next 2 octets into an unsigned long - - void skipSpaceIfAny (char *readPtr, int *hexCharsRead); - // Skip the space character encountered while parsing the IOR - - void skipNullOctets (char *readPtr, int *hexCharsRead, int expectingStr); - // Skip the null octets encountered while parsing the IOR - - int findIfVisiIor (char *readPtr, int *hexCharsRead); - // Finds out if VisiBroker generated this IOR - - char getCharacter (char *readPtr, int *offset); - // Extracts a single character from the IOR - - char *getString (char *readPtr, int givenLen); - // Extracts a character string of a given length from the IOR - -}; - -#endif /* __IORPARSER_H__ */ diff --git a/TAO/utils/IOR-parser/ior-parser.cpp b/TAO/utils/IOR-parser/ior-parser.cpp deleted file mode 100644 index 6099966470c..00000000000 --- a/TAO/utils/IOR-parser/ior-parser.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/utils/IOR-parser -// -// = FILENAME -// ior-parser.cpp -// -// = DESCRIPTION -// Main loop of the IOR Parser. -// -// = AUTHORS -// Priya Narasimhan <priya@lambda.ece.ucsb.edu> -// -// ============================================================================ - -#include "ior-handler.h" - -IorHandler parser; - -int -main (int argc, char **argv) -{ - if (argc <= 1 || argc >= 3) - ACE_ERROR_RETURN ((LM_ERROR, - "USAGE: parseIor <IOR filename>\n"), - 1); - - parser.readIorFromFile (argv[1]); - return 0; -} - - - - - diff --git a/TAO/utils/Makefile b/TAO/utils/Makefile deleted file mode 100644 index 28681103909..00000000000 --- a/TAO/utils/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = catior \ - IOR-parser - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/TAO/utils/catior/Makefile b/TAO/utils/catior/Makefile deleted file mode 100644 index b8d9f1768b4..00000000000 --- a/TAO/utils/catior/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Makefile for the catior utility -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -LDLIBS = -lTAO - -BIN = catior - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/utils/catior/README b/TAO/utils/catior/README deleted file mode 100644 index eff8a25c227..00000000000 --- a/TAO/utils/catior/README +++ /dev/null @@ -1,17 +0,0 @@ -$Id$ - -CatIOR is a small utility that takes in a stringified IOR and decode -it, printing out the information contained in it. - -Usage ------ - -catior -f <filename> - -Takes in a file which contains the IOR and will then output the -encoded information to stdout. - -There is a sample file in this directory called TaoSimple.IOR that is -an IOR generated using the example $TAO_ROOT/tests/Simple. You can -run the "catior" utility against that to see what the output looks -like. diff --git a/TAO/utils/catior/catior.cpp b/TAO/utils/catior/catior.cpp deleted file mode 100644 index c74c1a8437e..00000000000 --- a/TAO/utils/catior/catior.cpp +++ /dev/null @@ -1,629 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/Utils/catior -// -// = FILENAME -// catior.cpp -// -// = DESCRIPTION -// Reads stringified IORs and outputs the encoded information. -// -// = AUTHORS -// Jeff Hopper <jrhopper@cts.com> -// -// ============================================================================ - -#include "ace/Get_Opt.h" -#include <tao/corba.h> -#include <tao/debug.h> -#include <tao/Typecode.h> -#include <tao/IIOP_Object.h> - -static CORBA::Boolean -catiiop (CORBA::String string, - CORBA::Environment &env) -{ - // NIL objref encodes as just "iiop:" ... which has already been - // removed, so we see it as an empty string. - - if (!string || !*string) - return 0; - - // Type ID not encoded in this string ... makes narrowing rather - // expensive, though it does ensure that type-safe narrowing code - // gets thoroughly excercised/debugged! Without a typeID, the - // _narrow will be required to make an expensive remote "is_a" call. - - // Remove the "N.N//" prefix, and verify the version's one that we - // accept - - CORBA::Short iiop_version_major, iiop_version_minor; - if (isdigit (string [0]) - && isdigit (string [2]) - && string [1] == '.' - && string [3] == '/' - && string [4] == '/') - { - iiop_version_major = (char) (string [0] - '0'); - iiop_version_minor = (char) (string [2] - '0'); - string += 5; - } - else - { - iiop_version_major = 0; - iiop_version_minor = 0; - string += 2; - } - - ACE_DEBUG ((LM_DEBUG, - "IIOP Version:\t%d.%d\n", - iiop_version_major, - iiop_version_minor)); - - // Pull off the "hostname:port/" part of the objref Get host and - // port. - CORBA::UShort port_number; - CORBA::String hostname; - char *cp = ACE_OS::strchr (string, ':'); - - if (cp == 0) - { - env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO)); - return 0; - } - - hostname = CORBA::string_alloc (1 + cp - string); - - for (cp = hostname; - *string != ':'; - *cp++ = *string++) - continue; - - *cp = 0; - string++; - - cp = ACE_OS::strchr ((char *) string, '/'); - - if (cp == 0) - { - env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO)); - CORBA::string_free (hostname); - return 0; - } - - port_number = (short) ACE_OS::atoi ((char *) string); - string = ++cp; - - ACE_DEBUG ((LM_DEBUG, - "Host Name:\t%s\n", - hostname)); - ACE_DEBUG ((LM_DEBUG, - "Port Number:\t%d\n", - port_number)); - CORBA::string_free (hostname); - - // Parse the object key. - // dump the object key to stdout - // TAO_POA::decode_string_to_sequence (data->profile.object_key, - // string); - ACE_DEBUG ((LM_DEBUG, - "\nThe Object Key as string:\n%s\n", - string)); - return 1; -} - -static CORBA::Boolean -catior (CORBA::String str, - CORBA::Environment &env) -{ - // Unhex the bytes, and make a CDR deencapsulation stream from the - // resulting data. - - ACE_Message_Block mb (ACE_OS::strlen ((char *) str) / 2 + 1 - + CDR::MAX_ALIGNMENT); - CDR::mb_align (&mb); - - char *buffer = mb.rd_ptr (); - char *tmp = (char *) str; - size_t len = 0; - - CORBA::Boolean continue_decoding; - - // The prefix of the IOR must be removed, and the string must start - // with the encapsulation byte - - while (tmp [0] && tmp [1]) - { - u_char byte; - - if (! (isxdigit (tmp [0]) && isxdigit (tmp [1]))) - break; - - byte = (u_char) (ACE::hex2byte (tmp [0]) << 4); - byte |= ACE::hex2byte (tmp [1]); - - buffer [len++] = byte; - tmp += 2; - } - - // Create deencapsulation stream ... then unmarshal objref from that - // stream. - - CORBA::Boolean byteOrder; - - { - TAO_InputCDR encapStream (&mb); - continue_decoding = encapStream.read_boolean (byteOrder); - } - - mb.rd_ptr (1); - mb.wr_ptr (2 * len - 1); - TAO_InputCDR stream (&mb, - byteOrder); - - if (byteOrder == 1) - ACE_DEBUG ((LM_DEBUG, - "The Byte Order:\tLittle Endian\n")); - else - ACE_DEBUG ((LM_DEBUG, - "The Byte Order:\tBig Endian\n")); - - // First, read the type hint. This will be the type_id encoded in an - // object reference. - CORBA::String type_hint; - - continue_decoding = stream.decode (CORBA::_tc_string, - &type_hint, - 0, - env); - if (continue_decoding == 0) - { - ACE_DEBUG ((LM_DEBUG, - "cannot read type id\n")); - return CORBA::TypeCode::TRAVERSE_STOP; - } - - ACE_DEBUG ((LM_DEBUG, - "The Type Id:\t\"%s\"\n", - type_hint)); - - // Release any memory associated with the type_hint. - CORBA::string_free (type_hint); - - // Read the profiles, discarding all until an IIOP profile comes by. - // Once we see an IIOP profile, ignore any further ones. - // - // XXX this will need to change someday to let different protocol - // code be accessed, not just IIOP. Protocol modules will be - // dynamically loaded from shared libraries via ORB_init (), and we - // just need to be able to access such preloaded libraries here as - // we unmarshal objrefs. - - CORBA::ULong profiles = 0; - // IIOP_Object *objdata = 0; - - continue_decoding = stream.read_ulong (profiles); - - // Get the count of profiles that follow. - if (continue_decoding == 0) - { - ACE_DEBUG ((LM_DEBUG, - "cannot read the profile count\n")); - return CORBA::TypeCode::TRAVERSE_STOP; - } - - CORBA::ULong profile_counter = 0; - - // No profiles means a NIL objref. - if (profiles == 0) - return CORBA_TypeCode::TRAVERSE_CONTINUE; - else - while (profiles-- != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Profile Count:\t%d\n", - ++profile_counter)); - - // We keep decoding until we find a valid IIOP profile. - CORBA::ULong tag; - - continue_decoding = stream.read_ulong (tag); - - // Get the profile ID tag. - if (continue_decoding == 0) - { - ACE_DEBUG ((LM_DEBUG, - "cannot read profile tag\n")); - continue; - } - - if (tag != TAO_IOP_TAG_INTERNET_IOP) - { - continue_decoding = stream.skip_string (); - ACE_DEBUG ((LM_DEBUG, - "unknown tag %d skipping\n", tag)); - continue; - } - - // OK, we've got an IIOP profile. It's going to be - // encapsulated ProfileData. Create a new decoding stream and - // context for it, and tell the "parent" stream that this data - // isn't part of it any more. - - CORBA::ULong encap_len; - continue_decoding = stream.read_ulong (encap_len); - - // ProfileData is encoded as a sequence of octet. So first get - // the length of the sequence. - if (continue_decoding == 0) - { - ACE_DEBUG ((LM_DEBUG, - "cannot read encap length\n")); - continue; - } - - // Create the decoding stream from the encapsulation in the - // buffer, and skip the encapsulation. - TAO_InputCDR str (stream, encap_len); - - continue_decoding = str.good_bit () - && stream.skip_bytes (encap_len); - - if (!continue_decoding) - { - ACE_DEBUG ((LM_DEBUG, - "problem decoding encapsulated stream, " - "len = %d\n", - encap_len)); - continue; - } - - // Read and verify major, minor versions, ignoring IIOP - // profiles whose versions we don't understand. - // - // XXX this doesn't actually go back and skip the whole - // encapsulation... - CORBA::Octet iiop_version_major, iiop_version_minor; - if (! (str.read_octet (iiop_version_major) - && iiop_version_major == IIOP::MY_MAJOR - && str.read_octet (iiop_version_minor) - && iiop_version_minor <= IIOP::MY_MINOR)) - { - ACE_DEBUG ((LM_DEBUG, - "detected new v%d.%d IIOP profile", - iiop_version_major, - iiop_version_minor)); - continue; - } - - ACE_DEBUG ((LM_DEBUG, - "IIOP Version:\t%d.%d\n", - iiop_version_major, - iiop_version_minor)); - - // Get host and port. - CORBA::UShort port_number; - CORBA::String hostname; - if (str.decode (CORBA::_tc_string, - &hostname, - 0, - env) != CORBA::TypeCode::TRAVERSE_CONTINUE - || !str.read_ushort (port_number)) - { - ACE_DEBUG ((LM_DEBUG, - "error decoding IIOP host/port")); - return CORBA::TypeCode::TRAVERSE_STOP; - } - - ACE_DEBUG ((LM_DEBUG, - "Host Name:\t%s\n", - hostname)); - ACE_DEBUG ((LM_DEBUG, - "Port Number:\t%d\n", - port_number)); - CORBA::string_free (hostname); - - // ... and object key. - - CORBA::ULong objKeyLength = 0; - continue_decoding = str.read_ulong (objKeyLength); - - ACE_DEBUG ((LM_DEBUG, - "Object Key len:\t%d\n", - objKeyLength)); - - ACE_DEBUG ((LM_DEBUG, - "Object Key as hex:\n")); - - CORBA::Octet anOctet; - CORBA::String objKey = CORBA::string_alloc (objKeyLength + 1); - - short counter = -1; - - u_int i = 0; - - for (; i < objKeyLength; i++) - { - if (++counter == 8) - { - ACE_DEBUG ((LM_DEBUG, - "\n")); - counter = 0; - } - str.read_octet (anOctet); - - ACE_DEBUG ((LM_DEBUG, - "%x ", - anOctet)); - objKey[i] = (char) anOctet; - } - - objKey[i] = '\0'; - - ACE_DEBUG ((LM_DEBUG, - "\nThe Object Key as string:\n")); - - for (i = 0; i < objKeyLength; i++) - ACE_DEBUG ((LM_DEBUG, - "%c", - objKey[i])); - - CORBA::string_free (objKey); - ACE_DEBUG ((LM_DEBUG, - "\n")); - } - return 1; -} - -// Parse the Orbix-style POOP object references, which have the form: -//:\ntlj3corba:NS:NC_2::IR:CosNaming_NamingContext -// :\ hostname -// : server_name -// : marker -// : IR_host -// : IR_server -// : interface_marker - -static CORBA::Boolean -catpoop (CORBA::String string, - CORBA::Environment &env) -{ - if (!string || !*string) - return 0; - - if (string [0] == ':' - && string [1] == '\\') - ACE_DEBUG ((LM_DEBUG, - "\nPerhaps we've found some POOP\n")); - string += 2; - - char *cp = ACE_OS::strchr (string, ':'); - - if (cp == 0) - { - env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO)); - return 0; - } - - // Read the hostname. - CORBA::String hostname = CORBA::string_alloc (1 + cp - string); - - for (cp = hostname; - *string != ':'; - *cp++ = *string++) - continue; - - *cp = 0; - string++; - - ACE_DEBUG ((LM_DEBUG, - "Host Name:\t%s\n", - hostname)); - CORBA::string_free (hostname); - - // read the server name - cp = ACE_OS::strchr (string, ':'); - - CORBA::String server_name = CORBA::string_alloc (1 + cp - string); - - for (cp = server_name; - *string != ':'; - *cp++ = *string++) - continue; - - *cp = 0; - string++; - - ACE_DEBUG ((LM_DEBUG, - "Server Name:\t%s\n", - server_name)); - - CORBA::string_free (server_name); - - // Read the Orbix specific marker. - cp = ACE_OS::strchr (string, ':'); - - CORBA::String marker = CORBA::string_alloc (1 + cp - string); - - for (cp = marker; - *string != ':'; - *cp++ = *string++) - continue; - - *cp = 0; - string++; - - ACE_DEBUG ((LM_DEBUG, - "Marker:\t\t%s\n", - marker)); - CORBA::string_free (marker); - - cp = ACE_OS::strchr (string, ':'); - - // Read the IR_host. - CORBA::String IR_host = CORBA::string_alloc (1 + cp - string); - - for (cp = IR_host; - *string != ':'; - *cp++ = *string++) - continue; - - *cp = 0; - string++; - - ACE_DEBUG ((LM_DEBUG, - "IR Host:\t\t%s\n", - IR_host)); - CORBA::string_free (IR_host); - - // Read the IR_server - cp = ACE_OS::strchr (string, ':'); - - CORBA::String IR_server = CORBA::string_alloc (1 + cp - string); - - for (cp = IR_server; - *string != ':'; - *cp++ = *string++) - continue; - - *cp = 0; - string++; - - ACE_DEBUG ((LM_DEBUG, - "IR Server:\t\t%s\n", - IR_server)); - CORBA::string_free (IR_server); - - // Read the interface_marker - ACE_DEBUG ((LM_DEBUG, - "Interface Marker:\t%s\n", - string)); - return 1; -} - -int -main (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "f:n:"); - - CORBA::Environment env; - CORBA::ORB_var orb_var = CORBA::ORB_init (argc, argv, "TAO", env); - CORBA::Boolean b; - char opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'n': - // Read the CosName from the NamingService convert the - // object_ptr to a CORBA::String_var via the call to - // object_to_string. - ACE_DEBUG ((LM_DEBUG, - "opening a connection to the NamingService\n" - "resolving the CosName %s\n", - get_opt.optarg)); - break; - case 'f': - { - // Read the file into a CORBA::String_var. - ACE_DEBUG ((LM_DEBUG, - "reading the file %s\n", - get_opt.optarg)); - - ifstream ifstr (get_opt.optarg); - - if (!ifstr.good ()) - { - ifstr.close (); - return -1; - } - - char ch; - ACE_CString aString; - - while (!ifstr.eof ()) - { - ifstr.get (ch); - if (ch == '\n' || ch == EOF) - break; - aString += ch; - } - - ACE_DEBUG ((LM_DEBUG, - "\nhere is the IOR\n%s\n\n", - aString.rep ())); - - CORBA::String str; - if (aString.find ("IOR:") == 0) - { - ACE_DEBUG ((LM_DEBUG, - "decoding an IOR:\n")); - - // Strip the IOR: off the string. - ACE_CString prefix = "IOR:"; - short prefixLength = prefix.length (); - - ACE_CString subString = - aString.substring (prefixLength, - aString.length () - prefixLength); - subString[subString.length ()] = '\0'; - str = subString.rep (); - b = catior (str, env); - } - else if (aString.find ("iiop:") == 0) - { - ACE_DEBUG ((LM_DEBUG, - "decoding an IIOP URL IOR\n")); - - ACE_CString prefix = "IIOP:"; - short prefixLength = prefix.length (); - - ACE_CString subString = - aString.substring (prefixLength, - aString.length () - prefixLength); - //subString[subString.length () - 1] = '\0'; - str = subString.rep (); - b = catiiop (str, env); - } - else if (aString.find (":IR:")) - { - ACE_DEBUG ((LM_DEBUG, - "decoding an POOP IOR\n")); - - str = aString.rep (); - b = catpoop (str, env); - } - else - ACE_ERROR_RETURN ((LM_DEBUG, - "Don't know how to decode this IOR\n"), - -1); - if (b == 1) - ACE_DEBUG ((LM_DEBUG, - "catior returned true\n")); - else - ACE_DEBUG ((LM_DEBUG, - "catior returned false\n")); - ifstr.close (); - } - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "Usage: %s " - "-f filename " - "-n CosName " - "\n" - "Reads an IOR " - "and dumps the contents to stdout " - "\n", - argv[0]), - 1); - } - } - - return 0; -} diff --git a/TAO/utils/catior/catior.dsp b/TAO/utils/catior/catior.dsp deleted file mode 100644 index d2f6fbd4103..00000000000 --- a/TAO/utils/catior/catior.dsp +++ /dev/null @@ -1,89 +0,0 @@ -# Microsoft Developer Studio Project File - Name="catior" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=catior - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "catior.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "catior.mak" CFG="catior - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "catior - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "catior - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "catior - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "catior - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D __ACE_INLINE__=1 /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /pdb:"catior.pdb" /debug /machine:I386 /out:"catior.exe" /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "catior - Win32 Release"
-# Name "catior - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\catior.cpp
-# End Source File
-# End Target
-# End Project
diff --git a/TAO/utils/catior/catior.dsw b/TAO/utils/catior/catior.dsw deleted file mode 100644 index d2a827883a7..00000000000 --- a/TAO/utils/catior/catior.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "catior"=.\catior.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/utils/catior/test.bat b/TAO/utils/catior/test.bat deleted file mode 100644 index 0452ffbdfce..00000000000 --- a/TAO/utils/catior/test.bat +++ /dev/null @@ -1,6 +0,0 @@ -catior -f .\test\EventService.ior -catior -f .\test\test1.ior -catior -f .\test\test2.ior -catior -f .\test\timeserver.ior -catior -f .\test\timeserver.iiop -catior -f .\test\param_test.iiop diff --git a/TAO/utils/catior/test/adagrid.ior b/TAO/utils/catior/test/adagrid.ior deleted file mode 100644 index 5b411a78853..00000000000 --- a/TAO/utils/catior/test/adagrid.ior +++ /dev/null @@ -1,2 +0,0 @@ -IOR:000000000000000D49444C3A677269643A312E30000E7E4A00000001000000000000003200010000000000056A696D690000EA610000001EB54160B6B541646147726964537276B5424F41B541646147726964537276 - diff --git a/TAO/utils/catior/test/eventservice.ior b/TAO/utils/catior/test/eventservice.ior deleted file mode 100644 index 1aa109f1aa8..00000000000 --- a/TAO/utils/catior/test/eventservice.ior +++ /dev/null @@ -1 +0,0 @@ -IOR:01003a002a00000049444c3a436f734576656e744368616e6e656c41646d696e2f4576656e744368616e6e656c3a312e3000000001000000000000007000000001010000150000006d616e732e7370617761722e6e6176792e6d696c000022064c0000003a5c6d616e732e7370617761722e6e6176792e6d696c3a4576656e74536572766963653a303a3a49523a436f734576656e744368616e6e656c41646d696e5f4576656e744368616e6e656c00
\ No newline at end of file diff --git a/TAO/utils/catior/test/expersoft.iiop b/TAO/utils/catior/test/expersoft.iiop deleted file mode 100644 index c4909570633..00000000000 --- a/TAO/utils/catior/test/expersoft.iiop +++ /dev/null @@ -1,2 +0,0 @@ -iiop://millenium:5555/NameServiceRoot - diff --git a/TAO/utils/catior/test/expersoft.ior b/TAO/utils/catior/test/expersoft.ior deleted file mode 100644 index 8c523327e0f..00000000000 --- a/TAO/utils/catior/test/expersoft.ior +++ /dev/null @@ -1 +0,0 @@ -IOR:012020201d00000049444c3a6f6d672e6f72672f434f5242412f4f626a6563743a312e300020202001000000000000003c00000001010020100000003230362e3137312e3132352e32333900b31520201c0000005850530100000000000000104e616d6553657276696365526f6f7400
\ No newline at end of file diff --git a/TAO/utils/catior/test/expersoft2.iiop b/TAO/utils/catior/test/expersoft2.iiop deleted file mode 100644 index 87cd37a572e..00000000000 --- a/TAO/utils/catior/test/expersoft2.iiop +++ /dev/null @@ -1,2 +0,0 @@ -iiop://legend:5555/NameServiceRoot - diff --git a/TAO/utils/catior/test/expersoft2.ior b/TAO/utils/catior/test/expersoft2.ior deleted file mode 100644 index b0cce1896d1..00000000000 --- a/TAO/utils/catior/test/expersoft2.ior +++ /dev/null @@ -1 +0,0 @@ -IOR:012020201d00000049444c3a6f6d672e6f72672f434f5242412f4f626a6563743a312e300020202001000000000000003c00000001010020100000003230362e3137312e3132352e31333500b31520201c0000005850530100000000000000104e616d6553657276696365526f6f7400
\ No newline at end of file diff --git a/TAO/utils/catior/test/expersoft3.iiop b/TAO/utils/catior/test/expersoft3.iiop deleted file mode 100644 index 715213b3f93..00000000000 --- a/TAO/utils/catior/test/expersoft3.iiop +++ /dev/null @@ -1,2 +0,0 @@ -iiop://boris:5555/NameServiceRoot - diff --git a/TAO/utils/catior/test/expersoft3.ior b/TAO/utils/catior/test/expersoft3.ior deleted file mode 100644 index 2a679df9282..00000000000 --- a/TAO/utils/catior/test/expersoft3.ior +++ /dev/null @@ -1 +0,0 @@ -IOR:012020201d00000049444c3a6f6d672e6f72672f434f5242412f4f626a6563743a312e300020202001000000000000003c00000001010020100000003230362e3137312e3132352e32313700b31520201c0000005850530100000000000000104e616d6553657276696365526f6f7400
\ No newline at end of file diff --git a/TAO/utils/catior/test/namingservice.poop b/TAO/utils/catior/test/namingservice.poop deleted file mode 100644 index 060222390a7..00000000000 --- a/TAO/utils/catior/test/namingservice.poop +++ /dev/null @@ -1,2 +0,0 @@ -:\ntlj3corba:NS:NC_2::IR:CosNaming_NamingContext - diff --git a/TAO/utils/catior/test/param_test.iiop b/TAO/utils/catior/test/param_test.iiop deleted file mode 100644 index d85b2c06806..00000000000 --- a/TAO/utils/catior/test/param_test.iiop +++ /dev/null @@ -1,2 +0,0 @@ -iiop:1.0//danzon.cs.wustl.edu:2675/P35e4a0580002625a/RootPOA_is_BAD/param_test - diff --git a/TAO/utils/catior/test/quoteserver.ior b/TAO/utils/catior/test/quoteserver.ior deleted file mode 100644 index 9a812eab8f8..00000000000 --- a/TAO/utils/catior/test/quoteserver.ior +++ /dev/null @@ -1 +0,0 @@ -IOR:000000000000001d49444c3a53746f636b2f51756f7465725f466163746f72793a312e3000000000000000010000000000000040000100000000001173756e2e6172632e6e6173612e676f760000271f0000002054333565363238653530303036616332322f51756f7465725f466163746f7279
\ No newline at end of file diff --git a/TAO/utils/catior/test/test1.ior b/TAO/utils/catior/test/test1.ior deleted file mode 100644 index 5834b21dfcb..00000000000 --- a/TAO/utils/catior/test/test1.ior +++ /dev/null @@ -1 +0,0 @@ -IOR:000000000000000c49444c3a666f6f3a312e30000000000100000000000000330001000000000009696e6673756e3031000000000000001b3a5c696e6673756e30313a31363130343a303a3a49523a666f6f000 diff --git a/TAO/utils/catior/test/test2.ior b/TAO/utils/catior/test/test2.ior deleted file mode 100644 index 80cca1e46de..00000000000 --- a/TAO/utils/catior/test/test2.ior +++ /dev/null @@ -1 +0,0 @@ -IOR:000000000000000c49444c3a666f6f3a312e30000000000100000000000000330001000000000009696e6673756e3031000000000000001b3a5c696e6673756e30313a31363130343a303a3a49523a666f6f00
\ No newline at end of file diff --git a/TAO/utils/catior/test/timeserver.iiop b/TAO/utils/catior/test/timeserver.iiop deleted file mode 100644 index 53dd8c9514d..00000000000 --- a/TAO/utils/catior/test/timeserver.iiop +++ /dev/null @@ -1,2 +0,0 @@ -iiop:1.0//danzon.cs.wustl.edu:2651/P35e49ea30001312d/child_poa/time - diff --git a/TAO/utils/catior/test/timeserver.ior b/TAO/utils/catior/test/timeserver.ior deleted file mode 100644 index 1da269011b4..00000000000 --- a/TAO/utils/catior/test/timeserver.ior +++ /dev/null @@ -1 +0,0 @@ -IOR:010000000d00000049444c3a54696d653a312e3000000000010000000000000044000000010100001400000064616e7a6f6e2e63732e777573746c2e65647500310400002000000050333565316662663430303064393730312f6368696c645f706f612f74696d65
\ No newline at end of file |