Imported Upstream version 1.1.11
[platform/upstream/cdrkit.git] / include / librmt.h
1 /*
2  * This file has been modified for the cdrkit suite.
3  *
4  * The behaviour and appearence of the program code below can differ to a major
5  * extent from the version distributed by the original author(s).
6  *
7  * For details, see Changelog file distributed with the cdrkit package. If you
8  * received this file from another source then ask the distributing person for
9  * a log of modifications.
10  *
11  */
12
13 /* @(#)librmt.h 1.16 03/06/15 Copyright 1996 J. Schilling */
14 /*
15  *      Prototypes for rmt client subroutines
16  *
17  *      Copyright (c) 1995,1996,2000-2002 J. Schilling
18  */
19 /*
20  * This program is free software; you can redistribute it and/or modify
21  * it under the terms of the GNU General Public License version 2
22  * as published by the Free Software Foundation.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License along with
30  * this program; see the file COPYING.  If not, write to the Free Software
31  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32  */
33
34 #ifndef _LIBRMT_H
35 #define _LIBRMT_H
36
37 #ifndef _MCONFIG_H
38 #include <mconfig.h>
39 #endif
40 #ifndef _PROTOTYP_H
41 #include <prototyp.h>
42 #endif
43
44 #ifndef _INCL_SYS_TYPES_H
45 #include <sys/types.h>
46 #define _INCL_SYS_TYPES_H
47 #endif
48
49 #include <rmtio.h>
50
51 /*
52  * remote.c
53  */
54 extern  void            rmtinit(int (*errmsgn)(int, const char *, ...),
55                                                                   void (*eexit)(int));
56 extern  int             rmtdebug(int dlevel);
57 extern  char            *rmtfilename(char *name);
58 extern  char            *rmthostname(char *hostname, int hnsize, char *rmtspec);
59 extern  int             rmtgetconn(char *host, int trsize, int excode);
60 extern  int             rmtopen(int fd, char *fname, int fmode);
61 extern  int             rmtclose(int fd);
62 extern  int             rmtread(int fd, char *buf, int count);
63 extern  int             rmtwrite(int fd, char *buf, int count);
64 extern  off_t           rmtseek(int fd, off_t offset, int whence);
65 extern  int             rmtioctl(int fd, int cmd, int count);
66 #ifdef  MTWEOF
67 extern  int             rmtstatus(int fd, struct mtget *mtp);
68 #endif
69 extern  int             rmtxstatus(int fd, struct rmtget *mtp);
70 #ifdef  MTWEOF
71 extern  void            _rmtg2mtg(struct mtget *mtp, struct rmtget *rmtp);
72 extern  int             _mtg2rmtg(struct rmtget *rmtp, struct mtget *mtp);
73 #endif
74
75 #endif  /* _LIBRMT_H */