1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 1993 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 28 /* All Rights Reserved */ 29 30 31 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4.1.2 */ 32 33 # include <time.h> 34 35 # include "lpsched.h" 36 37 void s_accept_dest ( char * , MESG * ); 38 void s_alloc_files ( char * , MESG * ); 39 void s_cancel ( char * , MESG * ); 40 void s_cancel_request ( char * , MESG * ); 41 void s_complete_job ( char * , MESG * ); 42 void s_disable_dest ( char * , MESG * ); 43 void s_enable_dest ( char * , MESG * ); 44 void s_end_change_request ( char * , MESG * ); 45 void s_inquire_class ( char * , MESG * ); 46 void s_inquire_printer_status ( char * , MESG * ); 47 void s_inquire_remote_printer ( char * , MESG * ); 48 void s_inquire_request ( char * , MESG * ); 49 void s_inquire_request_rank ( char * , MESG * ); 50 void s_load_class ( char * , MESG * ); 51 void s_load_filter_table ( char * , MESG * ); 52 void s_load_form ( char * , MESG * ); 53 void s_load_printer ( char * , MESG * ); 54 void s_load_printwheel ( char * , MESG * ); 55 void s_load_system ( char * , MESG * ); 56 void s_load_user_file ( char * , MESG * ); 57 void s_mount ( char * , MESG * ); 58 void s_move_dest ( char * , MESG * ); 59 void s_move_request ( char * , MESG * ); 60 void s_print_request ( char * , MESG * ); 61 void s_quiet_alert ( char * , MESG * ); 62 void s_reject_dest ( char * , MESG * ); 63 void s_send_fault ( char * , MESG * ); 64 void s_clear_fault ( char * , MESG * ); 65 void s_shutdown ( char * , MESG * ); 66 void s_start_change_request ( char * , MESG * ); 67 void s_unload_class ( char * , MESG * ); 68 void s_unload_filter_table ( char * , MESG * ); 69 void s_unload_form ( char * , MESG * ); 70 void s_unload_printer ( char * , MESG * ); 71 void s_unload_printwheel ( char * , MESG * ); 72 void s_unload_system ( char * , MESG * ); 73 void s_unload_user_file ( char * , MESG * ); 74 void s_unmount ( char * , MESG * ); 75 void r_new_child ( char * , MESG * ); 76 void r_send_job ( char * , MESG * ); 77 void s_job_completed ( char * , MESG * ); 78 void s_child_done ( char * , MESG * ); 79 void s_get_fault_message ( char * , MESG * ); 80 void s_max_trays ( char * , MESG *); 81 void s_mount_tray ( char *, MESG * ); 82 void s_unmount_tray ( char *, MESG *); 83 void s_paper_changed ( char *, MESG *); 84 void s_paper_allowed ( char *, MESG *); 85 86 /** 87 ** dispatch_table[] 88 **/ 89 90 /* 91 * The dispatch table is used to decide if we should handle 92 * a message and which function should be used to handle it. 93 * 94 * D_ADMIN is set for messages that should be handled 95 * only if it came from an administrator. These entries should 96 * have a corresponding entry for the R_... message case, that 97 * provides a routine for sending back a MNOPERM message to those 98 * that aren't administrators. This is needed because the response 99 * message varies in size with the message type. 100 */ 101 102 typedef struct DISPATCH { 103 void (*fncp)(); 104 ushort flags; 105 } DISPATCH; 106 107 #define D_ADMIN 0x01 /* Only "lp" or "root" can use msg. */ 108 #define D_BADMSG 0x02 /* We should never get this message */ 109 #define D_SYSTEM 0x04 /* Only siblings may use this message */ 110