Annotation of win32/sql/oracle/include/oci/kusapi.h, revision 1.1.1.1

1.1       parser      1: /*
                      2:  * $Header: /var/lib/cvsroot/parser3/parser3/src/sql/oracle/oracle32/include/oci/kusapi.h,v 1.1 2001/08/22 14:02:18 parser Exp $
                      3:  */
                      4: 
                      5: /* Copyright (c) Oracle Corporation 1996, 1997. All Rights Reserved. */ 
                      6:  
                      7: /* NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
                      8:       directory for the header file template that includes instructions. 
                      9: */
                     10:  
                     11: /* 
                     12:    NAME 
                     13:      kusapi.h - Kernel Utility Statistics Application Programming Interface
                     14: 
                     15:    DESCRIPTION 
                     16:      Declarations of types and functions of the API used to retrieve 
                     17:      statistics from the SGA
                     18: 
                     19:    PUBLIC FUNCTION(S) 
                     20:      kusdb_connect - connect to a database
                     21:      kuscx_allocate - allocate continuation context
                     22:      kuscx_free - free continuation context
                     23:      kuscx_init - initialize continuation context
                     24:      kusdb_get_info - retrieve database information
                     25:      kusdb_get_memory - copy SGA contents into user-allocated memory
                     26:      kusdb_disconnect - disconnect from database
                     27:      kusdb_error_text - format message for last error
                     28:      kustv_allocate_handle - allocate a TLV handle
                     29:      kustv_dump - dump a TLV buffer
                     30:      kustv_free_handle - free a TLV handle
                     31:      kustv_get - get next entry in a TLV buffer
                     32:      kustv_offset - return offset for current entry in TLV buffer
                     33:      kussys_get_info - retrieve non-db-related info (noop for Oracle)
                     34:      kussys_error_text - format message for last error (noop for Oracle)
                     35:      kustvp1_put_one_byte - put TLV entry with 1 byte value into TLV buffer
                     36:      kustvp2_put_two_bytes - put TLV entry with 2 byte value into TLV buffer
                     37:      kustvp4_put_four_bytes - put TLV entry with 4 byte value into TLV buffer
                     38:      kustv_put - put TLV entry into TLV buffer
                     39:      kustvptg_put_tag - put TLV entry with empty value into TLV buffer
                     40:      kustv_reinit_handle - reset offset for a TLV handle
                     41:      kustv_buffer_state - return termination state for tlv buffer
                     42: 
                     43:    NOTES
                     44:      This interface is subject to change without notice
                     45: 
                     46:    MODIFIED   (MM/DD/YY)
                     47:    pabingha    03/14/97 - Add get_tagname argument
                     48:    jstenois    11/05/96 - "Make kustv_dump() header CONST"
                     49:    jstenois    11/01/96 - Use oratypes instead of sx.h
                     50:    jstenois    08/15/96 - SGAAPI public include file
                     51:    jstenois    08/15/96 - Creation
                     52: 
                     53: */
                     54: 
                     55:  
                     56: #ifndef KUSAPI
                     57: # define KUSAPI
                     58: 
                     59: # ifndef ORATYPES
                     60: #  include <oratypes.h>
                     61: # endif
                     62: 
                     63: 
                     64: /*---------------------------------------------------------------------------
                     65:                      PUBLIC TYPES AND CONSTANTS
                     66:   ---------------------------------------------------------------------------*/
                     67: 
                     68: /* values for status code returned by API calls */
                     69: 
                     70: typedef enum kusst
                     71:   {
                     72: 
                     73:     KUSSTOK =          1,      /* Success                              */
                     74:     KUSSTEOB =         2,      /* Cursor at end of buffer.             */
                     75:     KUSSTNWR =         3,      /* Attempt to write to TLV when no      */
                     76:                                /*    length specified at init time     */
                     77:     KUSSTILN =         4,      /* Invalid length specified when        */
                     78:                                /*    passing by value                  */
                     79:     KUSSTTRNC =                5,      /* buffer was truncated                 */
                     80:     KUSSTCONT =                6,      /* buffer is continued                  */
                     81:     KUSSTALLC =                7,      /* unable to allocate memory            */
                     82:     KUSSTUNKC =                8,      /* unknown class tag specified          */
                     83:     KUSSTICH =         9,      /* Invalid context handle               */
                     84:     KUSSTIDH =         10,     /* Invalid database handle              */
                     85:     KUSSTITH =         11,     /* Invalid TLV handle                   */
                     86:     KUSSTDIS =         12,     /* Stats collection disabled for database */
                     87:     KUSSTERR =         13,     /* Unexpected error encountered         */
                     88:     KUSSTBINF =                14,     /* Input buffer contained a bad tag     */
                     89:     KUSSTBDKY =         15,     /* Bad index value for class tag       */
                     90:     KUSSTBFSML =       16,     /* Buffer is too small for data         */
                     91:     KUSSTIBE =         17,     /* Information buffer is empty          */
                     92:     KUSSTDBDOWN =       18,     /* Database is unavaliable              */
                     93:     KUSSTFILACC =       19,     /* File cannot be accessed              */
                     94:     KUSSTINVDB =        20,     /* File is not a db root file (Rdb only)*/
                     95:     KUSSTNODB =         21,     /* Db root file doesn't exist (Rdb only)*/
                     96:     KUSSTBADVER =       22,     /* Db root file wrong version (Rdb only)*/
                     97:     KUSSTCIU =          23,     /* Context is already in use            */
                     98:     KUSSTDMPOP =        24,     /* Unable to open dump output file      */
                     99:     KUSSTDMPCL =        25      /* Unable to close dump output file     */
                    100:   } kusst;
                    101: 
                    102: 
                    103: /* values returned by kustvstate */ 
                    104: 
                    105: typedef enum kustvs
                    106:   {
                    107:     KUSTVS_CONT =      1,      /* tlv buffer terminated with KUSSTCONT */
                    108:     KUSTVS_END =       2,      /* tlv buffer terminated with KUSSTBEND */
                    109:     KUSTVS_TRUNC =     3,      /* tlv buffer terminated with KUSSTTRNC */
                    110:     KUSTVS_UNK =       4       /* handle specified has not been used   */
                    111:                                 /* to read or write a termination tag   */
                    112:   } kustvs;
                    113: 
                    114: 
                    115: /* Type Definitions for handles */
                    116: 
                    117: typedef dvoid *kusdb_handle;   /* handle for connected database */
                    118: typedef dvoid *kuscx_handle;   /* handle for continuation context */
                    119: typedef dvoid *kustv_handle;   /* handle for TLV context */
                    120: 
                    121: /* Data structure for use by kusdb_get_memory */
                    122: 
                    123: typedef struct kusmem
                    124:   {
                    125:     ub1 *sga_address_kusmem;    /* SGA memory address */
                    126:     ub4 length_kusmem;          /* Number of bytes to copy */
                    127:     ub1 *dest_address_kusmem;   /* User-allocated destination for SGA data */
                    128:   } kusmem;
                    129: 
                    130: 
                    131: /*---------------------------------------------------------------------------
                    132:                            PUBLIC FUNCTIONS
                    133:   ---------------------------------------------------------------------------*/
                    134: 
                    135: 
                    136: /* ---------------------------- kuscx_allocate ----------------------------- */
                    137: /*
                    138:   NAME
                    139:     kuscx_allocate -  allocate continuation context
                    140:   DESCRIPTION
                    141:     Allocate space to track information about continuation context for a 
                    142:     kusdb_get_info call.
                    143:   PARAMETERS
                    144:     context_handle - handle for the continuation context (in/out)
                    145:   RETURN VALUE
                    146:     status of call
                    147:   NOTES
                    148:     kuscx_init can be used to reinitilize a context that has been allocated 
                    149:     and is no longer used for a TLV buffer
                    150: */
                    151: 
                    152: kusst kuscx_allocate (/*_ kuscx_handle *context_handle _*/);
                    153: 
                    154: 
                    155: 
                    156: 
                    157: /* ------------------------------ kuscx_free_handle ------------------------ */
                    158: /*
                    159:   NAME
                    160:     kuscx_free_handle -  free continuation context
                    161:   DESCRIPTION
                    162:     free space used to track information about continuation context for a 
                    163:     kusdb_get_info call.
                    164:   PARAMETERS
                    165:     context_handle - handle for the continuation context (in/out)
                    166:   RETURN VALUE
                    167:     status of call
                    168:   NOTES
                    169:     kuscx_init can be used to reinitilize a context that has been allocated
                    170:     and is no longer used for a TLV buffer
                    171: */
                    172: 
                    173: kusst kuscx_free_handle (/*_ kuscx_handle *context_handle _*/);
                    174: 
                    175: 
                    176: 
                    177: 
                    178: /* ------------------------------ kuscx_init ------------------------------- */
                    179: /*
                    180:   NAME
                    181:     kuscx_init -  initialize continuation context
                    182:   DESCRIPTION
                    183:     Reinitialize a context handle that has been previously allocated and used.
                    184:   PARAMETERS
                    185:     context_handle - handle for the continuation context (in/out)
                    186:   RETURN VALUE
                    187:     status of call
                    188:   NOTES
                    189:     kuscx_init is the semantic equivalent of freeing a context handle and then
                    190:     allocating a new one.
                    191: */
                    192: 
                    193: kusst kuscx_init (/*_ kuscx_handle *context_handle _*/);
                    194: 
                    195: 
                    196: 
                    197: /* ----------------------------- kusdb_allocate ---------------------------- */
                    198: /*
                    199:   NAME
                    200:     kusdb_allocate - allocate a database handle
                    201:   DESCRIPTION
                    202:     allocate resources for a database handle
                    203:   PARAMETERS
                    204:     db_handle - handle for the database context (in/out)
                    205:   RETURN VALUE
                    206:     kusst - status of attempt to allocate
                    207: */
                    208: 
                    209: kusst kusdb_allocate (/*_ kusdb_handle *db_handle _*/);
                    210: 
                    211: 
                    212: 
                    213: 
                    214: /* ----------------------------- kusdb_connect ----------------------------- */
                    215: /*
                    216:   NAME
                    217:     kusdb_connect - connect to a database
                    218:   DESCRIPTION
                    219:     Connects to a database so that statistics for that database can be
                    220:     retrieved.
                    221:   PARAMETERS
                    222:     db_handle - handle for the database context (in/out)
                    223:     database_name_length - number of bytes in database_name parameter
                    224:     database name - name of database
                    225:     security_info_length - number of bytes in security_info parameter
                    226:     security_info - security information used to attach to database
                    227:   RETURN VALUE
                    228:     status of attempt to connect
                    229:   NOTES
                    230:     If the status is not successful, call kusdb_error_text to get more 
                    231:     information about the failure.
                    232:     Refer to the documentation for the format of information in the
                    233:     database_name and security_info parameters.
                    234: */
                    235: 
                    236: kusst kusdb_connect (/*_
                    237:        kusdb_handle db_handle,
                    238:        ub4 database_name_length,
                    239:        char *database_name,
                    240:        ub4 security_info_length,
                    241:        char *security_info
                    242:        _*/);
                    243: 
                    244: 
                    245: 
                    246: 
                    247: /* ---------------------------- kusdb_disconnect --------------------------- */
                    248: /*
                    249:   NAME
                    250:     kusdb_disconnect - disconnect from a database
                    251:   DESCRIPTION
                    252:     Disconnect from the current database
                    253:   PARAMETERS
                    254:     db_handle - handle for the database (in/out)
                    255:   RETURN VALUE
                    256:     status of call
                    257:   NOTES
                    258: */
                    259: 
                    260: kusst kusdb_disconnect (/*_ kusdb_handle db_handle _*/);
                    261: 
                    262: 
                    263: 
                    264: 
                    265: /* ------------------------------- kusdb_free ------------------------------ */
                    266: /*
                    267:   NAME
                    268:     kusdb_free - free a database handle
                    269:   DESCRIPTION
                    270:     free resources for a database handle
                    271:   PARAMETERS
                    272:     db_handle - handle for the database context (in/out)
                    273:   RETURN VALUE
                    274:     kusst - status of attempt to free the handle
                    275: */
                    276: 
                    277: kusst kusdb_free (/*_ kusdb_handle *db_handle _*/);
                    278: 
                    279: 
                    280: 
                    281: 
                    282: /* ----------------------------- kusdb_get_info ---------------------------- */
                    283: /*
                    284:   NAME
                    285:     kusdb_get_info - retrieve statistics for a database
                    286:   DESCRIPTION
                    287:     Retrieve requested statistics for the current database
                    288:   PARAMETERS
                    289:     db_handle - handle for the database (in)
                    290:     context_handle - handle for the continuation context (in/out)
                    291:     info_buf - TLV buffer indicating data to be returned (in)
                    292:     info_buf_len - number of bytes in info_buffer (in)
                    293:     result_buf - allocated TLV buffer to hold data returned (in/out)
                    294:     result_buf_len - number of bytes in result_buf (in/out)
                    295:     buffer_termination_status - indicates how buffer was terminated (normally,
                    296:       truncated, or continued) (out)
                    297:   RETURN VALUE
                    298:     status of call
                    299:   NOTES
                    300:     If the status is not successful, call kusdb_error_text to get more 
                    301:     information about the failure.
                    302:     Refer to documentation for information on the format of the information
                    303:     buffer and the result buffer
                    304: */
                    305: 
                    306: kusst kusdb_get_info (/*_
                    307:        kusdb_handle db_handle,
                    308:        kuscx_handle ctx_handle,
                    309:        ub1 *info_buffer,
                    310:        ub4 info_buffer_length,
                    311:        ub1 *result_buffer,
                    312:        ub4 *result_buffer_length,
                    313:        kustvs *buffer_termination_status
                    314:        _*/);
                    315: 
                    316: 
                    317: 
                    318: /* ----------------------------- kusdb_get_memory -------------------------- */
                    319: /*
                    320:   NAME
                    321:     kusdb_get_memory - copy SGA contents into user-allocated memory
                    322:   DESCRIPTION
                    323:     Copy SGA memory into user-allocated memory regions. User provides
                    324:     an array of kusmem structures. Each kusmem structure in the array
                    325:     describes a distinct copy to be done by this routine.
                    326:   PARAMETERS
                    327:     db_handle - handle for the database (in)
                    328:     mem_array_length - number of elements in mem_array (in)
                    329:     mem_array - address of an array of kusmem structures (in/out)
                    330:   RETURN VALUE
                    331:     status of call:
                    332:         KUSSTOK - call succeeded, all requested data copied
                    333:         KUSSTIDH - invalid database handle
                    334:         KUSSTDBDOWN - database is down
                    335:         KUSSTERR - unexpected error
                    336:   NOTES
                    337:      User should prepare each kusmem structure in array by filling in
                    338:      values for sga_address_kusmem, length_kusmem and dest_address_kusmem
                    339:      prior to making this call. 
                    340: 
                    341:      User is reponsible for allocating and deallocating the memory used
                    342:      by mem_array and each region that a dest_address_kusmem points to.
                    343: */
                    344: 
                    345: kusst kusdb_get_memory (/*_
                    346:        kusdb_handle db_handle,
                    347:         ub4 mem_array_length,
                    348:         kusmem *mem_array
                    349:        _*/);
                    350: 
                    351: 
                    352: 
                    353: 
                    354: /* ---------------------------- kusdb_error_text --------------------------- */
                    355: /*
                    356:   NAME
                    357:     kusdb_error_text - error text
                    358:   DESCRIPTION
                    359:     Display information about status of last kusdb call
                    360:   PARAMETERS
                    361:     db_ctx - context whose errors are to be returned (in)
                    362:     text_buf - buffer to hold error message (in/out)
                    363:     text_buf_len - number of bytes in text buffer (in)
                    364:     text_len_out - number of bytes written into text_buf
                    365:   RETURN VALUE
                    366:     status of call
                    367:   NOTES
                    368: */
                    369: 
                    370: kusst kusdb_error_text (/*_ kusdb_handle db_ctx, char *text_buf,
                    371:                          ub4 text_buf_len, ub4 *text_len_out _*/);
                    372: 
                    373: 
                    374: 
                    375: 
                    376: /* ------------------------ kustv_allocate_handle -------------------------- */
                    377: /*
                    378:   NAME
                    379:     kustv_allocate_handle - allocate a handle for a TLV buffer
                    380:   DESCRIPTION
                    381:     allocates and initializes information for a TLV handle
                    382:   PARAMETERS
                    383:     tlv_handle - handle of the TLV buffer (in/out)
                    384:     tlv_buffer - address of the TLV buffer for this handle (in)
                    385:     buf_size - number of bytes in tlv_buffer (in)
                    386:   RETURN VALUE
                    387:     KUSSTALL   Unable to allocate memory
                    388:   NOTES
                    389:     kustv_reinit can be used to reinitialize a TLV handle that is no longer
                    390:     needed.
                    391: */
                    392: 
                    393: kusst kustv_allocate_handle (/*_
                    394:        kustv_handle *tlv_handle,
                    395:        ub1 *tlv_buffer,
                    396:        ub4 buf_size
                    397:        _*/);
                    398: 
                    399: 
                    400: #ifndef _WINDOWS
                    401: 
                    402: 
                    403: /* ------------------------------- kustv_dump -------------------------------*/
                    404: /*
                    405:   NAME
                    406:     kustv_dump - dump tlv buffer
                    407:   DESCRIPTION
                    408:     Formats the content of a TLV buffer into the file specified by the caller
                    409:   PARAMETERS
                    410:     tlv_handle - handle of the TLV buffer to be dumped (in)
                    411:     header - ASCIZ string to be displayed before dumping the buffer (in)
                    412:     data_flg - flag to indicate if the contents of the value fueld in the TLV
                    413:        should be displayed (in)
                    414:     append_flg - flag to indicate if an existing instance of the output
                    415:         file should be appended to (or replaced)
                    416:     get_tagname - routine to get text associated with tags
                    417:     directory - ASCIZ string containing a directory specification for the
                    418:         output file (if absent, current default directory is used)
                    419:     file_name - ASCIZ string containing a file name for the output file.
                    420:         If absent, stderr is used and append_flg and directory are ignored.
                    421:         If specified without an extension, the Oracle extension for an output
                    422:         file on the given platform is used.
                    423:   RETURN VALUE
                    424:     KUSSTOK    Success
                    425:     KUSSTITH   invalid tlv handle
                    426:     KUSSTDMPOP  can't open dump file
                    427:     KUSSTDMPCL  can't close dump file
                    428:   NOTES
                    429: */
                    430: 
                    431: kusst kustv_dump (/*_
                    432:        kustv_handle tlv_handle,
                    433:        CONST char *header,
                    434:        int data_flg,
                    435:         int append_flg,
                    436:         CONST char *(*get_tagname)(ub2),
                    437:         CONST char *directory,
                    438:         CONST char *file_name
                    439:        _*/);
                    440: 
                    441: #endif
                    442: 
                    443: 
                    444: /* ------------------------- kustv_free_handle ----------------------------- */
                    445: /*
                    446:   NAME
                    447:     kustv_free_handle - free a handle for a TLV buffer
                    448:   DESCRIPTION
                    449:     Free a TLV handle that has already been created
                    450:   PARAMETERS
                    451:     tlv_handle - handle of the TLV buffer (in/out)
                    452:   RETURN VALUE
                    453:     status of call
                    454:   NOTES
                    455:     kustv_reinit_handle can be used to reinitialize a handle that is no 
                    456:     longer needed.
                    457: */
                    458: 
                    459: kusst kustv_free_handle (/*_ kustv_handle *tlv_handle _*/);
                    460: 
                    461: /* ----------------------------- kussys_get_info --------------------------- */
                    462: /*
                    463:   NAME
                    464:     kussys_get_info - retrieve non database specific data
                    465:   DESCRIPTION
                    466:     Retrieve non database specific information
                    467:   PARAMETERS
                    468:     context_handle - handle for the continuation context (in/out)
                    469:     info_buf - TLV buffer indicating data to be returned (in)
                    470:     info_buf_len - number of bytes in info_buffer (in)
                    471:     result_buf - allocated TLV buffer to hold data returned (in/out)
                    472:     result_buf_len - number of bytes in result_buf (in/out)
                    473:     buffer_termination_status - indicates how buffer was terminated (normally,
                    474:       truncated, or continued) (out)
                    475:   RETURN VALUE
                    476:     status of call
                    477:   NOTES
                    478:     This function is a noop for Oracle. It is included for compatability
                    479:     with Rdb only.
                    480: */
                    481: 
                    482: kusst kussys_get_info (/*_
                    483:        kuscx_handle ctx_handle,
                    484:        ub1 *info_buffer,
                    485:        ub4 info_buffer_length,
                    486:        ub1 *result_buffer,
                    487:        ub4 *result_buffer_length,
                    488:        kustvs *buffer_termination_status
                    489:        _*/);
                    490: 
                    491: 
                    492: 
                    493: 
                    494: 
                    495: /* ---------------------------- kussys_error_text -------------------------- */
                    496: /*
                    497:   NAME
                    498:     kussys_error_text - error text
                    499:   DESCRIPTION
                    500:     Display information about status of last kustv call
                    501:   PARAMETERS
                    502:     text_buf - buffer to hold error message (in/out)
                    503:     text_buf_len - number of bytes in text buffer (in)
                    504:     text_len_out - number of bytes written into text_buf
                    505:   RETURN VALUE
                    506:     status of call
                    507:   NOTES
                    508:     This function is a noop for Oracle. It is included for compatability
                    509:     with Rdb only.
                    510: */
                    511: 
                    512: kusst kussys_error_text (/*_ char *text_buf,
                    513:                          ub4 text_buf_len, ub4 *text_len_out _*/);
                    514: 
                    515: 
                    516: 
                    517: 
                    518: /* ------------------------------ kustv_get -------------------------------- */
                    519: /*
                    520:   NAME
                    521:     kustv_get - get next entry in tlv buffer
                    522:   DESCRIPTION
                    523:     Retrieves information about next entry in the tlv buffer and advances
                    524:     pointer into the TLV buffer to the following entry.
                    525:   PARAMETERS
                    526:     tlv_handle - handle of the TLV buffer (in)
                    527:     tag - tag for the next entry (out)
                    528:     length - number of bytes in the value for the TLV entry (out)
                    529:     value - pointer to value field for the TLV entry (out)
                    530:   RETURN VALUE
                    531:     KUSSTOK    Success
                    532:     KUSSTITH   Invalid TLV handle
                    533:   NOTES
                    534: */
                    535: 
                    536: kusst kustv_get (/*_
                    537:        kustv_handle tlv_handle,
                    538:        ub2 *tag,
                    539:        ub2 *length,
                    540:        ub1 **value
                    541:        _*/);
                    542: 
                    543: 
                    544: 
                    545: 
                    546: 
                    547: /* ------------------------ kustv_reinit_handle ---------------------------- */
                    548: /*
                    549:   NAME
                    550:     kustv_reinit_handle - reinitialize a TLV handle
                    551:   DESCRIPTION
                    552:     Reimitializes a TLV handle so that it can be used to read or write a new
                    553:     TLV buffer.
                    554:   PARAMETERS
                    555:     tlv_handle - handle of the TLV buffer (in/out)
                    556:     buffer - address of the TLV buffer
                    557:     buffer_size - number of bytes in the TLV buffer
                    558:   RETURN VALUE
                    559:     KUSSTOK    Success
                    560:     KUSSTITH   Invalid TLV handle
                    561:   NOTES
                    562: */
                    563: 
                    564: kusst kustv_reinit_handle (/*_ 
                    565:        kustv_handle tlv_handle,
                    566:        ub1 *buffer,
                    567:        ub4 buffer_length
                    568:        _*/);
                    569: 
                    570: 
                    571: 
                    572: 
                    573: 
                    574: /* --------------------------- kustv_length -------------------------------- */
                    575: 
                    576: /*
                    577:   NAME
                    578:     kustv_length - return length of a TLV buffer
                    579:   DESCRIPTION
                    580:     return the length of a TLV buffer associated with a TLV handle
                    581:   PARAMETERS
                    582:     tlv_handle - handle of the TLV buffer (in)
                    583:     buffer_length - number of bytes in the buffer (out)
                    584:   RETURN VALUE
                    585:     KUSSTOK    Success
                    586:     KUSSTITL   Invalid TLV handle
                    587:   NOTES
                    588: */
                    589: 
                    590: kusst kustv_length (/*_ 
                    591:        kustv_handle tlv_handle,
                    592:        ub4 buffer_length
                    593:        _*/);
                    594: 
                    595: 
                    596: 
                    597: 
                    598: /* ---------------------------- kustv_offset ------------------------------- */
                    599: 
                    600: /*
                    601:   NAME
                    602:     kustv_offset - return offset of a TLV buffer
                    603:   DESCRIPTION
                    604:     return the current offset of a TLV buffer associated with a TLV handle
                    605:   PARAMETERS
                    606:     tlv_handle - handle of the TLV buffer (in)
                    607:     offset - current offset for TLV buffer (out)
                    608:   RETURN VALUE
                    609:     KUSSTOK - success
                    610:     KUSSTITH - invalid TLV handle
                    611:   NOTES
                    612: */
                    613: 
                    614: kusst kustv_offset (/*_ 
                    615:        kustv_handle tlv_handle, 
                    616:        ub4 *offset 
                    617:        _*/);
                    618: 
                    619: 
                    620: 
                    621: 
                    622: /* ------------------------ kustvp1_put_one_byte --------------------------- */
                    623: 
                    624: /*
                    625:   NAME
                    626:     kustvp1_put_one_byte - Insert a TLV entry with a value field of 1 byte
                    627:   DESCRIPTION
                    628:     Adds a new TLV entry to the end of the current TLV buffer.  This entry
                    629:     contains 1 byte.
                    630:   PARAMETERS
                    631:     tlv_handle - handle of the TLV buffer (in/out)
                    632:     tag - tag for the new entry (in)
                    633:     value - value for the new entry (in)
                    634:   RETURN VALUE
                    635:     status of the operation
                    636:   NOTES
                    637: */
                    638: 
                    639: kusst kustvp1_put_one_byte (/*_
                    640:        kustv_handle tlv_handle,
                    641:        ub2 tag,
                    642:        ub1 value
                    643:        _*/);
                    644: 
                    645: 
                    646: 
                    647: 
                    648: /* ------------------------- kustvp2_put_two_bytes ------------------------- */
                    649: 
                    650: /*
                    651:   NAME
                    652:     kustvp2_put_two_bytes - Insert a TLV entry with a value field of 2 byte
                    653:   DESCRIPTION
                    654:     Adds a new TLV entry to the end of the current TLV buffer.  This entry
                    655:     contains 2 bytes.
                    656:   PARAMETERS
                    657:     tlv_handle - handle of the TLV buffer (in/out)
                    658:     tag - tag for the new entry (in)
                    659:     value - value for the new entry (in)
                    660:   RETURN VALUE
                    661:     status of the operation
                    662:   NOTES
                    663: */
                    664: 
                    665: kusst kustvp2_put_two_bytes (/*_
                    666:        kustv_handle tlv_handle,
                    667:        ub2 tag,
                    668:        ub2 value
                    669:        _*/);
                    670: 
                    671: 
                    672: 
                    673: 
                    674: /* ----------------------- kustvp4_put_four_bytes -------------------------- */
                    675: 
                    676: /*
                    677:   NAME
                    678:     kustvp4_put_four_bytes - Insert a TLV entry with a value field of 4 byte
                    679:   DESCRIPTION
                    680:     Adds a new TLV entry to the end of the current TLV buffer.  This entry
                    681:     contains 4 bytes.
                    682:   PARAMETERS
                    683:     tlv_handle - handle of the TLV buffer (in/out)
                    684:     tag - tag for the new entry (in)
                    685:     value - value for the new entry (in)
                    686:   RETURN VALUE
                    687:     status of the operation
                    688:   NOTES
                    689: */
                    690: 
                    691: kusst kustvp4_put_four_bytes (/*_
                    692:        kustv_handle tlv_handle,
                    693:        ub2 tag,
                    694:        ub4 value
                    695:        _*/);
                    696: 
                    697: 
                    698: 
                    699: 
                    700: /* ----------------------------- kustv_put --------------------------------- */
                    701: 
                    702: /*
                    703:   NAME
                    704:     kustv_put - Insert a TLV entry
                    705:   DESCRIPTION
                    706:     Adds a new TLV entry to the end of the current TLV buffer.
                    707:   PARAMETERS
                    708:     tlv_handle - handle of the TLV buffer (in/out)
                    709:     tag - tag for the new entry (in)
                    710:     length - number of bytes in the new entry (in)
                    711:     value - value for the new entry (in)
                    712:   RETURN VALUE
                    713:     status of the operation
                    714:   NOTES
                    715: */
                    716: 
                    717: kusst kustv_put (/*_
                    718:        kustv_handle tlv_handle,
                    719:        ub2 tag,
                    720:        ub2 length,
                    721:        dvoid *value
                    722:        _*/);
                    723: 
                    724: 
                    725: 
                    726: 
                    727: /* -------------------------- kustvptg_put_tag ----------------------------- */
                    728: 
                    729: /*
                    730:   NAME
                    731:     kustvptg_put_tag - Insert a TLV entry with no value field
                    732:   DESCRIPTION
                    733:     Adds a new TLV entry to the end of the current TLV buffer.  the entry
                    734:     contains a 0-length value field.
                    735:   PARAMETERS
                    736:     tlv_handle - handle of the TLV buffer (in/out)
                    737:     tag - tag for the new entry (in)
                    738:   RETURN VALUE
                    739:     status of the operation
                    740:   NOTES
                    741: */
                    742: 
                    743: kusst kustvptg_put_tag (/*_
                    744:        kustv_handle tlv_handle,
                    745:        ub2 tag
                    746:        _*/);
                    747: 
                    748: 
                    749: 
                    750: 
                    751: 
                    752: /* -------------------------- kustv_buffer_state --------------------------- */
                    753: 
                    754: /*
                    755:   NAME
                    756:     kustv_buffer_state - return termination state of TLV buffer
                    757:   DESCRIPTION
                    758:     Returns informationon how a TLV buffer was terminated.  This call returns
                    759:     useful information only if a TLV handle was used to read or write the
                    760:     termination tag.  The termination information is preserved 
                    761:   PARAMETERS
                    762:     tlv_handle - handle of the TLV buffer (in)
                    763:     state - termination state for the TLV (out)
                    764:   RETURN VALUE
                    765:     status of the operation
                    766:   NOTES
                    767: */
                    768: 
                    769: kusst kustv_buffer_state (/*_
                    770:        kustv_handle tlv_handle,
                    771:        kustvs *state
                    772:        _*/);
                    773: 
                    774: 
                    775: #endif                                              /* kusapi */

E-mail: