VMS Help  —  DCE  DCE_INTRO, dced_intro, Server Configuration Control Routines
  dced_server_create  Creates a DCE server's configuration data

  dced_server_modify_attributes
                      Modifies a DCE server's configuration data

  dced_server_delete  Deletes a DCE server's configuration data

  dced_server_start   Starts a DCE-configured server

1  –  dced_server_create

 NAME

   dced_server_create - Creates a DCE server's configuration data
                        for the host's dced

 SYNOPSIS

   #include <dce/dced.h>

   void dced_server_create( dced_binding_handle_t  dced_bh,
                            server_t               *conf_data,
                            error_status_t         *status );

 PARAMETERS

   Input

   dced_bh
       Specifies the dced binding handle for the srvrconf service on a
       specific host.

   Input/Output

   conf_data
       Specifies the configuration data for the server.  The dced_intro
       reference page describes the server_t structure.

   Output

   status
       Returns the status code from this routine.  This status code
       indicates whether the routine completed successfully or, if
       not, why not.  The possible status codes are:

            error_status_ok
            db_s_bad_header_type
            db_s_bad_index_type
            db_s_iter_not_allowed
            db_s_key_not_found
            db_s_readonly
            db_s_store_failed
            dced_s_already_exists
            dced_s_bad_binding
            dced_s_name_missing
            sec_acl_invalid_permission

 DESCRIPTION

   The dced_server_create() routine creates a server's configuration
   data.  This routine is used by management installation applications
   to remotely (or locally) establish the data used to control how a
   DCE server starts.  However, it does not create the program or
   start it. Since this activity is typically part of a server's
   installation, you can also use dcecp's server create operation.

   Management applications use the dced_object_read() routine to read
   the configuration data.

   Prior to calling dced_server_create(), the application must have
   established a valid dced binding handle to the srvrconf service
   by calling either dced_binding_create() or
   dced_binding_from_rpc_binding().

 EXAMPLES

   The following example shows how to fill in some of the fields of
   a server_t structure and then create the configuration in dced.

        dced_binding_handle_t dced_bh;
        server_t              conf;
        error_status_t        status;

        dced_binding_create( "srvrconf@hosts/katharine",
                             dced_c_binding_syntax_default,
                             &dced_bh,
                             &status );
        /* setup a server_t structure */
        uuid_create(&conf.id, &status);
        conf.name           = (dced_string_t)"application";
        conf.entryname      = (dced_string_t)"/.:/development/new_app";
        conf.services.count = 1;

        /* service_t structure(s) */
        conf.services.list = malloc( conf.services.count *
                                     sizeof(service_t) );
        rpc_if_inq_id( application_v1_0_c_ifspec,
                       &(conf.services.list[0].ifspec),
                       &status );
        conf.services.list[0].ifname     =
                             (dced_string_t)"application";
        conf.services.list[0].annotation =
                             (dced_string_t)"A new application";
        conf.services.list[0].flags      = 0;

        /* server_fixedattr_t structure */
        conf.fixed.startupflags = server_c_startup_explicit |
                                  server_c_startup_on_failure;
        conf.fixed.flags = 0;
        conf.fixed.program = (dced_string_t)"/usr/users/bin/new_app";

        dced_server_create( dced_bh, &conf, &status );
         .
         .
         .

 RELATED INFORMATION

   Routines:   dced_object_read
               dced_binding_create
               dced_binding_from_rpc_binding

   dcecp objects: server

   Books: OSF DCE Application Development Guide.

2  –  dced_server_modify_attributes

 NAME

   dced_server_modify_attributes - Modifies attributes for a DCE
                                   server's configuration data

 SYNOPSIS

   #include <dce/dced.h>

   void dced_server_modify_attributes(
           dced_binding_handle_t   dced_bh,
           uuid_t                  *conf_uuid,
           dced_attr_list_t        *data,
           error_status_t          *status );

 PARAMETERS

   Input

   dced_bh
       Specifies the dced binding handle for the srvrconf service
       on a specific host.

   conf_uuid
       Specifies the UUID that dced uses to identify a server's
       configuration data to be modified.

   data
       Specifies the attributes to be modified.

   Output

   status
       Returns the status code from this routine.  This status code
       indicates whether the routine completed successfully or, if
       not, why not.  The possible status codes are:

            error_status_ok
            db_s_bad_index_type
            db_s_iter_not_allowed
            db_s_readonly
            db_s_store_failed
            dced_s_bad_binding
            dced_s_not_found
            sec_acl_invalid_permission

 DESCRIPTION

   The dced_server_modify_attributes() routine replaces a server's
   attributes of its configuration data maintained by dced on a
   specific host. This routine is typically called after a
   configuration is created with the dced_server_create() routine.

   A server's configuration is manipulated in a server_t data
   structure, and the dced_server_modify_attributes() routine
   affects only the attributes member of this structure.  To change
   other server configuration data, you must first delete the
   configuration by using dced_server_delete() and then create the
   configuration again by using dced_server_create().

   Prior to calling dced_server_modify_attributes(), the application
   must have established a valid dced binding handle to the srvrconf
   service by calling either dced_binding_create() or
   dced_binding_from_rpc_binding().

 RELATED INFORMATION

   Routines:   dced_object_read
               dced_binding_create
               dced_binding_from_rpc_binding

   dcecp Objects: server

   Books: OSF DCE Application Development Guide

