in.lpd.c revision 355b4669e025ff377602b6fc7caaf30dbc218371
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
/* $Id: in.lpd.c 170 2006-05-20 05:58:49Z njacobs $ */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <syslog.h>
#include <libintl.h>
#include <papi.h>
#include "common.h"
/*
* This file contains the front-end of the BSD Print Protocol adaptor. This
* code assumes a BSD Socket interface to the networking side.
*/
void
{
}
static void
{
int i;
}
}
static void
{
/* This should actually implement transfer job from RFC-1179 */
switch (line[0]) {
case 0x01: /* Abort */
break;
case 0x02: /* Receive control file */
break;
case 0x03: { /* Receive data file */
char file[] = "lpdXXXXXX";
int fd;
}
break;
default:
break;
}
}
}
static void
char *printer)
{
papi_printer_t p = NULL;
char accepting = PAPI_FALSE;
"printer-is-accepting", &accepting);
else
papiPrinterFree(p);
} else
}
/*
* This is the entry point for this program. The program takes the
* following options:
* (none)
*/
int
{
int c;
**args,
*printer;
switch (c) {
case 'E':
break;
case 'd':
default:
;
}
exit(1);
}
exit(1);
}
exit(1);
}
encryption, NULL);
exit(1);
}
#ifdef HAVE_IS_SYSTEM_LABELED
if (is_system_labeled()) {
}
#endif
switch (buf[0]) {
case '\1': /* restart printer */
break;
case '\2': /* transfer job(s) */
break;
case '\3': /* show queue (short) */
case '\4': { /* show queue (long) */
int count;
}
break;
case '\5': { /* cancel job(s) */
int count;
}
break;
default:
}
return (0);
}