~ubuntu-branches/ubuntu/oneiric/nis/oneiric-proposed

« back to all changes in this revision

Viewing changes to ypserv-2.17/lib/ypxfrd.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2005-11-16 23:42:06 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051116234206-p00omaw5ji5q0qhr
Tags: 3.15-3ubuntu1
Resynchronise with Debian.  (me)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2000 Thorsten Kukuk
2
 
   Author: Thorsten Kukuk <kukuk@suse.de>
3
 
 
4
 
   The YP Server is free software; you can redistribute it and/or
5
 
   modify it under the terms of the GNU General Public License
6
 
   version 2 as published by the Free Software Foundation.
7
 
 
8
 
   The YP Server is distributed in the hope that it will be useful,
9
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
 
   General Public License for more details.
12
 
 
13
 
   You should have received a copy of the GNU General Public
14
 
   License along with the YP Server; see the file COPYING. If
15
 
   not, write to the Free Software Foundation, Inc., 675 Mass Ave,
16
 
   Cambridge, MA 02139, USA. */
17
 
 
18
 
#ifndef _LIB_YPXFRD_H_
19
 
#define _LIB_YPXFRD_H_
20
 
 
21
 
#include <rpc/rpc.h>
22
 
 
23
 
#define YPXFRBLOCK 32767
24
 
 
25
 
enum xfrstat {
26
 
  XFR_REQUEST_OK = 1,
27
 
  XFR_DENIED = 2,
28
 
  XFR_NOFILE = 3,
29
 
  XFR_ACCESS = 4,
30
 
  XFR_BADDB = 5,
31
 
  XFR_READ_OK = 6,
32
 
  XFR_READ_ERR = 7,
33
 
  XFR_DONE = 8,
34
 
  XFR_DB_ENDIAN_MISMATCH = 9,
35
 
  XFR_DB_TYPE_MISMATCH = 10
36
 
};
37
 
typedef enum xfrstat xfrstat;
38
 
 
39
 
enum xfr_db_type {
40
 
  XFR_DB_ASCII = 1,
41
 
  XFR_DB_BSD_HASH = 2,
42
 
  XFR_DB_BSD_BTREE = 3,
43
 
  XFR_DB_BSD_RECNO = 4,
44
 
  XFR_DB_BSD_MPOOL = 5,
45
 
  XFR_DB_BSD_NDBM = 6,
46
 
  XFR_DB_GNU_GDBM = 7,
47
 
  XFR_DB_DBM = 8,
48
 
  XFR_DB_NDBM = 9,
49
 
  XFR_DB_OPAQUE = 10,
50
 
  XFR_DB_ANY = 11,
51
 
  XFR_DB_UNKNOWN = 12,
52
 
  XFR_DB_GNU_GDBM64 = 13
53
 
};
54
 
typedef enum xfr_db_type xfr_db_type;
55
 
 
56
 
enum xfr_byte_order {
57
 
  XFR_ENDIAN_BIG = 1,
58
 
  XFR_ENDIAN_LITTLE = 2,
59
 
  XFR_ENDIAN_ANY = 3
60
 
};
61
 
typedef enum xfr_byte_order xfr_byte_order;
62
 
 
63
 
typedef char *xfrdomain;
64
 
typedef char *xfrmap;
65
 
typedef char *xfrmap_filename;
66
 
 
67
 
struct ypxfr_mapname {
68
 
  xfrmap xfrmap;
69
 
  xfrdomain xfrdomain;
70
 
  xfrmap_filename xfrmap_filename;
71
 
  xfr_db_type xfr_db_type;
72
 
  xfr_byte_order xfr_byte_order;
73
 
};
74
 
typedef struct ypxfr_mapname ypxfr_mapname;
75
 
 
76
 
struct xfr {
77
 
  bool_t ok;
78
 
  union {
79
 
    struct {
80
 
      u_int xfrblock_buf_len;
81
 
      char *xfrblock_buf_val;
82
 
    } xfrblock_buf;
83
 
    xfrstat xfrstat;
84
 
  } xfr_u;
85
 
};
86
 
typedef struct xfr xfr;
87
 
 
88
 
#define YPXFRD_FREEBSD_PROG 600100069
89
 
#define YPXFRD_FREEBSD_VERS 1
90
 
 
91
 
#define YPXFRD_GETMAP 1
92
 
extern  struct xfr *ypxfrd_getmap_1 (ypxfr_mapname *, CLIENT *);
93
 
extern  struct xfr *ypxfrd_getmap_1_svc (ypxfr_mapname *, struct svc_req *);
94
 
extern  void ypxfrd_freebsd_prog_1 (struct svc_req *, register SVCXPRT *);
95
 
extern  int ypxfrd_freebsd_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
96
 
 
97
 
extern  bool_t xdr_xfrstat (XDR *, xfrstat*);
98
 
extern  bool_t xdr_xfr_db_type (XDR *, xfr_db_type*);
99
 
extern  bool_t xdr_xfr_byte_order (XDR *, xfr_byte_order*);
100
 
extern  bool_t xdr_xfrdomain (XDR *, xfrdomain*);
101
 
extern  bool_t xdr_xfrmap (XDR *, xfrmap*);
102
 
extern  bool_t xdr_xfrmap_filename (XDR *, xfrmap_filename*);
103
 
extern  bool_t xdr_xfrstat (XDR *, xfrstat*);
104
 
extern  bool_t xdr_xfr_db_type (XDR *, xfr_db_type*);
105
 
extern  bool_t xdr_xfr_byte_order (XDR *, xfr_byte_order*);
106
 
extern  bool_t xdr_ypxfr_mapname (XDR *, ypxfr_mapname*);
107
 
extern  bool_t xdr_xfr (XDR *, xfr*);
108
 
 
109
 
#endif /* !_LIB_YPXFRD_H_ */