To add a new RPC to the NASD drive, you must first
define marshalled types for
the arguments and results of the RPC. The type definitions themselves
should be placed in include/nasd/nasd_drive_types.idl
.
Your new types should have types with names like
nasd_p_new_operation_args_t
and
nasd_p_new_operation_res_t
.
Each argument structure should have a nasd_security_param_t
as its first field, and a nasd_capability_args_t
as its
second. The last field of the argument structure should be a
nasd_digest_nonce_t
.
Each result structure should have a nasd_status_t
as the
first field, to represent the results of the operation, and a
nasd_digest_nonce_t
as the last field.
For example, let's look at the get attributes operation. The arguments
and results are defined as
include/nasd/nasd_pdrive.idl
. For
the get attribute operation, this looks like:
An appropriate wrapper function for this RPC must be prototyped in
include/nasd/nasd_pdrive_client.h
and defined in
client/nasd_pdrive_switch.c
. It is beyond the scope
of this document to detail the steps involved in doing so, as they
involve understanding each transport mechanism supported by NASD.
Readers are recommended to read and copy code that they find in
relevant files.
![]() | ![]() | ![]() |
---|---|---|
Adding marshalled types | Adding control objects | NASD Programmer's Documentation |