mapiproxy/dcesrv_mapiproxy.c File Reference

mapiproxy main file More...

#include "mapiproxy/dcesrv_mapiproxy.h"
#include "mapiproxy/dcesrv_mapiproxy_proto.h"
#include <util/debug.h>
#include <gen_ndr/ndr_exchange_s.c>

Functions

NTSTATUS dcerpc_server_mapiproxy_init (void)
static bool mapiproxy_fill_interface (struct dcesrv_interface *iface, const struct ndr_interface_table *tbl)
static NTSTATUS mapiproxy_op_bind (struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface)
static NTSTATUS mapiproxy_op_bind_proxy (struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface)
static NTSTATUS mapiproxy_op_connect (struct dcesrv_call_state *dce_call, const struct ndr_interface_table *table, const char *binding)
static NTSTATUS mapiproxy_op_dispatch (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
static NTSTATUS mapiproxy_op_init_server (struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
static bool mapiproxy_op_interface_by_name (struct dcesrv_interface *iface, const char *name)
static bool mapiproxy_op_interface_by_uuid (struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
static NTSTATUS mapiproxy_op_ndr_pull (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
static NTSTATUS mapiproxy_op_ndr_push (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
static NTSTATUS mapiproxy_op_reply (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
static void mapiproxy_op_unbind (struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
static NTSTATUS mapiproxy_register_one_iface (struct dcesrv_context *dce_ctx, const struct dcesrv_interface *iface)
NTSTATUS samba_init_module (void)

Detailed Description

mapiproxy main file


Function Documentation

NTSTATUS dcerpc_server_mapiproxy_init ( void   ) 

register the mapiproxy endpoint server.

Returns:
NT_STATUS_OK on success, otherwise NTSTATUS error

References ndr_table_init().

Referenced by samba_init_module().

static bool mapiproxy_fill_interface ( struct dcesrv_interface *  iface,
const struct ndr_interface_table *  tbl 
) [static]
static NTSTATUS mapiproxy_op_bind ( struct dcesrv_call_state *  dce_call,
const struct dcesrv_interface *  iface 
) [static]

This function is called when the client binds to one of the interfaces mapiproxy handles.

Parameters:
dce_call pointer to the session context
iface pointer to the dcesrv interface structure with function hooks
Returns:
NT_STATUS_OK on success, otherwise NTSTATUS error

References mapiproxy_op_bind_proxy(), and dcesrv_mapiproxy_private::server_mode.

static NTSTATUS mapiproxy_op_bind_proxy ( struct dcesrv_call_state *  dce_call,
const struct dcesrv_interface *  iface 
) [static]
static NTSTATUS mapiproxy_op_connect ( struct dcesrv_call_state *  dce_call,
const struct ndr_interface_table *  table,
const char *  binding 
) [static]
static NTSTATUS mapiproxy_op_dispatch ( struct dcesrv_call_state *  dce_call,
TALLOC_CTX *  mem_ctx,
void *  r 
) [static]

This function is called after the pull but before the push. Moreover it is called before the request is forward to the remote endpoint.

Parameters:
dce_call pointer to the session context
mem_ctx pointer to the memory context
r generic pointer to the call mapped data
Returns:
NT_STATUS_OK on success, otherwise NTSTATUS error

References mapiproxy_NspiDNToMId().

static NTSTATUS mapiproxy_op_init_server ( struct dcesrv_context *  dce_ctx,
const struct dcesrv_endpoint_server *  ep_server 
) [static]

Initializes the server and register emsmdb,nspi and rfr interfaces

Parameters:
dce_ctx pointer to the dcesrv context
ep_server pointer to the endpoint server list
Returns:
NT_STATUS_OK on success, otherwise NTSTATUS error

References mapiproxy_register_one_iface().

static bool mapiproxy_op_interface_by_name ( struct dcesrv_interface *  iface,
const char *  name 
) [static]
static bool mapiproxy_op_interface_by_uuid ( struct dcesrv_interface *  iface,
const struct GUID *  uuid,
uint32_t  if_version 
) [static]
static NTSTATUS mapiproxy_op_ndr_pull ( struct dcesrv_call_state *  dce_call,
TALLOC_CTX *  mem_ctx,
struct ndr_pull *  pull,
void **  r 
) [static]

This is the function called when mapiproxy receives a request. The request has already been extracted and its information filled into structures

Parameters:
dce_call pointer to the session context
mem_ctx pointer to the memory context
pull pointer on pointer to the ndr_pull structure
r generic pointer on pointer to the pulled ndr content
Returns:
NT_STATUS_OK on success, other NTSTATUS error

References mapiproxy_op_connect().

static NTSTATUS mapiproxy_op_ndr_push ( struct dcesrv_call_state *  dce_call,
TALLOC_CTX *  mem_ctx,
struct ndr_push *  push,
const void *  r 
) [static]

This is the function called when mapiproxy receive a response. The response has already been extracted and its information filled into structures

Parameters:
dce_call pointer to the session context
mem_ctx pointer to the memory context
push pointer to the ndr_push structure
r generic pointer to the data pushed
Returns:
NT_STATUS_OK on success, otherwise a NTSTATUS error

References mapiproxy_NspiGetProps(), mapiproxy_NspiQueryRows(), and mapiproxy_RfrGetNewDSA().

static NTSTATUS mapiproxy_op_reply ( struct dcesrv_call_state *  dce_call,
TALLOC_CTX *  mem_ctx,
void *  r 
) [static]
static void mapiproxy_op_unbind ( struct dcesrv_connection_context *  context,
const struct dcesrv_interface *  iface 
) [static]

Called when the client disconnects from one of the endpoints managed by mapiproxy.

Parameters:
context pointer to the connection context
iface pointer to the dcesrv interface structure with function hooks
static NTSTATUS mapiproxy_register_one_iface ( struct dcesrv_context *  dce_ctx,
const struct dcesrv_interface *  iface 
) [static]

Register an endpoint

Parameters:
dce_ctx pointer to the dcerpc context
iface pointer to the dcesrv interface with function hooks
Returns:
NT_STATUS_OK on success, otherwise NTSTATUS error

Referenced by mapiproxy_op_init_server().

NTSTATUS samba_init_module ( void   ) 

Register mapiproxy dynamic shared object modules

This function registers mapiproxy modules located

Entry point of mapiproxy dynamic shared object.

This function first registers exchange endpoints and ndr tables, then attempts to register the mapiproxy interface.

Returns:
NT_STATUS_OK on success, otherwise NT_STATUS_UNSUCCESSFUL;

Entry point for the pack mapiproxy module

Returns:
NT_STATUS_OK on success, otherwise NTSTATUS error

Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/