3  –  dced_server_delete

 NAME

   dced_server_delete - Deletes a DCE server's configuration data
                        from dced

 SYNOPSIS

   #include <dce/dced.h>

   void dced_server_delete( dced_binding_handle_t  dced_bh,
                            uuid_t                 *conf_uuid,
                            error_status_t         *status );

 PARAMETERS

   Input

   dced_bh
       Specifies the dced binding handle for the srvrconf service
       on a specific host.

   conf_uuid
       Specifies the UUID that dced uses to identify the server's
       configuration data to be deleted.

   Output

   status
       Returns the status code from this routine.  This status code
       indicates whether the routine completed successfully or, if
       not, why not. The possible status codes are:

            error_status_ok
            db_s_bad_index_type
            db_s_del_failed
            db_s_iter_not_allowed
            dced_s_bad_binding
            dced_s_not_found
            sec_acl_invalid_permission

 DESCRIPTION

   The dced_server_delete() routine deletes a server's configuration
   data from the server's dced.  This routine removes a server from
   DCE control by making it incapable of starting via dced.  It does
   not delete the program from disk nor does it affect the server
   if it is currently running.

   Prior to using dced_server_delete(), the server configuration
   data must be created by an administrator using the dcecp server
   create operation or by an application that using
   dced_server_create().

   Prior to calling dced_server_delete(), the application must
   have established a valid dced binding handle to the srvrconf
   service by calling either dced_binding_create() or
   dced_binding_from_rpc_binding().

 EXAMPLES

   In the following example, a dced binding is created to the
   server configuration service on a host, and then an inquiry
   is made as to the UUID associated with a particular server.
   The dced_server_delete() routine is then used to delete the
   configuration.

        dced_binding_handle_t dced_bh;
        dced_string_t         server_name;
        uuid_t                srvrconf_id;
        error_status_t        status;

        name_server( &server_name );    /* application specific */
        dced_binding_create( "srvrconf@hosts/katharine",
                             dced_c_binding_syntax_default,
                             &dced_bh,
                             &status );
        dced_inq_id( dced_bh, server_name, &srvrconf_id, &status );
        dced_server_delete( dced_bh, &srvrconf_id, &status );
        dced_binding_free( dced_bh, &status );

 RELATED INFORMATION

   Routines:   dced_server_create
               dced_server_modify_attributes
               dced_binding_create
               dced_binding_from_rpc_binding

   dcecp Objects: server

   Books: OSF DCE Application Development Guide.

4  –  dced_server_start

 NAME

   dced_server_start - Starts a DCE-configured server on a
                       specified host

 SYNOPSIS

   #include <dce/dced.h>

   void dced_server_start( dced_binding_handle_t  dced_bh,
                           uuid_t                 *conf_uuid,
                           dced_attr_list_t       *attributes,
                           uuid_t                 *exec_uuid,
                           error_status_t         *status );

 PARAMETERS

   Input

   dced_bh
       Specifies the dced binding handle for the srvrconf service on a
       specific host.

   conf_uuid
       Specifies the UUID that dced uses to identify the server to
       start.  If the value input is that of a server that is
       already running, dced starts a new instance.

   attributes
       Specifies the configuration attributes to use to start the
       server.  If the value is NULL, the default configuration
       defined in dced is used.

   Input/Output

   exec_uuid
       Specifies a new UUID for dced to use to identify the running
       server.  If a NIL UUID is input, a new UUID is created and
       returned.  If the value input is that of a server that is
       already running, dced starts a new instance and returns a
       new value.

   Output

   status
       Returns the status code from this routine.  This status code
       indicates whether the routine completed successfully or, if
       not, why not. The possible status codes are:

            error_status_ok
            db_s_bad_header_type
            db_s_iter_not_allowed
            db_s_key_not_found
            db_s_readonly
            db_s_store_failed
            dced_s_bad_binding
            dced_s_no_support
            dced_s_not_found
            dced_s_sc_cant_fork
            dced_s_sc_invalid_attr_type
            dced_s_sc_open_file_failed
            sec_acl_invalid_permission
            uuid_s_bad_version

 DESCRIPTION

   The dced_server_start() routine starts DCE-configured servers on
   a specific remote host (or the local host).  The configuration
   data is stored in an object in the srvrconf service of dced.
   When the server starts, dced uses the server configuration object
   and creates a server execution object in the srvrexec service.
   A server execution object consists of data that describes the
   executing server.

   Management applications create the configuration data by using
   the dced_server_create() use the dced_object_read() routine to
   read the configuration or execution data.

   Prior to calling dced_server_start(), the application must have
   established a valid dced binding handle to the srvrconf service
   by calling either dced_binding_create() or
   dced_binding_from_rpc_binding().

 EXAMPLES

   The following example starts a configured server using a nil UUID
   as input for the executing server.

        dced_binding_handle_t conf_bh;
        dced_string_t         server_name;
        uuid_t                srvrconf_id, srvrexec_id;
        error_status_t        status;

        dced_binding_create( "srvrconf@hosts/patrick",
                             dced_c_binding_syntax_default,
                             &conf_bh,
                             &status );
        dced_inq_id( conf_bh, server_name, &srvrconf_id, &status );
        uuid_create_nil( &srvrexec_id, &status );
        dced_server_start( conf_bh,
                           &srvrconf_id,
                           NULL,
                           &srvrexec_id,
                           &status );
         .
         .
         .

 RELATED INFORMATION

   Routines:   dced_server_create
               dced_server_stop
               dced_binding_create
               dced_binding_from_rpc_binding

   Commands: server

   Books: OSF DCE Application Development Guide.
Close Help