Debian packaging updates from Eloy
[Samba.git] / source / nsswitch / hp_nss_dbdefs.h
blobbd24772e339fb77eaeefc0b3a8dd853546d7ee12
1 #ifndef _HP_NSS_DBDEFS_H
2 #define _HP_NSS_DBDEFS_H
4 /*
5 Unix SMB/CIFS implementation.
7 Donated by HP to enable Winbindd to build on HPUX 11.x.
8 Copyright (C) Jeremy Allison 2002.
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Library General Public
12 License as published by the Free Software Foundation; either
13 version 2 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Library General Public License for more details.
20 You should have received a copy of the GNU Library General Public
21 License along with this library; if not, write to the
22 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA.
26 #include <errno.h>
27 #include <netdb.h>
28 #include <limits.h>
30 #ifndef NSS_INCLUDE_UNSAFE
31 #define NSS_INCLUDE_UNSAFE 1 /* Build old, MT-unsafe interfaces, */
32 #endif /* NSS_INCLUDE_UNSAFE */
34 enum nss_netgr_argn {
35 NSS_NETGR_MACHINE,
36 NSS_NETGR_USER,
37 NSS_NETGR_DOMAIN,
38 NSS_NETGR_N
41 enum nss_netgr_status {
42 NSS_NETGR_FOUND,
43 NSS_NETGR_NO,
44 NSS_NETGR_NOMEM
47 typedef unsigned nss_innetgr_argc;
48 typedef char **nss_innetgr_argv;
50 struct nss_innetgr_1arg {
51 nss_innetgr_argc argc;
52 nss_innetgr_argv argv;
55 typedef struct {
56 void *result; /* "result" parameter to getXbyY_r() */
57 char *buffer; /* "buffer" " " */
58 int buflen; /* "buflen" " " */
59 } nss_XbyY_buf_t;
61 extern nss_XbyY_buf_t *_nss_XbyY_buf_alloc(int struct_size, int buffer_size);
62 extern void _nss_XbyY_buf_free(nss_XbyY_buf_t *);
64 union nss_XbyY_key {
65 uid_t uid;
66 gid_t gid;
67 const char *name;
68 int number;
69 struct {
70 long net;
71 int type;
72 } netaddr;
73 struct {
74 const char *addr;
75 int len;
76 int type;
77 } hostaddr;
78 struct {
79 union {
80 const char *name;
81 int port;
82 } serv;
83 const char *proto;
84 } serv;
85 void *ether;
88 typedef struct nss_XbyY_args {
89 nss_XbyY_buf_t buf;
90 int stayopen;
92 * Support for setXXXent(stayopen)
93 * Used only in hosts, protocols,
94 * networks, rpc, and services.
96 int (*str2ent)(const char *instr, int instr_len, void *ent, char *buffer, int buflen);
97 union nss_XbyY_key key;
99 void *returnval;
100 int erange;
101 int h_errno;
102 nss_status_t status;
103 } nss_XbyY_args_t;
105 #endif /* _NSS_DBDEFS_H */