/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include "dispatch.h"
#include <syslog.h>
static void r_H(),
r_HS();
/* R_BAD_MESSAGE */ 0, D_BADMSG,
/* S_NEW_QUEUE */ 0, D_BADMSG,
/* R_NEW_QUEUE */ 0, D_BADMSG,
/* S_ALLOC_FILES */ s_alloc_files, 0,
/* R_ALLOC_FILES */ 0, D_BADMSG,
/* S_PRINT_REQUEST */ s_print_request, 0,
/* R_PRINT_REQUEST */ 0, D_BADMSG,
/* S_START_CHANGE_REQUEST */ s_start_change_request, 0,
/* R_START_CHANGE_REQUEST */ 0, D_BADMSG,
/* S_END_CHANGE_REQUEST */ s_end_change_request, 0,
/* R_END_CHANGE_REQUEST */ 0, D_BADMSG,
/* S_CANCEL_REQUEST */ s_cancel_request, 0,
/* R_CANCEL_REQUEST */ 0, D_BADMSG,
/* S_INQUIRE_REQUEST */ 0, D_BADMSG,
/* R_INQUIRE_REQUEST */ 0, D_BADMSG,
/* S_INQUIRE_PRINTER_STATUS */ s_inquire_printer_status, 0,
/* R_INQUIRE_PRINTER_STATUS */ 0, D_BADMSG,
/* S_INQUIRE_CLASS */ s_inquire_class, 0,
/* R_INQUIRE_CLASS */ 0, D_BADMSG,
/* S_GETSTATUS */ 0, D_ADMIN,
/* R_GETSTATUS */ 0, D_BADMSG,
/* S_SEND_FAULT */ s_send_fault, 0,
/* R_SEND_FAULT */ 0, D_BADMSG,
/* S_GOODBYE */ 0, D_BADMSG,
/* S_CHILD_DONE */ s_child_done, 0,
/* I_GET_TYPE */ 0, D_BADMSG,
/* I_QUEUE_CHK */ 0, D_BADMSG,
/* R_CONNECT */ 0, D_BADMSG,
/* S_GET_STATUS */ 0, D_BADMSG,
/* R_GET_STATUS */ 0, D_BADMSG,
/* S_INQUIRE_REQUEST_RANK */ s_inquire_request_rank, 0,
/* R_INQUIRE_REQUEST_RANK */ 0, D_BADMSG,
/* S_CANCEL */ s_cancel, 0,
/* R_CANCEL */ 0, D_BADMSG,
/* S_NEW_CHILD */ 0, D_BADMSG,
/* R_NEW_CHILD */ 0, D_BADMSG,
/* S_SEND_JOB */ 0, D_BADMSG,
/* R_SEND_JOB */ 0, D_BADMSG,
/* S_JOB_COMPLETED */ 0, D_BADMSG,
/* R_JOB_COMPLETED */ 0, D_BADMSG,
/* S_INQUIRE_REMOTE_PRINTER */ 0, D_BADMSG,
/* R_INQUIRE_REMOTE_PRINTER */ 0, D_BADMSG,
/* S_LOAD_SYSTEM */ 0, D_BADMSG,
/* R_LOAD_SYSTEM */ 0, D_BADMSG,
/* S_UNLOAD_SYSTEM */ 0, D_BADMSG,
/* R_UNLOAD_SYSTEM */ 0, D_BADMSG,
/* S_CLEAR_FAULT */ s_clear_fault, 0,
/* R_CLEAR_FAULT */ 0, D_BADMSG,
/* S_PAPER_CHANGED */ s_paper_changed, 0,
/* R_PAPER_CHANGED */ 0, D_BADMSG,
/* S_PAPER_ALLOWED */ s_paper_allowed, 0,
/* R_PAPER_ALLOWED */ 0, D_BADMSG,
/* S_PASS_PEER_CONNECTION */ s_pass_peer_connection, 0,
/* R_PASS_PEER_CONNECTION */ 0, D_BADMSG,
};
static char *dispatch_names[] = {
"R_BAD_MESSAGE",
"S_NEW_QUEUE",
"R_NEW_QUEUE",
"S_ALLOC_FILES",
"R_ALLOC_FILES",
"S_PRINT_REQUEST",
"R_PRINT_REQUEST",
"S_START_CHANGE_REQUEST",
"R_START_CHANGE_REQUEST",
"S_END_CHANGE_REQUEST",
"R_END_CHANGE_REQUEST",
"S_CANCEL_REQUEST",
"R_CANCEL_REQUEST",
"S_INQUIRE_REQUEST",
"R_INQUIRE_REQUEST",
"S_LOAD_PRINTER",
"R_LOAD_PRINTER",
"S_UNLOAD_PRINTER",
"R_UNLOAD_PRINTER",
"S_INQUIRE_PRINTER_STATUS",
"R_INQUIRE_PRINTER_STATUS",
"S_LOAD_CLASS",
"R_LOAD_CLASS",
"S_UNLOAD_CLASS",
"R_UNLOAD_CLASS",
"S_INQUIRE_CLASS",
"R_INQUIRE_CLASS",
"S_MOUNT",
"R_MOUNT",
"S_UNMOUNT",
"R_UNMOUNT",
"S_MOVE_REQUEST",
"R_MOVE_REQUEST",
"S_MOVE_DEST",
"R_MOVE_DEST",
"S_ACCEPT_DEST",
"R_ACCEPT_DEST",
"S_REJECT_DEST",
"R_REJECT_DEST",
"S_ENABLE_DEST",
"R_ENABLE_DEST",
"S_DISABLE_DEST",
"R_DISABLE_DEST",
"S_LOAD_FILTER_TABLE",
"R_LOAD_FILTER_TABLE",
"S_UNLOAD_FILTER_TABLE",
"R_UNLOAD_FILTER_TABLE",
"S_LOAD_PRINTWHEEL",
"R_LOAD_PRINTWHEEL",
"S_UNLOAD_PRINTWHEEL",
"R_UNLOAD_PRINTWHEEL",
"S_LOAD_USER_FILE",
"R_LOAD_USER_FILE",
"S_UNLOAD_USER_FILE",
"R_UNLOAD_USER_FILE",
"S_LOAD_FORM",
"R_LOAD_FORM",
"S_UNLOAD_FORM",
"R_UNLOAD_FORM",
"S_GETSTATUS",
"R_GETSTATUS",
"S_QUIET_ALERT",
"R_QUIET_ALERT",
"S_SEND_FAULT",
"R_SEND_FAULT",
"S_SHUTDOWN",
"R_SHUTDOWN",
"S_GOODBYE",
"S_CHILD_DONE",
"I_GET_TYPE",
"I_QUEUE_CHK",
"R_CONNECT",
"S_GET_STATUS",
"R_GET_STATUS",
"S_INQUIRE_REQUEST_RANK",
"R_INQUIRE_REQUEST_RANK",
"S_CANCEL",
"R_CANCEL",
"S_NEW_CHILD",
"R_NEW_CHILD",
"S_SEND_JOB",
"R_SEND_JOB",
"S_JOB_COMPLETED",
"R_JOB_COMPLETED",
"S_INQUIRE_REMOTE_PRINTER",
"R_INQUIRE_REMOTE_PRINTER",
"S_LOAD_SYSTEM",
"R_LOAD_SYSTEM",
"S_UNLOAD_SYSTEM",
"R_UNLOAD_SYSTEM",
"S_CLEAR_FAULT",
"R_CLEAR_FAULT",
"S_MOUNT_TRAY",
"R_MOUNT_TRAY",
"S_UNMOUNT_TRAY",
"R_UNMOUNT_TRAY",
"S_MAX_TRAYS",
"R_MAX_TRAYS",
"S_PAPER_CHANGED",
"R_PAPER_CHANGED",
"S_PAPER_ALLOWED",
"R_PAPER_ALLOWED",
"S_PASS_PEER_CONNECTION",
"R_PASS_PEER_CONNECTION",
};
static char *status_names[] = {
"MOK",
"MOKMORE",
"MOKREMOTE",
"MMORERR",
"MNODEST",
"MERRDEST",
"MDENYDEST",
"MNOMEDIA",
"MDENYMEDIA",
"MNOFILTER",
"MNOINFO",
"MNOMEM",
"MNOMOUNT",
"MNOOPEN",
"MNOPERM",
"MNOSTART",
"MUNKNOWN",
"M2LATE",
"MNOSPACE",
"MBUSY",
"MTRANSMITERR",
"MNOMORE",
"MGONEREMOTE",
"MNOTRAY"
};
/*
* dispatchName() - ROUTINE TO GIVE ASCII DISPATCH NAME
*/
char *
{
type = 0;
return (dispatch_names[type]);
}
char *
{
return ("unknown");
return (status_names[status]);
}
/*
* dispatch() - DISPATCH A ROUTINE TO HANDLE A MESSAGE
*/
void
{
else
else
else
}
/*
* r_H() - SEND MNOPERM RESPONSE MESSAGE
* r_HS() - SEND MNOPERM RESPONSE MESSAGE
*/
static void
{
}
static void
{
}