2 * Endpoint Mapper Functions
3 * DCERPC local endpoint mapper client routines
4 * Copyright (c) 2010-2011 Andreas Schneider.
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.
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.
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/>.
23 struct dcerpc_binding_vector {
24 struct dcerpc_binding *bindings;
30 * @brief Allocate a new binding vector.
32 * @param[in] mem_ctx The memory context to allocate the vector.
34 * @param[out] pbvec A pointer to store the binding vector.
36 * @return An NTSTATUS error code.
38 NTSTATUS dcerpc_binding_vector_new(TALLOC_CTX *mem_ctx,
39 struct dcerpc_binding_vector **pbvec);
42 * @brief Add default named pipes to the binding vector.
44 * @param[in] iface The rpc interface to add.
46 * @param[in] bvec The binding vector to add the interface.
48 * @return An NTSTATUS error code.
50 NTSTATUS dcerpc_binding_vector_add_np_default(const struct ndr_interface_table *iface,
51 struct dcerpc_binding_vector *bvec);
54 * @brief Add a tcpip port to a binding vector.
56 * @param[in] iface The rpc interface to add.
58 * @param[in] bvec The binding vector to add the intface, host and port.
60 * @param[in] host The ip address of the network inteface bound.
62 * @param[in] port The port bound.
64 * @return An NTSTATUS error code.
66 NTSTATUS dcerpc_binding_vector_add_port(const struct ndr_interface_table *iface,
67 struct dcerpc_binding_vector *bvec,
71 NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx,
72 const struct ndr_interface_table *iface,
75 struct dcerpc_binding_vector **pbvec);
78 * @brief Adds server address information in the local endpoint map.
80 * @param[in] mem_ctx The memory context to use for the binding handle.
82 * @param[in] iface The interface specification to register with the local
85 * @param[in] binding The server binding handles over which the server can
86 * receive remote procedure calls.
88 * @param[in] object_guid The object GUID that the server offers. The server
89 * application constructs this vector.
91 * @param[in] annotation Defines a character string comment applied to the
92 * element added to the local endpoint map. The string
93 * can be up to 64 characters long, including the null
94 * terminating character. Strings longer than 64
95 * characters are truncated. The application supplies
96 * the value NULL or the string "" to indicate an empty
99 * When replacing elements, the annotation string
100 * supplied, including an empty annotation string,
101 * replaces any existing annotation string.
103 * @param[out] ph A pointer to store the binding handle. The memory
104 * context will be the give one. If you free this handle
105 * then the connection will be closed.
107 * @return An NTSTATUS error code.
109 NTSTATUS dcerpc_ep_register(TALLOC_CTX *mem_ctx,
110 struct messaging_context *msg_ctx,
111 const struct ndr_interface_table *iface,
112 const struct dcerpc_binding_vector *bind_vec,
113 const struct GUID *object_guid,
114 const char *annotation,
115 struct dcerpc_binding_handle **ph);
117 NTSTATUS dcerpc_ep_register_noreplace(TALLOC_CTX *mem_ctx,
118 struct messaging_context *msg_ctx,
119 const struct ndr_interface_table *iface,
120 const struct dcerpc_binding_vector *bind_vec,
121 const struct GUID *object_guid,
122 const char *annotation,
123 struct dcerpc_binding_handle **ph);
125 NTSTATUS dcerpc_ep_unregister(struct messaging_context *msg_ctx,
126 const struct ndr_interface_table *iface,
127 const struct dcerpc_binding_vector *bind_vec,
128 const struct GUID *object_guid);
130 #endif /* _DCERPC_EP_H_ */