lpc.h revision 330897
1129198Scognet/*-
2129198Scognet * SPDX-License-Identifier: BSD-3-Clause
3139735Simp *
4129198Scognet * Copyright (c) 1983, 1993
5129198Scognet *	The Regents of the University of California.  All rights reserved.
6129198Scognet *
7129198Scognet * Redistribution and use in source and binary forms, with or without
8129198Scognet * modification, are permitted provided that the following conditions
9129198Scognet * are met:
10129198Scognet * 1. Redistributions of source code must retain the above copyright
11129198Scognet *    notice, this list of conditions and the following disclaimer.
12129198Scognet * 2. Redistributions in binary form must reproduce the above copyright
13129198Scognet *    notice, this list of conditions and the following disclaimer in the
14129198Scognet *    documentation and/or other materials provided with the distribution.
15129198Scognet * 4. Neither the name of the University nor the names of its contributors
16129198Scognet *    may be used to endorse or promote products derived from this software
17129198Scognet *    without specific prior written permission.
18129198Scognet *
19129198Scognet * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20129198Scognet * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21129198Scognet * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22129198Scognet * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23129198Scognet * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24129198Scognet * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25129198Scognet * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26129198Scognet * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27129198Scognet * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28129198Scognet * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29129198Scognet * SUCH DAMAGE.
30129198Scognet *
31129198Scognet *	@(#)lpc.h	8.1 (Berkeley) 6/6/93
32129198Scognet *
33129198Scognet * $FreeBSD: stable/11/usr.sbin/lpr/lpc/lpc.h 330897 2018-03-14 03:19:51Z eadler $
34129198Scognet */
35129198Scognet
36129198Scognet/*
37129198Scognet * Line Printer Control (lpc) program.
38129198Scognet */
39129198Scognetstruct	printer;
40129198Scognet
41129198Scognet#define LPC_PRIVCMD	0x0001		/* a privileged command */
42276032Sandrew#define LPC_MSGOPT	0x0002		/* command recognizes -msg option */
43276032Sandrew
44276032Sandrewstruct	cmd {
45276032Sandrew	const char	*c_name;	/* command name */
46186352Ssam	const char	*c_help;	/* help message */
47170827Scognet	const int	 c_opts;	/* flags (eg: privileged command) */
48170827Scognet		/* routine to do all the work for plain cmds, or
49179595Sbenno		 * initialization work for generic-printer cmds: */
50179595Sbenno	void	(*c_handler)(int, char *[]);
51179595Sbenno		/* routine to do the work for generic-printer cmds: */
52183840Sraj	void	(*c_generic)(struct printer *);
53183840Sraj};
54186352Ssam