1 | /*
|
---|
2 | * Endpoint Mapper Functions
|
---|
3 | * DCERPC local endpoint mapper client routines
|
---|
4 | * Copyright (c) 2010 Andreas Schneider.
|
---|
5 | *
|
---|
6 | * This program is free software; you can redistribute it and/or modify
|
---|
7 | * it under the terms of the GNU General Public License as published by
|
---|
8 | * the Free Software Foundation; either version 3 of the License, or
|
---|
9 | * (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This program is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | * GNU General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU General Public License
|
---|
17 | * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
---|
18 | */
|
---|
19 |
|
---|
20 | #ifndef _DCERPC_EP_H_
|
---|
21 | #define _DCERPC_EP_H_
|
---|
22 |
|
---|
23 | struct dcerpc_binding_vector {
|
---|
24 | struct dcerpc_binding *bindings;
|
---|
25 | uint32_t count;
|
---|
26 | };
|
---|
27 |
|
---|
28 | NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx,
|
---|
29 | const struct ndr_interface_table *iface,
|
---|
30 | uint16_t port,
|
---|
31 | const char *ncalrpc,
|
---|
32 | struct dcerpc_binding_vector **pbvec);
|
---|
33 |
|
---|
34 | /**
|
---|
35 | * @brief Adds server address information in the local endpoint map.
|
---|
36 | *
|
---|
37 | * @param[in] mem_ctx The memory context to use for the binding handle.
|
---|
38 | *
|
---|
39 | * @param[in] iface The interface specification to register with the local
|
---|
40 | * endpoint map.
|
---|
41 | *
|
---|
42 | * @param[in] binding The server binding handles over which the server can
|
---|
43 | * receive remote procedure calls.
|
---|
44 | *
|
---|
45 | * @param[in] object_guid The object GUID that the server offers. The server
|
---|
46 | * application constructs this vector.
|
---|
47 | *
|
---|
48 | * @param[in] annotation Defines a character string comment applied to the
|
---|
49 | * element added to the local endpoint map. The string
|
---|
50 | * can be up to 64 characters long, including the null
|
---|
51 | * terminating character. Strings longer than 64
|
---|
52 | * characters are truncated. The application supplies
|
---|
53 | * the value NULL or the string "" to indicate an empty
|
---|
54 | * annotation string.
|
---|
55 | *
|
---|
56 | * When replacing elements, the annotation string
|
---|
57 | * supplied, including an empty annotation string,
|
---|
58 | * replaces any existing annotation string.
|
---|
59 | *
|
---|
60 | * @param[out] ph A pointer to store the binding handle. The memory
|
---|
61 | * context will be the give one. If you free this handle
|
---|
62 | * then the connection will be closed.
|
---|
63 | *
|
---|
64 | * @return An NTSTATUS error code.
|
---|
65 | */
|
---|
66 | NTSTATUS dcerpc_ep_register(TALLOC_CTX *mem_ctx,
|
---|
67 | const struct ndr_interface_table *iface,
|
---|
68 | const struct dcerpc_binding_vector *bind_vec,
|
---|
69 | const struct GUID *object_guid,
|
---|
70 | const char *annotation,
|
---|
71 | struct dcerpc_binding_handle **ph);
|
---|
72 |
|
---|
73 | NTSTATUS dcerpc_ep_register_noreplace(TALLOC_CTX *mem_ctx,
|
---|
74 | const struct ndr_interface_table *iface,
|
---|
75 | const struct dcerpc_binding_vector *bind_vec,
|
---|
76 | const struct GUID *object_guid,
|
---|
77 | const char *annotation,
|
---|
78 | struct dcerpc_binding_handle **ph);
|
---|
79 |
|
---|
80 | NTSTATUS dcerpc_ep_unregister(const struct ndr_interface_table *iface,
|
---|
81 | const struct dcerpc_binding_vector *bind_vec,
|
---|
82 | const struct GUID *object_guid);
|
---|
83 |
|
---|
84 | #endif /* _DCERPC_EP_H_ */
|
---|