labeld.h revision b30a53d02d9bc370d76b8125a98e34311c768b5e
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LABELD_H
#define _LABELD_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions for the call parameters for the door-based label
* translation service.
*/
#define BUFSIZE 4096
#define DOOR_NAME "labeld"
/* Op codes */
/* Labeld Commands */
#define LABELDNULL 1
/* Miscellaneous */
#define BLINSET 10
#define BSLVALID 11
#define BILVALID 12
#define BCLEARVALID 13
#define LABELINFO 14
#define LABELVERS 15
#define BLTOCOLOR 16
/* Binary to String Label Translation */
#define BSLTOS 23
#define BCLEARTOS 25
/* String to Binary Label Translation */
#define STOBSL 31
#define STOBCLEAR 33
/*
* Dimming List Routines
* Contract private for label builders
*/
#define BSLCVT 40
#define BCLEARCVT 42
#define LABELFIELDS 43
#define UDEFS 44
#define GETFLABEL 45
#define SETFLABEL 46
#define ZCOPY 47
/* NEW LABELS */
/* DIA printer banner labels */
#define PR_CAVEATS 101
#define PR_CHANNELS 102
#define PR_LABEL 103
#define PR_TOP 104
/* DIA label to string */
#define LTOS 105
/* DIA string to label */
#define STOL 106
/* Structures */
/* Null call */
typedef struct {
int null;
} null_call_t;
typedef struct {
int null;
} null_ret_t;
/* Miscellaneous interfaces */
typedef struct {
int type;
} inset_call_t;
typedef struct {
int inset;
} inset_ret_t;
typedef struct {
typedef struct {
int valid;
typedef struct {
typedef struct {
int valid;
typedef struct {
int null;
} info_call_t;
typedef struct {
struct label_info info;
} info_ret_t;
typedef struct {
int null;
} vers_call_t;
typedef struct {
} vers_ret_t;
typedef struct {
} color_call_t;
typedef struct {
} color_ret_t;
/* Binary Label to String interfaces */
typedef struct {
typedef struct {
} bsltos_ret_t;
typedef struct {
typedef struct {
/* String to Binary Label interfaces */
typedef struct {
typedef struct {
} stobsl_ret_t;
typedef struct {
typedef struct {
/*
* The following Dimming List and Miscellaneous interfaces
* implement contract private interfaces for the label builder
* interfaces.
*/
/* Dimming List interfaces */
typedef struct {
typedef struct {
int first_comp;
int first_mark;
} cvt_ret_t;
typedef cvt_ret_t bslcvt_ret_t;
typedef struct {
typedef cvt_ret_t bclearcvt_ret_t;
/* Miscellaneous interfaces */
typedef struct {
int null;
typedef struct {
} fields_ret_t;
typedef struct {
int null;
} udefs_call_t;
typedef struct {
} udefs_ret_t;
typedef struct {
typedef struct {
int status;
typedef struct {
int transfer_mode;
} zcopy_call_t;
typedef struct {
int status;
} zcopy_ret_t;
typedef struct {
} pr_call_t;
typedef struct {
} pr_ret_t;
typedef struct {
} ls_call_t;
typedef struct {
} ls_ret_t;
typedef struct {
} sl_call_t;
typedef struct {
} sl_ret_t;
/* Labeld operation call structure */
typedef struct {
union {
} cargs;
/* Labeld operation return structure */
typedef struct {
int ret; /* labeld return codes */
int err; /* function error codes */
union {
} rvals;
} labeld_ret_t;
typedef struct {
union {
} param;
/* Labeld common client call function */
int
/* Return Codes */
/* Flag Translation Values */
#define L_NEW_LABEL 0x10000000
/* GFI FLAGS */
#define GFI_FLAG_MASK 0x0000FFFF
#define GFI_ACCESS_RELATED 0x00000001
/* binary to ASCII */
#define LABELS_NO_CLASS 0x00010000
#define LABELS_SHORT_CLASS 0x00020000
#define LABELS_SHORT_WORDS 0x00040000
/* Label view */
#define LABELS_VIEW_INTERNAL 0x00100000
#define LABELS_VIEW_EXTERNAL 0x00200000
/* Dimming list (convert -- b*cvt* ) */
#define LABELS_FULL_CONVERT 0x00010000
/* ASCII to binary */
#define LABELS_NEW_LABEL 0x00010000
#define LABELS_FULL_PARSE 0x00020000
#define LABELS_ONLY_INFO_LABEL 0x00040000
#define MOVE_FILE 0
#define COPY_FILE 1
#define LINK_FILE 2
#define PIPEMSG_FILEOP_ERROR 1
#define PIPEMSG_EXIST_ERROR 2
#define PIPEMSG_DONE 7
#define PIPEMSG_PATH_ERROR 20
#define PIPEMSG_ZONE_ERROR 21
#define PIPEMSG_LABEL_ERROR 22
#define PIPEMSG_READ_ERROR 23
#define PIPEMSG_READONLY_ERROR 24
#define PIPEMSG_WRITE_ERROR 25
#define PIPEMSG_CREATE_ERROR 26
#define PIPEMSG_DELETE_ERROR 27
#define PIPEMSG_CANCEL 101
#define PIPEMSG_PROCEED 102
#define PIPEMSG_MERGE 103
#define PIPEMSG_REPLACE_BUFFER 104
#define PIPEMSG_RENAME_BUFFER 105
#define PIPEMSG_MULTI_PROCEED 106
#define PIPEMSG_RENAME_FILE 107
#ifdef __cplusplus
}
#endif
#endif /* _LABELD_H */