2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: dtfns.h /main/3 1995/11/03 10:37:45 rswiston $ */
24 /* @(#)dtfns.h 1.3 94/11/07 SMI */
27 * (c) Copyright 1993, 1994 Hewlett-Packard Company *
28 * (c) Copyright 1993, 1994 International Business Machines Corp. *
29 * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
30 * (c) Copyright 1993, 1994 Novell, Inc. *
41 #define DTFNS_SEPARATOR ':'
43 #define DTFNS_ORG_NAME "org"
44 #define DTFNS_ORG_LEN 3
46 #define DTFNS_SITE_NAME "site"
47 #define DTFNS_SITE_LEN 4
49 #define DTFNS_MYORG_NAME "myorg"
50 #define DTFNS_MYORG_LEN 5
52 #define DTFNS_HOSTORG_NAME "hostorg"
53 #define DTFNS_HOSTORG_LEN 7
55 #define DTFNS_HOST_NAME "host"
56 #define DTFNS_HOST_LEN 4
58 #define DTFNS_THISUSER_NAME "thisuser"
59 #define DTFNS_THISUSER_LEN 8
61 #define DTFNS_USER_NAME "user"
62 #define DTFNS_USER_LEN 4
64 #define DTFNS_SERVICE_NAME "service"
65 #define DTFNS_SERVICE_LEN 7
67 #define DTFNS_LONG_NAME_LEN 8 /* Longest of above names */
69 #define DTFNS_NULL_CONTEXT_TYPE "SUNW_nscontext_null"
70 #define DTFNS_SERVICE_CONTEXT_TYPE "SUNW_nscontext_service"
72 #define FNS_LIBRARY "libfns.so.1"
74 extern int dtfns_init(void);
75 extern int dtfns_available(void);
76 extern int dtfns_service_name(const char *name, const char *type,
77 const char *service, const char *service_type,
78 const char *org, char *buf, const int size);
79 extern int dtfns_isa_helix_name(const char *);
80 extern int dtfns_lookup_str(const char *, char **, char *, int,
82 extern int dtfns_str_from_ref(NS_Reference_t *, int posn,
83 char *addr_buf, int addr_size,
84 char *type_buf, int type_size);
85 extern int dtfns_append_to_ref(NS_Reference_t *, const char *addr,
86 const char *addr_type);
87 extern int dtfns_bind_str(const char *name, const char *ref_type,
88 char *types[], const char *new_str);
90 extern NS_Reference_t * dtfns_lookup_ref(const char *);
91 extern void dtfns_myorg_name(char *, int);
92 extern NS_Context_t * dtfns_get_initial_ctx(void);
94 extern const NS_ReferenceAddress_t * dtfns_addr_from_ref(const NS_Reference_t *,
96 extern int dtfns_str_from_addr(const NS_ReferenceAddress_t *, char *dbuf, int,
98 extern NS_ReferenceAddress_t * dtfns_create_str_addr(const char *data,
101 extern int dtfns_insert_addr(NS_Reference_t *, void **,
102 const NS_ReferenceAddress_t *);
103 extern int dtfns_delete_addr(NS_Reference_t *, void **);
107 #endif /* _DTFNS_H */