Previous Next

dced_server_disable_if(3dce)

Disables a service (rpc interface) provided by a specific server on a specific host

Synopsis

#include <dce/dced.h>

void dced_server_disable_if(

dced_binding_handle_t dced_bh,

uuid_t *exec_uuid,

rpc_if_id_t *interface,

error_status_t *status);

Parameters

Input

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

exec_uuid
Specifies the UUID that dced uses to identify the running server.

interface
Specifies the RPC interface identifier that represents the service to be disabled. The interface identifier is generated when idl compiles an interface definition file. The interface identifier is an rpc_if_id_t structure that contains the interface UUID (uuid) of type uuid_t, and numbers of type unsigned16 representing the major (vers_major) and minor (vers_minor) version numbers for the interface.

Output

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The dced_server_disable_if( ) routine disables a service provided by a server on a specific host. A service is represented by an RPC interface identifier. Management applications use this routine to remotely disable an interface so it is inaccessible by clients, without completely stopping the entire server.

When a server starts and initializes itself, it must call the dce_server_register( ) routine to enable all of its services. The server can then disable its own individual services by using dce_server_disable_service( ). This routine unregisters the service's interface from the RPC runtime and marks the interface as disabled in the endpoint map. As an alternative, a management application can use dced_server_disable_if( ) to disable individual services. However, this routine only affects the endpoint map in dced by marking the interface as disabled and does not affect the server's runtime.

A management application can re-enable a service again by calling the dced_server_enable_if( ) routine. (Servers re-enable their own services using the dce_server_enable_if( ) routine.)

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

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

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

Related Information
Routines:

dced_server_disable_if(3dce)

dced_server_enable_if(3dce)

dce_server_register(3dce)

dced_server_enable_if(3dce)

dced_binding_create(3dce)

dced_binding_from_rpc_binding(3dce)

dcecp objects: server(8dce)

Book: OSF DCE Application Development Guide - Core Components