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