2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-05-16 19:34:19 +00:00

Only tarball needed to be checked in

Former-commit-id: 948924ed01574c8e7f0263f31f28e34f71e8513e
This commit is contained in:
phamt
2010-04-13 20:33:12 +00:00
parent 07988c9aaf
commit 817e806447
356 changed files with 0 additions and 47599 deletions
-209
View File
@@ -1,209 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject>
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="0.995217793">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.995217793" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="zHCP" buildProperties="" description="" id="0.995217793" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
<folderInfo id="0.995217793." name="/" resourcePath="">
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.961027043" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.961027043.1392632168" name=""/>
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1875663188" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.680332911" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.283219903" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1278186486" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1254140240" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1919159624" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1539807434" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2001000159" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="0.995217793">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="zHCP.null.1800403149" name="zHCP"/>
</storageModule>
</cproject>
-77
View File
@@ -1,77 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>zHCP</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.core.cnature</nature>
</natures>
</projectDescription>
-801
View File
@@ -1,801 +0,0 @@
DEBUG = -g
CFLAGS = -fPIC
LIB_DIR = $(RPM_BUILD_ROOT)/opt/zhcp/lib
BIN_DIR = $(RPM_BUILD_ROOT)/opt/zhcp/bin
LD_DIR = $(RPM_BUILD_ROOT)/etc/ld.so.conf.d
RA_SRC_DIR = resource_access/src/
RA_INCLUDE_DIR = resource_access/include/
VMAPILIB = libvmapi.so
#-----------------------------------------------------------------------
# Headers
#-----------------------------------------------------------------------
COMMON_HEADERS = $(RA_INCLUDE_DIR)smPublic.h $(RA_INCLUDE_DIR)smTraceAndError.h $(RA_INCLUDE_DIR)smapiTableParser.h $(RA_INCLUDE_DIR)smSocket.h
#-----------------------------------------------------------------------
# Objects for library
#-----------------------------------------------------------------------
OBJECTS = smSocket.o smMemoryGroup.o smapiUtilities.o \
smapiTableParser.o \
vmapiAsynchronousNotificationDisableDm.o \
vmapiAsynchronousNotificationEnableDm.o \
vmapiAsynchronousNotificationQueryDm.o \
vmapiAuthorizationListAdd.o \
vmapiAuthorizationListQuery.o \
vmapiAuthorizationListRemove.o \
vmapiCheckAuthentication.o \
vmapiDirectoryManagerLocalTagDefineDm.o \
vmapiDirectoryManagerLocalTagDeleteDm.o \
vmapiDirectoryManagerLocalTagQueryDm.o \
vmapiDirectoryManagerLocalTagSetDm.o \
vmapiDirectoryManagerSearchDm.o \
vmapiDirectoryManagerTaskCancelDm.o \
vmapiImageActivate.o \
vmapiImageActiveConfigurationQuery.o \
vmapiImageCpuDefine.o \
vmapiImageCpuDefineDm.o \
vmapiImageCpuDelete.o \
vmapiImageCpuDeleteDm.o \
vmapiImageCpuQuery.o \
vmapiImageCpuQueryDm.o \
vmapiImageCpuSetMaximumDm.o \
vmapiImageCreateDm.o \
vmapiImageDeactivate.o \
vmapiImageDeleteDm.o \
vmapiImageDeviceDedicate.o \
vmapiImageDeviceDedicateDm.o \
vmapiImageDeviceReset.o \
vmapiImageDeviceUndedicate.o \
vmapiImageDeviceUndedicateDm.o \
vmapiImageDiskCopy.o \
vmapiImageDiskCopyDm.o \
vmapiImageDiskCreate.o \
vmapiImageDiskCreateDm.o \
vmapiImageDiskDelete.o \
vmapiImageDiskDeleteDm.o \
vmapiImageDiskShare.o \
vmapiImageDiskShareDm.o \
vmapiImageDiskUnshare.o \
vmapiImageDiskUnshareDm.o \
vmapiImageIplDeleteDm.o \
vmapiImageIplDeviceQuery.o \
vmapiImageIplQueryDm.o \
vmapiImageIplSetDm.o \
vmapiImageLockDm.o \
vmapiImageNameQueryDm.o \
vmapiImagePasswordSetDm.o \
vmapiImageQueryActivateTime.o \
vmapiImageQueryDm.o \
vmapiImageRecycle.o \
vmapiImageReplaceDm.o \
vmapiImageScsiCharacteristicsDefineDm.o \
vmapiImageScsiCharacteristicsQueryDm.o \
vmapiImageStatusQuery.o \
vmapiImageUnlockDm.o \
vmapiImageVolumeAdd.o \
vmapiImageVolumeDelete.o \
vmapiImageVolumeSpaceDefineDm.o \
vmapiImageVolumeSpaceQueryDm.o \
vmapiImageVolumeSpaceRemoveDm.o \
vmapiNameListAdd.o \
vmapiNameListDestroy.o \
vmapiNameListQuery.o \
vmapiNameListRemove.o \
vmapiProfileCreateDm.o \
vmapiProfileDeleteDm.o \
vmapiProfileQueryDm.o \
vmapiProfileReplaceDm.o \
vmapiPrototypeCreateDm.o \
vmapiPrototypeDeleteDm.o \
vmapiPrototypeNameQueryDm.o \
vmapiPrototypeQueryDm.o \
vmapiPrototypeReplaceDm.o \
vmapiQueryApiFunctionalLevel.o \
vmapiQueryAsynchronousOperationDm.o \
vmapiQueryDirectoryManagerLevelDm.o \
vmapiSharedMemoryAccessAddDm.o \
vmapiSharedMemoryAccessQueryDm.o \
vmapiSharedMemoryAccessRemoveDm.o \
vmapiSharedMemoryCreate.o \
vmapiSharedMemoryDelete.o \
vmapiSharedMemoryQuery.o \
vmapiSharedMemoryReplace.o \
vmapiStaticImageChangesActivateDm.o \
vmapiStaticImageChangesDeactivateDm.o \
vmapiStaticImageChangesImmediateDm.o \
vmapiSystemInfoQuery.o \
vmapiSystemIoQuery.o \
vmapiVirtualChannelConnectionCreate.o \
vmapiVirtualChannelConnectionCreateDm.o \
vmapiVirtualChannelConnectionDelete.o \
vmapiVirtualChannelConnectionDeleteDm.o \
vmapiVirtualNetworkAdapterConnectLan.o \
vmapiVirtualNetworkAdapterConnectLanDm.o \
vmapiVirtualNetworkAdapterConnectVswitch.o \
vmapiVirtualNetworkAdapterConnectVswitchDm.o \
vmapiVirtualNetworkAdapterCreate.o \
vmapiVirtualNetworkAdapterCreateDm.o \
vmapiVirtualNetworkAdapterDelete.o \
vmapiVirtualNetworkAdapterDeleteDm.o \
vmapiVirtualNetworkAdapterDisconnect.o \
vmapiVirtualNetworkAdapterDisconnectDm.o \
vmapiVirtualNetworkAdapterQuery.o \
vmapiVirtualNetworkLanAccess.o \
vmapiVirtualNetworkLanAccessQuery.o \
vmapiVirtualNetworkLanCreate.o \
vmapiVirtualNetworkLanDelete.o \
vmapiVirtualNetworkLanQuery.o \
vmapiVirtualNetworkQueryOsa.o \
vmapiVirtualNetworkVswitchCreate.o \
vmapiVirtualNetworkVswitchDelete.o \
vmapiVirtualNetworkVswitchQuery.o \
vmapiVirtualNetworkVswitchSet.o \
vmapiVmrmConfigurationQuery.o \
vmapiVmrmConfigurationUpdate.o \
vmapiVmrmMeasurementQuery.o
.PHONY: all install post clean
#-----------------------------------------------------------------------
# All
#-----------------------------------------------------------------------
all: $(VMAPILIB) \
wrapperutils.o \
add3390 \
add3390active \
add9336 \
addvdisk \
addprocessor \
addnic \
connectnic2guestlan \
connectnic2vswitch \
createvs \
deleteipl \
deletevs \
dedicatedevice \
disconnectnic \
getuserentrynames \
getuserentry \
getipl \
getuserprofile \
getdiskpool \
getdiskpoolnames \
queryvolumes \
removemdisk \
removenic \
removeprocessor \
replacevs \
setipl \
setpassword \
startvs \
stopvs \
undedicatedevice
#-----------------------------------------------------------------------
# Resource access .o files
#-----------------------------------------------------------------------
smSocket.o : $(RA_SRC_DIR)smSocket.c $(RA_INCLUDE_DIR)smSocket.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)smSocket.c
smMemoryGroup.o : $(RA_SRC_DIR)smMemoryGroup.c $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)smMemoryGroup.c
smapiUtilities.o : $(RA_SRC_DIR)smapiUtilities.c $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)smapiUtilities.c
smapiTableParser.o : $(RA_SRC_DIR)smapiTableParser.c $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)smapiTableParser.c
vmapiAsynchronousNotificationDisableDm.o : $(RA_SRC_DIR)vmapiAsynchronousNotificationDisableDm.c $(RA_INCLUDE_DIR)vmapiAsynchronous.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiAsynchronousNotificationDisableDm.c
vmapiAsynchronousNotificationEnableDm.o : $(RA_SRC_DIR)vmapiAsynchronousNotificationEnableDm.c $(RA_INCLUDE_DIR)vmapiAsynchronous.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiAsynchronousNotificationEnableDm.c
vmapiAsynchronousNotificationQueryDm.o : $(RA_SRC_DIR)vmapiAsynchronousNotificationQueryDm.c $(RA_INCLUDE_DIR)vmapiAsynchronous.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiAsynchronousNotificationQueryDm.c
vmapiAuthorizationListAdd.o : $(RA_SRC_DIR)vmapiAuthorizationListAdd.c $(RA_INCLUDE_DIR)vmapiAuthorization.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiAuthorizationListAdd.c
vmapiAuthorizationListQuery.o : $(RA_SRC_DIR)vmapiAuthorizationListQuery.c $(RA_INCLUDE_DIR)vmapiAuthorization.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiAuthorizationListQuery.c
vmapiAuthorizationListRemove.o : $(RA_SRC_DIR)vmapiAuthorizationListRemove.c $(RA_INCLUDE_DIR)vmapiAuthorization.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiAuthorizationListRemove.c
vmapiCheckAuthentication.o : $(RA_SRC_DIR)vmapiCheckAuthentication.c $(RA_INCLUDE_DIR)vmapiCheckAuthentication.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiCheckAuthentication.c
vmapiDirectoryManagerLocalTagDefineDm.o : $(RA_SRC_DIR)vmapiDirectoryManagerLocalTagDefineDm.c $(RA_INCLUDE_DIR)vmapiDirectoryManager.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiDirectoryManagerLocalTagDefineDm.c
vmapiDirectoryManagerLocalTagDeleteDm.o : $(RA_SRC_DIR)vmapiDirectoryManagerLocalTagDeleteDm.c $(RA_INCLUDE_DIR)vmapiDirectoryManager.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiDirectoryManagerLocalTagDeleteDm.c
vmapiDirectoryManagerLocalTagQueryDm.o : $(RA_SRC_DIR)vmapiDirectoryManagerLocalTagQueryDm.c $(RA_INCLUDE_DIR)vmapiDirectoryManager.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiDirectoryManagerLocalTagQueryDm.c
vmapiDirectoryManagerLocalTagSetDm.o : $(RA_SRC_DIR)vmapiDirectoryManagerLocalTagSetDm.c $(RA_INCLUDE_DIR)vmapiDirectoryManager.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiDirectoryManagerLocalTagSetDm.c
vmapiDirectoryManagerSearchDm.o : $(RA_SRC_DIR)vmapiDirectoryManagerSearchDm.c $(RA_INCLUDE_DIR)vmapiDirectoryManager.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiDirectoryManagerSearchDm.c
vmapiDirectoryManagerTaskCancelDm.o : $(RA_SRC_DIR)vmapiDirectoryManagerTaskCancelDm.c $(RA_INCLUDE_DIR)vmapiDirectoryManager.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiDirectoryManagerTaskCancelDm.c
vmapiImageActivate.o : $(RA_SRC_DIR)vmapiImageActivate.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageActivate.c
vmapiImageActiveConfigurationQuery.o : $(RA_SRC_DIR)vmapiImageActiveConfigurationQuery.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageActiveConfigurationQuery.c
vmapiImageCpuDefine.o : $(RA_SRC_DIR)vmapiImageCpuDefine.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageCpuDefine.c
vmapiImageCpuDefineDm.o : $(RA_SRC_DIR)vmapiImageCpuDefineDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageCpuDefineDm.c
vmapiImageCpuDelete.o : $(RA_SRC_DIR)vmapiImageCpuDelete.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageCpuDelete.c
vmapiImageCpuDeleteDm.o : $(RA_SRC_DIR)vmapiImageCpuDeleteDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageCpuDeleteDm.c
vmapiImageCpuQuery.o : $(RA_SRC_DIR)vmapiImageCpuQuery.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageCpuQuery.c
vmapiImageCpuQueryDm.o : $(RA_SRC_DIR)vmapiImageCpuQueryDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageCpuQueryDm.c
vmapiImageCpuSetMaximumDm.o : $(RA_SRC_DIR)vmapiImageCpuSetMaximumDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageCpuSetMaximumDm.c
vmapiImageCreateDm.o : $(RA_SRC_DIR)vmapiImageCreateDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageCreateDm.c
vmapiImageDeactivate.o : $(RA_SRC_DIR)vmapiImageDeactivate.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDeactivate.c
vmapiImageDeleteDm.o : $(RA_SRC_DIR)vmapiImageDeleteDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDeleteDm.c
vmapiImageDeviceDedicate.o : $(RA_SRC_DIR)vmapiImageDeviceDedicate.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDeviceDedicate.c
vmapiImageDeviceDedicateDm.o : $(RA_SRC_DIR)vmapiImageDeviceDedicateDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDeviceDedicateDm.c
vmapiImageDeviceReset.o : $(RA_SRC_DIR)vmapiImageDeviceReset.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDeviceReset.c
vmapiImageDeviceUndedicate.o : $(RA_SRC_DIR)vmapiImageDeviceUndedicate.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDeviceUndedicate.c
vmapiImageDeviceUndedicateDm.o : $(RA_SRC_DIR)vmapiImageDeviceUndedicateDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDeviceUndedicateDm.c
vmapiImageDiskCopy.o : $(RA_SRC_DIR)vmapiImageDiskCopy.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskCopy.c
vmapiImageDiskCopyDm.o : $(RA_SRC_DIR)vmapiImageDiskCopyDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskCopyDm.c
vmapiImageDiskCreate.o : $(RA_SRC_DIR)vmapiImageDiskCreate.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskCreate.c
vmapiImageDiskCreateDm.o : $(RA_SRC_DIR)vmapiImageDiskCreateDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskCreateDm.c
vmapiImageDiskDelete.o : $(RA_SRC_DIR)vmapiImageDiskDelete.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskDelete.c
vmapiImageDiskDeleteDm.o : $(RA_SRC_DIR)vmapiImageDiskDeleteDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskDeleteDm.c
vmapiImageDiskShare.o : $(RA_SRC_DIR)vmapiImageDiskShare.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskShare.c
vmapiImageDiskShareDm.o : $(RA_SRC_DIR)vmapiImageDiskShareDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskShareDm.c
vmapiImageDiskUnshare.o : $(RA_SRC_DIR)vmapiImageDiskUnshare.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskUnshare.c
vmapiImageDiskUnshareDm.o : $(RA_SRC_DIR)vmapiImageDiskUnshareDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageDiskUnshareDm.c
vmapiImageIplDeleteDm.o : $(RA_SRC_DIR)vmapiImageIplDeleteDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageIplDeleteDm.c
vmapiImageIplDeviceQuery.o : $(RA_SRC_DIR)vmapiImageIplDeviceQuery.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageIplDeviceQuery.c
vmapiImageIplQueryDm.o : $(RA_SRC_DIR)vmapiImageIplQueryDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageIplQueryDm.c
vmapiImageIplSetDm.o : $(RA_SRC_DIR)vmapiImageIplSetDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageIplSetDm.c
vmapiImageLockDm.o : $(RA_SRC_DIR)vmapiImageLockDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageLockDm.c
vmapiImageNameQueryDm.o : $(RA_SRC_DIR)vmapiImageNameQueryDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageNameQueryDm.c
vmapiImagePasswordSetDm.o : $(RA_SRC_DIR)vmapiImagePasswordSetDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImagePasswordSetDm.c
vmapiImageQueryActivateTime.o : $(RA_SRC_DIR)vmapiImageQueryActivateTime.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageQueryActivateTime.c
vmapiImageQueryDm.o : $(RA_SRC_DIR)vmapiImageQueryDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageQueryDm.c
vmapiImageRecycle.o : $(RA_SRC_DIR)vmapiImageRecycle.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageRecycle.c
vmapiImageReplaceDm.o : $(RA_SRC_DIR)vmapiImageReplaceDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageReplaceDm.c
vmapiImageScsiCharacteristicsDefineDm.o : $(RA_SRC_DIR)vmapiImageScsiCharacteristicsDefineDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageScsiCharacteristicsDefineDm.c
vmapiImageScsiCharacteristicsQueryDm.o : $(RA_SRC_DIR)vmapiImageScsiCharacteristicsQueryDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageScsiCharacteristicsQueryDm.c
vmapiImageStatusQuery.o : $(RA_SRC_DIR)vmapiImageStatusQuery.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageStatusQuery.c
vmapiImageUnlockDm.o : $(RA_SRC_DIR)vmapiImageUnlockDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageUnlockDm.c
vmapiImageVolumeAdd.o : $(RA_SRC_DIR)vmapiImageVolumeAdd.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageVolumeAdd.c
vmapiImageVolumeDelete.o : $(RA_SRC_DIR)vmapiImageVolumeDelete.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageVolumeDelete.c
vmapiImageVolumeSpaceDefineDm.o : $(RA_SRC_DIR)vmapiImageVolumeSpaceDefineDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageVolumeSpaceDefineDm.c
vmapiImageVolumeSpaceQueryDm.o : $(RA_SRC_DIR)vmapiImageVolumeSpaceQueryDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageVolumeSpaceQueryDm.c
vmapiImageVolumeSpaceRemoveDm.o : $(RA_SRC_DIR)vmapiImageVolumeSpaceRemoveDm.c $(RA_INCLUDE_DIR)vmapiImage.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiImageVolumeSpaceRemoveDm.c
vmapiNameListAdd.o : $(RA_SRC_DIR)vmapiNameListAdd.c $(RA_INCLUDE_DIR)vmapiName.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiNameListAdd.c
vmapiNameListDestroy.o : $(RA_SRC_DIR)vmapiNameListDestroy.c $(RA_INCLUDE_DIR)vmapiName.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiNameListDestroy.c
vmapiNameListQuery.o : $(RA_SRC_DIR)vmapiNameListQuery.c $(RA_INCLUDE_DIR)vmapiName.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiNameListQuery.c
vmapiNameListRemove.o : $(RA_SRC_DIR)vmapiNameListRemove.c $(RA_INCLUDE_DIR)vmapiName.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiNameListRemove.c
vmapiProfileCreateDm.o : $(RA_SRC_DIR)vmapiProfileCreateDm.c $(RA_INCLUDE_DIR)vmapiProfile.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiProfileCreateDm.c
vmapiProfileDeleteDm.o : $(RA_SRC_DIR)vmapiProfileDeleteDm.c $(RA_INCLUDE_DIR)vmapiProfile.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiProfileDeleteDm.c
vmapiProfileQueryDm.o : $(RA_SRC_DIR)vmapiProfileQueryDm.c $(RA_INCLUDE_DIR)vmapiProfile.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiProfileQueryDm.c
vmapiProfileReplaceDm.o : $(RA_SRC_DIR)vmapiProfileReplaceDm.c $(RA_INCLUDE_DIR)vmapiProfile.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiProfileReplaceDm.c
vmapiPrototypeCreateDm.o : $(RA_SRC_DIR)vmapiPrototypeCreateDm.c $(RA_INCLUDE_DIR)vmapiPrototype.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiPrototypeCreateDm.c
vmapiPrototypeDeleteDm.o : $(RA_SRC_DIR)vmapiPrototypeDeleteDm.c $(RA_INCLUDE_DIR)vmapiPrototype.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiPrototypeDeleteDm.c
vmapiPrototypeNameQueryDm.o : $(RA_SRC_DIR)vmapiPrototypeNameQueryDm.c $(RA_INCLUDE_DIR)vmapiPrototype.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiPrototypeNameQueryDm.c
vmapiPrototypeQueryDm.o : $(RA_SRC_DIR)vmapiPrototypeQueryDm.c $(RA_INCLUDE_DIR)vmapiPrototype.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiPrototypeQueryDm.c
vmapiPrototypeReplaceDm.o : $(RA_SRC_DIR)vmapiPrototypeReplaceDm.c $(RA_INCLUDE_DIR)vmapiPrototype.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiPrototypeReplaceDm.c
vmapiQueryApiFunctionalLevel.o : $(RA_SRC_DIR)vmapiQueryApiFunctionalLevel.c $(RA_INCLUDE_DIR)vmapiQuery.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiQueryApiFunctionalLevel.c
vmapiQueryAsynchronousOperationDm.o : $(RA_SRC_DIR)vmapiQueryAsynchronousOperationDm.c $(RA_INCLUDE_DIR)vmapiQuery.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiQueryAsynchronousOperationDm.c
vmapiQueryDirectoryManagerLevelDm.o : $(RA_SRC_DIR)vmapiQueryDirectoryManagerLevelDm.c $(RA_INCLUDE_DIR)vmapiQuery.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiQueryDirectoryManagerLevelDm.c
vmapiSharedMemoryAccessAddDm.o : $(RA_SRC_DIR)vmapiSharedMemoryAccessAddDm.c $(RA_INCLUDE_DIR)vmapiShared.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSharedMemoryAccessAddDm.c
vmapiSharedMemoryAccessQueryDm.o : $(RA_SRC_DIR)vmapiSharedMemoryAccessQueryDm.c $(RA_INCLUDE_DIR)vmapiShared.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSharedMemoryAccessQueryDm.c
vmapiSharedMemoryAccessRemoveDm.o : $(RA_SRC_DIR)vmapiSharedMemoryAccessRemoveDm.c $(RA_INCLUDE_DIR)vmapiShared.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSharedMemoryAccessRemoveDm.c
vmapiSharedMemoryCreate.o : $(RA_SRC_DIR)vmapiSharedMemoryCreate.c $(RA_INCLUDE_DIR)vmapiShared.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSharedMemoryCreate.c
vmapiSharedMemoryDelete.o : $(RA_SRC_DIR)vmapiSharedMemoryDelete.c $(RA_INCLUDE_DIR)vmapiShared.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSharedMemoryDelete.c
vmapiSharedMemoryQuery.o : $(RA_SRC_DIR)vmapiSharedMemoryQuery.c $(RA_INCLUDE_DIR)vmapiShared.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSharedMemoryQuery.c
vmapiSharedMemoryReplace.o : $(RA_SRC_DIR)vmapiSharedMemoryReplace.c $(RA_INCLUDE_DIR)vmapiShared.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSharedMemoryReplace.c
vmapiStaticImageChangesActivateDm.o : $(RA_SRC_DIR)vmapiStaticImageChangesActivateDm.c $(RA_INCLUDE_DIR)vmapiStatic.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiStaticImageChangesActivateDm.c
vmapiStaticImageChangesDeactivateDm.o : $(RA_SRC_DIR)vmapiStaticImageChangesDeactivateDm.c $(RA_INCLUDE_DIR)vmapiStatic.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiStaticImageChangesDeactivateDm.c
vmapiStaticImageChangesImmediateDm.o : $(RA_SRC_DIR)vmapiStaticImageChangesImmediateDm.c $(RA_INCLUDE_DIR)vmapiStatic.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiStaticImageChangesImmediateDm.c
vmapiSystemInfoQuery.o : $(RA_SRC_DIR)vmapiSystemInfoQuery.c $(RA_INCLUDE_DIR)vmapiSystem.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSystemInfoQuery.c
vmapiSystemIoQuery.o : $(RA_SRC_DIR)vmapiSystemIoQuery.c $(RA_INCLUDE_DIR)vmapiSystem.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiSystemIoQuery.c
vmapiVirtualChannelConnectionCreate.o : $(RA_SRC_DIR)vmapiVirtualChannelConnectionCreate.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualChannelConnectionCreate.c
vmapiVirtualChannelConnectionCreateDm.o : $(RA_SRC_DIR)vmapiVirtualChannelConnectionCreateDm.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualChannelConnectionCreateDm.c
vmapiVirtualChannelConnectionDelete.o : $(RA_SRC_DIR)vmapiVirtualChannelConnectionDelete.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualChannelConnectionDelete.c
vmapiVirtualChannelConnectionDeleteDm.o : $(RA_SRC_DIR)vmapiVirtualChannelConnectionDeleteDm.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualChannelConnectionDeleteDm.c
vmapiVirtualNetworkAdapterConnectLan.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterConnectLan.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterConnectLan.c
vmapiVirtualNetworkAdapterConnectLanDm.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterConnectLanDm.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterConnectLanDm.c
vmapiVirtualNetworkAdapterConnectVswitch.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterConnectVswitch.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterConnectVswitch.c
vmapiVirtualNetworkAdapterConnectVswitchDm.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterConnectVswitchDm.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterConnectVswitchDm.c
vmapiVirtualNetworkAdapterCreate.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterCreate.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterCreate.c
vmapiVirtualNetworkAdapterCreateDm.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterCreateDm.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterCreateDm.c
vmapiVirtualNetworkAdapterDelete.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterDelete.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterDelete.c
vmapiVirtualNetworkAdapterDeleteDm.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterDeleteDm.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterDeleteDm.c
vmapiVirtualNetworkAdapterDisconnect.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterDisconnect.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterDisconnect.c
vmapiVirtualNetworkAdapterDisconnectDm.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterDisconnectDm.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterDisconnectDm.c
vmapiVirtualNetworkAdapterQuery.o : $(RA_SRC_DIR)vmapiVirtualNetworkAdapterQuery.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkAdapterQuery.c
vmapiVirtualNetworkLanAccess.o : $(RA_SRC_DIR)vmapiVirtualNetworkLanAccess.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkLanAccess.c
vmapiVirtualNetworkLanAccessQuery.o : $(RA_SRC_DIR)vmapiVirtualNetworkLanAccessQuery.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkLanAccessQuery.c
vmapiVirtualNetworkLanCreate.o : $(RA_SRC_DIR)vmapiVirtualNetworkLanCreate.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkLanCreate.c
vmapiVirtualNetworkLanDelete.o : $(RA_SRC_DIR)vmapiVirtualNetworkLanDelete.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkLanDelete.c
vmapiVirtualNetworkLanQuery.o : $(RA_SRC_DIR)vmapiVirtualNetworkLanQuery.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkLanQuery.c
vmapiVirtualNetworkQueryOsa.o : $(RA_SRC_DIR)vmapiVirtualNetworkQueryOsa.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkQueryOsa.c
vmapiVirtualNetworkVswitchCreate.o : $(RA_SRC_DIR)vmapiVirtualNetworkVswitchCreate.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkVswitchCreate.c
vmapiVirtualNetworkVswitchDelete.o : $(RA_SRC_DIR)vmapiVirtualNetworkVswitchDelete.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkVswitchDelete.c
vmapiVirtualNetworkVswitchQuery.o : $(RA_SRC_DIR)vmapiVirtualNetworkVswitchQuery.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkVswitchQuery.c
vmapiVirtualNetworkVswitchSet.o : $(RA_SRC_DIR)vmapiVirtualNetworkVswitchSet.c $(RA_INCLUDE_DIR)vmapiVirtual.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVirtualNetworkVswitchSet.c
vmapiVmrmConfigurationQuery.o : $(RA_SRC_DIR)vmapiVmrmConfigurationQuery.c $(RA_INCLUDE_DIR)vmapiVMRM.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVmrmConfigurationQuery.c
vmapiVmrmConfigurationUpdate.o : $(RA_SRC_DIR)vmapiVmrmConfigurationUpdate.c $(RA_INCLUDE_DIR)vmapiVMRM.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVmrmConfigurationUpdate.c
vmapiVmrmMeasurementQuery.o : $(RA_SRC_DIR)vmapiVmrmMeasurementQuery.c $(RA_INCLUDE_DIR)vmapiVMRM.h $(COMMON_HEADERS)
gcc -c $(CFLAGS) $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)vmapiVmrmMeasurementQuery.c
#-----------------------------------------------------------------------
# Resource access libraries
#-----------------------------------------------------------------------
$(VMAPILIB) : $(OBJECTS)
gcc -Wl,-d -shared -pthread -ldl -o $(VMAPILIB) $(OBJECTS)
#-----------------------------------------------------------------------
# Resource access executables
#-----------------------------------------------------------------------
wrapperutils.o : $(RA_SRC_DIR)wrapperutils.c $(RA_INCLUDE_DIR)smPublic.h $(RA_INCLUDE_DIR)vmapiImage.h
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)wrapperutils.c
add3390 : add3390.o $(VMAPILIB)
gcc -o add3390 -L./ -lvmapi wrapperutils.o add3390.o
add3390.o : $(RA_SRC_DIR)add3390.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)add3390.c
add3390active : add3390active.o $(VMAPILIB)
gcc -o add3390active -L./ -lvmapi wrapperutils.o add3390active.o
add3390active.o : $(RA_SRC_DIR)add3390active.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)add3390active.c
add9336 : add9336.o $(VMAPILIB)
gcc -o add9336 -L./ -lvmapi wrapperutils.o add9336.o
add9336.o : $(RA_SRC_DIR)add9336.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)add9336.c
addvdisk : addvdisk.o $(VMAPILIB)
gcc -o addvdisk -L./ -lvmapi wrapperutils.o addvdisk.o
addvdisk.o : $(RA_SRC_DIR)addvdisk.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)addvdisk.c
addprocessor : addprocessor.o $(VMAPILIB)
gcc -o addprocessor -L./ -lvmapi wrapperutils.o addprocessor.o
addprocessor.o : $(RA_SRC_DIR)addprocessor.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)addprocessor.c
addnic : addnic.o $(VMAPILIB)
gcc -o addnic -L./ -lvmapi wrapperutils.o addnic.o
addnic.o : $(RA_SRC_DIR)addnic.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)addnic.c
connectnic2guestlan : connectnic2guestlan.o $(VMAPILIB)
gcc -o connectnic2guestlan -L./ -lvmapi wrapperutils.o connectnic2guestlan.o
connectnic2guestlan.o : $(RA_SRC_DIR)connectnic2guestlan.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)connectnic2guestlan.c
connectnic2vswitch : connectnic2vswitch.o $(VMAPILIB)
gcc -o connectnic2vswitch -L./ -lvmapi wrapperutils.o connectnic2vswitch.o
connectnic2vswitch.o : $(RA_SRC_DIR)connectnic2vswitch.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)connectnic2vswitch.c
createvs : createvs.o $(VMAPILIB)
gcc -o createvs -L./ -lvmapi wrapperutils.o createvs.o
createvs.o : $(RA_SRC_DIR)createvs.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)createvs.c
deletevs : deletevs.o $(VMAPILIB)
gcc -o deletevs -L./ -lvmapi wrapperutils.o deletevs.o
deletevs.o : $(RA_SRC_DIR)deletevs.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)deletevs.c
dedicatedevice : dedicatedevice.o $(VMAPILIB)
gcc -o dedicatedevice -L./ -lvmapi wrapperutils.o dedicatedevice.o
dedicatedevice.o : $(RA_SRC_DIR)dedicatedevice.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)dedicatedevice.c
deleteipl : deleteipl.o $(VMAPILIB)
gcc -o deleteipl -L./ -lvmapi wrapperutils.o deleteipl.o
deleteipl.o : $(RA_SRC_DIR)deleteipl.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)deleteipl.c
disconnectnic : disconnectnic.o $(VMAPILIB)
gcc -o disconnectnic -L./ -lvmapi wrapperutils.o disconnectnic.o
disconnectnic.o : $(RA_SRC_DIR)disconnectnic.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)disconnectnic.c
getuserentrynames : getuserentrynames.o $(VMAPILIB)
gcc -o getuserentrynames -L./ -lvmapi wrapperutils.o getuserentrynames.o
getuserentrynames.o : $(RA_SRC_DIR)getuserentrynames.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)getuserentrynames.c
getuserentry : getuserentry.o $(VMAPILIB)
gcc -o getuserentry -L./ -lvmapi wrapperutils.o getuserentry.o
getuserentry.o : $(RA_SRC_DIR)getuserentry.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)getuserentry.c
getipl : getipl.o $(VMAPILIB)
gcc -o getipl -L./ -lvmapi wrapperutils.o getipl.o
getipl.o : $(RA_SRC_DIR)getipl.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)getipl.c
getuserprofile : getuserprofile.o $(VMAPILIB)
gcc -o getuserprofile -L./ -lvmapi wrapperutils.o getuserprofile.o
getuserprofile.o : $(RA_SRC_DIR)getuserprofile.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)getuserprofile.c
getdiskpool : getdiskpool.o $(VMAPILIB)
gcc -o getdiskpool -L./ -lvmapi wrapperutils.o getdiskpool.o
getdiskpool.o : $(RA_SRC_DIR)getdiskpool.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)getdiskpool.c
getdiskpoolnames : getdiskpoolnames.o $(VMAPILIB)
gcc -o getdiskpoolnames -L./ -lvmapi wrapperutils.o getdiskpoolnames.o
getdiskpoolnames.o : $(RA_SRC_DIR)getdiskpoolnames.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)getdiskpoolnames.c
queryvolumes : queryvolumes.o $(VMAPILIB)
gcc -o queryvolumes -L./ -lvmapi wrapperutils.o queryvolumes.o
queryvolumes.o : $(RA_SRC_DIR)queryvolumes.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)queryvolumes.c
removemdisk : removemdisk.o $(VMAPILIB)
gcc -o removemdisk -L./ -lvmapi wrapperutils.o removemdisk.o
removemdisk.o : $(RA_SRC_DIR)removemdisk.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)removemdisk.c
removenic : removenic.o $(VMAPILIB)
gcc -o removenic -L./ -lvmapi wrapperutils.o removenic.o
removenic.o : $(RA_SRC_DIR)removenic.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)removenic.c
removeprocessor : removeprocessor.o $(VMAPILIB)
gcc -o removeprocessor -L./ -lvmapi wrapperutils.o removeprocessor.o
removeprocessor.o : $(RA_SRC_DIR)removeprocessor.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)removeprocessor.c
replacevs : replacevs.o $(VMAPILIB)
gcc -o replacevs -L./ -lvmapi wrapperutils.o replacevs.o
replacevs.o : $(RA_SRC_DIR)replacevs.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)replacevs.c
setipl : setipl.o $(VMAPILIB)
gcc -o setipl -L./ -lvmapi wrapperutils.o setipl.o
setipl.o : $(RA_SRC_DIR)setipl.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)setipl.c
setpassword : setpassword.o $(VMAPILIB)
gcc -o setpassword -L./ -lvmapi wrapperutils.o setpassword.o
setpassword.o : $(RA_SRC_DIR)setpassword.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)setpassword.c
startvs : startvs.o $(VMAPILIB)
gcc -o startvs -L./ -lvmapi wrapperutils.o startvs.o
startvs.o : $(RA_SRC_DIR)startvs.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)startvs.c
stopvs : stopvs.o $(VMAPILIB)
gcc -o stopvs -L./ -lvmapi wrapperutils.o stopvs.o
stopvs.o : $(RA_SRC_DIR)stopvs.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)stopvs.c
undedicatedevice : undedicatedevice.o $(VMAPILIB)
gcc -o undedicatedevice -L./ -lvmapi wrapperutils.o undedicatedevice.o
undedicatedevice.o : $(RA_SRC_DIR)undedicatedevice.c
gcc -c $(DEBUG) -I$(RA_INCLUDE_DIR) $(RA_SRC_DIR)undedicatedevice.c
#-----------------------------------------------------------------------
# Install
#-----------------------------------------------------------------------
install:
mkdir -p $(LIB_DIR)
install $(VMAPILIB) $(LIB_DIR)
mkdir -p $(BIN_DIR)
install stopvs $(BIN_DIR)
install add3390 $(BIN_DIR)
install add3390active $(BIN_DIR)
install add9336 $(BIN_DIR)
install addvdisk $(BIN_DIR)
install addprocessor $(BIN_DIR)
install addnic $(BIN_DIR)
install connectnic2guestlan $(BIN_DIR)
install connectnic2vswitch $(BIN_DIR)
install createvs $(BIN_DIR)
install deletevs $(BIN_DIR)
install dedicatedevice $(BIN_DIR)
install deleteipl $(BIN_DIR)
install disconnectnic $(BIN_DIR)
install getuserentrynames $(BIN_DIR)
install getuserentry $(BIN_DIR)
install getipl $(BIN_DIR)
install getuserprofile $(BIN_DIR)
install getdiskpool $(BIN_DIR)
install getdiskpoolnames $(BIN_DIR)
install queryvolumes $(BIN_DIR)
install removemdisk $(BIN_DIR)
install removenic $(BIN_DIR)
install removeprocessor $(BIN_DIR)
install replacevs $(BIN_DIR)
install setipl $(BIN_DIR)
install setpassword $(BIN_DIR)
install startvs $(BIN_DIR)
install stopvs $(BIN_DIR)
install undedicatedevice $(BIN_DIR)
mkdir -p $(LD_DIR)
install -m 644 config/zhcp.conf $(LD_DIR)
#-----------------------------------------------------------------------
# Post
#-----------------------------------------------------------------------
post:
ldconfig
#-----------------------------------------------------------------------
# Clean
#-----------------------------------------------------------------------
clean:
rm -f *.o *.so $(VMAPILIB)
rm add3390
rm add3390active
rm add9336
rm addvdisk
rm addprocessor
rm addnic
rm connectnic2guestlan
rm connectnic2vswitch
rm createvs
rm deleteipl
rm deletevs
rm dedicatedevice
rm disconnectnic
rm getuserentrynames
rm getuserentry
rm getipl
rm getuserprofile
rm getdiskpool
rm getdiskpoolnames
rm queryvolumes
rm removemdisk
rm removenic
rm removeprocessor
rm replacevs
rm setipl
rm setpassword
rm startvs
rm stopvs
rm undedicatedevice
-1
View File
@@ -1 +0,0 @@
/opt/zhcp/lib
@@ -1,381 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _SM_PUBLIC_H
#define _SM_PUBLIC_H
#include <netinet/in.h>
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#define BUFLEN 256
#define MAXCACHENAMELEN 8+1+8
#define CACHEENTRYLEN BUFLEN+MAXCACHENAMELEN
#define PATHLENGTH 512
#define LENGTH_OF_USERID_LENGTH_FIELD 4
#define ALL_SCAN_FILES "*.scan"
#define PORT_FILENAME "vmbkend.UDP"
// Data structure to character based information
typedef struct _Record {
struct _Record* nextP;
char data[1];
} Record;
// Data structure to keep lists of records
typedef struct _List {
Record* firstP;
Record* currentP;
int size;
} List;
enum Times {
ConnectRetryLimit = 10, // # trials for connect
SEND_RETRY_LIMIT = 8, // # times to retry send to SMAPI
Delay = 10, // Delay in loop checking for pending workunits
MaxWaitCycleN = 10, // Max number of wait cycles for pending ops
SleepInterval = 15, // Interval in seconds to sleep on repetitive operations
Socket_Timeout = 240, // Max timeout for socket operations
Socket_Indication_Timeout = 500, // Max timeout for indication socket operations
ImageSetRange = 4096, // # image disks in an image set
LINESIZE = 512
// # bytes to use for a message/log line
};
// Resource layer specific function call return codes for internal/unexpected errors
// Look in the internal context for other specific return and reason codes
// listed below
//
// NOTE Parser return codes are using -4000 to -4010 see smapiTableParser.h for details.
#define MEMORY_ERROR -999
#define INVALID_DATA -2
#define PROCESSING_ERROR -3
// These are from smSocket.c functions
#define SOCKET_OBTAIN_ERROR -100
#define SOCKET_CONNECT_REFUSED_ERROR -101
#define SOCKET_CONNECT_TRYAGAIN_ERROR -102
#define SOCKET_TIMEOUT_ERROR -103
#define SOCKET_READ_ERROR -104
#define SOCKET_READ_RETRYABLE_ERROR -105
#define SOCKET_WRITE_ERROR -106
#define SOCKET_WRITE_RETRYABLE_ERROR -107
#define SOCKET_PROCESSING_ERROR -108
#define CUSTOM_DEFINED_SOCKET_RETRY 100
// Return and reason codes
enum ReturnCodes {
RcWarning = 4, RcContext = -1, // Context related errors
RcSession = -2, // Session related errors
RcFunction = -3, // Errors invoking functions
RcRuntime = -4, // General runtime errors
RcIucv = -5, // Error caused by IUCV, reason code is IUCV return value
RcCp = -6, // CP command invocation errors
RcCpint = -7, // CPint invocation
RcNoMemory = -8
// Out of memory and no context yet
};
enum GeneralReasonCodes {
RsInternalBufferTooSmall = 10000, RsNoMemory = 10001,
RsSemaphoreNotCreated = 10011, RsSemaphoreNotObtained = 10012,
RsSemaphoreNotReleased = 10013, RsSocketAddrIdFileNotOpened = 10014,
RsUnableToOpenLog = 10100, RsSocketTimeout = 10110, RsUnexpected = 10200
};
enum ContextReasonCodes {
RsNoHostname = 1, RsNoHostId = 2, RsNoServerAssociation = 3,
RsNoUserid = 4, RsInvalidVmapiServerVersion = 5, RsInvalidServerName = 6
};
enum SessionReasonCodes {
RsUnableToReadSessionContext = 1, RsUnableToWriteSessionContext = 2
};
enum FunctionReasonCodes {
RsFunctionNotSpecified = 1, RsFunctionUnknown = 2,
RsFunctionNotImplemented = 3, RsInvalidNumberOfArguments = 4,
RsFunctionNotSupported = 5, RsInvalidArgument = 24
};
enum RuntimeReasonCodes {
RsUnableToOpenLog22 = 1
};
typedef struct _smMemoryGroupContext {
int arraySize;
int lastChunk;
void ** chunks;
} smMemoryGroupContext;
#define CACHE_PATH_DEFAULT "/var/opt/ibm/zvmmap/.vmapi/"
#define CACHE_SEMAPHORE_DIRECTORY ".vmapi/"
#define CACHE_SEMAPHORE_FILENAME "vmapi.sem"
#define CACHE_DIRECTORY ".cache/"
#define CACHE_DIRECTORY_FOR_USER "cache/"
#define CACHE_FILE_EXTENSION_FOR_USER ".cache"
#define CACHE_INSTANCEID_FILE_EXTENSION_FOR_USER ".id"
// A macro to free memory and zero out the pointer too
#define FREE_MEMORY(_mempointer_) \
if (_mempointer_) \
{ \
free(_mempointer_); \
_mempointer_ = NULL; \
}
#define TO_STRING2(_data_) \
#_data_
#define TO_STRING(_data_) \
TO_STRING2(_data_)
/**
* Before calling the resource layer the caller needs to create and zero out
* a VmApiInternalContext and set the following fields:
*
* smMemoryGroupContext structure pointed to by the memContext field. That
* memory structure should also be zeroed out.
*
* --- Trace info ---
* Set a trace flags structure pointer using the global external name:
* extern struct _smtrace externSmapiTraceFlags;
*
* Ex:
* vmapiContext.smTraceDetails = (struct _smTrace *)&externSmapiTraceFlags;
*
* That structure can be zero'ed out for no tracing or flags set to trace
* a specific area. See smTraceAndError.h for constants.
*
* Note: The first socket init call will call readTraceFile and look for a
* file (TRACE_LEVELS_FILE) to read and set trace levels if any are found.
*/
#define FIRST_FAILURE_MESSAGE_MAX_LEN 250
typedef struct _VmApiInternalContext {
char serverName[256];
int pendingWorkunits[10];
struct _smTrace * smTraceDetails; // Trace and error flags, locations, etc
char userid[9]; // Used for context creation default userID
char IucvUserid[9]; // SMAPI machine UserID. If this field is null, default is VSMREQIU
char useridForAsynchNotification[9]; // This is usually the Linux ID, can be any ID in SMAPI auth file
smMemoryGroupContext * memContext;
char vmapiServerVersion[4];
int maxServerRpcVersion;
int contextCreatedFlag; // Set to 1 if context has been created
char strFirstFailureMsg[FIRST_FAILURE_MESSAGE_MAX_LEN + 1];
int firstFailureCaptured; // 0: False
int rc;
int reason;
int printOffset;
int execDepth;
int isBackend;
int checkBackendFlag;
key_t semKey;
int semId;
FILE* logFileP;
FILE* contextFileP;
List inputStream;
List outputStream;
List errorStream;
char path[PATHLENGTH]; // Context path in ZVMMAP_VAR or defaulted
char name[256];
char emsg[LINESIZE];
char hostid[20];
char password[9];
int instanceId;
char tag[256];
int resolveHostName; // To be moved to persistant later
} VmApiInternalContext;
typedef struct _Abbreviation {
char* nameP;
int minimum;
} Abbreviation;
// Internal data structure to keep minidisk data
typedef struct _Minidisk {
struct _Minidisk* nextP;
int address;
char type[8];
int location;
int extent;
char volser[8];
char mode[4];
int processFlag;
} Minidisk;
// Internal data structure to keep dedicate data
typedef struct _Dedicate {
struct _Dedicate* nextP;
int vnum;
int rnum;
} Dedicate;
/**
* Macro: break_if_error(FUNC, CODE, SOCK)
*
* Purpose: After a socket function, this macro will display a msg using
* perror if the function FUNC fails with code CODE. Additionally,
* if the value of the socket SOCK is not -1, the socket will be
* closed. Finally, do the 'break' part, to break out of the
* current loop.
*
* Inputs: FUNC - String to be displayed along with with perror
* CODE - The return code to be tested for failure (< 0)
* SOCK - The socket descriptor to be close if not equal to -1
*/
#ifndef break_if_error
#define break_if_error(FUNC,CODE,SOCK) { \
if (CODE < 0) { \
perror(#FUNC "() failed"); \
if (SOCK != -1) { \
close(SOCK); \
SOCK = -1; \
} \
break; }}
#endif
/**
* Macro: continue_if_error(FUNC, CODE, SOCK)
*
* Purpose: After a socket function, this macro will display a msg using
* perror if the function FUNC fails with code CODE. Additionally,
* if the value of the socket SOCK is not -1, the socket will be
* closed. Finally, do the 'continue' part, to iterate the
* current loop.
*
* Inputs: FUNC - String to be displayed along with with perror
* CODE - The return code to be tested for failure (< 0)
* SOCK - The socket descriptor to be close if not equal to -1
*
*/
#ifndef continue_if_error
#define continue_if_error(FUNC,CODE,SOCK) { \
if (CODE < 0) { \
perror(#FUNC "() failed"); \
if (SOCK != -1) { \
close(SOCK); \
SOCK = -1; \
} \
continue; }}
#endif
/**
* Macro: exit_if_error(FUNC, CODE, SOCK)
*
* Purpose: After a socket function, this macro will display a msg using
* perror if the function FUNC fails with code CODE. Additionally,
* if the value of the socket SOCK is not -1, the socket will be
* closed. Finally, cause the 'return' to happen.
*
* Inputs: FUNC - String to be displayed along with with perror
* CODE - The return code to be tested for failure (< 0)
* SOCK - The socket descriptor to be close if not equal to -1
*/
#ifndef exit_if_error
#define exit_if_error(FUNC,CODE,SOCK) { \
if (CODE < 0) { \
perror(#FUNC "() failed"); \
if (SOCK != -1) { \
close(SOCK); \
SOCK = -1; \
} \
return; }}
#endif
// Macros to retrieve or default argument
#define ARG(x) getArg(x,anArgc,anArgvPP,"")
#define ARG_DEFAULT(x,aDefaultP) getArg(x,anArgc,anArgvPP,aDefaultP)
// Utility functions
int checkAbbreviation(const char* aStringP,
const Abbreviation* anAbbreviationListP, int anAbbreviationN);
int checkBoolean(const char* aStringP);
int checkPrefixCommand(const char* aCommandP);
int initializeThreadSemaphores(struct _VmApiInternalContext* vmapiContextP,
const char* aContextNameP, int aCreateFlag);
int createDirectories(const char* aFilenameP);
void dumpArea(struct _VmApiInternalContext* vmapiContextP, void * pstor,
int len);
Dedicate* getDedicates();
Minidisk* getMinidisks();
int isOSA(struct _VmApiInternalContext* vmapiContextP, char* rdev);
void listAppendLine(struct _VmApiInternalContext* vmapiContextP, List* aListP,
const char* aLineP);
void listAppendRecord(List* aListP, Record* aRecordP);
void listDeleteCurrent(List* aListP);
Record*
listDequeueRecord(List* aListP);
const char*
listNextLine(List* aListP);
const Record*
listNextRecord(List* aListP);
void listFree(List* aListP);
void listReset(List* aListP);
void readTraceFile(struct _VmApiInternalContext* vmapiContextP);
void *
smMemoryGroupAlloc(struct _VmApiInternalContext* vmapiContextP, size_t size);
int smMemoryGroupFreeAll(struct _VmApiInternalContext* vmapiContextP);
int smMemoryGroupInitialize(struct _VmApiInternalContext* vmapiContextP);
void *
smMemoryGroupRealloc(struct _VmApiInternalContext* vmapiContextP, void * chunk,
size_t size);
int smMemoryGroupTerminate(struct _VmApiInternalContext* vmapiContextP);
char*
strip(char* aLineP, char anOption, char aChar);
void sysinfo(struct _VmApiInternalContext* vmapiContextP, int anArgc,
const char**anArgvPP);
int testDigit(char aChar);
const char*
vmApiMessageText(struct _VmApiInternalContext* vmapiContextP);
int vmbkendCacheEntryInvalidate(struct _VmApiInternalContext* vmapiContextP,
char *pathP, char *useridP);
int vmbkendCheck(struct _VmApiInternalContext* vmapiContextP);
void vmbkendGetCachePath(struct _VmApiInternalContext* vmapiContextP,
char *pathP);
void *vmbkendMain(void* vmapiContextP);
int vmbkendRemoveCachedScanFiles(struct _VmApiInternalContext* vmapiContextP,
char *pathP);
void vmbkendRemoveEntireCache(struct _VmApiInternalContext* vmapiContextP,
char *cachePathP);
void waitForPendingWorkunits(struct _VmApiInternalContext* vmapiContextP,
int waitIntervalInSeconds);
int cacheFileValid(struct _VmApiInternalContext* vmapiContextP,
const char* cFName);
#include "smTraceAndError.h"
#endif
@@ -1,16 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _SMSOCKET_H
#define _SMSOCKET_H
#include "smPublic.h"
int smSocketInitialize(struct _VmApiInternalContext* vmapiContextP,
int * sockId);
int smSocketWrite(struct _VmApiInternalContext* vmapiContextP, int sockId,
char * data, int dataLen);
int smSocketRead(struct _VmApiInternalContext* vmapiContextP, int sockId,
char * buff, int len);
int smSocketReadLoop(struct _VmApiInternalContext* vmapiContextP, int sockId,
char * buff, int len);
int smSocketTerminate(struct _VmApiInternalContext* vmapiContextP, int sockId);
#endif
@@ -1,137 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _SM_TRACE_H
#define _SM_TRACE_H
#include <stdio.h>
#include <syslog.h>
#include "smPublic.h"
// Trace levels are to be powers of 2 to allow combinations of tracing
#define TRACE_LEVELS_FILE "vmmaptracing"
#define TRACE_LEVELS_FILE_DIRECTORY "/etc/opt/ibm/zvmmap/.cimvm/"
// Make sure the level information matches the index in the TRACE_LEVELS and TRACE_FLAG_VALUES array below
#define TRACELEVEL_OFF 0
#define TRACELEVEL_FLOW 1
#define TRACELEVEL_PARAMETERS 2
#define TRACELEVEL_DETAILS 4
#define TRACELEVEL_BUFFER_OUT 256 // Unit test socket layer
#define TRACELEVEL_BUFFER_IN 512 // Unit test socket layer
#define TRACELEVEL_ALL 0x8FFFFFFF
// Keywords for the trace file
#define TRACE_LEVELS_COUNT 7
static const char * TRACE_LEVELS[TRACE_LEVELS_COUNT] = { "off", "flow",
"parms", "details", "buffout", "buffin", "all" };
static const unsigned int TRACE_FLAG_VALUES[TRACE_LEVELS_COUNT] = { 0,
TRACELEVEL_FLOW, TRACELEVEL_PARAMETERS, TRACELEVEL_DETAILS,
TRACELEVEL_BUFFER_OUT, TRACELEVEL_BUFFER_IN, TRACELEVEL_ALL };
// Trace areas index into trace array
#define TRACEAREA_BACKGROUND_DIRECTORY_NOTIFICATION_THREAD 0
#define TRACEAREA_CIM_OPERATION_LAYER 1
#define TRACEAREA_RESOURCE_LAYER 2
#define TRACEAREA_RESOURCE_LAYER_SOCKET 3
#define TRACEAREA_RESOURCE_LAYER_PARSER 4
#define TRACEAREA_BACKGROUND_VMEVENT_NOTIFICATION_THREAD 5
#define TRACEAREA_NAME_VALUE_PARSER 6
#define TRACEAREA_CACHE 7
#define TRACEAREA_SMAPI_ONLY 8
// Keywords for the trace areas
#define TRACE_AREAS_COUNT 9
static const char * TRACE_KEYWORDS[TRACE_AREAS_COUNT] = { "directorychanges",
"cimop", "resourcelayer", "socket", "parser", "vmeventchanges",
"namevalueparser", "cache", "smapionly" };
typedef struct _smTrace {
unsigned int traceFlags[TRACE_AREAS_COUNT]; // A separate trace int for each area
int traceLock;
int traceFileRead; // 0 = trace file needs to be checked with "readTraceFile("
unsigned int traceOutputLocation; // 0 = syslog
FILE * traceFilePointer; // 0 = no file open
} smTrace;
/**
* Trace functions and constants for a line of data or a block of storage
*/
// errorLog will save the return and reason code in the context and then
// call errorLine.
void errorLog(struct _VmApiInternalContext* vmapiContextP,
const char * functionName, const char * lineNumber, int aRc,
int aReason, const char* aLineP);
// errorLine will call Logline with the "error" flag and then
// call listAppendLine to add a record to the context error stream
void errorLine(struct _VmApiInternalContext* vmapiContextP, const char* aLineP);
// These severity contants get remapped to syslog constants in LogLine
#define LOGLINE_DEBUG 'D'
#define LOGLINE_ERR 'E'
#define LOGLINE_INFO 'I'
#define LOGLINE_NOTICE 'N'
#define LOGLINE_WARNING 'W'
#define LOGLINE_EXCEPTION 'X'
// LogLine will add a timestamp and then write the data to the syslog.
void logLine(struct _VmApiInternalContext* vmapiContextP, char aSeverity,
const char* aLineP);
void outputLine(struct _VmApiInternalContext* vmapiContextP,
const char* aLineP, int aLogFlag);
// This macro can be used to test for a trace type being on before
// calling logLine. See logline description below. Follow the logLine
// call with the TRACE_END or TRACE_END_DEBUG to close out the braces
// logline with the LOGLINE_DEBUG will replace the old codes use of debugline.
#define TRACE_START(_context_ , _tracearea_, _tracelevel_) \
if(((_context_)->smTraceDetails->traceFlags[_tracearea_])&_tracelevel_ ) \
{
#define TRACE_END }
#define TRACE_END_DEBUG(_context_, _linedata_) \
logLine(_context_, LOGLINE_DEBUG, _linedata_); \
}
// This macro can be used to trace entry into a function,
// the function name is supplied by the compiler
#define TRACE_ENTRY_FLOW(_context_ , _tracearea_) \
TRACE_START(_context_, _tracearea_, TRACELEVEL_FLOW); \
char _line_[LINESIZE]; \
sprintf(_line_, \
"%s function ENTRY (at line %d in %s) \n", \
__func__, __LINE__, __FILE__); \
logLine(_context_ ,LOGLINE_DEBUG, _line_); \
}
// This macro can be used to trace exit from a function,
// the function name is supplied by the compiler
// The context is expected to be a pointer
#define TRACE_EXIT_FLOW(_context_ , _tracearea_) \
TRACE_START(_context_, _tracearea_, TRACELEVEL_FLOW); \
char _line_[LINESIZE]; \
sprintf(_line_, \
"%s function EXIT. RC: %d RS: %d (at line %d in %s) \n", \
__func__, \
_context_->rc, \
_context_->reason, __LINE__, __FILE__); \
logLine(_context_ ,LOGLINE_DEBUG, _line_); \
}
// This macro can be used to trace exit from a CIM function where you specify the return code,
// the function name is supplied by the compiler
// The context is expected to be a pointer
#define TRACE_EXIT_CIM_FLOW(_context_ , _tracearea_ , _rc_) \
TRACE_START(_context_, _tracearea_, TRACELEVEL_FLOW); \
char _line_[LINESIZE]; \
sprintf(_line_, \
"%s function EXIT. RC: %d (at line %d in %s) \n", \
__func__, \
_rc_, __LINE__, __FILE__); \
logLine(_context_ ,LOGLINE_DEBUG, _line_); \
}
#endif
@@ -1,213 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_PARSER_ROUTINE_H
#define _VMAPI_PARSER_ROUTINE_H
#include <stddef.h>
#include <sys/types.h>
#include <netinet/in.h>
#include "smPublic.h"
#ifdef __cplusplus
extern "C" {
#endif
// This structure typedef is used for the common information returned by
// the SMAPI
typedef struct _commonOutputFields {
int requestId;
int returnCode;
int reasonCode;
} commonOutputFields;
// This structure is used to handle unknown number of zero terminated data
// returned by the SMAPI. Array notation can be used to subscript the strings.
typedef struct _vmApiCStringInfo {
char * vmapiString;
} vmApiCStringInfo;
/**
* Parser table general layout:
* Columns are: Type, min, max, output structure unique index number, nesting level,
* offset in output structure (or size of output structure)
*
* Min and max only apply to string length items, and arrays
*
* NOTE:
* Each type has the following requirements:
*
* APITYPE_BASE_STRUCT_LEN Column 4 must be STRUCT_INDX_0, column 6 is size of structure
* APITYPE_INTn Column 4 must have the structure index, column 6 contains the offset to store this value into
* APITYPE_STRING_LEN Column 2 must have the minimum string length, column 3 must have the maximum length or -1 if no max
* Column 4 must have the structure index, column 6 contains the offset to store this string into
* If a single zero terminated string is returned in the buffer; then use
* APITYPE_C_STR_PTR Column 2 must have the minimum string length, column 3 must have the maximum length or -1 if no max
* Column 4 must have the structure index, column 6 contains the offset to store this string into
*
* APITYPE_CHARBUF_LEN Column 2 must have the minimum charaters length, column 3 must have the maximum length or -1 if no max
* Column 4 must have the structure index, column 6 contains the offset to store this charater buffer pointer into
* APITYPE_CHARBUF_COUNT Column 4 must have the structure index, column 6 contains the offset to store the count into
* (CHARBUF_LEN must have a ..COUNT as the next table entry)
*
* APITYPE_ARRAY_LEN Column 4 must have the structure index, column 6 contains the offset to
* store the pointer to first array element at.
* APITYPE_ARRAY_STRUCT_COUNT Column 4 must have the structure index, column 6 contains the offset to store the count into
* APITYPE_STRUCT_LEN or APITYPE_NOBUFFER_STRUCT_LEN
* Column 5 must have the size of the output structure
* (ARRAY must have STRUCT following; STRUCT_COUNT must have a ..LEN as the next table entry)
* APITYPE_NOBUFFER_STRUCT_LEN is used when the SMAPI buffer does not have a structure size
* after the array size in the returned data. (The data is an array of strings vs array of structures)
*
* When the SMAPI buffer has many zero terminated strings as output: (use the next 4 types in that order)
* The vmApiCStringInfo structure can be used to hold each string.
* APITYPE_C_STR_ARRAY_PTR Column 4 must have the parent structure index, column 6 contains
* the offset to store the pointer to first string in the array at.
* APITYPE_C_STR_ARRAY_COUNT Column 4 must have the structure index which hold the count field, column 6 contains the offset to store the count into
* APITYPE_C_STR_STRUCT_LEN Column 5 must have the size of the output structure (vmApiCStringInfo)
* APITYPE_C_STR_PTR Column 5 must have the offset in the C string structure of the char *
*
* APITYPE_END_OF_TABLE Must be used to end the table
*
* Note: use CHARBUF for strings that can contain nulls (CHARNA in zVM API data types)
*
* Ex:
* static tableLayout Imalge_Activate_Layout =
* {
* {APITYPE_BASE_STRUCT_LEN, 4,4,STRUCT_INDX_0,NEST_LEVEL_0,sizeof(VmApiImageActivateOutput) },
* {APITYPE_INT4, 4,4,STRUCT_INDX_0,NEST_LEVEL_0,offsetof(VmApiImageActivateOutput,common.requestId) },
* {APITYPE_INT4, 4,4,STRUCT_INDX_0,NEST_LEVEL_0,offsetof(VmApiImageActivateOutput,common.returnCode)},
* {APITYPE_INT4, 4,4,STRUCT_INDX_0,NEST_LEVEL_0,offsetof(VmApiImageActivateOutput,common.reasonCode)},
* {APITYPE_INT4, 4,4,STRUCT_INDX_0,NEST_LEVEL_0,offsetof(VmApiImageActivateOutput,activated) },
* {APITYPE_INT4, 4,4,STRUCT_INDX_0,NEST_LEVEL_0,offsetof(VmApiImageActivateOutput,notActivated) },
*
* {APITYPE_ARRAY_LEN, 4,4,STRUCT_INDX_0,NEST_LEVEL_0,offsetof(VmApiImageActivateOutput,failList) },
* {APITYPE_ARRAY_STRUCT_COUNT,4,4,STRUCT_INDX_0,NEST_LEVEL_0,offsetof(VmApiImageActivateOutput,failingArrayCount)},
* {APITYPE_STRUCT_LEN, 4,4,STRUCT_INDX_1,NEST_LEVEL_1,sizeof(VmApiImageFailing) },
* {APITYPE_STRING_LEN, 1,8,STRUCT_INDX_1,NEST_LEVEL_1,offsetof(VmApiImageFailing,imageName) },
* {APITYPE_INT4, 4,4,STRUCT_INDX_1,NEST_LEVEL_1,offsetof(VmApiImageFailing,returnCode) },
* {APITYPE_INT4, 4,4,STRUCT_INDX_1,NEST_LEVEL_1,offsetof(VmApiImageFailing,reasonCode) },
* {APITYPE_END_OF_TABLE,0,0,0,0}
* };
*/
#define APITYPE_END_OF_TABLE 0
#define APITYPE_INT1 1
#define APITYPE_INT4 2
#define APITYPE_INT8 3
#define APITYPE_STRING_LEN 20
#define APITYPE_ARRAY_LEN 21
#define APITYPE_ARRAY_STRUCT_COUNT 22
#define APITYPE_STRUCT_LEN 23
#define APITYPE_NOBUFFER_STRUCT_LEN 24
#define APITYPE_CHARBUF_LEN 25
#define APITYPE_CHARBUF_COUNT 26
#define APITYPE_C_STR_ARRAY_PTR 30
#define APITYPE_C_STR_ARRAY_COUNT 31
#define APITYPE_C_STR_STRUCT_LEN 32
#define APITYPE_C_STR_PTR 33
#define APITYPE_BASE_STRUCT_LEN 98
#define STRUCT_INDX_0 0
#define STRUCT_INDX_1 1
#define STRUCT_INDX_2 2
#define STRUCT_INDX_3 3
#define STRUCT_INDX_4 4
#define STRUCT_INDX_5 5
#define STRUCT_INDX_6 6
#define STRUCT_INDX_7 7
#define STRUCT_INDX_8 8
#define STRUCT_INDX_9 9
#define STRUCT_INDX_10 10
#define NEST_LEVEL_0 0
#define NEST_LEVEL_1 1
#define NEST_LEVEL_2 2
#define NEST_LEVEL_3 3
#define MAX_STRUCT_ARRAYS 10
#define COL_1_TYPE 0
#define COL_2_MINSIZE 1
#define COL_3_MAXSIZE 2
#define COL_4_STRUCT_INDEX 3
#define COL_5_NEST_LEVEL 4
#define COL_6_SIZE_OR_OFFSET 5
enum tableParserModes {
scan, populate
};
typedef int tableLayout[][6];
/**
* Input/output structure for use by smapiTableParser parseBufferWithTable()
*
* - smapiBufferCursor must be set to the start of the SMAPI data
* - dataBufferSize must be set to the total size of the SMAPI data
* - byteCount is used by parseBufferWithTable as a work variable
* - outStringByteCount will be set in "scan" mode to the number of bytes needed for all the
* strings found in the SMAPI data
* - outStructCount array will be set in "scan" mode to the number of structures found at each
* level
* - outStructSizes array will be set in "scan" mode to the size of 1 structure
* - inStructAddrs array must be set in "populate" mode to the starting address of the first
* structure at each level
* - inStringCursor must be set in "populate" mode to the start of the storage block for use in
* string allocation.
*/
typedef struct _tableParserParms {
char * smapiBufferCursor; // Input for SCAN and POPULATE. Initially set to output buffer.
int dataBufferSize; // Input for SCAN and POPULATE, size of SMAPI output buffer
int byteCount; // Bytes processed from SMAPI returned data buffer
int outStringByteCount; // Output parm from SCAN
int outStructCount[MAX_STRUCT_ARRAYS]; // Output parm from SCAN
int outStructSizes[MAX_STRUCT_ARRAYS]; // Output parm from SCAN
void * inStructAddrs[MAX_STRUCT_ARRAYS];// Input parm for POPULATE
char * inStringCursor; // Input string block pointer for POPULATE
} tableParserParms;
#define PARSER_ERROR_INVALID_TABLE -4002
#define PARSER_ERROR_INVALID_STRING_SIZE -4003
#define ntohll(x) (((unsigned long long)(ntohl((int)((x << 32) >> 32))) << 32) | (unsigned int)ntohl(((int)(x >> 32))))
#define htonll(x) ntohll(x)
#define PUT_INT(_inInt_,_outBuf_) \
({ int _int; \
_int = htonl(_inInt_) ; \
memcpy(_outBuf_, &_int, 4); \
_outBuf_ += 4; \
})
#define GET_INT(_outInt_,_inBuf_) \
({ int _int; \
memcpy(&_int, _inBuf_, 4); \
_outInt_ = ntohl(_int) ; \
_inBuf_ += 4; \
})
#define PUT_64INT(_in64Int_,_outBuf_) \
({ long long _64int; \
_64int = htonll(_in64Int_) ; \
memcpy(_outBuf_, &_64int, 8); \
_outBuf_ += 8; \
})
#define GET_64INT(_out64Int_,_inBuf_) \
({ long long _64int; \
memcpy(&_64int, _inBuf_, 8); \
_out64Int_ = ntohll(_64int) ; \
_inBuf_ += 8; \
})
int parseBufferWithTable(struct _VmApiInternalContext* vmapiContextP,
enum tableParserModes mode, tableLayout table, tableParserParms *parms);
int getAndParseSmapiBuffer(struct _VmApiInternalContext* vmapiContextP,
char * * inputBufferPointerPointer, int inputBufferSize,
tableLayout parserTable, char * parserTableName, char * * outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,129 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_ASYNCHRONOUS_H
#define _VMAPI_ASYNCHRONOUS_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Asynchronous_Notification_Disable_DM
typedef commonOutputFields vmApiAsynchronousNotificationDisableDmOutput;
// Parser table for Asynchronous_Notification_Disable_DM
static tableLayout Asynchronous_Notification_Disable_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiAsynchronousNotificationDisableDmOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationDisableDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationDisableDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationDisableDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smAsynchronous_Notification_Disable_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char entity_type, char communication_type, int port_number,
char * ip_address, char encoding, int subscriber_data_length,
char * subscriber_data,
vmApiAsynchronousNotificationDisableDmOutput ** outData);
// Asynchronous_Notification_Enable_DM
typedef commonOutputFields vmApiAsynchronousNotificationEnableDmOutput;
// Parser table for Asynchronous_Notification_Enable_DM
static tableLayout Asynchronous_Notification_Enable_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiAsynchronousNotificationEnableDmOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationEnableDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationEnableDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationEnableDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smAsynchronous_Notification_Enable_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char entity_type, char subscription_type, char communication_type,
int port_number, char * ip_address, char encoding,
int subscriber_data_length, char * subscriber_data,
vmApiAsynchronousNotificationEnableDmOutput ** outData);
// Asynchronous_Notification_Query_DM
typedef struct _vmApiNotification { // Common structure used by Asynchronous_Notification_Query
char * userid;
char subscriptionType;
char communicationType;
int portNumber;
char * ipAddress;
char encoding;
int subscriberDataLength;
char * subscriberData;
} vmApiNotification;
typedef struct _vmApiAsynchronousNotificationQueryDmOutput {
commonOutputFields common;
int notificationCount;
vmApiNotification * notificationList;
} vmApiAsynchronousNotificationQueryDmOutput;
// Parser table for Asynchronous_Notification_Query_DM
static tableLayout
Asynchronous_Notification_Query_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiAsynchronousNotificationQueryDmOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationQueryDmOutput,
common.requestId) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationQueryDmOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationQueryDmOutput,
common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiAsynchronousNotificationQueryDmOutput,
notificationList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(
vmApiAsynchronousNotificationQueryDmOutput,
notificationCount) }, { APITYPE_STRUCT_LEN, 4,
4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiNotification) }, { APITYPE_STRING_LEN, 4,
4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiNotification, userid) }, { APITYPE_INT1,
4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiNotification, subscriptionType) }, {
APITYPE_INT1, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiNotification, communicationType) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiNotification, portNumber) }, {
APITYPE_STRING_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiNotification, ipAddress) }, {
APITYPE_INT1, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiNotification, encoding) }, {
APITYPE_CHARBUF_LEN, 0, 64, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiNotification,
subscriberData) }, { APITYPE_CHARBUF_COUNT, 0,
4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiNotification, subscriberDataLength) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smAsynchronous_Notification_Query_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char entity_type, char communication_type, int port_number,
char * ip_address, char encoding, int subscriber_data_length,
char * subscriber_data,
vmApiAsynchronousNotificationQueryDmOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,106 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_AUTHORIZATION_H
#define _VMAPI_AUTHORIZATION_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Authorization_List_Add
typedef commonOutputFields vmApiAuthorizationListAddOutput;
// Parser table for Authorization_List_Add
static tableLayout Authorization_List_Add_Layout = { { APITYPE_BASE_STRUCT_LEN,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiAuthorizationListAddOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiAuthorizationListAddOutput,
requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiAuthorizationListAddOutput, returnCode) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAuthorizationListAddOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smAuthorization_List_Add(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * for_id, char * function_id,
vmApiAuthorizationListAddOutput ** outData);
// Authorization_List_Query
typedef struct _vmApiAuthorizationRecord { // Common structure used by Authorization_List_Query
char * requestingUserid;
char requestingListIndicator;
char * forUserid;
char forListIndicator;
char * functionName;
char functionListIndicator;
} vmApiAuthorizationRecord;
typedef struct _vmApiAuthorizationListQueryOutput {
commonOutputFields common;
int authorizationRecordCount;
vmApiAuthorizationRecord * authorizationRecordList;
} vmApiAuthorizationListQueryOutput;
// Parser table for Authorization_List_Query
static tableLayout Authorization_List_Query_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiAuthorizationListQueryOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAuthorizationListQueryOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAuthorizationListQueryOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAuthorizationListQueryOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAuthorizationListQueryOutput, authorizationRecordList) },
{ APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiAuthorizationListQueryOutput,
authorizationRecordCount) }, { APITYPE_STRUCT_LEN, 4,
4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiAuthorizationRecord) }, { APITYPE_STRING_LEN, 1,
64, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiAuthorizationRecord, requestingUserid) }, {
APITYPE_INT1, 1, 1, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiAuthorizationRecord, requestingListIndicator) }, {
APITYPE_STRING_LEN, 1, 64, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiAuthorizationRecord, forUserid) }, {
APITYPE_INT1, 1, 1, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiAuthorizationRecord, forListIndicator) }, {
APITYPE_STRING_LEN, 1, 64, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiAuthorizationRecord, functionName) }, {
APITYPE_INT1, 1, 1, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiAuthorizationRecord, functionListIndicator) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smAuthorization_List_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * for_id, char * function_id,
vmApiAuthorizationListQueryOutput ** outData);
// Authorization_List_Remove
typedef commonOutputFields vmApiAuthorizationListRemoveOutput;
// Parser table for Authorization_List_Remove
static tableLayout Authorization_List_Remove_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiAuthorizationListRemoveOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAuthorizationListRemoveOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAuthorizationListRemoveOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiAuthorizationListRemoveOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smAuthorization_List_Remove(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * for_id, char * function_id,
vmApiAuthorizationListRemoveOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,34 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_CHECK_AUTHENTICATION_H
#define _VMAPI_CHECK_AUTHENTICATION_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Check_Authentication
typedef commonOutputFields vmApiCheckAuthenticationOutput;
// Parser table for Check_Authentication
static tableLayout Check_Authentication_Layout = { { APITYPE_BASE_STRUCT_LEN,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiCheckAuthenticationOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiCheckAuthenticationOutput,
requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiCheckAuthenticationOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiCheckAuthenticationOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smCheck_Authentication(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
vmApiCheckAuthenticationOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,172 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_DIRECTORY_MANAGER_H
#define _VMAPI_DIRECTORY_MANAGER_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Directory_Manager_Local_Tag_Define_DM
typedef commonOutputFields vmApiDirectoryManagerLocalTagDefineDmOutput;
// Parser table for Directory_Manager_Local_Tag_Define_DM
static tableLayout Directory_Manager_Local_Tag_Define_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiDirectoryManagerLocalTagDefineDmOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagDefineDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagDefineDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagDefineDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smDirectory_Manager_Local_Tag_Define_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * tag_name, int tag_ordinal, char createOrChange,
vmApiDirectoryManagerLocalTagDefineDmOutput ** outData);
// Directory_Manager_Local_Tag_Delete_DM
typedef commonOutputFields vmApiDirectoryManagerLocalTagDeleteDmOutput;
// Parser table for Directory_Manager_Local_Tag_Delete_DM
static tableLayout Directory_Manager_Local_Tag_Delete_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiDirectoryManagerLocalTagDeleteDmOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagDeleteDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagDeleteDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagDeleteDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int
smDirectory_Manager_Local_Tag_Delete_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * tag_name,
vmApiDirectoryManagerLocalTagDeleteDmOutput ** outData);
// Directory_Manager_Local_Tag_Query_DM
typedef struct _vmApiDirectoryManagerLocalTagQueryDmOutput {
commonOutputFields common;
int tagValueLength;
char * tagValue;
} vmApiDirectoryManagerLocalTagQueryDmOutput;
// Parser table for Directory_Manager_Local_Tag_Query_DM
static tableLayout
Directory_Manager_Local_Tag_Query_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiDirectoryManagerLocalTagQueryDmOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagQueryDmOutput,
common.requestId) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagQueryDmOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagQueryDmOutput,
common.reasonCode) },
{ APITYPE_CHARBUF_LEN, 1, 240, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiDirectoryManagerLocalTagQueryDmOutput,
tagValue) }, { APITYPE_CHARBUF_COUNT, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagQueryDmOutput,
tagValueLength) }, { APITYPE_END_OF_TABLE, 0,
0, 0, 0 } };
int smDirectory_Manager_Local_Tag_Query_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * tag_name, vmApiDirectoryManagerLocalTagQueryDmOutput ** outData);
// Directory_Manager_Local_Tag_Set_DM
typedef commonOutputFields vmApiDirectoryManagerLocalTagSetDmOutput;
// Parser table for Directory_Manager_Local_Tag_Set_DM
static tableLayout Directory_Manager_Local_Tag_Set_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiDirectoryManagerLocalTagSetDmOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagSetDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagSetDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerLocalTagSetDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smDirectory_Manager_Local_Tag_Set_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * tag_name, int tag_value_length, char * tag_value,
vmApiDirectoryManagerLocalTagSetDmOutput ** outData);
// Directory_Manager_Search_DM
typedef struct _vmApiDirectoryManagerStatement { // Common structure used by Directory_Manager_Search
char * targetId;
int statementLength;
char * statement;
} vmApiDirectoryManagerStatement;
typedef struct _vmApiDirectoryManagerSearchDmOutput {
commonOutputFields common;
int statementCount;
vmApiDirectoryManagerStatement * statementList;
} vmApiDirectoryManagerSearchDmOutput;
// Parser table for Directory_Manager_Search_DM
static tableLayout Directory_Manager_Search_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiDirectoryManagerSearchDmOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerSearchDmOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerSearchDmOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerSearchDmOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerSearchDmOutput, statementList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiDirectoryManagerSearchDmOutput, statementCount) }, {
APITYPE_NOBUFFER_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiDirectoryManagerStatement) }, { APITYPE_STRING_LEN, 1, 8,
STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiDirectoryManagerStatement,
targetId) }, { APITYPE_CHARBUF_LEN, 1, 72, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiDirectoryManagerStatement, statement) }, {
APITYPE_CHARBUF_COUNT, 0, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiDirectoryManagerStatement, statementLength) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smDirectory_Manager_Search_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, int search_pattern_length,
char * search_pattern, vmApiDirectoryManagerSearchDmOutput ** outData);
// Directory_Manager_Task_Cancel_DM
typedef commonOutputFields vmApiDirectoryManagerTaskCancelDmOutput;
// Parser table for Directory_Manager_Task_Cancel_DM
static tableLayout Directory_Manager_Task_Cancel_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiDirectoryManagerTaskCancelDmOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerTaskCancelDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerTaskCancelDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiDirectoryManagerTaskCancelDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smDirectory_Manager_Task_Cancel_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
int operation_id, vmApiDirectoryManagerTaskCancelDmOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large Load Diff
@@ -1,102 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_NAME_H
#define _VMAPI_NAME_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Name_List_Add
typedef commonOutputFields vmApiNameListAddOutput;
int smName_List_Add(struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * name, vmApiNameListAddOutput ** outData);
// Parser table for Name_List_Add
static tableLayout Name_List_Add_Layout = { { APITYPE_BASE_STRUCT_LEN, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiNameListAddOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiNameListAddOutput, requestId) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiNameListAddOutput,
returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiNameListAddOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Name_List_Destroy
typedef commonOutputFields vmApiNameListDestroyOutput;
int smName_List_Destroy(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiNameListDestroyOutput ** outData);
// Parser table for Name_List_Destroy
static tableLayout Name_List_Destroy_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiNameListDestroyOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiNameListDestroyOutput, requestId) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiNameListDestroyOutput,
returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiNameListDestroyOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Name_List_Query
typedef struct _vmApiNameList { // Common structure for Name_List_Query,
char * imageName;
} vmApiNameList;
typedef struct _vmApiNameListQuery {
commonOutputFields common;
int nameArrayCount;
vmApiNameList * nameList;
} vmApiNameListQueryOutput;
int smName_List_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiNameListQueryOutput ** outData);
// Parser table for Name_List_Query
static tableLayout Name_List_Query_Layout = { { APITYPE_BASE_STRUCT_LEN, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiNameListQueryOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiNameListQueryOutput, common.requestId) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiNameListQueryOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiNameListQueryOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiNameListQueryOutput, nameList) }, { APITYPE_ARRAY_STRUCT_COUNT, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiNameListQueryOutput,
nameArrayCount) }, { APITYPE_NOBUFFER_STRUCT_LEN, 4, 4,
STRUCT_INDX_1, NEST_LEVEL_1, sizeof(vmApiNameList) }, {
APITYPE_STRING_LEN, 1, 8, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiNameList, imageName) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Name_List_Remove
typedef commonOutputFields vmApiNameListRemoveOutput;
int smName_List_Remove(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * name,
vmApiNameListRemoveOutput ** outData);
// Parser table for Name_List_Remove
static tableLayout Name_List_Remove_Layout = { { APITYPE_BASE_STRUCT_LEN, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiNameListRemoveOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiNameListRemoveOutput, requestId) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiNameListRemoveOutput,
returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiNameListRemoveOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
#ifdef __cplusplus
}
#endif
#endif
@@ -1,111 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_PROFILE_H
#define _VMAPI_PROFILE_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Profile_Create_DM
// Common structure to hold one profile record (used on profile_query output, input for Create and Replace)
typedef struct _vmApiProfileRecord {
int profileRecordLength;
char * recordData;
} vmApiProfileRecord;
typedef commonOutputFields vmApiProfileCreateDmOutput;
// Parser table for Profile_Create_DM
static tableLayout Profile_Create_DM_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiProfileCreateDmOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiProfileCreateDmOutput, requestId) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiProfileCreateDmOutput,
returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiProfileCreateDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smProfile_Create_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, int profileRecordCount,
vmApiProfileRecord * profileRecordList,
vmApiProfileCreateDmOutput ** outData);
// Profile_Delete_DM
typedef commonOutputFields vmApiProfileDeleteDmOutput;
// Parser table for Profile_Delete_DM
static tableLayout Profile_Delete_DM_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiProfileDeleteDmOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiProfileDeleteDmOutput, requestId) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiProfileDeleteDmOutput,
returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiProfileDeleteDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smProfile_Delete_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiProfileDeleteDmOutput ** outData);
// Profile_Query_DM
typedef struct _vmApiProfileQueryDmOutput {
commonOutputFields common;
int profileRecordCount;
vmApiProfileRecord * profileRecordList;
} vmApiProfileQueryDmOutput;
// Parser table for Profile_Query_DM
static tableLayout Profile_Query_DM_Layout = { { APITYPE_BASE_STRUCT_LEN, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiProfileQueryDmOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiProfileQueryDmOutput, common.requestId) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiProfileQueryDmOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiProfileQueryDmOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiProfileQueryDmOutput, profileRecordList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiProfileQueryDmOutput, profileRecordCount) }, {
APITYPE_NOBUFFER_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiProfileRecord) },
{ APITYPE_CHARBUF_LEN, 0, 80, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiProfileRecord, recordData) }, { APITYPE_CHARBUF_COUNT, 0,
4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiProfileRecord,
profileRecordLength) }, { APITYPE_END_OF_TABLE, 0, 0,
0, 0 } };
int smProfile_Query_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiProfileQueryDmOutput ** outData);
// Profile_Replace_DM
typedef commonOutputFields vmApiProfileReplaceDmOutput;
// Parser table for Profile_Replace_DM
static tableLayout Profile_Replace_DM_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiProfileReplaceDmOutput) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiProfileReplaceDmOutput, requestId) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiProfileReplaceDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiProfileReplaceDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smProfile_Replace_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, int profileRecordCount,
vmApiProfileRecord * profileRecordList,
vmApiProfileReplaceDmOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,148 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_PROTOTYPE_H
#define _VMAPI_PROTOTYPE_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Prototype_Create_DM
typedef struct _vmApiPrototypeRecordList { // Common structure for Prototype_Query_DM, create, replace
char * recordName;
int recordNameLength;
} vmApiPrototypeRecordList;
typedef commonOutputFields vmApiPrototypeCreateDmOutput;
int smPrototype_Create_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, int recordArrayCount,
vmApiPrototypeRecordList * recordArrayData,
vmApiPrototypeCreateDmOutput ** outData);
// Parser table for Prototype_Create_DM
static tableLayout Prototype_Create_DM_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiPrototypeCreateDmOutput) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeCreateDmOutput, requestId) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeCreateDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeCreateDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Prototype_Delete_DM
typedef commonOutputFields vmApiPrototypeDeleteDmOutput;
int smPrototype_Delete_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiPrototypeDeleteDmOutput ** outData);
// Parser table for Prototype_Delete_DM
static tableLayout Prototype_Delete_DM_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiPrototypeDeleteDmOutput) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeDeleteDmOutput, requestId) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeDeleteDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeDeleteDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Prototype_Name_Query_DM
typedef struct _vmApiPrototypeNameList { // Common structure for Prototype_Name_Query_DM,
char * name;
} vmApiPrototypeNameList;
typedef struct _vmApiPrototypeNameQueryDm {
commonOutputFields common;
int nameArrayCount;
vmApiPrototypeNameList * nameList;
} vmApiPrototypeNameQueryDmOutput;
int smPrototype_Name_Query_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiPrototypeNameQueryDmOutput ** outData);
// Parser table for Prototype_Name_Query_DM
static tableLayout Prototype_Name_Query_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiPrototypeNameQueryDmOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiPrototypeNameQueryDmOutput,
common.requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiPrototypeNameQueryDmOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiPrototypeNameQueryDmOutput,
common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeNameQueryDmOutput, nameList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiPrototypeNameQueryDmOutput, nameArrayCount) }, {
APITYPE_NOBUFFER_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiPrototypeNameList) }, { APITYPE_STRING_LEN, 1, 8,
STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiPrototypeNameList, name) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Prototype_Query_DM
typedef struct _vmApiPrototypeQueryDm {
commonOutputFields common;
int recordArrayCount;
vmApiPrototypeRecordList * recordList;
} vmApiPrototypeQueryDmOutput;
int smPrototype_Query_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiPrototypeQueryDmOutput ** outData);
// Parser table for Prototype_Query_DM
static tableLayout Prototype_Query_DM_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiPrototypeQueryDmOutput) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeQueryDmOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeQueryDmOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeQueryDmOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeQueryDmOutput, recordList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiPrototypeQueryDmOutput, recordArrayCount) }, {
APITYPE_NOBUFFER_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiPrototypeRecordList) }, { APITYPE_CHARBUF_LEN, 1,
72, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiPrototypeRecordList, recordName) }, {
APITYPE_CHARBUF_COUNT, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiPrototypeRecordList, recordNameLength) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Prototype_Replace_DM
typedef commonOutputFields vmApiPrototypeReplaceDmOutput;
int smPrototype_Replace_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, int recordArrayCount,
vmApiPrototypeRecordList * recordArrayData,
vmApiPrototypeReplaceDmOutput ** outData);
// Parser table for Prototype_Replace_DM
static tableLayout Prototype_Replace_DM_Layout = { { APITYPE_BASE_STRUCT_LEN,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiPrototypeReplaceDmOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiPrototypeReplaceDmOutput,
requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiPrototypeReplaceDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiPrototypeReplaceDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
#ifdef __cplusplus
}
#endif
#endif
@@ -1,90 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_QUERY_H
#define _VMAPI_QUERY_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Query_API_Functional_Level
typedef commonOutputFields vmApiQueryApiFunctionalLevelOutput;
int smQuery_API_Functional_Level(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiQueryApiFunctionalLevelOutput ** outData);
// Parser table for Query_API_Functional_Level
static tableLayout Query_API_Functional_Level_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiQueryApiFunctionalLevelOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryApiFunctionalLevelOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryApiFunctionalLevelOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryApiFunctionalLevelOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Query_Asychronous_Operation_DM
typedef commonOutputFields vmApiQueryAsynchronousOperationDmOutput;
int smQuery_Asychronous_Operation_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
int operationId, vmApiQueryAsynchronousOperationDmOutput ** outData);
// Parser table for Query_Asychronous_Operation_DM
static tableLayout Query_Asynchronous_Operation_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiQueryAsynchronousOperationDmOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryAsynchronousOperationDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryAsynchronousOperationDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryAsynchronousOperationDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Query_Directory_Manager_Level_DM
typedef struct _vmApiQueryDirectoryManagerLevelDm {
commonOutputFields common;
char * directoryManagerLevel;
int directoryManagerLevelLength;
} vmApiQueryDirectoryManagerLevelDmOutput;
// Parser table for Query_Directory_Manager_Level_DM
static tableLayout
Query_Directory_Manager_Level_DM_Layout = { { APITYPE_BASE_STRUCT_LEN,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiQueryDirectoryManagerLevelDmOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryDirectoryManagerLevelDmOutput,
common.requestId) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryDirectoryManagerLevelDmOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryDirectoryManagerLevelDmOutput,
common.reasonCode) }, { APITYPE_CHARBUF_LEN, 1, 100,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryDirectoryManagerLevelDmOutput,
directoryManagerLevel) }, { APITYPE_CHARBUF_COUNT, 1,
100, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiQueryDirectoryManagerLevelDmOutput,
directoryManagerLevelLength) }, { APITYPE_END_OF_TABLE,
0, 0, 0, 0 } };
int smQuery_Directory_Manager_Level_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
vmApiQueryDirectoryManagerLevelDmOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,214 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_SHARED_H
#define _VMAPI_SHARED_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Shared_Memory_Access_Add_DM
typedef commonOutputFields vmApiSharedMemoryAccessAddDmOutput;
// Parser table for Shared_Memory_Access_Add_DM
static tableLayout Shared_Memory_Access_Add_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiSharedMemoryAccessAddDmOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessAddDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessAddDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessAddDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smShared_Memory_Access_Add_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * memorySegmentName,
vmApiSharedMemoryAccessAddDmOutput ** outData);
// Shared_Memory_Access_Query_DM
typedef struct _vmApiSharedMemorySegmentName { // Common structure used by Shared_Memory_Access_Query
char * memorySegmentName;
} vmApiSharedMemorySegmentName;
typedef struct _vmApiSharedMemoryAccessQueryDm {
commonOutputFields common;
int memorySegmentNameCount;
vmApiSharedMemorySegmentName * memorySegmentNameList;
} vmApiSharedMemoryAccessQueryDmOutput;
// Parser table for Shared_Memory_Access_Query_DM
static tableLayout Shared_Memory_Access_Query_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiSharedMemoryAccessQueryDmOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessQueryDmOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessQueryDmOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessQueryDmOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessQueryDmOutput, memorySegmentNameList) },
{ APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiSharedMemoryAccessQueryDmOutput,
memorySegmentNameCount) }, {
APITYPE_NOBUFFER_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiSharedMemorySegmentName) }, { APITYPE_STRING_LEN,
1, 8, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiSharedMemorySegmentName, memorySegmentName) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smShared_Memory_Access_Query_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * memorySegmentName,
vmApiSharedMemoryAccessQueryDmOutput ** outData);
// Shared_Memory_Access_Remove_DM
typedef commonOutputFields vmApiSharedMemoryAccessRemoveDmOutput;
// Parser table for Shared_Memory_Access_Remove_DM
static tableLayout Shared_Memory_Access_Remove_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiSharedMemoryAccessRemoveDmOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessRemoveDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessRemoveDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryAccessRemoveDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smShared_Memory_Access_Remove_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * memorySegmentName,
vmApiSharedMemoryAccessRemoveDmOutput ** outData);
// Shared_Memory_Create
typedef commonOutputFields vmApiSharedMemoryCreateOutput;
// Parser table for Shared_Memory_Create
static tableLayout Shared_Memory_Create_Layout = { { APITYPE_BASE_STRUCT_LEN,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiSharedMemoryCreateOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiSharedMemoryCreateOutput,
requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiSharedMemoryCreateOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryCreateOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int
smShared_Memory_Create(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * memorySegmentName,
unsigned long long beginPage, unsigned long long endPage,
char pageAccessDescriptor, char memoryAttributes,
char * memoryAccessIdentifier,
vmApiSharedMemoryCreateOutput ** outData);
// Shared_Memory_Delete
typedef commonOutputFields vmApiSharedMemoryDeleteOutput;
// Parser table for Shared_Memory_Delete
static tableLayout Shared_Memory_Delete_Layout = { { APITYPE_BASE_STRUCT_LEN,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiSharedMemoryDeleteOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiSharedMemoryDeleteOutput,
requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiSharedMemoryDeleteOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryDeleteOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smShared_Memory_Delete(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * memorySegmentName,
vmApiSharedMemoryDeleteOutput ** outData);
// Shared_Memory_Query
typedef struct _vmApiSharedPageRangeInfo {
unsigned long long beginPage;
unsigned long long endPage;
char pageAccessDescriptor;
} vmApiSharedPageRangeInfo;
typedef struct _vmApiSharedMemorySegmentInfo {
char * memorySegmentName;
char memorySegmentStatus;
int pageRangeCount;
vmApiSharedPageRangeInfo * pageRangeList;
} vmApiSharedMemorySegmentInfo;
typedef struct _vmApiSharedMemoryQueryOutput {
commonOutputFields common;
int memorySegmentCount;
vmApiSharedMemorySegmentInfo * memorySegmentInfoList;
} vmApiSharedMemoryQueryOutput;
// Parser table for Shared_Memory_Query
static tableLayout Shared_Memory_Query_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiSharedMemoryQueryOutput) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryQueryOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryQueryOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryQueryOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryQueryOutput, memorySegmentInfoList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiSharedMemoryQueryOutput, memorySegmentCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiSharedMemorySegmentInfo) }, { APITYPE_STRING_LEN,
1, 8, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiSharedMemorySegmentInfo, memorySegmentName) }, {
APITYPE_INT1, 1, 1, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiSharedMemorySegmentInfo, memorySegmentStatus) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiSharedMemorySegmentInfo, pageRangeList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiSharedMemorySegmentInfo, pageRangeCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_2, NEST_LEVEL_2,
sizeof(vmApiSharedPageRangeInfo) }, { APITYPE_INT8, 8, 8,
STRUCT_INDX_2, NEST_LEVEL_2, offsetof(vmApiSharedPageRangeInfo,
beginPage) }, { APITYPE_INT8, 8, 8, STRUCT_INDX_2,
NEST_LEVEL_2, offsetof(vmApiSharedPageRangeInfo, endPage) }, {
APITYPE_INT1, 1, 1, STRUCT_INDX_2, NEST_LEVEL_2, offsetof(
vmApiSharedPageRangeInfo, pageAccessDescriptor) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smShared_Memory_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * memorySegmentName,
vmApiSharedMemoryQueryOutput ** outData);
// Shared_Memory_Replace
typedef commonOutputFields vmApiSharedMemoryReplaceOutput;
// Parser table for Shared_Memory_Replace
static tableLayout Shared_Memory_Replace_Layout = { { APITYPE_BASE_STRUCT_LEN,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiSharedMemoryReplaceOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiSharedMemoryReplaceOutput,
requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiSharedMemoryReplaceOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSharedMemoryReplaceOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smShared_Memory_Replace(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * memorySegmentName,
char * memoryAccessIdentifier,
vmApiSharedMemoryReplaceOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,74 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_STATIC_H
#define _VMAPI_STATIC_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Static_Image_Changes_Activate_DM
typedef commonOutputFields vmApiStaticImageChangesActivateDmOutput;
// Parser table for Static_Image_Changes_Activate_DM
static tableLayout Static_Image_Changes_Activate_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiStaticImageChangesActivateDmOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesActivateDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesActivateDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesActivateDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smStatic_Image_Changes_Activate_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
vmApiStaticImageChangesActivateDmOutput ** outData);
// Static_Image_Changes_Deactivate_DM
typedef commonOutputFields vmApiStaticImageChangesDeactivateDmOutput;
// Parser table for Static_Image_Changes_Deactivate_DM
static tableLayout Static_Image_Changes_Deactivate_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiStaticImageChangesDeactivateDmOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesDeactivateDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesDeactivateDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesDeactivateDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smStatic_Image_Changes_Deactivate_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
vmApiStaticImageChangesDeactivateDmOutput ** outData);
// Static_Image_Changes_Immediate_DM
typedef commonOutputFields vmApiStaticImageChangesImmediateDmOutput;
// Parser table for Static_Image_Changes_Immediate_DM
static tableLayout Static_Image_Changes_Immediate_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiStaticImageChangesImmediateDmOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesImmediateDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesImmediateDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiStaticImageChangesImmediateDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smStatic_Image_Changes_Immediate_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
vmApiStaticImageChangesImmediateDmOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,115 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_SYSTEM_H
#define _VMAPI_SYSTEM_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// IPaddr_Get
// This is here because it is VM related vs userid related
typedef struct _vmApiIPAddr_GetOutput {
commonOutputFields common;
int ipCount;
vmApiCStringInfo * ipList; // should only be one item in the list
} vmApiIPaddrGetOutput;
// Parser table for IPaddr_Get
static tableLayout IPaddr_Get_Layout = { { APITYPE_BASE_STRUCT_LEN, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiIPaddrGetOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiIPaddrGetOutput, common.requestId) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiIPaddrGetOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiIPaddrGetOutput, common.reasonCode) },
{ APITYPE_C_STR_ARRAY_PTR, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiIPaddrGetOutput, ipList) }, { APITYPE_C_STR_ARRAY_COUNT, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiIPaddrGetOutput, ipCount) },
{ APITYPE_C_STR_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiCStringInfo) }, { APITYPE_C_STR_PTR, 4, 4,
STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiCStringInfo,
vmapiString) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smIPaddr_Get(struct _VmApiInternalContext* vmapiContextP,
vmApiIPaddrGetOutput ** outData);
// System_Info_Query
typedef struct _vmApiSystemInfoQueryOutput {
commonOutputFields common;
char * timezone;
char * time;
char * vmVersion;
char * cpGenTime;
char * cpIplTime;
char * realStorageSize;
} vmApiSystemInfoQueryOutput;
// Parser table for Virtual_Network_Query_OSA
static tableLayout System_Info_Query_Layout = { { APITYPE_BASE_STRUCT_LEN, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiSystemInfoQueryOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSystemInfoQueryOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSystemInfoQueryOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSystemInfoQueryOutput, common.reasonCode) },
{ APITYPE_C_STR_PTR, 4, 43, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSystemInfoQueryOutput, timezone) },
{ APITYPE_C_STR_PTR, 4, 43, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSystemInfoQueryOutput, time) }, { APITYPE_C_STR_PTR, 4,
80, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSystemInfoQueryOutput, vmVersion) }, {
APITYPE_C_STR_PTR, 4, 43, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiSystemInfoQueryOutput, cpGenTime) }, {
APITYPE_C_STR_PTR, 4, 43, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiSystemInfoQueryOutput, cpIplTime) }, {
APITYPE_C_STR_PTR, 4, 80, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiSystemInfoQueryOutput, realStorageSize) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smSystem_Info_Query(struct _VmApiInternalContext* vmapiContextP,
vmApiSystemInfoQueryOutput ** outData);
// System_IO_Query
typedef struct _vmApiSystemIoQueryOutput {
commonOutputFields common;
int chipidCount;
vmApiCStringInfo * chipidList;
} vmApiSystemIoQueryOutput;
// Parser table for Virtual_Network_Query_OSA
static tableLayout System_IO_Query_Layout = { { APITYPE_BASE_STRUCT_LEN, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, sizeof(vmApiSystemIoQueryOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSystemIoQueryOutput, common.requestId) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiSystemIoQueryOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiSystemIoQueryOutput, common.reasonCode) },
{ APITYPE_C_STR_ARRAY_PTR, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiSystemIoQueryOutput, chipidList) }, { APITYPE_C_STR_ARRAY_COUNT,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiSystemIoQueryOutput,
chipidCount) }, { APITYPE_C_STR_STRUCT_LEN, 4, 4,
STRUCT_INDX_1, NEST_LEVEL_1, sizeof(vmApiCStringInfo) }, {
APITYPE_C_STR_PTR, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiCStringInfo, vmapiString) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smSystem_IO_Query(struct _VmApiInternalContext* vmapiContextP,
char * realDeviceAddress, vmApiSystemIoQueryOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,137 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_VMRM_H
#define _VMAPI_VMRM_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// VMRM_Configuration_Query
typedef struct _vmApiVmrmConfigurationQuery {
commonOutputFields common;
char * configurationFile;
int configurationFileLength;
} vmApiVmrmConfigurationQueryOutput;
// Parser table for VMRM_Configuration_Query
static tableLayout VMRM_Configuration_Query_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVmrmConfigurationQueryOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationQueryOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationQueryOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationQueryOutput, common.reasonCode) }, {
APITYPE_CHARBUF_LEN, 1, -1, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationQueryOutput, configurationFile) }, {
APITYPE_CHARBUF_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationQueryOutput, configurationFileLength) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVMRM_Configuration_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * configurationFileName,
char * configurationFileType, char * configurationDirName,
vmApiVmrmConfigurationQueryOutput ** outData);
// VMRM_Configuration_Update
typedef struct _vmApiVmrmConfigurationLogRecordInfo {
char * logRecord;
int logRecordLength;
} vmApiVmrmConfigurationLogRecordInfo;
typedef struct _vmApiVmrmConfigurationUpdateOutput {
commonOutputFields common;
int logRecordCount;
vmApiVmrmConfigurationLogRecordInfo * logRecordInfoList;
} vmApiVmrmConfigurationUpdateOutput;
// Parser table for VMRM_Configuration_Update
static tableLayout VMRM_Configuration_Update_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVmrmConfigurationUpdateOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationUpdateOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationUpdateOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationUpdateOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmConfigurationUpdateOutput, logRecordInfoList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiVmrmConfigurationUpdateOutput, logRecordCount) }, {
APITYPE_NOBUFFER_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiVmrmConfigurationLogRecordInfo) }, { APITYPE_CHARBUF_LEN,
1, -1, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVmrmConfigurationLogRecordInfo, logRecord) }, {
APITYPE_CHARBUF_COUNT, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVmrmConfigurationLogRecordInfo, logRecordLength) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVMRM_Configuration_Update(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * configurationFileName,
char * configurationFileType, char * configurationDirName,
char syncheckOnly, int updateFileLength, char * updateFile,
vmApiVmrmConfigurationUpdateOutput ** outData);
// VMRM_Measurement_Query
typedef struct _vmApiVmrmMeasurementQueryWorkloadInfo {
char * workloadRecord;
int workloadRecordLength;
} vmApiVmrmMeasurementQueryWorkloadInfo;
typedef struct _vmApiVmrmMeasurementQueryOutput {
commonOutputFields common;
char * queryTimestamp;
char * fileName;
char * fileTimestamp;
int workloadCount;
vmApiVmrmMeasurementQueryWorkloadInfo * workloadInfoList;
} vmApiVmrmMeasurementQueryOutput;
// Parser table for VMRM_Measurement_Query
static tableLayout VMRM_Measurement_Query_Layout = { { APITYPE_BASE_STRUCT_LEN,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVmrmMeasurementQueryOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiVmrmMeasurementQueryOutput,
common.requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiVmrmMeasurementQueryOutput,
common.returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiVmrmMeasurementQueryOutput,
common.reasonCode) }, { APITYPE_STRING_LEN, 1, 17,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(vmApiVmrmMeasurementQueryOutput,
queryTimestamp) }, { APITYPE_STRING_LEN, 1, 20, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(vmApiVmrmMeasurementQueryOutput, fileName) }, {
APITYPE_STRING_LEN, 1, 17, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmMeasurementQueryOutput, fileTimestamp) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVmrmMeasurementQueryOutput, workloadInfoList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiVmrmMeasurementQueryOutput, workloadCount) }, {
APITYPE_NOBUFFER_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiVmrmMeasurementQueryWorkloadInfo) }, { APITYPE_CHARBUF_LEN,
1, 35, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVmrmMeasurementQueryWorkloadInfo, workloadRecord) }, {
APITYPE_CHARBUF_COUNT, 1, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVmrmMeasurementQueryWorkloadInfo, workloadRecordLength) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVMRM_Measurement_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiVmrmMeasurementQueryOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,782 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#ifndef _VMAPI_VIRTUAL_H
#define _VMAPI_VIRTUAL_H
#include "smPublic.h"
#include "smapiTableParser.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
// Virtual_Channel_Connection_Create
typedef commonOutputFields vmApiVirtualChannelConnectionCreateOutput;
// Parser table for Virtual_Channel_Connection_Create
static tableLayout Virtual_Channel_Connection_Create_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualChannelConnectionCreateOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionCreateOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionCreateOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionCreateOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Channel_Connection_Create(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber, char * coupledImageName,
char * coupledImageDeviceNumber,
vmApiVirtualChannelConnectionCreateOutput ** outData);
// Virtual_Channel_Connection_Create_DM
typedef commonOutputFields vmApiVirtualChannelConnectionCreateDmOutput;
// Parser table for Virtual_Channel_Connection_Create_DM
static tableLayout Virtual_Channel_Connection_Create_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualChannelConnectionCreateDmOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionCreateDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionCreateDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionCreateDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Channel_Connection_Create_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber, char * coupledImageName,
vmApiVirtualChannelConnectionCreateDmOutput ** outData);
// Virtual_Channel_Connection_Delete
typedef commonOutputFields vmApiVirtualChannelConnectionDeleteOutput;
// Parser table for Virtual_Memory_Access_Add_DM
static tableLayout Virtual_Channel_Connection_Delete_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualChannelConnectionDeleteOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionDeleteOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionDeleteOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionDeleteOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Channel_Connection_Delete(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber,
vmApiVirtualChannelConnectionDeleteOutput ** outData);
// Virtual_Channel_Connection_Delete_DM
typedef commonOutputFields vmApiVirtualChannelConnectionDeleteDmOutput;
// Parser table for Virtual_Channel_Connection_Delete_DM
static tableLayout Virtual_Channel_Connection_Delete_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualChannelConnectionDeleteDmOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionDeleteDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionDeleteDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualChannelConnectionDeleteDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Channel_Connection_Delete_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber,
vmApiVirtualChannelConnectionDeleteDmOutput ** outData);
// Virtual_Network_Adapter_Connect_LAN
typedef commonOutputFields vmApiVirtualNetworkAdapterConnectLanOutput;
// Parser table for Virtual_Network_Adapter_Connect_LAN
static tableLayout Virtual_Network_Adapter_Connect_LAN_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterConnectLanOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectLanOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectLanOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectLanOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Connect_LAN(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber, char * lanName, char * lanOwner,
vmApiVirtualNetworkAdapterConnectLanOutput ** outData);
// Virtual_Network_Adapter_Connect_LAN_DM
typedef commonOutputFields vmApiVirtualNetworkAdapterConnectLanDmOutput;
// Parser table for Virtual_Network_Adapter_Connect_LAN_DM
static tableLayout Virtual_Network_Adapter_Connect_LAN_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterConnectLanDmOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectLanDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectLanDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectLanDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Connect_LAN_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber, char * lanName, char * lanOwner,
vmApiVirtualNetworkAdapterConnectLanDmOutput ** outData);
// Virtual_Network_Adapter_Connect_Vswitch
typedef commonOutputFields vmApiVirtualNetworkAdapterConnectVswitchOutput;
// Parser table for Virtual_Network_Adapter_Connect_Vswitch
static tableLayout Virtual_Network_Adapter_Connect_Vswitch_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterConnectVswitchOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectVswitchOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectVswitchOutput, returnCode) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectVswitchOutput, reasonCode) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Connect_Vswitch(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber, char * switchName,
vmApiVirtualNetworkAdapterConnectVswitchOutput ** outData);
// Virtual_Network_Adapter_Connect_Vswitch_DM
typedef commonOutputFields vmApiVirtualNetworkAdapterConnectVswitchDmOutput;
// Parser table for Virtual_Network_Adapter_Connect_Vswitch_DM
static tableLayout
Virtual_Network_Adapter_Connect_Vswitch_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterConnectVswitchDmOutput) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectVswitchDmOutput,
requestId) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectVswitchDmOutput,
returnCode) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_0,
NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterConnectVswitchDmOutput,
reasonCode) }, { APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Connect_Vswitch_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber, char * switchName,
vmApiVirtualNetworkAdapterConnectVswitchDmOutput ** outData);
// Virtual_Network_Adapter_Create
typedef commonOutputFields vmApiVirtualNetworkAdapterCreateOutput;
// Parser table for Virtual_Network_Adapter_Create
static tableLayout Virtual_Network_Adapter_Create_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterCreateOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterCreateOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterCreateOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterCreateOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int
smVirtual_Network_Adapter_Create(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber, char adapterType,
int networkAdapterDevices, char * channelPathId,
vmApiVirtualNetworkAdapterCreateOutput ** outData);
// Virtual_Network_Adapter_Create_DM
typedef commonOutputFields vmApiVirtualNetworkAdapterCreateDmOutput;
// Parser table for Virtual_Network_Adapter_Create_DM
static tableLayout Virtual_Network_Adapter_Create_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterCreateDmOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterCreateDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterCreateDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterCreateDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Create_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber, char adapterType, int networkAdapterDevices,
char * channelPathId, char * macId,
vmApiVirtualNetworkAdapterCreateDmOutput ** outData);
// Virtual_Network_Adapter_Delete
typedef commonOutputFields vmApiVirtualNetworkAdapterDeleteOutput;
// Parser table for Virtual_Network_Adapter_Delete
static tableLayout Virtual_Network_Adapter_Delete_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterDeleteOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDeleteOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDeleteOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDeleteOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Delete(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber,
vmApiVirtualNetworkAdapterDeleteOutput ** outData);
// Virtual_Network_Adapter_Delete_DM
typedef commonOutputFields vmApiVirtualNetworkAdapterDeleteDmOutput;
// Parser table for Virtual_Network_Adapter_Delete_DM
static tableLayout Virtual_Network_Adapter_Delete_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterDeleteDmOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDeleteDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDeleteDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDeleteDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Delete_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber,
vmApiVirtualNetworkAdapterDeleteDmOutput ** outData);
// Virtual_Network_Adapter_Disconnect
typedef commonOutputFields vmApiVirtualNetworkAdapterDisconnectOutput;
// Parser table for Virtual_Network_Adapter_Disconnect
static tableLayout Virtual_Network_Adapter_Disconnect_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterDisconnectOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDisconnectOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDisconnectOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDisconnectOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Disconnect(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber,
vmApiVirtualNetworkAdapterDisconnectOutput ** outData);
// Virtual_Network_Adapter_Disconnect_DM
typedef commonOutputFields vmApiVirtualNetworkAdapterDisconnectDmOutput;
// Parser table for Virtual_Network_Adapter_Disconnect_DM
static tableLayout Virtual_Network_Adapter_Disconnect_DM_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterDisconnectDmOutput) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDisconnectDmOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDisconnectDmOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterDisconnectDmOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Adapter_Disconnect_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber,
vmApiVirtualNetworkAdapterDisconnectDmOutput ** outData);
// Virtual_Network_Adapter_Query
typedef struct _vmApiVirtualNetworkAdapter {
char * imageDeviceNumber;
char adapterType;
int networkAdapterDevices;
char adapterStatus;
char * lanOwner;
char * lanName;
} vmApiVirtualNetworkAdapter;
typedef struct _vmApiVirtualNetworkAdapterQueryOutput {
commonOutputFields common;
int adapterArrayCount;
vmApiVirtualNetworkAdapter * adapterList;
} vmApiVirtualNetworkAdapterQueryOutput;
int smVirtual_Network_Adapter_Query(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * imageDeviceNumber,
vmApiVirtualNetworkAdapterQueryOutput ** outData);
// Parser table for Virtual_Network_Adapter_Query
static tableLayout Virtual_Network_Adapter_Query_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkAdapterQueryOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterQueryOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterQueryOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterQueryOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkAdapterQueryOutput, adapterList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiVirtualNetworkAdapterQueryOutput, adapterArrayCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiVirtualNetworkAdapter) }, { APITYPE_STRING_LEN, 1, 4,
STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiVirtualNetworkAdapter,
imageDeviceNumber) }, { APITYPE_INT1, 1, 1, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiVirtualNetworkAdapter, adapterType) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVirtualNetworkAdapter, networkAdapterDevices) }, {
APITYPE_INT1, 1, 1, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVirtualNetworkAdapter, adapterStatus) }, {
APITYPE_STRING_LEN, 0, 8, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVirtualNetworkAdapter, lanOwner) }, { APITYPE_STRING_LEN,
0, 8, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiVirtualNetworkAdapter,
lanName) }, { APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
// Virtual_Network_LAN_Access
typedef commonOutputFields vmApiVirtualNetworkLanAccessOutput;
// Parser table for Virtual_Network_LAN_Access
static tableLayout Virtual_Network_LAN_Access_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkLanAccessOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanAccessOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanAccessOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanAccessOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_LAN_Access(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * lanName, char * lanOwner,
char * accessOption, char * accessGrantName, char * promiscuity,
vmApiVirtualNetworkLanAccessOutput ** outData);
// Virtual_Network_LAN_Access_Query
typedef struct _vmApiVirtualNetworkLanAccessQueryOutput {
commonOutputFields common;
int lanAccessCount;
vmApiCStringInfo * lanAccessList;
} vmApiVirtualNetworkLanAccessQueryOutput;
// Parser table for Virtual_Network_LANAccess_Query
static tableLayout Virtual_Network_LAN_Access_Query_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkLanAccessQueryOutput) }, { APITYPE_INT4, 4,
4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanAccessQueryOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanAccessQueryOutput, common.returnCode) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanAccessQueryOutput, common.reasonCode) },
{ APITYPE_C_STR_ARRAY_PTR, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanAccessQueryOutput, lanAccessList) }, {
APITYPE_C_STR_ARRAY_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiVirtualNetworkLanAccessQueryOutput,
lanAccessCount) }, { APITYPE_C_STR_STRUCT_LEN, 4, 4,
STRUCT_INDX_1, NEST_LEVEL_1, sizeof(vmApiCStringInfo) }, {
APITYPE_C_STR_PTR, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiCStringInfo, vmapiString) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_LAN_Access_Query(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * lanName, char * lanOwner,
vmApiVirtualNetworkLanAccessQueryOutput ** outData);
// Virtual_Network_LAN_Create
typedef commonOutputFields vmApiVirtualNetworkLanCreateOutput;
// Parser table for Virtual_Network_LAN_Create
static tableLayout Virtual_Network_LAN_Create_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkLanCreateOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanCreateOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanCreateOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanCreateOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_LAN_Create(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * lanName, char * lanOwner, char lanType,//1,2,3,4
char transportType, vmApiVirtualNetworkLanCreateOutput ** outData);
// Virtual_Network_LAN_Delete
typedef commonOutputFields vmApiVirtualNetworkLanDeleteOutput;
// Parser table for Virtual_Network_LAN_Delete
static tableLayout Virtual_Network_LAN_Delete_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkLanDeleteOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanDeleteOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanDeleteOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanDeleteOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_LAN_Delete(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * lanName, char * lanOwner,
vmApiVirtualNetworkLanDeleteOutput ** outData);
// Virtual_Network_LAN_Query
typedef struct _vmApiVirtualNetworkConnectedAdapterInfo { // Common structure with Virtual Network Vswitch Query
char * adapterOwner;
char * imageDeviceNumber;
} vmApiVirtualNetworkConnectedAdapterInfo;
typedef struct _vmApiVirtualNetworkLanInfo {
char * lanName;
char * lanOwner;
char lanType;
int connectedAdapterCount;
vmApiVirtualNetworkConnectedAdapterInfo * connectedAdapterList;
} vmApiVirtualNetworkLanInfo;
typedef struct _vmApiVirtualNetworkLanQueryOutput {
commonOutputFields common;
int lanCount;
vmApiVirtualNetworkLanInfo * lanList;
} vmApiVirtualNetworkLanQueryOutput;
// Parser table for Virtual_Network_LAN_Query
static tableLayout Virtual_Network_LAN_Query_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkLanQueryOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanQueryOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanQueryOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanQueryOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkLanQueryOutput, lanList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiVirtualNetworkLanQueryOutput, lanCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiVirtualNetworkLanInfo) }, { APITYPE_STRING_LEN, 1, 8,
STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiVirtualNetworkLanInfo,
lanName) }, { APITYPE_STRING_LEN, 1, 8, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiVirtualNetworkLanInfo, lanOwner) }, {
APITYPE_INT1, 1, 1, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVirtualNetworkLanInfo, lanType) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVirtualNetworkLanInfo, connectedAdapterList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiVirtualNetworkLanInfo, connectedAdapterCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_2, NEST_LEVEL_2,
sizeof(vmApiVirtualNetworkConnectedAdapterInfo) }, {
APITYPE_STRING_LEN, 1, 8, STRUCT_INDX_2, NEST_LEVEL_2, offsetof(
vmApiVirtualNetworkConnectedAdapterInfo, adapterOwner) }, {
APITYPE_STRING_LEN, 1, 4, STRUCT_INDX_2, NEST_LEVEL_2, offsetof(
vmApiVirtualNetworkConnectedAdapterInfo, imageDeviceNumber) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_LAN_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * lanName, char * lanOwner,
vmApiVirtualNetworkLanQueryOutput ** outData);
// Virtual_Network_Query_LAN
typedef struct _vmApiVirtualNetworkQueryLanOutput {
commonOutputFields common;
int lanCount;
vmApiCStringInfo * lanList;
} vmApiVirtualNetworkQueryLanOutput;
// Parser table for Virtual_Network_Query_LAN
static tableLayout Virtual_Network_Query_LAN_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkQueryLanOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryLanOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryLanOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryLanOutput, common.reasonCode) },
{ APITYPE_C_STR_ARRAY_PTR, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryLanOutput, lanList) }, {
APITYPE_C_STR_ARRAY_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryLanOutput, lanCount) }, {
APITYPE_C_STR_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiCStringInfo) }, { APITYPE_C_STR_PTR, 4, 4, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiCStringInfo, vmapiString) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Query_LAN(struct _VmApiInternalContext* vmapiContextP,
vmApiVirtualNetworkQueryLanOutput ** outData);
// Virtual_Network_Query_OSA
typedef struct _vmApiVirtualNetworkQueryOsaOutput {
commonOutputFields common;
int osaCount;
vmApiCStringInfo * osaList;
} vmApiVirtualNetworkQueryOsaOutput;
// Parser table for Virtual_Network_Query_OSA
static tableLayout Virtual_Network_Query_OSA_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkQueryOsaOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryOsaOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryOsaOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryOsaOutput, common.reasonCode) },
{ APITYPE_C_STR_ARRAY_PTR, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryOsaOutput, osaList) }, {
APITYPE_C_STR_ARRAY_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkQueryOsaOutput, osaCount) }, {
APITYPE_C_STR_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiCStringInfo) }, { APITYPE_C_STR_PTR, 4, 4, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiCStringInfo, vmapiString) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Query_OSA(struct _VmApiInternalContext* vmapiContextP,
vmApiVirtualNetworkQueryOsaOutput ** outData);
// Virtual_Network_Vswitch_Create
typedef commonOutputFields vmApiVirtualNetworkVswitchCreateOutput;
// Parser table for Virtual_Network_Vswitch_Create
static tableLayout Virtual_Network_Vswitch_Create_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkVswitchCreateOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchCreateOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchCreateOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchCreateOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Vswitch_Create(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * switchName, char * realDeviceAddress, char * portName,
char * controllerName, char connectionValue, int queueMemoryLimit,
char routingValue, char transportType, int vlanId, char portType,
char updateSystemConfigIndicator, char * systemConfigName,
char * systemConfigType, char * parmDiskOwner, char * parmDiskNumber,
char * parmDiskPassword, char * altSystemConfigName,
char * altSystemConfigType, char * altParmDiskOwner,
char * altParmDiskNumber, char * altParmDiskPassword, char gvrpValue,
int nativeVlanId, vmApiVirtualNetworkVswitchCreateOutput ** outData);
// Virtual_Network_Vswitch_Delete
typedef commonOutputFields vmApiVirtualNetworkVswitchDeleteOutput;
// Parser table for Virtual_Network_Vswitch_Delete
static tableLayout Virtual_Network_Vswitch_Delete_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkVswitchDeleteOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchDeleteOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchDeleteOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchDeleteOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Vswitch_Delete(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * switchName, char updateSystemConfigIndicator,
char * systemConfigName, char * systemConfigType, char * parmDiskOwner,
char * parmDiskNumber, char * parmDiskPassword,
char * altSystemConfigName, char * altSystemConfigType,
char * altParmDiskOwner, char * altParmDiskNumber,
char * altParmDiskPassword,
vmApiVirtualNetworkVswitchDeleteOutput ** outData);
// Virtual_Network_Vswitch_Query
typedef struct _vmApiConnectedAdapterInfo {
int userVlanId;
} vmApiVlanInfo;
typedef struct _vmApiAuthorizedUserInfo {
char * grantUserid;
int vlanCount;
vmApiVlanInfo * vlanList;
} vmApiAuthorizedUserInfo;
typedef struct _vmApiRealDeviceInfo {
int realDeviceAddress;
char * controllerName;
char * portName;
char deviceStatus;
char deviceErrorStatus;
} vmApiRealDeviceInfo;
typedef struct _vmApiVswitchInfo {
char * switchName;
char transportType;
char portType;
int queueMemoryLimit;
char routingValue;
int vlanId;
int nativeVlanId;
unsigned long long macId;
char grvpRequestAttribute;
char grvpEnabledAttribute;
char switchStatus;
int realDeviceCount;
vmApiRealDeviceInfo * realDeviceList;
int authorizedUserCount;
vmApiAuthorizedUserInfo * authorizedUserList;
int connectedAdapterCount;
vmApiVirtualNetworkConnectedAdapterInfo * connectedAdapterList; // Shares common structure with Virtual network lan query
} vmApiVswitchInfo;
typedef struct _vmApiVirtualNetworkVswitchQueryOutput {
commonOutputFields common;
int vswitchCount;
vmApiVswitchInfo * vswitchList;
} vmApiVirtualNetworkVswitchQueryOutput;
// Parser table for Virtual_Network_Vswitch_Query
static tableLayout Virtual_Network_Vswitch_Query_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkVswitchQueryOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchQueryOutput, common.requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchQueryOutput, common.returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchQueryOutput, common.reasonCode) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchQueryOutput, vswitchList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
offsetof(vmApiVirtualNetworkVswitchQueryOutput, vswitchCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
sizeof(vmApiVswitchInfo) }, { APITYPE_STRING_LEN, 1, 8, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiVswitchInfo, switchName) }, { APITYPE_INT1,
1, 1, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiVswitchInfo,
transportType) }, { APITYPE_INT1, 1, 1, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiVswitchInfo, portType) }, { APITYPE_INT4,
4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiVswitchInfo,
queueMemoryLimit) }, { APITYPE_INT1, 1, 1, STRUCT_INDX_1,
NEST_LEVEL_1, offsetof(vmApiVswitchInfo, routingValue) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVswitchInfo, vlanId) },
{ APITYPE_INT4, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVswitchInfo, nativeVlanId) },
{ APITYPE_INT8, 8, 8, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVswitchInfo, macId) }, { APITYPE_INT1, 1, 1,
STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiVswitchInfo,
grvpRequestAttribute) }, { APITYPE_INT1, 1, 1,
STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiVswitchInfo,
grvpEnabledAttribute) }, { APITYPE_INT1, 1, 1,
STRUCT_INDX_1, NEST_LEVEL_1, offsetof(vmApiVswitchInfo,
switchStatus) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVswitchInfo, realDeviceList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiVswitchInfo, realDeviceCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_2, NEST_LEVEL_2,
sizeof(vmApiRealDeviceInfo) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_2, NEST_LEVEL_2, offsetof(vmApiRealDeviceInfo,
realDeviceAddress) }, { APITYPE_STRING_LEN, 0, 71,
STRUCT_INDX_2, NEST_LEVEL_2, offsetof(vmApiRealDeviceInfo,
controllerName) }, { APITYPE_STRING_LEN, 0, 16,
STRUCT_INDX_2, NEST_LEVEL_2, offsetof(vmApiRealDeviceInfo,
portName) }, { APITYPE_INT1, 1, 1, STRUCT_INDX_2,
NEST_LEVEL_2, offsetof(vmApiRealDeviceInfo, deviceStatus) }, {
APITYPE_INT1, 1, 1, STRUCT_INDX_2, NEST_LEVEL_2, offsetof(
vmApiRealDeviceInfo, deviceErrorStatus) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVswitchInfo, authorizedUserList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiVswitchInfo, authorizedUserCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_3, NEST_LEVEL_2,
sizeof(vmApiAuthorizedUserInfo) }, { APITYPE_STRING_LEN, 1, 8,
STRUCT_INDX_3, NEST_LEVEL_2, offsetof(vmApiAuthorizedUserInfo,
grantUserid) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_3, NEST_LEVEL_2, offsetof(
vmApiAuthorizedUserInfo, vlanList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_3, NEST_LEVEL_2,
offsetof(vmApiAuthorizedUserInfo, vlanCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_4, NEST_LEVEL_3,
sizeof(vmApiVlanInfo) }, { APITYPE_INT4, 4, 4, STRUCT_INDX_4,
NEST_LEVEL_3, offsetof(vmApiVlanInfo, userVlanId) },
{ APITYPE_ARRAY_LEN, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1, offsetof(
vmApiVswitchInfo, connectedAdapterList) }, {
APITYPE_ARRAY_STRUCT_COUNT, 4, 4, STRUCT_INDX_1, NEST_LEVEL_1,
offsetof(vmApiVswitchInfo, connectedAdapterCount) }, {
APITYPE_STRUCT_LEN, 4, 4, STRUCT_INDX_5, NEST_LEVEL_2,
sizeof(vmApiVirtualNetworkConnectedAdapterInfo) },
{ APITYPE_STRING_LEN, 1, 8, STRUCT_INDX_5, NEST_LEVEL_2, offsetof(
vmApiVirtualNetworkConnectedAdapterInfo, adapterOwner) }, {
APITYPE_STRING_LEN, 1, 4, STRUCT_INDX_5, NEST_LEVEL_2,
offsetof(vmApiVirtualNetworkConnectedAdapterInfo,
imageDeviceNumber) },
{ APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Vswitch_Query(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * switchName, vmApiVirtualNetworkVswitchQueryOutput ** outData);
// Virtual_Network_Vswitch_Set
typedef commonOutputFields vmApiVirtualNetworkVswitchSetOutput;
// Parser table for Virtual_Network_Vswitch_Set
static tableLayout Virtual_Network_Vswitch_Set_Layout = { {
APITYPE_BASE_STRUCT_LEN, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0,
sizeof(vmApiVirtualNetworkVswitchSetOutput) }, { APITYPE_INT4, 4, 4,
STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchSetOutput, requestId) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchSetOutput, returnCode) }, {
APITYPE_INT4, 4, 4, STRUCT_INDX_0, NEST_LEVEL_0, offsetof(
vmApiVirtualNetworkVswitchSetOutput, reasonCode) }, {
APITYPE_END_OF_TABLE, 0, 0, 0, 0 } };
int smVirtual_Network_Vswitch_Set(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * switchName, char * grantUserid,
char * userVlanId, char * revokeUserid, char * realDeviceAddress,
char * portName, char * controllerName, char connectionValue,
int queueMemoryLimit, char routingValue, char portType,
char updateSystemConfigIndicator, char * systemConfigName,
char * systemConfigType, char * parmDiskOwner, char * parmDiskNumber,
char * parmDiskPassword, char * altSystemConfigName,
char * altSystemConfigType, char * altParmDiskOwner,
char * altParmDiskNumber, char * altParmDiskPassword, char gvrpValue,
char * macId, vmApiVirtualNetworkVswitchSetOutput ** outData);
#ifdef __cplusplus
}
#endif
#endif
@@ -1,19 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include <stdio.h>
#include <string.h>
#include "vmapiImage.h"
#include "vmapiVirtual.h"
#include "smPublic.h"
#include "vmapiSystem.h"
#include "vmapiAsynchronous.h"
#include "vmapiAuthorization.h"
#include "vmapiCheckAuthentication.h"
#include "vmapiDirectoryManager.h"
#include "vmapiProfile.h"
void releaseContext(VmApiInternalContext* context);
void initializeContext(VmApiInternalContext* context);
int isImageNameInvalid(char* imageName);
int isDevNumberInvalid(char* devNumber);
void trim(char * s);
-99
View File
@@ -1,99 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Adds a 3390 (ECKD) disk to a virtual image's directory entry.
*
* @param $1: The name of the guest to which a disk is to be added
* @param $2: The name of the disk pool from which a disk is to be allocated
* @param $3: The virtual device address for the newly-allocated volume
* @param $4: The mode under which the disk is to be linked by the user
* @param $5: The size of the new disk, in cylinders
* @param $6: The read password
* @param $7: The write password
* @param $8: The multi password
*
* @return 0 If the disk was added successfully
* 1 If given invalid parameters
* 2 If disk allocation failed
*/
int main(int argC, char* argV[]) {
if (argC < 6 || argC > 9) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* pool = argV[2];
char* vdev = argV[3];
int size = atoi(argV[4]);
char* mode = argV[5];
// Read password
char* readPw = "";
if (argC > 7 && argV[6])
readPw = argV[6];
// Write password
char* writePw = "";
if (argC > 8 && argV[7])
writePw = argV[7];
// Mutli password
// In order to link to a disk, a multi password must be specified
char* multiPw = "";
if (argC > 9 && argV[8])
multiPw = argV[8];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
printf("Adding disk %s to %s... ", vdev, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDiskCreateDmOutput* output;
int rc = smImage_Disk_Create_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, vdev, "3390", "AUTOG", pool, 1, // Cylinders
size, mode, 1, "", // Do not format disk. Do not give disk a label.
readPw, writePw, multiPw, // Read, write, and multi passwords.
&output);
if (rc || (output->common.returnCode && output->common.returnCode != 408
&& output->common.returnCode != 592)
|| (output->common.reasonCode && output->common.reasonCode != 4
&& output->common.reasonCode != 0)) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,71 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Adds a 3390 (ECKD) disk that is defined in a virtual image's directory
* entry to that virtual image's active configuration
*
* @param $1: The name of the guest to which a disk is to be added
* @param $2: The virtual device address for the newly-allocated volume
* @param $3: The mode under which the disk is to be linked by the user
*
* @return 0 If the disk was added successfully
* 1 If given invalid parameters
* 2 If disk allocation failed
*/
int main(int argC, char* argV[]) {
if (argC != 4) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* vdev = argV[2];
char* mode = argV[3];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
printf("Adding disk %s to %s... ", vdev, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDiskCreateOutput * output;
int rc = smImage_Disk_Create(&context, "", 0, "", // Authorizing user, password length, password.
image, vdev, mode, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode,
output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
-116
View File
@@ -1,116 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Adds a 9336 (FBA) disk to a virtual image's directory entry.
*
* @param $1: The name of the guest to which a disk is to be added
* @param $2: The name of the disk pool from which a disk is to be allocated
* @param $3: The virtual device address for the newly-allocated volume
* @param $4: The mode under which the disk is to be linked by the user
* @param $5: Block size (512, 1024, 2048, or 4096)
* @param $6: The size of the new disk, in blocks
* @param $7: The read password
* @param $8: The write password
* @param $9: The multi password
*
* @return 0 If the disk was added successfully
* 1 If given invalid parameters
* 2 If disk allocation failed
*/
int main(int argC, char* argV[]) {
if (argC < 7 || argC > 10) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* pool = argV[2];
char* vdev = argV[3];
char* mode = argV[4];
int blocksize = atoi(argV[5]);
int size = atoi(argV[6]);
// Read password
char* readPw = "";
if (argC > 8 && argV[7])
readPw = argV[7];
// Write password
char* writePw = "";
if (argC > 9 && argV[8])
writePw = argV[8];
// Mutli password
// In order to link to a disk, a multi password must be specified
char* multiPw = "";
if (argC > 10 && argV[9])
multiPw = argV[9];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
int unit;
switch (blocksize) {
case 512:
unit = 2;
break;
case 1024:
unit = 3;
break;
case 2048:
unit = 4;
break;
case 4096:
unit = 5;
break;
default:
printf("Error: Block size must be 512, 1024, 2048, or 4096\n");
return 1;
}
printf("Adding disk %s to %s... ", vdev, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDiskCreateDmOutput* output;
int rc = smImage_Disk_Create_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, vdev, "9336", "AUTOG", pool, unit, size, mode, 1, "", // Do not format disk. Do not give disk a label.
readPw, writePw, multiPw, // Read, write, and multi passwords.
&output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
-85
View File
@@ -1,85 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include <string.h>
#include "vmapiVirtual.h"
#include "wrapperutils.h"
/**
* Adds a network adapter to a virtual image's directory entry.
*
* @param $1: The z/VM guest for which a NIC is being allocated
* @param $2: The virtual device address of the NIC being allocated
* @param $3: The type of NIC which is to be allocated
* @param $4: The number of VDEV channels associated with this NIC
*
* @return 0 If the NIC was added successfully
* 1 If given invalid parameters
* 2 If the NIC definition failed
*/
int main(int argC, char * argV[]) {
if (argC != 5) {
printf("Error: Wrong number of parameters");
return 1;
}
char* image = argV[1];
char* address = argV[2];
char* type = argV[3];
int devcount = atoi(argV[4]);
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
int typecode;
if (!strcmp(type, "HiperSockets")) {
typecode = 1;
} else if (!strcmp(type, "QDIO")) {
typecode = 2;
} else {
printf("Error: NIC type must be HiperSockets or QDIO\n");
return 1;
}
printf("Adding NIC %s to %s... ", address, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiVirtualNetworkAdapterCreateDmOutput* output;
int rc = smVirtual_Network_Adapter_Create_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, address, typecode, devcount, "", // Only relevant for a second-level z/OS.
"", // The MAC identifier.
&output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,67 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Adds a non-dedicated processor to a virtual image's directory entry.
*
* @param $1: The z/VM guest to which a processor is to be added
* @param $2: The virtual device address for the processor being added
*
* @return 0 If the processor was created
* 1 If given invalid parameters
* 2 If the processor definition failed
*/
int main(int argC, char * argV[]) {
if (argC != 3) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* address = argV[2]; // Hexedecimal string, 00-3F
printf("Adding processor %s to %s... ", address, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageCpuDefineDmOutput* output;
int rc = smImage_CPU_Define_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, address, 0, // Base CPU status unspecified.
"", // The processor identification number.
1, // Not a dedicated processor.
0, // Do not specify a cryptographic facility.
&output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
-76
View File
@@ -1,76 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Adds a v-disk to a virtual images directory entry.
*
* @param $1: The name of the guest to which a disk is to be added
* @param $2: The virtual device address for the newly-allocated volume
* @param $3: The size of the new disk, in 512-byte blocks
*
* @return 0 If the disk was added successfully
* 1 If given invalid parameters
* 2 If disk allocation failed
*/
int main(int argC, char* argV[]) {
if (argC != 4) {
printf("Error: Wrong number of parameters\n");
return -1;
}
char* image = argV[1];
char* vdev = argV[2];
int size = atoi(argV[3]);
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
printf("Adding V-Disk %s to %s... ", vdev, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDiskCreateDmOutput* output;
int rc = smImage_Disk_Create_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, vdev, "FB-512", // Required for V-Disk devices.
"V-DISK", "NONE", // No disk pool (value is ignored).
2, // Allocation unit is BLK0512.
size, "W", // Writable.
0, "", // Formatting unspecified, no label.
"", "", "", // Read, write, and multi passwords.
&output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,72 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "vmapiVirtual.h"
#include "wrapperutils.h"
/**
* Connect network adapter to a GuestLAN.
*
* @param $1: The user for which a NIC is being connected
* @param $2: The virtual device address of the NIC being connected
* @param $3: The name of the LAN to which the NIC is to be connected
* @param $4: The virtual image owning the GuestLAN segment to be connected
*
* @return 0 If the NIC was added successfully
* 1 If given invalid parameters
* 2 If the NIC could not be connected to the VSwitch
*/
int main(int argC, char * argV[]) {
if (argC != 5) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* address = argV[2];
char* lan = argV[3];
char* owner = argV[4];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image) || isImageNameInvalid(owner))
return 1;
printf("Connecting NIC %s to GuestLan %s on %s... ", address, lan, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiVirtualNetworkAdapterConnectVswitchDmOutput* output;
int rc = smVirtual_Network_Adapter_Connect_LAN_DM(&context, "", 0, "",
image, address, lan, owner, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,71 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include <stdio.h>
#include "vmapiVirtual.h"
#include "wrapperutils.h"
/**
* Connect network adapter to a VSwitch.
*
* @param $1: The user for which a NIC is being connected
* @param $2: The virtual device address of the NIC being connected
* @param $3: The name of the VSwitch to which the NIC is to be connected
*
* @return 0 If the NIC was added successfully
* 1 If given invalid parameters
* 2 If the NIC could not be connected to the VSwitch
*/
int main(int argC, char * argV[]) {
if (argC != 4) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* address = argV[2];
char* vswitch = argV[3];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
printf("Connecting NIC %s to VSwitch %s on %s... ", address, vswitch, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiVirtualNetworkAdapterConnectVswitchDmOutput* output;
int rc = smVirtual_Network_Adapter_Connect_Vswitch_DM(&context, "", 0, "",
image, address, vswitch, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
-231
View File
@@ -1,231 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Creates a z/VM guest with the specified name.
*
* @param $1: The name of the guest which is to be created
*
* @return 0 If the virtual image now exists
* 1 If given invalid parameters
* 2 If image creation failed
*/
int main(int argC, char * argV[]) {
// Should be only 1 or 2 arguments
if (argC < 2 || argC > 3) {
printf("Error: Wrong number of parameters\n");
return 1;
}
// Get image name
char * imageName = argV[1];
// Check if image name is between 1 and 8 characters
if (isImageNameInvalid(imageName))
return 1;
printf("Creating user directory entry for %s... ", imageName);
// Create DirMaint directory entry
int rc;
if (argC == 3) {
rc = createUsingFile(imageName, argV[2]);
}
// If no user directory entry is given, create a NOLOG userID
else {
rc = createNoLog(imageName);
}
return rc;
}
/**
* Creates a z/VM guest with the specified name using a directory entry file.
*
* @param $1: The name of the guest which is to be created
* @param $2: The directory entry in a file
*
* @return 0 If the virtual image now exists
* 1 If given invalid parameters
* 2 If image creation failed
*/
int createUsingFile(char * imageName, char * file) {
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageCreateDmOutput * output;
int rc;
FILE * userProfile;
// Open file for user directory entry
userProfile = fopen(file, "r");
if (userProfile == NULL)
printf(" Error: Failed to open %s\n", file);
else {
// Read in user directory entry
int recordCount = 0, i = 0;
char line[100], buffer[30][100];
char * ptr;
while (!feof(userProfile)) {
// Read in 100 characters
fgets(line, 100, userProfile);
// Delete new line
ptr = strstr(line, "\n");
if (ptr != NULL) {
strncpy(ptr, "\0", 1);
}
// Copy line into buffer
strcpy(buffer[i], line);
i++;
if (!feof(userProfile))
recordCount++;
}
// Check USER line for correct virtual server name
ptr = strstr(buffer[0], imageName);
char newLine[100];
// If the virtual server name is NOT in the USER line
if (ptr == NULL) {
// Insert virtual server name into the USER line
ptr = strtok(buffer[0], " ");
int i = 0;
while (ptr != NULL) {
if (i == 1) {
strcat(newLine, imageName);
} else {
strcat(newLine, ptr);
}
strcat(newLine, " ");
ptr = strtok(NULL, " ");
i++;
}
strcpy(buffer[0], newLine);
}
// Create image record
vmApiImageRecord record[recordCount];
// Copy buffer contents into image record
for (i = 0; i < recordCount; i++) {
record[i].imageRecordLength = strlen(buffer[i]);
record[i].imageRecord = buffer[i];
}
// Close user directory entry
fclose(userProfile);
rc = smImage_Create_DM(&context, "", 0, "", // Authorizing user, password length, password.
imageName, // Image name.
"", // The prototype to use for creating the image.
0, "", // Initial password length, initial password.
"", recordCount, // Initial account number, image record array length
&record, // Image record.
&output);
}
if (rc || (output->common.returnCode && output->common.returnCode != 400
&& output->common.returnCode != 592)
|| (output->common.reasonCode && output->common.reasonCode != 8
&& output->common.reasonCode != 0)) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
}
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
/**
* Creates a z/VM guest with the specified name with NOLOG.
*
* @param $1: The name of the guest which is to be created
*
* @return 0 If the virtual image now exists
* 1 If given invalid parameters
* 2 If image creation failed
*/
int createNoLog(char * imageName) {
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageCreateDmOutput * output;
int rc;
char userLine[19] = "USER ";
strcat(userLine, imageName);
strcat(userLine, " NOLOG");
vmApiImageRecord record;
record.imageRecordLength = 19; // Length of image_record
record.imageRecord = userLine; // The user or profile entry
rc = smImage_Create_DM(&context, "", 0, "", // Authorizing user, password length, password.
imageName, // Image name.
"", // The prototype to use for creating the image.
0, "", // Initial password length, initial password.
"", 1, // Initial account number, image record array length
&record, // Image record.
&output);
if (rc || (output->common.returnCode && output->common.returnCode != 400
&& output->common.returnCode != 592)
|| (output->common.reasonCode && output->common.reasonCode != 8
&& output->common.reasonCode != 0)) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,80 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Adds a dedicated device to a virtual image's directory entry.
*
* @param $1: The name of the guest to which a device is to be added
* @param $2: The virtual device address to be assigned to the device
* @param $3: The device's real address
*
* @return 0 If the dedicated device was added successfully
* 1 If given invalid parameters
* 2 If device dedication failed
*/
int main(int argC, char* argV[]) {
if (argC != 5) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* vdev = argV[2];
char* rdev = argV[3];
char* mode = argV[4];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
int readonly;
if (strcmp(mode, "RW") == 0 || strcmp(mode, "rw") == 0) {
readonly = 0;
} else if (strcmp(mode, "RO") == 0 || !strcmp(mode, "ro") == 0) {
readonly = 1;
} else {
printf("Error: Mode must be in RW or RO\n");
return 1;
}
printf("Adding device %s as %s to %s... ", rdev, vdev, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDeviceDedicateDmOutput* output;
int rc = smImage_Device_Dedicate_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, vdev, rdev, readonly, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,65 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Deletes the IPL statement for the z/VM guest with the specified name.
*
* @param $1: The name of the guest from which the IPL statement is to be removed
*
* @return 0 If the no IPL statement exists upon completion
* 1 If given invalid parameters
* 2 If IPL statement removal failed
*/
int main(int argC, char * argV[]) {
if (argC != 2) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
printf("Removing IPL statement on %s... ", image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageIplDeleteDmOutput* output;
int rc = smImage_IPL_Delete_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
-72
View File
@@ -1,72 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Deletes the specified z/VM virtual server.
*
* @param $1: The name of the virtual server which is to be deleted
*
* @return 0 If the image is not present in the directory upon completion
* 1 If given invalid parameters
* 2 If image deletion failed
*/
int main(int argC, char* argV[]) {
if (argC != 2) {
printf("Error: Wrong number of parameters\n");
return 1;
}
// Get the virtual server name
char* imageName = argV[1];
// Check if the virtual server name is between 1 and 8 characters
if (isImageNameInvalid(imageName))
return 1;
printf("Deleting virtual server %s... ", imageName);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDeleteDmOutput* output;
// Delete z/VM virtual server
int rc = smImage_Delete_DM(&context, "", 0, "", // Authorizing user, password length, password.
imageName, // Image name.
1, // Do not erase data from disks being released.
&output);
if (rc || (output->common.returnCode && output->common.returnCode != 400
&& output->common.returnCode != 592)
|| (output->common.reasonCode && output->common.reasonCode != 4
&& output->common.reasonCode != 0)) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,69 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include <stdio.h>
#include "vmapiVirtual.h"
#include "wrapperutils.h"
/**
* Disconnect network adapter.
*
* @param $1: The user for which a NIC is being disconnected
* @param $2: The virtual device address of the NIC being disconnected
*
* @return 0 If the NIC was successfully disconnected
* 1 If given invalid parameters
* 2 If the NIC could not be disconnected
*/
int main(int argC, char * argV[]) {
if (argC != 3) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* address = argV[2];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
printf("Disconnecting NIC %s on %s... ", address, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiVirtualNetworkAdapterDisconnectDmOutput* output;
int rc = smVirtual_Network_Adapter_Disconnect_DM(&context, "", 0, "",
image, address, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,100 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Get the free and used space in a given disk pool.
*
* @param $1: The name of the guest to get the disk pool from
* @param $2: The name of the disk pool
* @param $2: Free or used space in the disk pool
*
* @return 0 If the disk pool was successfully printed
* 1 If given invalid parameters
* 2 If the disk pool could not be retrieved
*/
int main(int argC, char * argV[]) {
if (argC != 4) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char * image = argV[1];
char * pool = argV[2];
char * spaceStr = argV[3];
// Get the disk space
int space;
if (strcmp(spaceStr, "free") == 0) {
space = 2;
} else if (strcmp(spaceStr, "used") == 0) {
space = 3;
} else {
printf("Error: Disk pool space must be free or used\n");
return 1;
}
VmApiInternalContext context;
vmApiImageRecord * record;
char temp[1024];
char * token;
char diskStr[256];
int i;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageVolumeSpaceQueryDmOutput * output;
// Get disk pool used space
int rc = smImage_Volume_Space_Query_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, space, // Used space
3, // Query group
pool, &output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
record = output->recordList;
for (i = 0; i < output->recordCount; i++) {
strncpy(temp, record->imageRecord, record->imageRecordLength);
token = strtok_r(temp, " ", &context); // VolId
strcpy(diskStr, token);
strcat(diskStr, " ");
token = strtok_r(NULL, " ", &context); // Device type
strcat(diskStr, token);
strcat(diskStr, " ");
token = strtok_r(NULL, " ", &context); // Start address
strcat(diskStr, token);
strcat(diskStr, " ");
token = strtok_r(NULL, " ", &context); // Size
strcat(diskStr, token);
printf("%s\n", diskStr);
record++;
}
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,73 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Get a list of defined disk pools.
*
* @param $1: The name of the guest to get a list of disk pools for
*
* @return 0 If the disk pools were successfully printed
* 1 If given invalid parameters
* 2 If the disk pools could not be retrieved
*/
int main(int argC, char * argV[]) {
if (argC != 2) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
VmApiInternalContext context;
vmApiImageRecord * record;
char * poolName;
int i;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageVolumeSpaceQueryDmOutput * output;
int rc = smImage_Volume_Space_Query_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, 1, // Query definition
3, // Query group
"*", // All areas
&output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
record = output->recordList;
for (i = 0; i < output->recordCount; i++) {
// Get disk pool name from each record
poolName = strtok_r(record->imageRecord, " ", &context);
if (poolName) {
printf("%s\n", poolName);
}
record++;
}
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
-63
View File
@@ -1,63 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Prints out the specified DirMaint profile entry.
*
* @param $1: The name of the profile which is to be listed
*
* @return 0 If the IPL entry was successfully printed
* 1 If given invalid parameters
* 2 If the IPL entry could not be retrieved
*/
int main(int argC, char * argV[]) {
if (argC != 2) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageIplQueryDmOutput* output;
int rc = smImage_IPL_Query_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, &output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("IPL target: %s\n"
"LoadParms: %s\n"
"Parameters: %s\n", output->savedSystem, output->loadParameter,
output->parameters);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,90 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Prints out the specified DirMaint directory entry.
*
* @param $1: The name of the z/VM guest which is to be listed
*
* @return 0 If the image record was successfully printed
* 1 If given invalid parameters
* 2 If the image could not be retrieved
*/
int main(int argC, char * argV[]) {
if (argC != 2) {
printf("Error: Wrong number of parameters\n");
return 1;
}
// Image name
char * image = argV[1];
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageQueryDmOutput * output;
// Query DirMaint directory entry
int rc = smImage_Query_DM(&context, "", 0, "", image, &output, false);
// Handle return code and reason code
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return code: %d\n", rc) : printf(" Return code: %d\n"
" Reason code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
// Print out DirMaint directory entry
int recCount = output->imageRecordCount;
int recLen = output->imageRecordList[0].imageRecordLength - 8;
// Line to print
char line[recLen], chs[4];
if (recCount > 0) {
int i;
int token = 0;
// Loop through image record and print out directory entry
for (i = 0; i < recCount; i++) {
memset(line, 0, recLen);
memcpy(line, output->imageRecordList[i].imageRecord, recLen);
// Print lines that are not comment
trim(line);
// Copy first 4 characters
strncpy(chs, line, 4);
// If first 4 characters does not have * (comment)
if (!strstr(chs, "*")) {
// Print directory entry line
printf("%s\n", line);
}
}
}
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,62 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include <stdlib.h>
#include "wrapperutils.h"
/**
* Prints out a list of defined image names on a z/VM system.
*
* @return 0 If the list of image names was successfully printed
* 1 If given invalid parameters
* 2 If the image name list could not be retrieved
*/
int main(int argC, char * argV[]) {
if (argC > 1) {
printf("Error: Wrong number of parameters\n");
return 1;
}
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageNameQueryDmOutput* output;
int rc = smImage_Name_Query_DM(&context, "", 0, "", // Authorizing user, password length, password.
"NA", // Doesn't matter what image name we use.
&output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
int i;
int n = output->nameCount;
for (i = 0; i < n; i++) {
printf("%s\n", output->nameList[i]);
}
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,90 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Prints out the specified profile.
*
* @param $1: The name of the profile which is to be listed
*
* @return 0 If the profile was successfully printed
* 1 If given invalid parameters
* 2 If the profile could not be retrieved
*/
int main(int argC, char * argV[]) {
if (argC != 2) {
printf("Error: Wrong number of parameters\n");
return 1;
}
// Image name
char * profile = argV[1];
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiProfileQueryDmOutput * output;
// Query DirMaint profile
int rc = smProfile_Query_DM(&context, "", // Authorizing user
0, // Password length
"", // Password
profile,// Profile name
&output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return code: %d\n", rc) : printf(" Return code: %d\n"
" Reason code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
// Print out DirMaint directory entry
int i;
int recCount = output->profileRecordCount;
int recLen = 72;
// Line to print
char line[recLen], chs[4];
if (recCount > 0) {
// Loop through image record and print out directory entry
for (i = 0; i < recCount; i++) {
memset(line, 0, recLen);
memcpy(line, output->profileRecordList[i].recordData, recLen);
// Print lines that are not comment
trim(line);
// Copy first 4 characters
strncpy(chs, line, 4);
// If first 4 characters does not have * (comment)
if (!strstr(chs, "*")) {
printf("%s\n", line);
}
} // End of for
}
} // End of else
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
@@ -1,93 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Prints out information about disk spaces on a z/VM system.
*
* @param $1: The type of query to run
* @param $2: The type of space to query
*
* @return 0 If the virtual image was created
* 1 If given invalid parameters
* 2 If the image name list could not be retrieved
*/
int main(int argC, char * argV[]) {
if (argC != 3) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* queryType = argV[1];
char* entryType = argV[2];
int iQueryType;
if (!strcmp(queryType, "definition")) {
iQueryType = 1;
} else if (!strcmp(queryType, "free")) {
iQueryType = 2;
} else if (!strcmp(queryType, "used")) {
iQueryType = 3;
} else {
return 1;
}
int iEntryType;
if (!strcmp(entryType, "volume")) {
iEntryType = 1;
} else if (!strcmp(entryType, "region")) {
iEntryType = 2;
} else if (!strcmp(entryType, "group")) {
iEntryType = 3;
} else {
return 1;
}
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageVolumeSpaceQueryDmOutput* output;
int rc = smImage_Volume_Space_Query_DM(&context, "", 0, "", // Authorizing user, password length, password.
"NA", // Doesn't matter what image name we use.
iQueryType, iEntryType, "*", // List all spaces of specified type.
&output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
int i, l;
int n = output->recordCount;
int p = 0;
for (i = 0; i < n; i++) {
l = output->recordList[i].imageRecordLength;
printf("%.*s\n", l, output->recordList[0].imageRecord + p);
p = p + l;
}
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,69 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Removes a disk from a virtual image's directory entry
*
* @param $1: The name of the guest from which a disk is to be removed
* @param $2: The virtual device address of the volume which is to be removed
*
* @return 0 If the disk is not in the image's directory entry upon completion
* 1 If given invalid parameters
* 2 If the disk allocation failed
*/
int main(int argC, char* argV[]) {
if (argC != 3) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* vdev = argV[2];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image) || isDevNumberInvalid(vdev))
return 1;
printf("Removing disk %s on %s... ", vdev, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDiskDeleteDmOutput* output;
int rc = smImage_Disk_Delete_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, vdev, 0, // Use default setting for whether to erase data.
&output);
if (rc || output->common.returnCode || output->common.reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,68 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include <string.h>
#include "vmapiVirtual.h"
#include "wrapperutils.h"
/**
* Removes a network adapter from a virtual image's directory entry.
*
* @param $1: The z/VM guest from which the NIC is to be removed
* @param $2: The virtual device address of the NIC which is to be removed
*
* @return 0 If the NIC was removed successfully
* 1 If given invalid parameters
* 2 If the NIC removal failed
*/
int main(int argC, char * argV[]) {
if (argC != 3) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* address = argV[2];
if (isImageNameInvalid(image))
return 1;
printf("Removing NIC %s on %s... ", address, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiVirtualNetworkAdapterDeleteDmOutput* output;
int rc = smVirtual_Network_Adapter_Delete_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, address, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,64 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Removes a processor to a virtual image's directory entry.
*
* @param $1: The name of the guest to which a processor is to be removed
* @param $2: The virtual address of the processor which is to be removed
*
* @return 0 If the processor was successfully removed
* 1 If given invalid parameters
* 2 If the specified processor remains after attempted removal
*/
int main(int argC, char * argV[]) {
if (argC != 3) {
printf("Error: Wrong number of parameters");
return 1;
}
char* image = argV[1];
char* address = argV[2]; // Hexedecimal string, 00-3F
printf("Removing processor %s on %s... ", address, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageCpuDeleteDmOutput* output;
int rc = smImage_CPU_Delete_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, address, &output);
if (rc || (output->returnCode && output->returnCode != 520
|| (output->reasonCode && output->reasonCode != 30))) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
-202
View File
@@ -1,202 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Replace specified user directory entry.
*
* @param $1: Name of the z/VM guest to replace the directory entry
* @param $2: Text file containing the new directory entry
*
* @return 0 If directory entry was successfully replaced
* 1 If given invalid parameters
* 2 If directory entry replace failed
*/
int main(int argC, char* argV[]) {
if (argC != 3) {
printf("Error: Wrong number of parameters\n");
return 1;
}
// Get user name
char* image = argV[1];
char* file = argV[2];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
// Lock user directory entry
int rc = lockImage(image, &context);
FILE * userDirEntry;
// Open file for user directory entry
userDirEntry = fopen(file, "r");
if (userDirEntry == NULL)
printf("Error: Failed to open %s\n", file);
else {
// Read in user directory entry
int recordCount = 0;
int i = 0;
char line[100], buffer[30][100];
char * ptr;
while (!feof(userDirEntry)) {
// Read in 100 characters
fgets(line, 100, userDirEntry);
// Delete new line
ptr = strstr(line, "\n");
if (ptr != NULL) {
strncpy(ptr, "\0", 1);
}
// Copy line into buffer
strcpy(buffer[i], line);
i++;
if (!feof(userDirEntry))
recordCount++;
}
// Close user directory entry
fclose(userDirEntry);
// Create image record
vmApiImageRecord record[recordCount];
// Copy buffer contents into image record
for (i = 0; i < recordCount; i++) {
record[i].imageRecordLength = strlen(buffer[i]);
record[i].imageRecord = buffer[i];
}
// Replace user directory entry
rc = replaceImage(image, &context, &record, recordCount);
}
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return rc;
}
/**
* Lock specified user directory entry.
*
* @param $1: Name of the z/VM guest directory entry to lock
*
* @return 0 If directory entry was successfully locked
* 1 If given invalid parameters
* 2 If directory entry lock failed
*/
int lockImage(char * image, VmApiInternalContext context) {
printf("Locking %s... ", image);
vmApiImageLockDmOutput * lockOutput;
int rc = smImage_Lock_DM(&context, "", // Authorizing user
0, // Password length
"", // Password
image, // Image name
"", // Device virtual address
&lockOutput);
if (rc || (lockOutput->returnCode && lockOutput->returnCode != 400
|| (lockOutput->reasonCode && lockOutput->reasonCode != 12))) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", lockOutput->returnCode,
lockOutput->reasonCode);
return 2;
} else {
printf("Done\n");
return 0;
}
}
/**
* Unlock specified user directory entry.
*
* @param $1: Name of the z/VM guest directory entry to unlock
*
* @return 0 If directory entry was successfully unlocked
* 1 If given invalid parameters
* 2 If directory entry unlock failed
*/
int unlockImage(char * image, VmApiInternalContext context) {
printf("Unlocking %s... ", image);
vmApiImageUnlockDmOutput * unlockOutput;
int rc = smImage_Unlock_DM(&context, "", // Authorizing user
0, // Password length
"", // Password
image, // Image name
"", // Device virtual address
&unlockOutput);
if (rc || unlockOutput->returnCode || unlockOutput->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", unlockOutput->returnCode,
unlockOutput->reasonCode);
return 2;
} else {
printf("Done\n");
return 0;
}
}
/**
* Replace specified user directory entry.
*
* @param $1: Name of the z/VM guest to replace the directory entry
*
* @return 0 If directory entry was successfully unlocked
* 1 If given invalid parameters
* 2 If directory entry unlock failed
*/
int replaceImage(char * image, VmApiInternalContext context,
vmApiImageRecord * record, int recordCount) {
printf("Replacing directory entry of %s... ", image);
vmApiImageReplaceDmOutput* replaceOutput;
int rc = smImage_Replace_DM(&context, "", // Authorizing user
0, // Password length
"", // Password
image, // Image name
recordCount, // Record count
record, // Record array
&replaceOutput);
if (rc || replaceOutput->returnCode || replaceOutput->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", replaceOutput->returnCode,
replaceOutput->reasonCode);
// Unlock user directory entry
rc = unlockImage(image, context);
return 2;
} else {
printf("Done\n");
return 0;
}
}
-71
View File
@@ -1,71 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Sets the IPL statement for the z/VM guest with the specified name.
*
* @param $1: The name of the guest for which the IPL statement is to be set.
* @param $2: The new IPL statement's IPL target string.
* @param $3: The new IPL statement's load parameter string.
* @param $4: The new IPL statement's parameter string.
*
* @return 0 If the virtual image now exists
* 1 If given invalid parameters
* 2 If image creation failed
*/
int main(int argC, char * argV[]) {
if (argC != 5) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* ipltarget = argV[2];
char* loadparms = argV[3];
char* parms = argV[4];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
printf("Setting IPL statement on %s... ", image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageIplSetDmOutput* output;
int rc = smImage_IPL_Set_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, ipltarget, loadparms, parms, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,67 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Sets the password for the z/VM guest with the specified name.
*
* @param $1: The name of the guest for which a password is to be set
* @param $2: The guest's new password
*
* @eeturn 0 If the password was set
* 1 If given invalid parameters
* 2 If setting the password failed
*/
int main(int argC, char * argV[]) {
if (argC != 3) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* password = argV[2];
// Check if the userID is between 1 and 8 characters
if (isImageNameInvalid(image))
return 1;
printf("Setting password for %s... ", image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImagePasswordSetDmOutput* output;
int rc = smImage_Password_Set_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, strlen(password), password, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,140 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include <stdlib.h>
#include "smPublic.h"
int quantum = 64;
int smMemoryGroupInitialize(struct _VmApiInternalContext* vmapiContextP) {
smMemoryGroupContext * context = vmapiContextP->memContext;
// Set up a tracking array with no allocated chunks yet
context->arraySize = quantum;
context->chunks = (void **) malloc(context->arraySize * sizeof(void *));
if (context->chunks == 0) {
errorLine(vmapiContextP, "smMemoryGroupInitialize: out of memory");
return MEMORY_ERROR;
}
context->lastChunk = -1;
// Return successfully
return 0;
}
void * smMemoryGroupAlloc(struct _VmApiInternalContext* vmapiContextP,
size_t size) {
int rc;
smMemoryGroupContext * context = vmapiContextP->memContext;
// Check that memory structure is initialized, if not then call to init.
if (context->arraySize < quantum || context->chunks == 0) {
rc = smMemoryGroupInitialize(vmapiContextP);
if (rc != 0)
return 0; // Return of 0 is error in this case
}
// Increment to the next unused entry in the tracking array
context->lastChunk = context->lastChunk + 1;
// If we're past the end of the array, enlarge it by the quantum
if (context->lastChunk == context->arraySize) {
context->arraySize = context->arraySize + quantum;
void ** reallocated = (void **) realloc(context->chunks,
context->arraySize * sizeof(void *));
if (NULL == reallocated) {
errorLine(vmapiContextP, "smMemory realloc: out of memory");
return NULL;
} else {
context->chunks = reallocated;
}
}
// Obtain the memory and record it in the tracking array
context->chunks[context->lastChunk] = malloc(size);
// clear out the memory chunk if obtained
if (context->chunks[context->lastChunk]) {
memset(context->chunks[context->lastChunk], 0, size);
}
// Return the pointer
return context->chunks[context->lastChunk];
}
void * smMemoryGroupRealloc(struct _VmApiInternalContext* vmapiContextP,
void * chunk, size_t size) {
smMemoryGroupContext * context = vmapiContextP->memContext;
// Variables
int i;
int rc;
void * newChunk;
// Check that memory structure is initialized, if not then call to init
if (context->arraySize < quantum || context->chunks == 0) {
rc = smMemoryGroupInitialize(vmapiContextP);
if (rc != 0)
return 0; // Return of 0 is error in this case
}
// Find this chunk in the tracking array and reallocate it
newChunk = NULL;
for (i = 0; (i <= context->lastChunk) && (newChunk == NULL); i++) {
if (context->chunks[i] == chunk) {
char *reallocated = realloc(context->chunks[i], size);
if (NULL == reallocated) {
errorLine(vmapiContextP,
"smMemory group realloc: out of memory");
return NULL;
} else {
context->chunks[i] = reallocated;
}
newChunk = context->chunks[i];
}
}
// Return the new pointer
return newChunk;
}
int smMemoryGroupFreeAll(struct _VmApiInternalContext* vmapiContextP) {
smMemoryGroupContext * context = vmapiContextP->memContext;
// Variables
int i;
// Check that memory structure is initialized, if not then just return
if (context->arraySize < quantum || context->chunks == 0) {
return 0;
}
// Free all the memory recorded in the tracking array
for (i = 0; i <= context->lastChunk; i++) {
if (context->chunks[i])
FREE_MEMORY(context->chunks[i]);
}
// Reset the tracking array to empty
if (context->arraySize != quantum) {
context->arraySize = quantum;
context->chunks = (void **) realloc(context->chunks, context->arraySize
* sizeof(void *));
}
context->lastChunk = -1;
// Return successfully
return 0;
}
int smMemoryGroupTerminate(struct _VmApiInternalContext* vmapiContextP) {
smMemoryGroupContext * context = vmapiContextP->memContext;
// Check that memory structure is initialized, if not then just return
if (context->arraySize < quantum || context->chunks == 0) {
return 0;
}
// Free the tracking array
FREE_MEMORY(context->chunks);
// Return successfully
return 0;
}
-659
View File
@@ -1,659 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#ifndef AF_IUCV
#define AF_IUCV 32
#endif
#ifndef PF_IUCV
#define PF_IUCV AF_IUCV
#endif
struct sockaddr_iucv {
sa_family_t siucv_family;
unsigned short siucv_port;
unsigned int siucv_addr;
char siucv_nodeid[8];
char siucv_userid[8];
char siucv_name[8];
};
// This macro is used to check return values on close
// and do one retry if the close had an EINTR error
#define CHECK_SOCKET_CLOSE(_SOCKETID_) \
if (retValue)\
{\
saveCloseErrno = errno;\
sprintf(line, "close() error on socket %d return value %d errno %d\n", _SOCKETID_,retValue, saveCloseErrno);\
errorLog(vmapiContextP,\
__func__,\
TO_STRING(__LINE__),\
RcIucv,\
retValue,\
line);\
if (EINTR == saveCloseErrno)\
{\
retValue = close(_SOCKETID_);\
if (retValue)\
{\
saveCloseErrno = errno;\
sprintf(line, "retried close() error on socket %d return value %d errno %d\n", _SOCKETID_,retValue, saveCloseErrno);\
errorLog(vmapiContextP,\
__func__,\
TO_STRING(__LINE__),\
RcIucv,\
retValue,\
line);\
}\
}\
}
static const char* default_IUCV_server = "VSMREQIU";
static const char* IUCV_programName = "DMSRSRQU";
int smSocketInitialize(struct _VmApiInternalContext* vmapiContextP,
int * sockId) {
#define RETRY_CONNECTION_LIMIT 10
const int SLEEP_TIMES[RETRY_CONNECTION_LIMIT] = { 0, 0, 1, 1, 2, 2, 8, 8,
16, 32 };
int retValue;
char line[LINESIZE];
int length;
int retryConnection;
int saveErrno, saveCloseErrno;
struct sockaddr_iucv serverSockAddr;
struct timeval timeoutValue;
// If the trace file has not been read yet, do it
if (!(vmapiContextP->smTraceDetails->traceFileRead)) {
readTraceFile(vmapiContextP);
}
// Place holders for context and background starting
if (1 != vmapiContextP->contextCreatedFlag) {
retValue = initializeThreadSemaphores(vmapiContextP, "", 1); // Create context using no name to override current context name
if (retValue) {
sprintf(
line,
"smSocketInitialize(): context reserve() returned error: %d\n",
retValue);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcRuntime,
RsUnexpected, line);
return PROCESSING_ERROR;
}
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line,
"smSocketInitialize: initializeThreadSemaphores completed successfully.\n");
TRACE_END_DEBUG(vmapiContextP, line);
// If the backend is not marked as running, check it
if (!vmapiContextP->checkBackendFlag) {
retValue = vmbkendCheck(vmapiContextP);
if (retValue)
return retValue; // If any error return
}
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
// Get a local socket
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "smSocketInitialize: trying to obtain local socket.\n");
TRACE_END_DEBUG(vmapiContextP, line);
*sockId = socket(PF_IUCV, SOCK_STREAM, IPPROTO_IP);
if (*sockId == -1) {
sprintf(line, "smSocketInitialize(): socket() returned errno: %d\n",
errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv, *sockId,
line);
return SOCKET_OBTAIN_ERROR;
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(
line,
"smSocketInitialize: local socket id %d obtained. Now trying connect loop. \n",
*sockId);
TRACE_END_DEBUG(vmapiContextP, line);
// Initialize the server IUCV socket structure
memset(&serverSockAddr, 0, sizeof(serverSockAddr));
serverSockAddr.siucv_family = AF_IUCV;
serverSockAddr.siucv_port = 0;
serverSockAddr.siucv_addr = 0;
memset(&serverSockAddr.siucv_nodeid, ' ',
sizeof(serverSockAddr.siucv_nodeid));
memset(&serverSockAddr.siucv_userid, ' ',
sizeof(serverSockAddr.siucv_userid));
memset(&serverSockAddr.siucv_name, ' ', sizeof(serverSockAddr.siucv_name));
timeoutValue.tv_usec = 0;
timeoutValue.tv_sec = 60; // Changed to 60 now that AF IUCV and CMS are working better
retValue = setsockopt(*sockId, SOL_SOCKET, SO_SNDTIMEO,
(struct timeval *) &timeoutValue, sizeof(struct timeval));
if (retValue < 0) {
sprintf(line, "setsockopt(): connect timeout returned errno %d\n",
errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv, errno,
line);
retValue = close(*sockId);
CHECK_SOCKET_CLOSE(*sockId);
return SOCKET_PROCESSING_ERROR;
}
// Do we have an IUCV userID or just use the default?
// Do not copy in the null terminator on strings
length = strlen(vmapiContextP->IucvUserid);
if (length <= 0 || length > 8) {
memcpy(&serverSockAddr.siucv_userid, default_IUCV_server, strlen(
default_IUCV_server));
} else {
memcpy(&serverSockAddr.siucv_userid, &vmapiContextP->IucvUserid,
strlen(vmapiContextP->IucvUserid));
}
// Add in the iucv program name constant
memcpy(&serverSockAddr.siucv_name[0], IUCV_programName, strlen(
IUCV_programName));
// Try to connect to the IUCV server
for (retryConnection = 1;; retryConnection++) {
retValue = connect(*sockId, (struct sockaddr *) &serverSockAddr,
sizeof(serverSockAddr));
if (retValue != 0) {
saveErrno = errno;
sprintf(line, "connect() of socket %d returned %d errno %d\n",
*sockId, retValue, errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
retValue, line);
// If we have exceeded the retry limit, then shutdown, close and return with error
if (retryConnection >= RETRY_CONNECTION_LIMIT) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line,
"smSocketInitialize: connect retry limit exceeded.\n");
TRACE_END_DEBUG(vmapiContextP, line);
retValue = close(*sockId);
CHECK_SOCKET_CLOSE(*sockId);
switch (saveErrno) {
case ECONNREFUSED:
return SOCKET_CONNECT_REFUSED_ERROR;
case EAGAIN:
return SOCKET_CONNECT_TRYAGAIN_ERROR;
default:
return SOCKET_PROCESSING_ERROR;
}
}
// Is this an errno that we can retry? If so continue the loop
switch (saveErrno) {
case ECONNREFUSED:
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line,
"====>>ECONNREFUSED, going to close and retry connect.\n");
TRACE_END_DEBUG(vmapiContextP, line);
case EAGAIN:
if (saveErrno == EAGAIN) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line,
"====>>EAGAIN, going to close and retry connect.\n");
TRACE_END_DEBUG(vmapiContextP, line);
}
// Close the current socket
// Get a new one, and retry the connect
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "====>>closing the socket before retry.\n");
TRACE_END_DEBUG(vmapiContextP, line);
retValue = close(*sockId);
CHECK_SOCKET_CLOSE(*sockId)
;
// Delay for a while to give SMAPI some time to restart
if (SLEEP_TIMES[retryConnection] > 0) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "+++++++++ Sleeping for %d seconds\n",
SLEEP_TIMES[retryConnection]);
TRACE_END_DEBUG(vmapiContextP, line);
sleep(SLEEP_TIMES[retryConnection]);
}
*sockId = socket(PF_IUCV, SOCK_STREAM, IPPROTO_IP);
if (*sockId == -1) {
sprintf(
line,
"smSocketInitialize(): socket() returned errno: %d\n",
errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcIucv, *sockId, line);
return SOCKET_OBTAIN_ERROR;
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(
line,
"smSocketInitialize: retry obtained new local socket id %d. Now retrying connect.\n",
*sockId);
TRACE_END_DEBUG(vmapiContextP, line);
// Reset the return and reason codes in the context
vmapiContextP->rc = 0;
vmapiContextP->reason = 0;
continue; // Try to connect again
default:
break; // Shutdown the socket and return with error if errno is not listed
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "====>>closing the socket \n");
TRACE_END_DEBUG(vmapiContextP, line);
retValue = close(*sockId);
CHECK_SOCKET_CLOSE(*sockId);
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "====>>return from closing the socket \n");
TRACE_END_DEBUG(vmapiContextP, line);
TRACE_EXIT_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
return SOCKET_PROCESSING_ERROR;
} else
break; // Got a good connection, leave loop
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line,
"smSocketInitialize: Socket connect completed successfully.\n");
TRACE_END_DEBUG(vmapiContextP, line);
TRACE_EXIT_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
return 0;
}
int smSocketWrite(struct _VmApiInternalContext* vmapiContextP, int sockId,
char * data, int dataLen) {
int retValue;
char line[LINESIZE];
struct timeval timeoutValue;
int onValue = 1;
int saveErrno, saveCloseErrno;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_BUFFER_OUT);
dumpArea(vmapiContextP, data, dataLen);
TRACE_END;
// Set the send socket timeout value
timeoutValue.tv_usec = 0;
timeoutValue.tv_sec = Socket_Timeout;
retValue = setsockopt(sockId, SOL_SOCKET, SO_SNDTIMEO,
(struct timeval *) &timeoutValue, sizeof(struct timeval));
if (retValue < 0) {
sprintf(line, "setsockopt(): send timeout returned errno %d\n", errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv, errno,
line);
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
return SOCKET_PROCESSING_ERROR;
}
// Set the reuse socket address value
onValue = 1;
retValue = setsockopt(sockId, SOL_SOCKET, SO_REUSEADDR, (int *) &onValue,
sizeof(int));
if (retValue < 0) {
sprintf(line, "setsockopt(): reuse addr returned errno %d\n", errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv, errno,
line);
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
return SOCKET_PROCESSING_ERROR;
}
// Write the data to the socket
while (dataLen > 0) {
retValue = send(sockId, (void *) data, dataLen, 0);
if (retValue < 0) {
saveErrno = errno;
// Log a special message and set the return and reason code if a timeout
if (errno == EAGAIN) {
sprintf(line, "smSocketWrite(): timeout errno %d\n", errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
RsSocketTimeout, line);
} else {
sprintf(line, "smSocketWrite(): send() returned errno %d\n",
errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
errno, line);
}
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
if (saveErrno == EAGAIN)
return SOCKET_TIMEOUT_ERROR;
if (saveErrno == ENOTCONN)
return SOCKET_WRITE_RETRYABLE_ERROR;
return SOCKET_WRITE_ERROR;
}
data = data + retValue;
dataLen = dataLen - retValue;
}
TRACE_EXIT_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
return 0;
}
int smSocketRead(struct _VmApiInternalContext* vmapiContextP, int sockId,
char * buff, int len) {
int retValue;
int lenRead;
int retryNoData;
char line[LINESIZE];
retryNoData = 0;
struct timeval timeoutValue;
unsigned long ulTimeoutSeconds;
long ulTimeoutSecondsRequested = 0;
char * ptrTimeOutValue;
int onValue = 1;
void * buffPtr;
int buffLength;
int saveErrno, saveCloseErrno;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
buffPtr = (void *) buff;
buffLength = len;
ulTimeoutSeconds = Socket_Timeout;
// Obtain read timeout environment variable
ptrTimeOutValue = getenv("ZVMMAP_READ_TIMEOUT_SECONDS");
if (ptrTimeOutValue) {
ulTimeoutSecondsRequested = atol(ptrTimeOutValue);
if (ulTimeoutSecondsRequested > 0) {
ulTimeoutSeconds = ulTimeoutSecondsRequested;
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(
line,
"Socket read timeout set from enviromentVariable. %lu seconds.\n",
ulTimeoutSeconds);
TRACE_END_DEBUG(vmapiContextP, line);
}
}
// Set the read socket timeout value
timeoutValue.tv_usec = 0;
timeoutValue.tv_sec = ulTimeoutSeconds;
retValue = setsockopt(sockId, SOL_SOCKET, SO_RCVTIMEO,
(struct timeval *) &timeoutValue, sizeof(struct timeval));
if (retValue < 0) {
sprintf(line, "setsockopt(): receive timeout returned errno %d\n",
errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv, errno,
line);
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
return SOCKET_PROCESSING_ERROR;
}
// Set the reuse socket address value
onValue = 1;
retValue = setsockopt(sockId, SOL_SOCKET, SO_REUSEADDR, (int *) &onValue,
sizeof(int));
if (retValue < 0) {
sprintf(line, "setsockopt(): reuse addr returned errno %d\n", errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv, errno,
line);
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
return SOCKET_PROCESSING_ERROR;
}
/* Read the data from the socket */
lenRead = 0;
while (lenRead < len) {
retValue = recv(sockId, buffPtr, buffLength, 0);
if (retValue < 0) {
saveErrno = errno;
// Log a special message and set the return and reason code if a timeout
if (errno == EAGAIN) {
sprintf(line, "smSocketRead(): timeout errno %d\n", errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
RsSocketTimeout, line);
} else {
sprintf(line, "smSocketRead(): recv() returned errno %d\n",
errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
errno, line);
}
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
if (saveErrno == EAGAIN)
return SOCKET_TIMEOUT_ERROR;
if (saveErrno == ENOTCONN)
return SOCKET_READ_RETRYABLE_ERROR;
return SOCKET_READ_ERROR;
}
// No data returned?
// Retry 10 times if we haven't received any data
if (retValue == 0) {
retryNoData++;
if (retryNoData > 10 && lenRead == 0) {
sprintf(line,
"smSocketRead(): recv() returned no data after 10 retries.\n");
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
RsUnexpected, line);
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
return SOCKET_READ_ERROR;
}
}
lenRead += retValue;
buffPtr += retValue;
buffLength -= retValue;
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_BUFFER_IN);
dumpArea(vmapiContextP, buff, lenRead);
TRACE_END;
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "smSocketRead(): read %d bytes of data \n", lenRead);
TRACE_END_DEBUG(vmapiContextP, line);
TRACE_EXIT_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
return 0;
}
int smSocketReadLoop(struct _VmApiInternalContext* vmapiContextP, int sockId,
char * buff, int len) {
int retValue;
int lenRead;
int retryNoData;
char line[LINESIZE];
retryNoData = 0;
struct timeval timeoutValue;
unsigned long ulTimeoutSeconds;
long ulTimeoutSecondsRequested = 0;
char * ptrTimeOutValue;
void * buffPtr;
int buffLength;
int saveErrno, saveCloseErrno;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "--> Inside smSocketReadLoop:.\n");
TRACE_END_DEBUG(vmapiContextP, line);
buffPtr = (void *) buff;
buffLength = len;
ulTimeoutSeconds = Socket_Indication_Timeout;
// Obtain read timeout environment variable
ptrTimeOutValue = getenv("ZVMMAP_READ_INDICATION_TIMEOUT_SECONDS");
if (ptrTimeOutValue) {
ulTimeoutSecondsRequested = atol(ptrTimeOutValue);
if (ulTimeoutSecondsRequested > 0) {
ulTimeoutSeconds = ulTimeoutSecondsRequested;
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(
line,
"Socket read indication timeout set from enviromentVariable. %lu seconds.\n",
ulTimeoutSeconds);
TRACE_END_DEBUG(vmapiContextP, line);
}
}
// Set the read socket timeout value
timeoutValue.tv_usec = 0;
timeoutValue.tv_sec = ulTimeoutSeconds;
retValue = setsockopt(sockId, SOL_SOCKET, SO_RCVTIMEO,
(struct timeval *) &timeoutValue, sizeof(struct timeval));
if (retValue < 0) {
sprintf(line, "setsockopt(): receive timeout returned errno %d\n",
errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv, errno,
line);
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
return SOCKET_PROCESSING_ERROR;
}
// Read the data from the socket
lenRead = 0;
while (lenRead < len) {
retValue = recv(sockId, buffPtr, buffLength, 0);
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "--> return value of recv inside socketReadLoop = %d \n",
retValue);
TRACE_END_DEBUG(vmapiContextP, line);
if (retValue < 0) {
saveErrno = errno;
// Log a special message and set the return and reason code if a timeout
if (errno == EAGAIN) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(
line,
"--> Errno inside socketReadLoop = %d for recv() return value = %d \n",
errno, retValue);
TRACE_END_DEBUG(vmapiContextP, line);
return CUSTOM_DEFINED_SOCKET_RETRY;
} else {
sprintf(line, "smSocketRead(): recv() returned errno %d\n",
errno);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
errno, line);
}
retValue = close(sockId);
CHECK_SOCKET_CLOSE(sockId);
if (saveErrno == EAGAIN)
return SOCKET_TIMEOUT_ERROR;
if (saveErrno == ENOTCONN)
return SOCKET_READ_RETRYABLE_ERROR;
return SOCKET_READ_ERROR;
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "smSocketRead(): retValue %d \n", retValue);
TRACE_END_DEBUG(vmapiContextP, line);
// No data returned?
//Retry 100 times if we haven't received any data
if (retValue == 0) {
retryNoData++;
if (retryNoData > 100 && lenRead == 0) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(
line,
"--> Errno inside socketReadLoop = %d for recv() return value = %d \n",
errno, retValue);
TRACE_END_DEBUG(vmapiContextP, line);
return CUSTOM_DEFINED_SOCKET_RETRY;
}
}
lenRead += retValue;
buffPtr += retValue;
buffLength -= retValue;
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_BUFFER_IN);
dumpArea(vmapiContextP, buff, lenRead);
TRACE_END;
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET,
TRACELEVEL_DETAILS);
sprintf(line, "smSocketRead(): read %d bytes of data \n", lenRead);
TRACE_END_DEBUG(vmapiContextP, line);
TRACE_EXIT_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
return 0;
}
int smSocketTerminate(struct _VmApiInternalContext* vmapiContextP, int sockId) {
int retValue;
char line[LINESIZE];
int saveCloseErrno;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
retValue = close(sockId);
if (retValue != 0) {
CHECK_SOCKET_CLOSE(sockId);
return SOCKET_PROCESSING_ERROR;
}
TRACE_EXIT_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER_SOCKET);
return 0;
}
@@ -1,929 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "smPublic.h"
#include "smSocket.h"
// Internal function to handle imbedded arrays in smapi output
static int handleArrays(struct _VmApiInternalContext* vmapiContextP,
enum tableParserModes mode, int * tableStartingIndex,
tableLayout table, tableParserParms * parms);
int parseBufferWithTable(struct _VmApiInternalContext* vmapiContextP,
enum tableParserModes mode, tableLayout table, tableParserParms *parms) {
int temp, dataType, i, rc, iSize, reachedByteCount;
int cStringArrayPtrOffset, cStringArrayPtrIndex;
int cStringCounterFieldOffset, cStringCounterFieldIndex;
int cStringStructIndex, cStringStructSize;
int cStringFieldIndex, cStringFieldOffset, cStringCurrentStructCount;
char line[LINESIZE];
reachedByteCount = 0; // Set this if we are at the end of the data
// If this is a SCAN mode; clear out the output fields
if (mode == scan) {
parms->outStringByteCount = 0;
for (i = 0; i < MAX_STRUCT_ARRAYS; i++) {
parms->outStructCount[i] = 0;
parms->outStructSizes[i] = 0;
}
}
parms->byteCount = 0;
// First entry in the table must be the base structure size
if (table[0][COL_1_TYPE] != APITYPE_BASE_STRUCT_LEN) {
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcRuntime,
RsUnexpected, "Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
}
// If this is scan mode, fill in the output array size for top level structure
if (mode == scan) {
parms->outStructSizes[0] = table[0][COL_6_SIZE_OR_OFFSET];
parms->outStructCount[0] = 1;
}
for (i = 1; (table[i][COL_1_TYPE] != APITYPE_END_OF_TABLE)
&& (parms->byteCount < parms->dataBufferSize); i++) {
dataType = table[i][COL_1_TYPE];
switch (dataType) {
case APITYPE_INT1:
if (mode == populate) {
memcpy((parms->inStructAddrs[0]
+ table[i][COL_6_SIZE_OR_OFFSET]),
parms->smapiBufferCursor, 1);
}
parms->smapiBufferCursor += 1;
parms->byteCount += 1;
break;
case APITYPE_INT4:
if (mode == populate) {
GET_INT(*((int *) (parms->inStructAddrs[0]
+ table[i][COL_6_SIZE_OR_OFFSET])),
parms->smapiBufferCursor);
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, "int 4 found Value %d stored at %p(+%d) \n",
*((int *) (parms->inStructAddrs[0]
+ table[i][COL_6_SIZE_OR_OFFSET])),
parms->inStructAddrs[0], table[i][COL_6_SIZE_OR_OFFSET]);
TRACE_END_DEBUG(vmapiContextP, line);
} else
parms->smapiBufferCursor += 4;
parms->byteCount += 4;
break;
case APITYPE_INT8:
if (mode == populate) {
GET_64INT(*((long long*) (parms->inStructAddrs[0]
+ table[i][COL_6_SIZE_OR_OFFSET])),
parms->smapiBufferCursor);
} else
parms->smapiBufferCursor += 8;
parms->byteCount += 8;
break;
case APITYPE_STRING_LEN:
case APITYPE_CHARBUF_LEN:
case APITYPE_C_STR_PTR:
if (APITYPE_C_STR_PTR == dataType) {
temp = strlen(parms->smapiBufferCursor);
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, "C string found of length %d <%s>\n", temp,
parms->smapiBufferCursor);
TRACE_END_DEBUG(vmapiContextP, line);
parms->byteCount += (temp + 1);
} else {
GET_INT(temp, parms->smapiBufferCursor);
parms->byteCount += 4;
parms->byteCount += temp;
}
// If the string size is incorrect, display error and return.
if (temp < table[i][COL_2_MINSIZE]) // Check for less than min first
{
sprintf(
line,
"String size found: %d (@ %p), not in correct range %d-%d \n",
temp, (parms->smapiBufferCursor - 4),
table[i][COL_2_MINSIZE], table[i][COL_3_MAXSIZE]);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected, line);
return PARSER_ERROR_INVALID_STRING_SIZE;
}
// If max is not -1, then check for max
if (-1 != table[i][COL_3_MAXSIZE] && temp > table[i][COL_3_MAXSIZE]) {
sprintf(
line,
"String size found: %d (@ %p), not in correct range %d-%d \n",
temp, (parms->smapiBufferCursor - 4),
table[i][COL_2_MINSIZE], table[i][COL_3_MAXSIZE]);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected, line);
return PARSER_ERROR_INVALID_STRING_SIZE;
}
// If scan update the string byte count
if (mode == scan) {
if (temp > 0) {
parms->outStringByteCount += (temp + 1);
}
if (APITYPE_CHARBUF_LEN == dataType) // Skip past the buf count row in table
{
i++;
(parms->outStringByteCount)--; // Don't need null terminator for char buf
}
} else { // If populate then set the char * in struct; copy the string/charbuf into the buffer
if (temp > 0) {
*((char **) ((parms->inStructAddrs[0]
+ table[i][COL_6_SIZE_OR_OFFSET])))
= parms->inStringCursor;
// If this ia a null terminated string just just strcpy, else use memcpy
if (APITYPE_C_STR_PTR == dataType) {
strcpy(parms->inStringCursor, parms->smapiBufferCursor);
parms->inStringCursor += temp + 1;
} else {
// copy the string/charbuf into the string buffer and add zero terminator if a string
memcpy(parms->inStringCursor, parms->smapiBufferCursor,
temp);
parms->inStringCursor += temp;
if (APITYPE_STRING_LEN == dataType) {
*(parms->inStringCursor) = '\0';
parms->inStringCursor++;
} else // Char buffer, so no need to add null terminator, but must update count field
{
i++;
*((int*) (parms->inStructAddrs[0]
+ table[i][COL_6_SIZE_OR_OFFSET])) = temp;
}
}
} else {
*((char**) (parms->inStructAddrs[0]
+ table[i][COL_6_SIZE_OR_OFFSET])) = NULL;
if (APITYPE_CHARBUF_LEN == dataType) // Set char buf count to 0
{
i++;
*((int*) (parms->inStructAddrs[0]
+ table[i][COL_6_SIZE_OR_OFFSET])) = 0;
}
}
}
if (APITYPE_C_STR_PTR == dataType) {
temp++; // Add on a byte for zero terminator
}
parms->smapiBufferCursor += temp;
break;
case APITYPE_ARRAY_LEN:
// Call a subroutine to handle this
if (0 != (rc = handleArrays(vmapiContextP, mode, &i, table, parms)))
return rc;
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(
line,
"** Finished handling an array in parseBufferwithTable. Buffer pointer %p \n",
parms->smapiBufferCursor);
TRACE_END_DEBUG(vmapiContextP, line);
break;
// If null terminated strings are in the base structure, we need to
// find them all until we use up the buffer. They must be the last
// type of data in the stream.
// For scan mode we need to add up all the string lengths (adding in a byte
// for the null terminator) until the buffer is empty.
// The static table will have the APITYPE_C_STR_ARRAY_PTR, then APITYPE_C_STR_ARRAY_COUNT,
// APITYPE_C_STR_STRUCT_LEN, APITYPE_C_STR_PTR in that order.
case APITYPE_C_STR_ARRAY_PTR:
cStringArrayPtrOffset = table[i][COL_6_SIZE_OR_OFFSET]; // Get the offset where the array ptr will be stored
cStringArrayPtrIndex = table[i][COL_4_STRUCT_INDEX];// Get the index of this field (should be 0 for this level)
i++; // Get next table value; which must be the counter info
if (APITYPE_C_STR_ARRAY_COUNT != table[i][COL_1_TYPE]) {
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected,
"Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
}
cStringCounterFieldOffset = table[i][COL_6_SIZE_OR_OFFSET];
cStringCounterFieldIndex = table[i][COL_4_STRUCT_INDEX];
i++; // Get next table value; which must be the c array structure size info
if (APITYPE_C_STR_STRUCT_LEN != table[i][COL_1_TYPE]) {
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected,
"Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
}
cStringStructSize = table[i][COL_6_SIZE_OR_OFFSET];
cStringStructIndex = table[i][COL_4_STRUCT_INDEX];
i++; // Get next table value; which must be the char * offset in the structure
if (APITYPE_C_STR_PTR != table[i][COL_1_TYPE]) {
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected,
"Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
}
cStringFieldIndex = table[i][COL_4_STRUCT_INDEX];
cStringFieldOffset = table[i][COL_6_SIZE_OR_OFFSET];
cStringCurrentStructCount = 0; // Used in populate
// Look through the rest of the buffer.
while (parms->byteCount < parms->dataBufferSize) {
iSize = strlen(parms->smapiBufferCursor) + 1;
// If this is scan, then increment the c string structure count,
// add the output size of the string + byte for zero terminator, and
// move buffer pointer past the string. Increment our count of data bytes
// processed also.
if (mode == scan) {
parms->outStringByteCount += iSize;
parms->smapiBufferCursor += iSize;
parms->outStructCount[cStringStructIndex]++;// Structures hold the char *
// If the size of the char * structure has not been filled in, do that now
if (0 == parms->outStructSizes[cStringStructIndex]) {
parms->outStructSizes[cStringStructIndex]
= cStringStructSize;
}
}
// If populate, copy the string to the storage area,
// store the pointer to the string in the correct array structure,
// then move to next string.
else {
// If this is the first string/structure, then set the structure pointer to to the
// starting address. The array notation will handle the rest of the addresses.
if (0 == cStringCurrentStructCount) {
*(char **) (parms->inStructAddrs[cStringArrayPtrIndex]
+ cStringArrayPtrOffset)
= parms->inStructAddrs[cStringStructIndex];
// Copy the struct count from the scan (input to this populate) into the
// count field
*((int *) (parms->inStructAddrs[cStringCounterFieldIndex]
+ cStringCounterFieldOffset))
= parms->outStructCount[cStringStructIndex];
}
// Copy the string into the string buffer
strcpy(parms->inStringCursor, parms->smapiBufferCursor);
// Set the char * pointer in the c structure of char *'s
memcpy((parms->inStructAddrs[cStringStructIndex]
+ (cStringCurrentStructCount * cStringStructSize)
+ cStringFieldOffset), &(parms->inStringCursor),
sizeof(char *));
// Advance to next string storage location and structure counter
parms->inStringCursor += iSize;
parms->smapiBufferCursor += iSize;
cStringCurrentStructCount++;
}
parms->byteCount += iSize;
}// End while buffer has data
break;
case APITYPE_ARRAY_STRUCT_COUNT: // Should not get here, subroutine should be handling this
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcRuntime,
RsUnexpected,
"Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
break;
default: // Error
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcRuntime,
RsUnexpected,
"Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
break;
}// End switch on table type
if (parms->byteCount >= parms->dataBufferSize) {
reachedByteCount = 1;
break; // End of for loop (Will we always get here vs find the last entry in the table?)
}
}// For loop until end of table
return 0;
}
/**
* Routine for doing all processing when an array is found.
* Can be recursively called if nested arrays
*/
static int handleArrays(struct _VmApiInternalContext* vmapiContextP,
enum tableParserModes mode, int * tableStartingIndex,
tableLayout table, tableParserParms *parms) {
// At our calling the table index should be at the arrayLen field, and next field should be
// struct len details.
int arrayByteMax, arrayByteCount, arrayPointerOffset, arrayPointerIndex, j,
dataType;
int dataBuffStructSize, outStructSize, structIndex, structByteCount;
int tableIndex, tableMaxIndex, temp, rc, arrayNestLevel;
int structCounter, structCounterField, structCounterIndex;
int noBufferStructLen; // set to 1 if SMAPI array doesn't have an inner structure length
char * structStorage;
char line[LINESIZE];
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line,
"** Array found. Starting table index is %d buffer pointer %p \n",
*tableStartingIndex, parms->smapiBufferCursor);
TRACE_END_DEBUG(vmapiContextP, line);
arrayByteCount = 0;
tableMaxIndex = 0; // Used to find end of table entries for this structure
structCounter = 0; // Used for populate of structure (an address multiplier)
GET_INT(arrayByteMax, parms->smapiBufferCursor);// Actual size of SMAPI array data
arrayPointerOffset = table[*tableStartingIndex][COL_6_SIZE_OR_OFFSET];
arrayPointerIndex = table[*tableStartingIndex][COL_4_STRUCT_INDEX];
arrayNestLevel = table[*tableStartingIndex][COL_5_NEST_LEVEL];
(*tableStartingIndex)++; // Position at the struct len in this table (or struct count)
// If the struct count field was specified, then make a note of that for populate step
if (APITYPE_ARRAY_STRUCT_COUNT == table[*tableStartingIndex][COL_1_TYPE]) {
if (mode == populate) {
structCounterField
= table[*tableStartingIndex][COL_6_SIZE_OR_OFFSET];
structCounterIndex = table[*tableStartingIndex][COL_4_STRUCT_INDEX];
} else {
structCounterField = 0;
structCounterIndex = 0;
}
(*tableStartingIndex)++; // Position at the struct length APITYPE_STRUCT_LEN
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, "SMAPI buffer array found: %d bytes \n", arrayByteMax);
TRACE_END_DEBUG(vmapiContextP, line);
structIndex = table[*tableStartingIndex][COL_4_STRUCT_INDEX];
outStructSize = table[*tableStartingIndex][COL_6_SIZE_OR_OFFSET];
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " Output struct size is %d \n", outStructSize);
TRACE_END_DEBUG(vmapiContextP, line);
// Figure out where is the ending index of the structure. This will be used in case the
// array is empty or the size of the structure is larger than we expect. (The actual
// structure could be bigger if the next release of SMAPI adds more fields at the end.)
tableMaxIndex = *tableStartingIndex;
while (arrayNestLevel < table[tableMaxIndex + 1][COL_5_NEST_LEVEL]
&& APITYPE_END_OF_TABLE != table[tableMaxIndex + 1][COL_1_TYPE]) {
tableMaxIndex++;
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " Structure's table max index is %d \n", tableMaxIndex);
TRACE_END_DEBUG(vmapiContextP, line);
// Find each structure until we reach array max
while (arrayByteCount < arrayByteMax) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " Loop to scan buffer for structure data. \n");
TRACE_END_DEBUG(vmapiContextP, line);
noBufferStructLen = 0;
tableIndex = *tableStartingIndex;
// Start at the field past the array in the table
// next table field should be the array structure size or if no nested inner structure
// the NOBUFFER keyword
if ((APITYPE_STRUCT_LEN != table[tableIndex][COL_1_TYPE])
&& (APITYPE_NOBUFFER_STRUCT_LEN
!= table[tableIndex][COL_1_TYPE])) {
printf("table index %d column1 type: %d \n", tableIndex,
table[tableIndex][COL_1_TYPE]);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcRuntime,
RsUnexpected,
"Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
}
structByteCount = 0;
GET_INT(dataBuffStructSize, parms->smapiBufferCursor);
// If the SMAPI buffer does not contain a nested structure size, then set
// the data pointer back to make the "implied" structure.
if (APITYPE_NOBUFFER_STRUCT_LEN == table[tableIndex][COL_1_TYPE]) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(
line,
" There is no inner structure length, so this length %d is first item, back up to re-read it later. \n",
dataBuffStructSize);
TRACE_END_DEBUG(vmapiContextP, line);
parms->smapiBufferCursor -= 4;
noBufferStructLen = 1; // set flag so that correct count at bottom of loop is done
}
if (mode == scan) {
parms->outStructCount[structIndex]++;
// If the size of the structure has not been filled in, do that now
if (0 == parms->outStructSizes[structIndex]) {
parms->outStructSizes[structIndex]
= table[tableIndex][COL_6_SIZE_OR_OFFSET];
}
} else { // If populate and structCounterField specified, then fill it in
if (0 == structCounter) {
*(char **) (parms->inStructAddrs[arrayPointerIndex]
+ arrayPointerOffset)
= parms->inStructAddrs[structIndex];
}
if (structCounterField) {
*((int *) (parms->inStructAddrs[structCounterIndex]
+ structCounterField))
= parms->outStructCount[structIndex];
}
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
if (noBufferStructLen == 1) {
sprintf(
line,
" table index %d implied Array struct index %d first data item size %d\n",
tableIndex, structIndex, dataBuffStructSize);
} else {
sprintf(line,
" table index %d Array struct index %d data size %d\n",
tableIndex, structIndex, dataBuffStructSize);
}
TRACE_END_DEBUG(vmapiContextP, line);
if (dataBuffStructSize == 0)
continue; // Probably rare?
tableIndex++;
// Loop until reaching the end of the table or if an imbedded structure size,
// When the data has been all read.
while ((noBufferStructLen == 0
&& (structByteCount < dataBuffStructSize))
|| (noBufferStructLen && (tableIndex <= tableMaxIndex))) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(
line,
" noBufferStructLen %d structByteCount %d table index %d \n",
noBufferStructLen, structByteCount, tableIndex);
TRACE_END_DEBUG(vmapiContextP, line);
// If we are at the end of this table, then adjust the byte count and leave
// this loop. This would happen if there is more data than we expect. (A newer
// version of SMAPI may of added more fields at the end.
if (tableIndex > tableMaxIndex) {
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(
line,
" Reached the end of the table. Unexpected condition. Table index %d \n",
tableIndex);
TRACE_END_DEBUG(vmapiContextP, line);
structByteCount = dataBuffStructSize;
break;
}
dataType = table[tableIndex][0];
switch (dataType) {
case APITYPE_INT1:
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " Int1 found.\n");
TRACE_END_DEBUG(vmapiContextP, line);
if (mode == populate) {
memcpy((parms->inStructAddrs[structIndex] + (structCounter
* outStructSize)
+ table[tableIndex][COL_6_SIZE_OR_OFFSET]),
parms->smapiBufferCursor, 1);
}
parms->smapiBufferCursor += 1;
structByteCount += 1;
break;
case APITYPE_INT4:
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " Int4 found.\n");
TRACE_END_DEBUG(vmapiContextP, line);
if (mode == populate) {
GET_INT(*((int*) (parms->inStructAddrs[structIndex]
+ (structCounter * outStructSize)
+ table[tableIndex][COL_6_SIZE_OR_OFFSET])),
parms->smapiBufferCursor);
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(
line,
"int 4 found Value %d stored at %p(+%d) \n",
*((int *) (parms->inStructAddrs[structIndex]
+ (structCounter * outStructSize)
+ table[tableIndex][COL_6_SIZE_OR_OFFSET])),
parms->inStructAddrs[structIndex],
table[tableIndex][COL_6_SIZE_OR_OFFSET]);
TRACE_END_DEBUG(vmapiContextP, line);
} else
parms->smapiBufferCursor += 4;
structByteCount += 4;
break;
case APITYPE_INT8:
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " Int8 found.\n");
TRACE_END_DEBUG(vmapiContextP, line);
if (mode == populate) {
GET_64INT(*((long long*) (parms->inStructAddrs[structIndex]
+ (structCounter * outStructSize)
+ table[tableIndex][COL_6_SIZE_OR_OFFSET])),
parms->smapiBufferCursor);
} else
parms->smapiBufferCursor += 8;
structByteCount += 8;
break;
case APITYPE_STRING_LEN:
case APITYPE_CHARBUF_LEN:
case APITYPE_C_STR_PTR:
if (APITYPE_C_STR_PTR == dataType) {
temp = strlen(parms->smapiBufferCursor);
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " C string found. Length %d\n", temp);
TRACE_END_DEBUG(vmapiContextP, line);
} else {
GET_INT(temp, parms->smapiBufferCursor);
structByteCount += 4;
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
if (dataType == APITYPE_CHARBUF_LEN) {
sprintf(line, " Charbuf with length %d found.\n", temp);
} else {
sprintf(line, " String with length %d found.\n", temp);
}
TRACE_END_DEBUG(vmapiContextP, line);
}
// If the string size is incorrect, display error and return.
if (temp < table[tableIndex][COL_2_MINSIZE]) // Check for less than min first
{
sprintf(
line,
"String size found: %d (@ %p), not in correct range %d-%d \n",
temp, (parms->smapiBufferCursor - 4),
table[tableIndex][COL_2_MINSIZE],
table[tableIndex][COL_3_MAXSIZE]);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected, line);
return PARSER_ERROR_INVALID_STRING_SIZE;
}
// If max is not -1, then check for max
if (-1 != table[tableIndex][COL_3_MAXSIZE] && temp
> table[tableIndex][COL_3_MAXSIZE]) {
sprintf(
line,
"String size found: %d (@ %p), not in correct range %d-%d \n",
temp, (parms->smapiBufferCursor - 4),
table[tableIndex][COL_2_MINSIZE],
table[tableIndex][COL_3_MAXSIZE]);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected, line);
return PARSER_ERROR_INVALID_STRING_SIZE;
}
// If scan update the string byte count
if (mode == scan) {
if (temp > 0) {
parms->outStringByteCount += (temp + 1);
}
if (dataType == APITYPE_CHARBUF_LEN) {
tableIndex++; // Position at the char buf count in the table
}
} else { // If populate then set the char * in struct; copy the string into the buffer
if (temp > 0) {
*((char **) ((parms->inStructAddrs[structIndex]
+ (structCounter * outStructSize)
+ table[tableIndex][COL_6_SIZE_OR_OFFSET])))
= parms->inStringCursor;
// If this ia a null terminated string just just strcpy, else use memcpy
if (APITYPE_C_STR_PTR == dataType) {
strcpy(parms->inStringCursor,
parms->smapiBufferCursor);
parms->inStringCursor += temp + 1;
} else {
// Copy the string into the string buffer and add zero terminator
TRACE_START(vmapiContextP,
TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(
line,
"Memcopying string data from %p into %p for length %d \n",
parms->smapiBufferCursor,
parms->inStringCursor, temp);
TRACE_END_DEBUG(vmapiContextP, line);
memcpy(parms->inStringCursor,
parms->smapiBufferCursor, temp);
parms->inStringCursor += temp;
if (APITYPE_STRING_LEN == dataType) {
*parms->inStringCursor = '\0';
parms->inStringCursor++;
TRACE_START(vmapiContextP,
TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(
line,
"String found Value '%s' next avail struct pointer %p \n",
*((char**) (parms->inStructAddrs[structIndex]
+ (structCounter
* outStructSize)
+ +table[tableIndex][COL_6_SIZE_OR_OFFSET])),
parms->inStringCursor);
TRACE_END_DEBUG(vmapiContextP, line);
} else // Char buffer, so no need to add null terminator, but must update count field
{
tableIndex++; // Position at the char buf count in the table
*((int*) (parms->inStructAddrs[structIndex]
+ (structCounter * outStructSize)
+ table[tableIndex][COL_6_SIZE_OR_OFFSET]))
= temp;
TRACE_START(vmapiContextP,
TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(
line,
"Charbuf count at table index %d updated \n",
tableIndex);
TRACE_END_DEBUG(vmapiContextP, line);
}
}
} else {
*((char**) (parms->inStructAddrs[structIndex]
+ (structCounter * outStructSize)
+ table[tableIndex][COL_6_SIZE_OR_OFFSET]))
= NULL;
}
}
if (APITYPE_C_STR_PTR == dataType) {
temp++; // Add on a byte for zero terminator
}
parms->smapiBufferCursor += temp;
structByteCount += temp;
break;
case APITYPE_ARRAY_LEN:
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " Array found.\n");
TRACE_END_DEBUG(vmapiContextP, line);
// Call a subroutine to handle this
if (0 != (rc = handleArrays(vmapiContextP, mode, &tableIndex,
table, parms)))
return rc;
break;
case APITYPE_ARRAY_STRUCT_COUNT: // Should not get here, subroutine should be handling this
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected,
"Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
break;
default: // Error
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsUnexpected,
"Parser found a problem in the internal table\n");
return PARSER_ERROR_INVALID_TABLE;
break;
}
tableIndex++;
}
structCounter++;
if (noBufferStructLen) {
arrayByteCount += structByteCount;
} else {
arrayByteCount += structByteCount + 4; // Add in struct len field also
}
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, " current arrayByteCount subtotal is %d \n",
arrayByteCount);
TRACE_END_DEBUG(vmapiContextP, line);
}
*tableStartingIndex = tableMaxIndex;
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, "table starting Index on return is %d \n",
*tableStartingIndex);
TRACE_END_DEBUG(vmapiContextP, line);
return 0;
}
/**
* This helper function will handle connecting and reading of the SMAPI buffer data.
*/
int getAndParseSmapiBuffer(
struct _VmApiInternalContext* vmapiContextP,
char * * inputPp, // input buffer pointer pointer
int inputSize, tableLayout parserTable, char * parserTableName,
char * * outData //Output pointer for base structure
) {
int sockDesc;
tableParserParms parserParms;
int requestId;
int tempSize;
int * pReturnCode;
int * pReasonCode;
int rc, i, j;
char line[BUFLEN];
char * smapiOutputP = 0;
rc = 0;
const int SLEEP_TIMES[SEND_RETRY_LIMIT] = { 0, 8, 16, 16 };
TRACE_START(vmapiContextP, TRACEAREA_RESOURCE_LAYER_PARSER,
TRACELEVEL_DETAILS);
sprintf(line, "Table being parsed: <%s> \n", parserTableName);
TRACE_END_DEBUG(vmapiContextP, line);
// Initialize our socket
if (0 != (rc = smSocketInitialize(vmapiContextP, &sockDesc))) {
FREE_MEMORY(*inputPp);
return rc;
}
TRACE_START(vmapiContextP, TRACEAREA_SMAPI_ONLY, TRACELEVEL_DETAILS);
sprintf(line, "Socket write starting for <%s> \n", parserTableName);
TRACE_END_DEBUG(vmapiContextP, line);
// Retry the send if the error detected is ok to retry
for (j = 0;; j++) {
if (0 != (rc = smSocketWrite(vmapiContextP, sockDesc, *inputPp,
inputSize))) {
if (rc == SOCKET_WRITE_RETRYABLE_ERROR) {
if (j < SEND_RETRY_LIMIT) {
// Delay for a while to give SMAPI some time to restart
if (SLEEP_TIMES[j] > 0) {
sleep(SLEEP_TIMES[j]);
}
continue;
}
// Change the internal return code to general write one
rc = SOCKET_WRITE_ERROR;
}
FREE_MEMORY(*inputPp);
TRACE_START(vmapiContextP, TRACEAREA_SMAPI_ONLY, TRACELEVEL_DETAILS);
sprintf(
line,
"Socket write for <%s> did not complete after %d retries \n",
parserTableName, SEND_RETRY_LIMIT);
TRACE_END_DEBUG(vmapiContextP, line);
return rc;
}
break;
}
FREE_MEMORY(*inputPp);
// Get the request id
if (0
!= (rc = smSocketRead(vmapiContextP, sockDesc, (char*) &requestId,
4))) {
sprintf(line, "Socket %d receive of the requestId failed\n", sockDesc);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
RsUnexpected, line);
return rc;
}
// Read in the output length
if (0
!= (rc = smSocketRead(vmapiContextP, sockDesc, (char *) &tempSize,
4))) {
sprintf(line, "Socket %d receive of the buffer length failed\n",
sockDesc);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcIucv,
RsUnexpected, line);
return rc;
}
tempSize = ntohl(tempSize);
// Read in the rest of the output buffer
if (tempSize >= (3* 4 )) // Must have at least 3 more ints
{
if (0 == (smapiOutputP = malloc(tempSize))) {
sprintf(line, "Insufficiant memory (request=%d bytes)\n", tempSize);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcRuntime,
RsNoMemory, line);
return MEMORY_ERROR;
}
if (0 != (rc = smSocketRead(vmapiContextP, sockDesc, smapiOutputP,
tempSize))) {
FREE_MEMORY(smapiOutputP);
return rc;
}
if (0 != (rc = smSocketTerminate(vmapiContextP, sockDesc))) {
FREE_MEMORY(smapiOutputP);
return rc;
}
TRACE_START(vmapiContextP, TRACEAREA_SMAPI_ONLY, TRACELEVEL_DETAILS);
pReturnCode = (int *) (smapiOutputP + 4);
pReasonCode = (int *) (smapiOutputP + 8);
sprintf(line, "SMAPI return code %d reason code %d \n", *pReturnCode,
*pReasonCode);
TRACE_END_DEBUG(vmapiContextP, line);
// Scan the SMAPI output data to get sizes of structures and strings.
// A non zero return code indicates errors.
parserParms.smapiBufferCursor = smapiOutputP;
parserParms.dataBufferSize = tempSize;
rc = parseBufferWithTable(vmapiContextP, scan, parserTable,
&parserParms);
if (rc != 0) {
// If we have an error because of invalid string size, dump out the
// buffer to help with diagnosis. Limit the dump to 5000 characters
if (rc == PARSER_ERROR_INVALID_STRING_SIZE) {
if (tempSize > 5000) {
dumpArea(vmapiContextP, smapiOutputP, 5000);
} else {
dumpArea(vmapiContextP, smapiOutputP, tempSize);
}
}
FREE_MEMORY(smapiOutputP);
return rc;
}
// We can add up all the storage or get each structure independently, do independent for now
for (i = 0; i < MAX_STRUCT_ARRAYS; i++) {
if (parserParms.outStructSizes[i] == 0
|| parserParms.outStructCount[i] == 0)
continue;
parserParms.inStructAddrs[i] = smMemoryGroupAlloc(vmapiContextP,
parserParms.outStructSizes[i]
* parserParms.outStructCount[i]);
if (parserParms.inStructAddrs[i] == 0) {
FREE_MEMORY(smapiOutputP);
sprintf(line, "Insufficiant memory (request=%d bytes)\n",
parserParms.outStructSizes[i]
* parserParms.outStructCount[i]);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsNoMemory, line);
return MEMORY_ERROR;
}
}
// If any string data, just get one chunk of storage for that
if (parserParms.outStringByteCount > 0) {
parserParms.inStringCursor = smMemoryGroupAlloc(vmapiContextP,
parserParms.outStringByteCount);
if (parserParms.inStringCursor == 0) {
FREE_MEMORY(smapiOutputP);
sprintf(line, "Insufficiant memory (request=%d bytes)\n",
parserParms.outStringByteCount);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__),
RcRuntime, RsNoMemory, line);
return MEMORY_ERROR;
}
}
// Set the output pointer to the level 0 structure's storage
*outData = parserParms.inStructAddrs[0];
parserParms.smapiBufferCursor = smapiOutputP; // reset the output cursor pointer
rc = parseBufferWithTable(vmapiContextP, populate, parserTable,
&parserParms);
if (rc != 0) {
FREE_MEMORY(smapiOutputP);
return rc;
}
} else {
sprintf(line, "Insufficiant memory (request=%d bytes)/n",
parserParms.outStringByteCount);
errorLog(vmapiContextP, __func__, TO_STRING(__LINE__), RcRuntime,
RsUnexpected, line);
return INVALID_DATA; // Not enough data returned
}
FREE_MEMORY(smapiOutputP);
return 0;
}
File diff suppressed because it is too large Load Diff
-73
View File
@@ -1,73 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Logs on the specified virtual server.
*
* @param $1: The name of the guest which is to be logged on
*
* @return 0 If the image is powered on upon completion
* 1 If given invalid parameters
* 2 If power-on failed
*/
int main(int argC, char* argV[]) {
if (argC != 2) {
printf("Error: Wrong number of parameters\n");
return 1;
}
// Get the virtual server name
char* imageName = argV[1];
// Check if the virtual server name is between 1 and 8 characters
if (isImageNameInvalid(imageName))
return 1;
printf("Starting %s... ", imageName);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageActivateOutput* output;
// Log on virtual server
int rc = smImage_Activate(&context, "", 0, "", // Authorizing user, password length, password.
imageName, // Image name.
&output);
int rtnCode = output->common.returnCode;
int rsnCode = output->common.reasonCode;
// If return code = 200 and reason code = 8, virtual server is logged on
if (rc || (output->common.returnCode && output->common.returnCode != 200
|| (output->common.reasonCode && output->common.reasonCode != 8))) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
-69
View File
@@ -1,69 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Log off the specified virtual server.
*
* @param $1: The z/VM guest ID of the virtual server which is to be stopped
*
* @return 0 If the image is powered off upon completion
* 1 If given invalid parameters
* 2 If power-off failed
*/
int main(int argC, char* argV[]) {
if (argC != 2) {
printf("Error: Wrong number of parameters\n");
return 1;
}
// Get the virtual server name
char* imageName = argV[1];
// Check if the virtual server name is between 1 and 8 characters
if (isImageNameInvalid(imageName))
return 1;
printf("Stopping %s... ", imageName);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDeactivateOutput* output;
// Log off virtual server
int rc = smImage_Deactivate(&context, "", 0, "", // Authorizing user, password length, password.
imageName, "IMMED", // Immediate deactivation.
&output);
if (rc || (output->common.returnCode && output->common.returnCode != 200
|| (output->common.reasonCode && output->common.reasonCode != 12))) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->common.returnCode,
output->common.reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,66 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "wrapperutils.h"
/**
* Removes a dedicated device from a virtual image's directory entry.
*
* @param $1: The name of the guest from which a device is to be removed
* @param $2: The virtual device address assigned to the device
*
* @return 0 If the dedicated device was removed successfully
* 1 If given invalid parameters
* 2 If device undedication failed.
*/
int main(int argC, char* argV[]) {
if (argC != 6) {
printf("Error: Wrong number of parameters\n");
return 1;
}
char* image = argV[1];
char* vdev = argV[2];
if (isImageNameInvalid(image))
return 1;
printf("Removing device %s on %s... ", vdev, image);
VmApiInternalContext context;
// Initialize context
extern struct _smTrace externSmapiTraceFlags;
smMemoryGroupContext memContext;
memset(&context, 0, sizeof(context));
memset(&memContext, 0, sizeof(memContext));
memset(&externSmapiTraceFlags, 0, sizeof(smTrace));
context.smTraceDetails = (struct _smTrace *) &externSmapiTraceFlags;
context.memContext = &memContext;
vmApiImageDeviceUndedicateDmOutput* output;
int rc = smImage_Device_Undedicate_DM(&context, "", 0, "", // Authorizing user, password length, password.
image, vdev, &output);
if (rc || output->returnCode || output->reasonCode) {
printf("Failed\n");
rc ? printf(" Return Code: %d\n", rc) : printf(" Return Code: %d\n"
" Reason Code: %d\n", output->returnCode, output->reasonCode);
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 2;
} else {
printf("Done\n");
// Release context
smMemoryGroupFreeAll(&context);
smMemoryGroupTerminate(&context);
return 0;
}
}
@@ -1,70 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include <stdio.h>
#include "smPublic.h"
#include "vmapiSystem.h"
#include "vmapiImage.h"
#include "vmapiVirtual.h"
#include "smPublic.h"
#include "vmapiAsynchronous.h"
#include "vmapiAuthorization.h"
#include "vmapiCheckAuthentication.h"
#include "vmapiDirectoryManager.h"
#include "vmapiName.h"
#include "vmapiProfile.h"
#include "vmapiPrototype.h"
/* Check if Smapi is up and running
*****************************************************************************************/
int checkSmapi(VmApiInternalContext vmapiContext);
/* Use Profile_Create_DM to create a profile directory entry to be included in
* the definition of a virtual image in the directory.
*****************************************************************************************/
int createProfile(VmApiInternalContext vmapiContext);
/* Use Prototype_Create_DM to create a new virtual image prototype
*****************************************************************************************/
int createProto(VmApiInternalContext vmapiContext);
/* Use Image_Create_DM to define a new virtual image in the directory
*****************************************************************************************/
int createImage(VmApiInternalContext vmapiContext, char * argV);
/* Use Prototype_Name_Query_DM to obtain a list of names of defined prototypes
*****************************************************************************************/
int queryProto(VmApiInternalContext vmapiContext, char * argV);
/* Use Profile_Query_DM to query a profile directory entry
*****************************************************************************************/
int queryProfile(VmApiInternalContext vmapiContext, char * argV);
/* Use Image_Query_DM to obtain a virtual images directory entry
*****************************************************************************************/
int queryImage(VmApiInternalContext vmapiContext, char * argV);
/* Use Profile_Delete_DM to delete a profile directory entry
*****************************************************************************************/
int deleteProfile(VmApiInternalContext vmapiContext, char * argV);
/* Use Prototype_Delete_DM to delete an image prototype
*****************************************************************************************/
int deleteProto(VmApiInternalContext vmapiContext, char * argV);
/* Use Image_Delete_DM to delete a virtual image's definition from the directory
*****************************************************************************************/
int deleteImage(VmApiInternalContext vmapiContext, char * argV);
/* Use Image_Disk_Create_DM to add a disk to a virtual images directory entry
*****************************************************************************************/
int addDisk(VmApiInternalContext vmapiContext, char * argV);
/* Use Image_Query_DM to obtain a virtual images directory entry
*****************************************************************************************/
void getImage(VmApiInternalContext vmapiContext,
vmApiImageRecord imageRecord[], char * argV);
/* Internal function to display error text to console
*****************************************************************************************/
static void displayErrorText(int errorCode);
@@ -1,105 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiAsynchronous.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Asynchronous_Notification_Disable_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiAsynchronousNotificationDisableDmOutput
/**
* Asynchronous_Notification_Disable_DM SMAPI interface
*/
int smAsynchronous_Notification_Disable_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char entity_type, char communication_type, int port_number,
char * ip_address, char encoding, int subscriber_data_length,
char * subscriber_data,
vmApiAsynchronousNotificationDisableDmOutput ** outData) {
const char * const functionName = "Asynchronous_Notification_Disable_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
// The input buffer size of the VMAPI socket call is calculated by adding up all the
// field lengths and data (see System management application programming manual for details)
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 1 + 1 + 4 + 4
+ strlen(ip_address) + 1 + 4 + subscriber_data_length;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
*cursor = entity_type; // Entity_type int1
cursor++;
*cursor = communication_type; // Communication_type int1
cursor++;
PUT_INT(port_number, cursor); // Port_number int4
tempSize = strlen(ip_address); // IP_address 7..15 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, ip_address, tempSize);
cursor += tempSize;
*cursor = encoding; // Encoding
cursor++;
tempSize = subscriber_data_length; // Subscriber_data 0..64 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, subscriber_data, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,106 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiAsynchronous.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Asynchronous_Notification_Enable_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiAsynchronousNotificationEnableDmOutput
/**
* Asynchronous_Notification_Enable_DM SMAPI interface
*/
int smAsynchronous_Notification_Enable_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char entity_type, char subscription_type, char communication_type,
int port_number, char * ip_address, char encoding,
int subscriber_data_length, char * subscriber_data,
vmApiAsynchronousNotificationEnableDmOutput ** outData) {
const char * const functionName = "Asynchronous_Notification_Enable_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 1 + 1 + 1 + 4 + 4
+ strlen(ip_address) + 1 + 4 + subscriber_data_length;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
*cursor = entity_type; // Entity_type int1
cursor++;
*cursor = subscription_type; // Subscription_type int1
cursor++;
*cursor = communication_type; // Communication_type int1
cursor++;
PUT_INT(port_number, cursor); // Port_number int4
tempSize = strlen(ip_address); // IP_address 7..15 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, ip_address, tempSize);
cursor += tempSize;
*cursor = encoding; // Encoding
cursor++;
tempSize = subscriber_data_length; // Subscriber_data 0..64 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, subscriber_data, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,105 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiAsynchronous.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Asynchronous_Notification_Query_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiAsynchronousNotificationQueryDmOutput
/**
* Asynchronous_Notification_Query_DM SMAPI interface
*/
int smAsynchronous_Notification_Query_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char entity_type, char communication_type, int port_number,
char * ip_address, char encoding, int subscriber_data_length,
char * subscriber_data,
vmApiAsynchronousNotificationQueryDmOutput ** outData) {
const char * const functionName = "Asynchronous_Notification_Query_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 1 + 1 + 4 + 4
+ strlen(ip_address) + 1 /* Encoding */+ 4 + subscriber_data_length;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
*cursor = entity_type; // Entity_type int1
cursor++;
*cursor = communication_type; // Communication_type int1
cursor++;
PUT_INT(port_number, cursor); // Port_number int4
tempSize = strlen(ip_address); // IP_address 7..15 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, ip_address, tempSize);
cursor += tempSize;
*cursor = encoding; // Encoding
cursor++;
tempSize = subscriber_data_length; // Subscriber_data 0..64 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, subscriber_data, tempSize);
cursor += tempSize;
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,88 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiAuthorization.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Authorization_List_Add_Layout
#define OUTPUT_STRUCTURE_NAME vmApiAuthorizationListAddOutput
/**
* Authorization_List_Add SMAPI interface
*/
int smAuthorization_List_Add(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * for_id, char * function_id,
vmApiAuthorizationListAddOutput ** outData) {
const char * const functionName = "Authorization_List_Add";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4
+ strlen(for_id) + 4 + strlen(function_id);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(for_id); // For_id 1..8 or 1..64 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, for_id, tempSize);
cursor += tempSize;
tempSize = strlen(function_id); // Function_id 1..64 OR 1..* chars
PUT_INT(tempSize, cursor);
memcpy(cursor, function_id, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,88 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiAuthorization.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Authorization_List_Query_Layout
#define OUTPUT_STRUCTURE_NAME vmApiAuthorizationListQueryOutput
/**
* Authorization_List_Query SMAPI interface
*/
int smAuthorization_List_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * for_id, char * function_id,
vmApiAuthorizationListQueryOutput ** outData) {
const char * const functionName = "Authorization_List_Query";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4
+ strlen(for_id) + 4 + strlen(function_id);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(for_id); // For_id 0..8 or 0..64 or 1 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, for_id, tempSize);
cursor += tempSize;
tempSize = strlen(function_id); // Function_id 0..64 OR 1 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, function_id, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,88 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiAuthorization.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Authorization_List_Remove_Layout
#define OUTPUT_STRUCTURE_NAME vmApiAuthorizationListRemoveOutput
/**
* Authorization_List_Remove SMAPI interface
*/
int smAuthorization_List_Remove(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * for_id, char * function_id,
vmApiAuthorizationListRemoveOutput ** outData) {
const char * const functionName = "Authorization_List_Remove";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4
+ strlen(for_id) + 4 + strlen(function_id);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(for_id); // For_id 1..8 or 1..64 or 1 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, for_id, tempSize);
cursor += tempSize;
tempSize = strlen(function_id); // Function_id 1..64 OR 1 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, function_id, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,71 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiCheckAuthentication.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Check_Authentication_Layout
#define OUTPUT_STRUCTURE_NAME vmApiCheckAuthenticationOutput
/**
* Check_Authentication_DM SMAPI interface
*/
int smCheck_Authentication(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
vmApiCheckAuthenticationOutput ** outData) {
const char * const functionName = "Check_Authentication";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // UserID 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,89 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiDirectoryManager.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Directory_Manager_Local_Tag_Define_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiDirectoryManagerLocalTagDefineDmOutput
/**
* Directory_Manager_Local_Tag_Define_DM SMAPI interface
*/
int smDirectory_Manager_Local_Tag_Define_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * tag_name, int tag_ordinal, char createOrChange,
vmApiDirectoryManagerLocalTagDefineDmOutput ** outData) {
const char * const functionName = "Directory_Manager_Local_Tag_Define_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
tag_name) + 4 + 1;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // UserID 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(tag_name); // Tag_name 1..8 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, tag_name, tempSize);
cursor += tempSize;
PUT_INT(tag_ordinal, cursor);
*cursor = createOrChange; // Create or change request
*cursor++;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiDirectoryManager.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Directory_Manager_Local_Tag_Delete_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiDirectoryManagerLocalTagDeleteDmOutput
/**
* Directory_Manager_Local_Tag_Delete_DM SMAPI interface
*/
int smDirectory_Manager_Local_Tag_Delete_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * tag_name, vmApiDirectoryManagerLocalTagDeleteDmOutput ** outData) {
const char * const functionName = "Directory_Manager_Local_Tag_Delete_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
tag_name);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(tag_name); // Tag_name 1..8 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, tag_name, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiDirectoryManager.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Directory_Manager_Local_Tag_Query_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiDirectoryManagerLocalTagQueryDmOutput
/**
* Directory_Manager_Local_Tag_Query_DM SMAPI interface
*/
int smDirectory_Manager_Local_Tag_Query_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * tag_name, vmApiDirectoryManagerLocalTagQueryDmOutput ** outData) {
const char * const functionName = "Directory_Manager_Local_Tag_Query_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
tag_name);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(tag_name); // Tag_name 1..8 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, tag_name, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,89 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiDirectoryManager.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Directory_Manager_Local_Tag_Set_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiDirectoryManagerLocalTagSetDmOutput
/**
* Directory_Manager_Local_Tag_Set_DM SMAPI interface
*/
int smDirectory_Manager_Local_Tag_Set_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
char * tag_name, int tag_value_length, char * tag_value,
vmApiDirectoryManagerLocalTagSetDmOutput ** outData) {
const char * const functionName = "Directory_Manager_Local_Tag_Set_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
tag_name) + 4 + tag_value_length;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // UserID 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(tag_name); // Tag_name 1..8 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, tag_name, tempSize);
cursor += tempSize;
tempSize = tag_value_length; // Tag_value 1..240 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, tag_value, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,84 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiDirectoryManager.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Directory_Manager_Search_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiDirectoryManagerSearchDmOutput
/**
* Directory_Manager_Search_DM SMAPI interface
*/
int smDirectory_Manager_Search_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, int search_pattern_length,
char * search_pattern, vmApiDirectoryManagerSearchDmOutput ** outData) {
const char * const functionName = "Directory_Manager_Search_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4
+ search_pattern_length;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // UserID 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = search_pattern_length; // Search_pattern 1..72 charNA
PUT_INT(tempSize, cursor);
memcpy(cursor, search_pattern, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,80 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiDirectoryManager.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Directory_Manager_Task_Cancel_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiDirectoryManagerTaskCancelDmOutput
/**
* Directory_Manager_Task_Cancel_DM SMAPI interface
*/
int smDirectory_Manager_Task_Cancel_DM(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
int operation_id, vmApiDirectoryManagerTaskCancelDmOutput ** outData) {
const char * const functionName = "Directory_Manager_Task_Cancel_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
PUT_INT(operation_id, cursor);
cursor += 4;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,57 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiSystem.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME IPaddr_Get_Layout
#define OUTPUT_STRUCTURE_NAME vmApiIPaddrGetOutput
/**
* Virtual_Network_Query_OSA SMAPI interface
*/
int smIPaddr_Get(struct _VmApiInternalContext* vmapiContextP,
vmApiIPaddrGetOutput ** outData) {
const char * const functionName = "IPaddr_Get";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 1 + strlen(functionName) + 1;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
*cursor = 0xFF; // Separator
cursor++;
tempSize = strlen(functionName);
strcpy(cursor, functionName);
cursor += tempSize + 1;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,76 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Activate_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageActivateOutput
/**
* Image_Activate SMAPI interface
*/
int smImage_Activate(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiImageActivateOutput ** outData) {
const char * const functionName = "Image_Activate";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 or 1..64 chars
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,77 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Active_Configuration_Query_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageActiveConfigurationQueryOutput
/**
* Image_Active Configiration Query SMAPI interface
*/
int smImage_Active_Configuration_Query(
struct _VmApiInternalContext* vmapiContextP, char * userid,
int passwordLength, char * password, char * targetIdentifier,
vmApiImageActiveConfigurationQueryOutput ** outData) {
const char * const functionName = "Image_Active_Configuration_Query";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 (userid)
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,87 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_CPU_Define_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageCpuDefineOutput
/**
* Image_CPU_Define SMAPI interface
*/
int smImage_CPU_Define(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * cpuAddress, char cpuType,
vmApiImageCpuDefineOutput ** outData) {
const char * const functionName = "Image_CPU_Define";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
cpuAddress) + 1; /* CPU type */
;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(cpuAddress); // CPU address 1..2
PUT_INT(tempSize, cursor);
memcpy(cursor, cpuAddress, tempSize);
cursor += tempSize;
*cursor = cpuType;
cursor++;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,102 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_CPU_Define_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageCpuDefineDmOutput
/**
* Image_CPU_Define_DM SMAPI interface
*/
int smImage_CPU_Define_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * cpuAddress, char baseCpu, char * cpuId,
char dedicateCpu, char cryptoCpu,
vmApiImageCpuDefineDmOutput ** outData) {
const char * const functionName = "Image_CPU_Define_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
cpuAddress) + 1 /* Base CPU */+ 4 + strlen(cpuId) + 1
/* Dedicate CPU */+ 1; /* Crypto */
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(cpuAddress); // CPU address 1..2
PUT_INT(tempSize, cursor);
memcpy(cursor, cpuAddress, tempSize);
cursor += tempSize;
*cursor = baseCpu;
cursor++;
tempSize = strlen(cpuId); // CPU ID 0..6 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, cpuId, tempSize);
cursor += tempSize;
}
*cursor = dedicateCpu;
cursor++;
*cursor = cryptoCpu;
cursor++;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,84 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_CPU_Delete_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageCpuDeleteOutput
/**
* Image_CPU_Delete SMAPI interface
*/
int smImage_CPU_Delete(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * cpuAddress,
vmApiImageCpuDeleteOutput ** outData) {
const char * const functionName = "Image_CPU_Delete";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
cpuAddress);
;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // UserID 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(cpuAddress); // CPU address 1..2
PUT_INT(tempSize, cursor);
memcpy(cursor, cpuAddress, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,84 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_CPU_Delete_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageCpuDeleteDmOutput
/**
* Image_CPU_Delete_DM SMAPI interface
*/
int smImage_CPU_Delete_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * cpuAddress,
vmApiImageCpuDeleteDmOutput ** outData) {
const char * const functionName = "Image_CPU_Delete_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
cpuAddress);
;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(cpuAddress); // CPU address 1..2
PUT_INT(tempSize, cursor);
memcpy(cursor, cpuAddress, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,77 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_CPU_Query_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageCpuQueryOutput
/**
* Image_CPU_Query SMAPI interface
*/
int smImage_CPU_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiImageCpuQueryOutput ** outData) {
const char * const functionName = "Image_CPU_Query";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier);
;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_CPU_Query_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageCpuQueryDmOutput
/**
* Image_CPU_Query_DM SMAPI interface
*/
int smImage_CPU_Query_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * cpuAddress,
vmApiImageCpuQueryDmOutput ** outData) {
const char * const functionName = "Image_CPU_Query_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
cpuAddress);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(cpuAddress); // CPU address 1..2
PUT_INT(tempSize, cursor);
memcpy(cursor, cpuAddress, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,80 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_CPU_Set_Maximum_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageCpuSetMaximumDmOutput
/**
* Image_CPU_Set_Maximum_DM SMAPI interface
*/
int smImage_CPU_Set_Maximum_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, int maxCpus,
vmApiImageCpuSetMaximumDmOutput ** outData) {
const char * const functionName = "Image_CPU_Set_Maximum_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 /* Max CPUs */;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
PUT_INT(maxCpus, cursor);
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,122 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Create_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageCreateDmOutput
/**
* Image_Create_DM SMAPI interface
*/
int smImage_Create_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * prototypeName,
int initialPasswordLength, char * initialPassword,
char * initialAccountNumber, int imageRecordCount,
vmApiImageRecord * imageRecordList, vmApiImageCreateDmOutput ** outData) {
const char * const functionName = "Image_Create_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
prototypeName) + 4 + initialPasswordLength + 4 + strlen(
initialAccountNumber) + 4;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
int imageRecordTotal = 0;
for (i = 0; i < imageRecordCount; i++) {
inputSize += 4; // Record length integer
inputSize += imageRecordList[i].imageRecordLength; // Data length
imageRecordTotal += 4;
imageRecordTotal += imageRecordList[i].imageRecordLength;
}
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize + 4)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 (image name)
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(prototypeName); // Prototype name 0..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, prototypeName, tempSize);
cursor += tempSize;
}
tempSize = initialPasswordLength; // Initial password 0..200
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, initialPassword, tempSize);
cursor += tempSize;
}
tempSize = strlen(initialAccountNumber); // Initial account number 0..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, initialAccountNumber, tempSize);
cursor += tempSize;
}
// Add in the length of images array then the data if available
PUT_INT(imageRecordTotal, cursor);
if (imageRecordTotal > 0) {
for (i = 0; i < imageRecordCount; i++) {
tempSize = imageRecordList[i].imageRecordLength; // Data length
PUT_INT(tempSize, cursor);
memcpy(cursor, imageRecordList[i].imageRecord, tempSize);
cursor += tempSize;
}
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,86 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Deactivate_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDeactivateOutput
/**
* Image_Deactivate SMAPI interface
*/
int smImage_Deactivate(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * forceTime,
vmApiImageDeactivateOutput ** outData) {
const char * const functionName = "Image_Deactivate";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
forceTime);
;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 or 1..64
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(forceTime); // Force time 0..12
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, forceTime, tempSize);
cursor += tempSize;
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,82 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Delete_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDeleteDmOutput
/**
* Image_Delete_DM SMAPI interface
*/
int smImage_Delete_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char dataSecurityErase,
vmApiImageDeleteDmOutput ** outData) {
const char * const functionName = "Image_Delete_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 1;
;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
// Data security erase byte
*cursor = dataSecurityErase;
cursor++;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,94 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Device_Dedicate_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDeviceDedicateOutput
/**
* Image_Device_Dedicate SMAPI interface
*/
int smImage_Device_Dedicate(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDeviceNumber,
char * realDeviceNumber, char readonly,
vmApiImageDeviceDedicateOutput ** outData) {
const char * const functionName = "Image_Device_Dedicate";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDeviceNumber) + 4 + strlen(realDeviceNumber) + 1; // For readonly char
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDeviceNumber); // Image device number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDeviceNumber, tempSize);
cursor += tempSize;
tempSize = strlen(realDeviceNumber); // Real device number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, realDeviceNumber, tempSize);
cursor += tempSize;
// Readonly byte
*cursor = readonly;
cursor++;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,94 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Device_Dedicate_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDeviceDedicateDmOutput
/**
* Image_Device_Dedicate SMAPI interface
*/
int smImage_Device_Dedicate_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDeviceNumber,
char * realDeviceNumber, char readonly,
vmApiImageDeviceDedicateDmOutput ** outData) {
const char * const functionName = "Image_Device_Dedicate_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDeviceNumber) + 4 + strlen(realDeviceNumber) + 1; // For readonly char
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDeviceNumber); // Image device number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDeviceNumber, tempSize);
cursor += tempSize;
tempSize = strlen(realDeviceNumber); // Real device number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, realDeviceNumber, tempSize);
cursor += tempSize;
// Readonly byte
*cursor = readonly;
cursor++;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Device_Reset_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDeviceResetOutput
/**
* Image_Device_Dedicate SMAPI interface
*/
int smImage_Device_Reset(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDeviceNumber,
vmApiImageDeviceResetOutput ** outData) {
const char * const functionName = "Image_Device_Reset";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDeviceNumber);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDeviceNumber); // Image device number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDeviceNumber, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Device_Undedicate_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDeviceUndedicateOutput
/**
* Image_Device_Dedicate SMAPI interface
*/
int smImage_Device_Undedicate(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDeviceNumber,
vmApiImageDeviceUndedicateOutput ** outData) {
const char * const functionName = "Image_Device_Undedicate";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDeviceNumber);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDeviceNumber); // Image device number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDeviceNumber, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Device_Undedicate_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDeviceUndedicateOutput
/**
* Image_Device_Undedicate_DM SMAPI interface
*/
int smImage_Device_Undedicate_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDeviceNumber,
vmApiImageDeviceUndedicateDmOutput ** outData) {
const char * const functionName = "Image_Device_Undedicate_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDeviceNumber);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDeviceNumber); // Image device number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDeviceNumber, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Copy_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskCopyOutput
/**
* Image_Device_Undedicate_DM SMAPI interface
*/
int smImage_Disk_Copy(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
vmApiImageDiskCopyOutput ** outData) {
const char * const functionName = "Image_Disk_Copy";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,144 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Copy_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskCopyDmOutput
/**
* Image_Disk_Copy_DM
*/
int smImage_Disk_Copy_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
char * sourceImageName, char * sourceImageDiskNumber,
char * imageDiskAllocationType, char * allocationAreaName,
char * imageDiskMode, char * readPassword, char * writePassword,
char * multiPassword, vmApiImageDiskCopyDmOutput ** outData) {
const char * const functionName = "Image_Disk_Copy_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber) + 4 + strlen(sourceImageName) + 4 + strlen(
sourceImageDiskNumber) + 4 + strlen(imageDiskAllocationType) + 4
+ strlen(allocationAreaName) + 4 + strlen(imageDiskMode) + 4
+ strlen(readPassword) + 4 + strlen(writePassword) + 4 + strlen(
multiPassword);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(sourceImageName); // Image name 1..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, sourceImageName, tempSize);
cursor += tempSize;
}
tempSize = strlen(sourceImageDiskNumber); // Source image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, sourceImageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskAllocationType); // Image allocation type 0..10
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, imageDiskAllocationType, tempSize);
cursor += tempSize;
}
tempSize = strlen(allocationAreaName); // Allocation area name 0..10
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, allocationAreaName, tempSize);
cursor += tempSize;
}
tempSize = strlen(imageDiskMode); // Image disk mode 0..5
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, imageDiskMode, tempSize);
cursor += tempSize;
}
tempSize = strlen(readPassword); // Read password 0..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, readPassword, tempSize);
cursor += tempSize;
}
tempSize = strlen(writePassword); // Write password 0..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, writePassword, tempSize);
cursor += tempSize;
}
tempSize = strlen(multiPassword); // Multi password 0..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, multiPassword, tempSize);
cursor += tempSize;
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,90 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Create_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskCreateOutput
/**
* Image_Disk_Create SMAPI interface
*/
int smImage_Disk_Create(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber, char * imageDiskMode,
vmApiImageDiskCreateOutput ** outData) {
const char * const functionName = "Image_Disk_Create";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber) + 4 + strlen(imageDiskMode);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskMode); // Image disk mode 0..5
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, imageDiskMode, tempSize);
cursor += tempSize;
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,150 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Create_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskCreateDmOutput
/**
* Image_Disk_Create_DM SMAPI interface
*/
int smImage_Disk_Create_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
char * imageDiskDeviceType, char * imageDiskAllocationType,
char * allocationAreaNameOrVolser, char allocationUnitSize,
int imageDiskSize, char * imageDiskMode, char imageDiskFormatting,
char * imageDiskLabel, char * readPassword, char * writePassword,
char * multiPassword, vmApiImageDiskCreateDmOutput ** outData) {
const char * const functionName = "Image_Disk_Create_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber) + 4 + strlen(imageDiskDeviceType) + 4 + strlen(
imageDiskAllocationType) + 4 + strlen(allocationAreaNameOrVolser)
+ 1 + /* allocationUnitSize */4 /* imageDiskSize */+ 4 + strlen(
imageDiskMode) + 1 /* imageDiskFormatting */+ 4 + strlen(
imageDiskLabel) + 4 + strlen(readPassword) + 4 + strlen(
writePassword) + 4 + strlen(multiPassword);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskDeviceType); // Image disk device type 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskDeviceType, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskAllocationType); // Image disk allocation type 1..10
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskAllocationType, tempSize);
cursor += tempSize;
tempSize = strlen(allocationAreaNameOrVolser); // Allocation area name or volser 0..8, 0..6 or 0..4
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, allocationAreaNameOrVolser, tempSize);
cursor += tempSize;
}
*cursor = allocationUnitSize; // Allocation Unit size
cursor++;
PUT_INT(imageDiskSize, cursor); // Image disk size
tempSize = strlen(imageDiskMode); // Image disk mode 1..5
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskMode, tempSize);
cursor += tempSize;
*cursor = imageDiskFormatting; // Image disk formatting
cursor++;
tempSize = strlen(imageDiskLabel); // Image disk label 0..6
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, imageDiskLabel, tempSize);
cursor += tempSize;
}
tempSize = strlen(readPassword); // Read password 0..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, readPassword, tempSize);
cursor += tempSize;
}
tempSize = strlen(writePassword); // Write password 0..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, writePassword, tempSize);
cursor += tempSize;
}
tempSize = strlen(multiPassword); // Multi password 0..8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, multiPassword, tempSize);
cursor += tempSize;
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Delete_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskDeleteOutput
/**
* Image_Disk_Delete SMAPI interface
*/
int smImage_Disk_Delete(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
vmApiImageDiskDeleteOutput ** outData) {
const char * const functionName = "Image_Disk_Delete";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8 image name
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,86 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Delete_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskDeleteDmOutput
/**
* Image_Disk_Delete SMAPI interface
*/
int smImage_Disk_Delete_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
char dataSecurityErase, vmApiImageDiskDeleteDmOutput ** outData) {
const char * const functionName = "Image_Disk_Delete_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber) + 1 /* dataSecurityErase */;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
*cursor = dataSecurityErase; // Data security erase byte
cursor++;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,111 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Share_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskShareOutput
/**
* Image_Disk_Share SMAPI interface
*/
int smImage_Disk_Share(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
char * targetImageName, char * targetImageDiskNumber,
char * readWriteMode, char * optionalPassword,
vmApiImageDiskShareOutput ** outData) {
const char * const functionName = "Image_Disk_Share";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber) + 4 + strlen(targetImageName) + 4 + strlen(
targetImageDiskNumber) + 4 + strlen(readWriteMode) + 4 + strlen(
optionalPassword);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(targetImageName); // Target image name 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetImageName, tempSize);
cursor += tempSize;
tempSize = strlen(targetImageDiskNumber); // Target image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, targetImageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(readWriteMode); // Read write mode 0-4
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, readWriteMode, tempSize);
cursor += tempSize;
}
tempSize = strlen(optionalPassword); // Optional password to share the disk 0-8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, optionalPassword, tempSize);
cursor += tempSize;
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,111 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Share_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskShareDmOutput
/**
* Image_Disk_Share_DM SMAPI interface
*/
int smImage_Disk_Share_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
char * targetImageName, char * targetImageDiskNumber,
char * readWriteMode, char * optionalPassword,
vmApiImageDiskShareDmOutput ** outData) {
const char * const functionName = "Image_Disk_Share_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber) + 4 + strlen(targetImageName) + 4 + strlen(
targetImageDiskNumber) + 4 + strlen(readWriteMode) + 4 + strlen(
optionalPassword);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(targetImageName); // Target image name 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetImageName, tempSize);
cursor += tempSize;
tempSize = strlen(targetImageDiskNumber); // Target image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, targetImageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(readWriteMode); // Read write mode 0-4
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, readWriteMode, tempSize);
cursor += tempSize;
}
tempSize = strlen(optionalPassword); // Optional password to share the disk 0-8
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, optionalPassword, tempSize);
cursor += tempSize;
}
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,83 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Unshare_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskUnshareOutput
/**
* Image_Disk_Unshare SMAPI interface
*/
int smImage_Disk_Unshare(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
vmApiImageDiskUnshareOutput ** outData) {
const char * const functionName = "Image_Disk_Unshare";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,95 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_Disk_Unshare_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageDiskUnshareDmOutput
/**
* Image_Disk_Unshare_DM SMAPI interface
*/
int smImage_Disk_Unshare_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, char * imageDiskNumber,
char * targetImageName, char * targetImageDiskNumber,
vmApiImageDiskUnshareDmOutput ** outData) {
const char * const functionName = "Image_Disk_Unshare_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier) + 4 + strlen(
imageDiskNumber) + 4 + strlen(targetImageName) + 4 + strlen(
targetImageDiskNumber);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
tempSize = strlen(imageDiskNumber); // Image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, imageDiskNumber, tempSize);
cursor += tempSize;
tempSize = strlen(targetImageName); // Target image name 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetImageName, tempSize);
cursor += tempSize;
tempSize = strlen(targetImageDiskNumber); // Target image disk number 1..4
PUT_INT(tempSize, cursor);
memcpy(cursor, targetImageDiskNumber, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,76 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_IPL_Delete_DM_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageIplDeleteDmOutput
/**
* Image_IPL_Delete_DM SMAPI interface
*/
int smImage_IPL_Delete_DM(struct _VmApiInternalContext* vmapiContextP,
char * userid, int passwordLength, char * password,
char * targetIdentifier, vmApiImageIplDeleteDmOutput ** outData) {
const char * const functionName = "Image_IPL_Delete_DM";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 4 + strlen(functionName) + 4 + strlen(userid) + 4
+ passwordLength + 4 + strlen(targetIdentifier);
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
tempSize = strlen(functionName);
PUT_INT(tempSize, cursor);
memcpy(cursor, functionName, tempSize);
cursor += tempSize;
tempSize = strlen(userid); // Userid 1..8 or 0..8 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, userid, tempSize);
cursor += tempSize;
}
tempSize = passwordLength; // Password 1..200 or 0..200 chars
PUT_INT(tempSize, cursor);
if (tempSize > 0) {
memcpy(cursor, password, tempSize);
cursor += tempSize;
}
tempSize = strlen(targetIdentifier); // Target identifier 1..8
PUT_INT(tempSize, cursor);
memcpy(cursor, targetIdentifier, tempSize);
cursor += tempSize;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}
@@ -1,62 +0,0 @@
// IBM (C) Copyright 2010 Eclipse Public License
// http://www.eclipse.org/org/documents/epl-v10.html
#include "smSocket.h"
#include "vmapiImage.h"
#include "smapiTableParser.h"
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#define PARSER_TABLE_NAME Image_IPL_Device_Query_Layout
#define OUTPUT_STRUCTURE_NAME vmApiImageIplDeviceQueryOutput
/**
* Image_IPL_Device_Query SMAPI interface
*/
int smImage_IPL_Device_Query(struct _VmApiInternalContext* vmapiContextP,
char * userid, vmApiImageIplDeviceQueryOutput ** outData) {
const char * const functionName = "Image_IPL_Device_Query";
tableParserParms parserParms;
int tempSize;
char * cursor;
char * stringCursor; // Used for outData string area pointer
int arrayCount;
int totalStringSize;
int rc;
int sockDesc;
int requestId;
int inputSize = 4 + 1 + strlen(functionName) + 1 /* Null term */+ strlen(
userid) + 1 /* Null term */;
char * inputP = 0;
char * smapiOutputP = 0;
char line[LINESIZE];
int i;
TRACE_ENTRY_FLOW(vmapiContextP, TRACEAREA_RESOURCE_LAYER);
// Build SMAPI input parameter buffer
if (0 == (inputP = malloc(inputSize)))
return MEMORY_ERROR;
cursor = inputP;
PUT_INT(inputSize - 4, cursor);
*cursor = 0xFF; // Separator
cursor++;
tempSize = strlen(functionName);
strcpy(cursor, functionName);
cursor += tempSize + 1;
tempSize = strlen(userid);
strcpy(cursor, userid);
cursor += tempSize + 1;
// This routine will send SMAPI the input, delete the input storage
// and call the table parser to set the output in outData
rc = getAndParseSmapiBuffer(vmapiContextP, &inputP, inputSize,
PARSER_TABLE_NAME, // Integer table
TO_STRING(PARSER_TABLE_NAME), // String name of the table
(char * *) outData);
return rc;
}

Some files were not shown because too many files have changed in this diff Show More