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 # include <time.h> 30 31 # include "lpsched.h" 32 33 void s_accept_dest ( char * , MESG * ); 34 void s_alloc_files ( char * , MESG * ); 35 void s_cancel ( char * , MESG * ); 36 void s_cancel_request ( char * , MESG * ); 37 void s_complete_job ( char * , MESG * ); 38 void s_disable_dest ( char * , MESG * ); 39 void s_enable_dest ( char * , MESG * ); 40 void s_end_change_request ( char * , MESG * ); 41 void s_inquire_class ( char * , MESG * ); 42 void s_inquire_printer_status ( char * , MESG * ); 43 void s_inquire_request_rank ( char * , MESG * ); 44 void s_load_class ( char * , MESG * ); 45 void s_load_filter_table ( char * , MESG * ); 46 void s_load_form ( char * , MESG * ); 47 void s_load_printer ( char * , MESG * ); 48 void s_load_printwheel ( char * , MESG * ); 49 void s_load_system ( char * , MESG * ); 50 void s_load_user_file ( char * , MESG * ); 51 void s_mount ( char * , MESG * ); 52 void s_move_dest ( char * , MESG * ); 53 void s_move_request ( char * , MESG * ); 54 void s_print_request ( char * , MESG * ); 55 void s_quiet_alert ( char * , MESG * ); 56 void s_reject_dest ( char * , MESG * ); 57 void s_send_fault ( char * , MESG * ); 58 void s_clear_fault ( char * , MESG * ); 59 void s_shutdown ( char * , MESG * ); 60 void s_start_change_request ( char * , MESG * ); 61 void s_unload_class ( char * , MESG * ); 62 void s_unload_filter_table ( char * , MESG * ); 63 void s_unload_form ( char * , MESG * ); 64 void s_unload_printer ( char * , MESG * ); 65 void s_unload_printwheel ( char * , MESG * ); 66 void s_unload_system ( char * , MESG * ); 67 void s_unload_user_file ( char * , MESG * ); 68 void s_unmount ( char * , MESG * ); 69 void r_new_child ( char * , MESG * ); 70 void r_send_job ( char * , MESG * ); 71 void s_job_completed ( char * , MESG * ); 72 void s_child_done ( char * , MESG * ); 73 void s_get_fault_message ( char * , MESG * ); 74 void s_max_trays ( char * , MESG *); 75 void s_mount_tray ( char *, MESG * ); 76 void s_unmount_tray ( char *, MESG *); 77 void s_paper_changed ( char *, MESG *); 78 void s_paper_allowed ( char *, MESG *); 79 void s_pass_peer_connection ( char * , MESG * ); 80 81 /** 82 ** dispatch_table[] 83 **/ 84 85 /* 86 * The dispatch table is used to decide if we should handle 87 * a message and which function should be used to handle it. 88 * 89 * D_ADMIN is set for messages that should be handled 90 * only if it came from an administrator. These entries should 91 * have a corresponding entry for the R_... message case, that 92 * provides a routine for sending back a MNOPERM message to those 93 * that aren't administrators. This is needed because the response 94 * message varies in size with the message type. 95 */ 96 97 typedef struct DISPATCH { 98 void (*fncp)(); 99 ushort flags; 100 } DISPATCH; 101 102 #define D_ADMIN 0x01 /* Only "lp" or "root" can use msg. */ 103 #define D_BADMSG 0x02 /* We should never get this message */ 104 #define D_SYSTEM 0x04 /* Only siblings may use this message */ 105