MAPIProxy 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
dcesrv_mapiproxy.c File Reference

mapiproxy main file More...

`#include "mapiproxy/dcesrv_mapiproxy.h"`
`#include "mapiproxy/dcesrv_mapiproxy_proto.h"`
`#include <dlinklist.h>`
`#include "libmapi/libmapi.h"`
`#include "libmapi/libmapi_private.h"`
`#include "gen_ndr/ndr_exchange_s.c"`

## Functions
NTSTATUS | dcerpc_server_mapiproxy_init (void)
static NTSTATUS | mapiproxy_op_bind (struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
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 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 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 mapiproxy_op_init_server().

Referenced by samba_init_module().

static NTSTATUS mapiproxy_op_bind | ( | struct dcesrv_call_state * | dce_call,
|  | const struct dcesrv_interface * | iface,
|  | uint32_t | if_version
| ) |  |
| 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
  if_version | the version of the pipe

Returns
  NT_STATUS_OK on success, otherwise NTSTATUS error

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(), and mapiproxy_server_init().

Referenced by dcerpc_server_mapiproxy_init().

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

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 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

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