[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
General Programming Concepts: Writing and Debugging Programs

Defining Your Subsystem to the SRC

Subsystems are defined to the SRC object class as subsystem objects. Subservers are defined in the SRC configuration database as subserver type objects. The structures associated with each type of object are predefined in the sys/srcobj.h file.

A subsystem object is created with the mkssys command or the addssys subroutine. A subserver type object is created with the mkserver command. You are not required to specify all possible options and parameters using the configuration commands and subroutines. The SRC offers pre-set defaults. You must specify only the required fields and any fields in which you want some value other than the default. See the Subsystem Object Descriptor and Default Value table in "Subsystem Object Class" in "SRC Objects" for a list of subsystem and subserver default values.

Descriptors can be added or modified at the command line by writing a shell script. They can also be added or modified using the C interface. Commands and subroutines are available for configuring and modifying the SRC objects.

Note: The choice of programming interfaces is provided for convenience only.

At the command line use the following commands:

mkssys Adds a subsystem definition to the SRC configuration database.
mkserver Adds a subserver definition to the SRC configuration database.
chssys Changes a subsystem definition in the SRC configuration database.
chserver Changes a subserver definition in the SRC configuration database.
rmssys Removes a subsystem definition from the SRC configuration database.
rmserver Removes a subserver definition from the SRC configuration database.

When using the C interface, use the following subroutines:

addssys Adds a subsystem definition to the SRC configuration database
chssys Changes a subsystem definition in the SRC configuration database
defssys Initializes a new subsystem definition with default values
delssys Deletes an existing subsystem definition from the SRC configuration database
Note: The object code running with the chssys subroutine must be running with the group system.
getssys Gets a subsystem definition from the SRC configuration database
getsubsvr Gets a subserver definition from the SRC configuration database

The mkssys and mkserver commands call the defssys subroutine internally to determine subsystem and subserver default values prior to adding or modifying any values entered at the command line.

The getssys and getsubsvr subroutines are used when the SRC master program or a subsystem program needs to retrieve data from the SRC configuration files.

Related Information

System Resource Controller (SRC) Overview for Programmers

Understanding SRC Objects

Programming Subsystem Communication with the SRC

List of Additional SRC Subroutines

System Resource Controller Overview in AIX Version 4.3 System Management Guide: Operating System and Devices

TCP/IP Protocols in AIX Version 4.3 System Management Guide: Communications and Networks.

Sockets Overview in AIX Communications Programming Concepts

Reading Internet Datagrams Example Program in AIX Communications Programming Concepts

Message Queue Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts

Checking for Pending Connections Example Program in AIX Communications Programming Concepts

srcmstr daemon in AIX Version 4.3 Commands Reference

spc.h file, srcobj.h file in AIX Version 4.3 Files Reference

select subroutine, getsockname subroutine, recvfrom subroutine, msgget subroutine, msgrcv or msgxrcv subroutine in AIX Version 4.3 Technical Reference


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]