1 /* @(#)librmt.h	1.24 18/06/09 Copyright 1995,1996,2000-2018 J. Schilling */
2 /*
3  *	Prototypes for rmt client subroutines
4  *
5  *	Copyright (c) 1995,1996,2000-2018 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License").  You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  * A copy of the CDDL is also available via the Internet at
15  * http://www.opensource.org/licenses/cddl1.txt
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file CDDL.Schily.txt from this distribution.
19  */
20 
21 #ifndef	_SCHILY_LIBRMT_H
22 #define	_SCHILY_LIBRMT_H
23 
24 #ifndef _SCHILY_MCONFIG_H
25 #include <schily/mconfig.h>
26 #endif
27 #ifndef	_SCHILY_TYPES_H
28 #include <schily/types.h>
29 #endif
30 
31 #include <schily/rmtio.h>
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * remote.c
39  */
40 extern	void		rmtinit		__PR((int (*errmsgn)
41 						(int, const char *, ...),
42 						void (*eexit)(int)));
43 extern	int		rmtdebug	__PR((int dlevel));
44 extern	const char	*rmtrmt		__PR((const char *rmt_name));
45 extern	const char	*rmtrsh		__PR((const char *rsh_name));
46 extern	char		*rmtfilename	__PR((char *name));
47 extern	char		*rmthostname	__PR((char *hostname, int hnsize,
48 						char *rmtspec));
49 extern	int		rmtgetconn	__PR((char *host, int trsize,
50 						int excode));
51 extern	int		rmtopen		__PR((int fd, char *fname, int fmode));
52 extern	int		rmtclose	__PR((int fd));
53 extern	int		rmtread		__PR((int fd, char *buf, int count));
54 extern	int		rmtwrite	__PR((int fd, char *buf, int count));
55 extern	off_t		rmtseek		__PR((int fd, off_t offset,
56 						int whence));
57 extern	int		rmtioctl	__PR((int fd, int cmd, int count));
58 #ifdef	MTWEOF
59 extern	int		rmtstatus	__PR((int fd, struct mtget *mtp));
60 #endif
61 extern	int		rmtxstatus	__PR((int fd, struct rmtget *mtp));
62 #ifdef	MTWEOF
63 extern	void		_rmtg2mtg	__PR((struct mtget *mtp,
64 						struct rmtget *rmtp));
65 extern	int		_mtg2rmtg	__PR((struct rmtget *rmtp,
66 						struct mtget *mtp));
67 #endif
68 
69 #ifdef	__cplusplus
70 }
71 #endif
72 
73 #endif	/* _SCHILY_LIBRMT_H */
74