/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NETPR_H
#define _NETPR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define BSD 0
#define NOBANNER 0
#define CONTROL_FIRST 0
#define ERRORMSG 0
#define E_SUCCESS 0
{ \
printf("malloc: size: <%d>, for <%s>\n"); \
}
/*
* Contains the input data for this job.
* Data is independent of protocol
*/
struct job {
char *filename;
char *request_id;
char *printer;
char *dest;
char *title;
int protocol;
char *username;
int timeout;
int banner;
int filesize;
};
struct np_tcp_job {
char * np_port;
char * np_host;
};
struct np_data {
char *np_dfAfilename;
char *jobfile_data;
};
struct np_bsdjob {
char *np_filename;
char *np_request_id;
char *np_printer;
char *np_destination;
char *np_title;
char *np_username;
int np_timeout;
int np_banner;
char *np_host;
int np_print_order;
char *np_cfAfilename;
char *np_cfAfile;
};
extern char * long2str(long, char *);
extern void null_sighandler(int);
extern int open_network(char *, int);
extern int add_bsd_file(char *, np_bsdjob_t *);
extern int start_bsd_job(int, char *);
extern void done_and_close(int);
extern void panic();
extern char * alloc_str(char *);
extern int net_send_cmd(int, char *, ...);
extern int tcp_open(char *, np_tcpjob_t *, int);
extern void tell_lptell(int, char *, ...);
extern int net_open(char *, int);
extern void parse_dest(char *, char **, char **, char *);
extern int check_file(char *);
#ifdef __cplusplus
}
#endif
#endif /* _NETPR_H */