csi.h revision cee0fb94c0d4227de0a00efc162fb2739844b641
/*
* 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 _CSI_
#define _CSI_
#ifndef _CL_QM_DEFS_
#include "cl_qm_defs.h"
#endif
#ifndef _ACSLM_
#include "acslm.h"
#endif
#ifndef _CSI_MSG_
#include "csi_msg.h"
#endif
#ifndef _CSI_STRUCTS_
#include "csi_structs.h"
#endif
#ifndef _CSI_V1_STRUCTS_
#include "csi_v1_structs.h"
#endif
#ifndef _CSI_V2_STRUCTS_
#include "csi_v2_structs.h"
#endif
#ifdef ADI
#define CSI_LOG_NAME "OSLAN"
#else
#define CSI_LOG_NAME "ONC RPC"
#endif
#ifndef INETSOCKETS
#define CSI_INPUT_SOCKET "./to_CSI"
#define CSI_ACSLM_SOCKET "./to_ACSLM"
#else
#define CSI_INPUT_SOCKET ANY_PORT
#define CSI_ACSLM_SOCKET ACSLM
#endif
#define CSI_XDR_TRACE_LEVEL 5
#define CSI_DEF_CONNECTQ_AGETIME 172800
#define CSI_MIN_CONNECTQ_AGETIME 600
#define CSI_MAX_CONNECTQ_AGETIME 31536000
#define CSI_SELECT_TIMEOUT 2
#define CSI_DEF_RETRY_TIMEOUT 3
#define CSI_DEF_RETRY_TRIES 5
#define CSI_HOSTNAMESIZE 128
#define CSI_NO_CALLEE (NULL *)char
#define CSI_NO_SSI_IDENTIFIER 0
#define CSI_MAX_MESSAGE_SIZE MAX_MESSAGE_SIZE
#define CSI_TO_ACSLM 0
#define CSI_FROM_ACSLM 1
#define CSI_TO_ACSPD 2
#define CSI_FROM_ACSPD 3
#define CSI_NAME_SIZE 16
#define CSI_DGRAM_SIZE 1495
#define ADI_HANDSHAKE_TIMEOUT 30
#define CSI_PROGRAM1 0x200000fe
#define CSI_PROGRAM 0x000493ff
#define CSI_UDP_VERSION 1
#define CSI_TCP_VERSION 2
#define CSI_ACSLM_PROC 1000
#define CSI_ACSPD_PROC 1001
#define CSI_DEF_TCPSENDBUF 0
#define CSI_DEF_TCPRECVBUF 0
typedef enum {
#define CSI_HOSTNAME "CSI_HOSTNAME"
#define CSI_SSI_ACSLM_CALLBACK_PROCEDURE "SSI_ACSLM_CALLBACK_PROCEDURE"
#define CSI_SSI_ACSPD_CALLBACK_PROCEDURE "SSI_ACSPD_CALLBACK_PROCEDURE"
#define CSI_SSI_CALLBACK_VERSION_NUMBER "SSI_CALLBACK_VERSION_NUMBER"
#define CSI_HAVENT_GOTTEN_ENVIRONMENT_YET (long)-2
#define CSI_NOT_IN_ENVIRONMENT (long)-1
#define CSI_MAXMEMB_LM_QUEUE 0
#define CSI_MAXMEMB_NI_OUT_QUEUE 0
#define CSI_MAXQUEUES 2
#define CSI_CONNECTQ_NAME "connection queue"
#define CSI_NI_OUTQ_NAME "network output queue"
#define CSI_QCB_REMARKS "master control block"
? 0 : sizeof (IPC_HEADER) - sizeof (CSI_HEADER)
? sizeof (CSI_HEADER) - sizeof (IPC_HEADER) : 0
#define CSI_PAK_LMOFFSET CSI_PAK_IPCOFFSET
((char *)CSI_PAK_NETOFFSET)
((char *)CSI_PAK_IPCOFFSET)
typedef enum {
CSI_PAKSTAT_INITIAL = 0,
} CSI_PAKSTAT;
typedef struct csi_q_mgmt {
unsigned short xmit_tries;
} CSI_Q_MGMT;
typedef struct {
int offset;
int size;
int maxsize;
int translated_size;
} CSI_MSGBUF;
(long)(netaddr & 0xff))
#ifdef DEBUG
{ \
char *typ; \
char *actionp = action_str; \
typ = "ACKNOWLEDGE"; \
typ = "INTERMEDIATE"; \
else \
typ = "FINAL, or REQUEST"; \
"%s\ncommand:%s\ntype:%s\nsequence#:%d\nssi identifier:%d"), \
}
#else
#endif
typedef union {
typedef union {
typedef union {
typedef union {
typedef union {
typedef union {
typedef union {
} CSI_REQUEST;
typedef union {
} CSI_RESPONSE;
extern QM_QID csi_ni_out_qid;
extern long csi_lmq_lastcleaned;
extern int csi_rpc_tcpsock;
extern int csi_rpc_udpsock;
extern BOOLEAN csi_udp_rpcsvc;
extern BOOLEAN csi_tcp_rpcsvc;
extern CSI_MSGBUF *csi_netbufp;
extern SVCXPRT *csi_udpxprt;
extern SVCXPRT *csi_tcpxprt;
extern QM_QID csi_lm_qid;
extern IPC_HEADER csi_ipc_header;
extern int csi_retry_tries;
extern char csi_hostname[];
extern int csi_pid;
extern int csi_xexp_size;
extern int csi_xcur_size;
extern unsigned char csi_netaddr[];
extern int csi_trace_flag;
extern int csi_broke_pipe;
extern VERSION csi_active_xdr_version_branch;
#ifdef ADI
extern int csi_co_process_pid;
extern unsigned char csi_client_name[];
#endif
extern CSI_HEADER csi_ssi_rpc_addr;
extern CSI_HEADER csi_ssi_adi_addr;
extern int csi_adi_ref;
extern long csi_ssi_alt_procno_lm;
int cl_chk_input(long tmo);
void csi_process(void);
STATUS csi_rpctinit(void);
STATUS csi_rpcuinit(void);
void csi_shutdown(void);
void csi_sighdlr(int sig);
STATUS csi_svcinit(void);
#endif /* _CSI_ */