typedef struct {
PyObject_HEAD
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
} PyEventContextObject;
PyAPI_DATA(PyTypeObject) PyEventContext;
{
const char *kwnames[] = { "name", NULL };
char *name = NULL;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
PyEventContextObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", (char **)kwnames, &name))
return NULL;
static int fde_count;
-static void fde_handler(struct event_context *ev_ctx, struct fd_event *f,
+static void fde_handler(struct tevent_context *ev_ctx, struct tevent_fd *f,
uint16_t flags, void *private)
{
int *fd = (int *)private;
fde_count++;
}
-static void finished_handler(struct event_context *ev_ctx, struct timed_event *te,
+static void finished_handler(struct tevent_context *ev_ctx, struct tevent_timer *te,
struct timeval tval, void *private)
{
int *finished = (int *)private;
(*finished) = 1;
}
-static void count_handler(struct event_context *ev_ctx, struct signal_event *te,
+static void count_handler(struct tevent_context *ev_ctx, struct signal_event *te,
int signum, int count, void *info, void *private)
{
int *countp = (int *)private;
static bool test_event_context(struct torture_context *test,
const void *test_data)
{
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
int fd[2] = { -1, -1 };
const char *backend = (const char *)test_data;
int alarm_count=0, info_count=0;
- struct fd_event *fde;
+ struct tevent_fd *fde;
struct signal_event *se1, *se2, *se3;
int finished=0;
struct timeval t;
To setup a set of events you first need to create a event_context
structure using the function event_context_init(); This returns a
- 'struct event_context' that you use in all subsequent calls.
+ 'struct tevent_context' that you use in all subsequent calls.
After that you can add/remove events that you are interested in
using event_add_*() and talloc_free()
NOTE: use event_context_init() inside of samba!
*/
-static struct event_context *event_context_init_ops(TALLOC_CTX *mem_ctx,
+static struct tevent_context *event_context_init_ops(TALLOC_CTX *mem_ctx,
const struct event_ops *ops)
{
- struct event_context *ev;
+ struct tevent_context *ev;
int ret;
- ev = talloc_zero(mem_ctx, struct event_context);
+ ev = talloc_zero(mem_ctx, struct tevent_context);
if (!ev) return NULL;
ev->ops = ops;
call, and all subsequent calls pass this event_context as the first
element. Event handlers also receive this as their first argument.
*/
-struct event_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char *name)
+struct tevent_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char *name)
{
struct event_ops_list *e;
call, and all subsequent calls pass this event_context as the first
element. Event handlers also receive this as their first argument.
*/
-struct event_context *event_context_init(TALLOC_CTX *mem_ctx)
+struct tevent_context *event_context_init(TALLOC_CTX *mem_ctx)
{
return event_context_init_byname(mem_ctx, NULL);
}
if flags contains EVENT_FD_AUTOCLOSE then the fd will be closed when
the returned fd_event context is freed
*/
-struct fd_event *event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
+struct tevent_fd *event_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int fd, uint16_t flags, event_fd_handler_t handler,
void *private_data)
{
/*
add a disk aio event
*/
-struct aio_event *event_add_aio(struct event_context *ev,
+struct aio_event *event_add_aio(struct tevent_context *ev,
TALLOC_CTX *mem_ctx,
struct iocb *iocb,
event_aio_handler_t handler,
/*
return the fd event flags
*/
-uint16_t event_get_fd_flags(struct fd_event *fde)
+uint16_t event_get_fd_flags(struct tevent_fd *fde)
{
if (!fde) return 0;
return fde->event_ctx->ops->get_fd_flags(fde);
/*
set the fd event flags
*/
-void event_set_fd_flags(struct fd_event *fde, uint16_t flags)
+void event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
if (!fde) return;
fde->event_ctx->ops->set_fd_flags(fde, flags);
add a timed event
return NULL on failure
*/
-struct timed_event *event_add_timed(struct event_context *ev, TALLOC_CTX *mem_ctx,
+struct tevent_timer *event_add_timed(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
struct timeval next_event,
event_timed_handler_t handler,
void *private_data)
return NULL on failure
*/
-struct signal_event *event_add_signal(struct event_context *ev, TALLOC_CTX *mem_ctx,
+struct signal_event *event_add_signal(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int signum,
int sa_flags,
event_signal_handler_t handler,
/*
do a single event loop using the events defined in ev
*/
-int event_loop_once(struct event_context *ev)
+int event_loop_once(struct tevent_context *ev)
{
return ev->ops->loop_once(ev);
}
/*
return on failure or (with 0) if all fd events are removed
*/
-int event_loop_wait(struct event_context *ev)
+int event_loop_wait(struct tevent_context *ev)
{
return ev->ops->loop_wait(ev);
}
where you would prefer to use the existing event context if possible
(which is most situations)
*/
-struct event_context *event_context_find(TALLOC_CTX *mem_ctx)
+struct tevent_context *event_context_find(TALLOC_CTX *mem_ctx)
{
- struct event_context *ev = talloc_find_parent_bytype(mem_ctx, struct event_context);
+ struct tevent_context *ev = talloc_find_parent_bytype(mem_ctx, struct tevent_context);
if (ev == NULL) {
ev = event_context_init(mem_ctx);
}
#include <stdint.h>
#include <talloc.h>
-struct event_context;
+struct tevent_context;
struct tevent_ops;
-struct fd_event;
+struct tevent_fd;
struct tevent_timer;
struct tevent_aio;
struct tevent_signal;
-#define tevent_context event_context
-#define tevent_fd fd_event
-
/* event handler types */
typedef void (*tevent_fd_handler_t)(struct tevent_context *,
struct tevent_fd *,
#ifdef TEVENT_COMPAT_DEFINES
-/*TODO:#define event_context tevent_context*/
+#define event_context tevent_context
#define event_ops tevent_ops
-/*TODO:#define fd_event tevent_fd*/
+#define fd_event tevent_fd
#define timed_event tevent_timer
#define aio_event tevent_aio
#define signal_event tevent_signal
struct aio_event_context {
/* a pointer back to the generic event_context */
- struct event_context *ev;
+ struct tevent_context *ev;
/* list of filedescriptor events */
- struct fd_event *fd_events;
+ struct tevent_fd *fd_events;
/* number of registered fd event handlers */
int num_fd_events;
};
struct aio_event {
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct iocb iocb;
void *private_data;
event_aio_handler_t handler;
return 0;
}
-static void epoll_add_event(struct aio_event_context *aio_ev, struct fd_event *fde);
+static void epoll_add_event(struct aio_event_context *aio_ev, struct tevent_fd *fde);
/*
reopen the epoll handle when our pid changes
*/
static void epoll_check_reopen(struct aio_event_context *aio_ev)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
if (aio_ev->pid == getpid()) {
return;
/*
add the epoll event to the given fd_event
*/
-static void epoll_add_event(struct aio_event_context *aio_ev, struct fd_event *fde)
+static void epoll_add_event(struct aio_event_context *aio_ev, struct tevent_fd *fde)
{
struct epoll_event event;
if (aio_ev->epoll_fd == -1) return;
/*
delete the epoll event for given fd_event
*/
-static void epoll_del_event(struct aio_event_context *aio_ev, struct fd_event *fde)
+static void epoll_del_event(struct aio_event_context *aio_ev, struct tevent_fd *fde)
{
struct epoll_event event;
/*
change the epoll event to the given fd_event
*/
-static void epoll_mod_event(struct aio_event_context *aio_ev, struct fd_event *fde)
+static void epoll_mod_event(struct aio_event_context *aio_ev, struct tevent_fd *fde)
{
struct epoll_event event;
if (aio_ev->epoll_fd == -1) return;
}
}
-static void epoll_change_event(struct aio_event_context *aio_ev, struct fd_event *fde)
+static void epoll_change_event(struct aio_event_context *aio_ev, struct tevent_fd *fde)
{
bool got_error = (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR);
bool want_read = (fde->flags & EVENT_FD_READ);
}
case IOCB_CMD_EPOLL_WAIT: {
struct epoll_event *ep = (struct epoll_event *)finished->u.c.buf;
- struct fd_event *fde;
+ struct tevent_fd *fde;
uint16_t flags = 0;
int j;
for (j=0; j<event->res; j++, ep++) {
fde = talloc_get_type(ep->data.ptr,
- struct fd_event);
+ struct tevent_fd);
if (fde == NULL) {
return -1;
}
/*
create a aio_event_context structure.
*/
-static int aio_event_context_init(struct event_context *ev)
+static int aio_event_context_init(struct tevent_context *ev)
{
struct aio_event_context *aio_ev;
/*
destroy an fd_event
*/
-static int aio_event_fd_destructor(struct fd_event *fde)
+static int aio_event_fd_destructor(struct tevent_fd *fde)
{
- struct event_context *ev = fde->event_ctx;
+ struct tevent_context *ev = fde->event_ctx;
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
add a fd based event
return NULL on failure (memory allocation error)
*/
-static struct fd_event *aio_event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
+static struct tevent_fd *aio_event_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int fd, uint16_t flags,
event_fd_handler_t handler,
void *private_data)
{
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
- struct fd_event *fde;
+ struct tevent_fd *fde;
epoll_check_reopen(aio_ev);
- fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event);
+ fde = talloc(mem_ctx?mem_ctx:ev, struct tevent_fd);
if (!fde) return NULL;
fde->event_ctx = ev;
/*
return the fd event flags
*/
-static uint16_t aio_event_get_fd_flags(struct fd_event *fde)
+static uint16_t aio_event_get_fd_flags(struct tevent_fd *fde)
{
return fde->flags;
}
/*
set the fd event flags
*/
-static void aio_event_set_fd_flags(struct fd_event *fde, uint16_t flags)
+static void aio_event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
- struct event_context *ev;
+ struct tevent_context *ev;
struct aio_event_context *aio_ev;
if (fde->flags == flags) return;
/*
do a single event loop using the events defined in ev
*/
-static int aio_event_loop_once(struct event_context *ev)
+static int aio_event_loop_once(struct tevent_context *ev)
{
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
/*
return on failure or (with 0) if all fd events are removed
*/
-static int aio_event_loop_wait(struct event_context *ev)
+static int aio_event_loop_wait(struct tevent_context *ev)
{
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
*/
static int aio_destructor(struct aio_event *ae)
{
- struct event_context *ev = ae->event_ctx;
+ struct tevent_context *ev = ae->event_ctx;
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
struct io_event result;
}
/* submit an aio disk IO event */
-static struct aio_event *aio_event_add_aio(struct event_context *ev,
+static struct aio_event *aio_event_add_aio(struct tevent_context *ev,
TALLOC_CTX *mem_ctx,
struct iocb *iocb,
event_aio_handler_t handler,
/*
this allows the user to choose their own debug function
*/
-int ev_set_debug(struct event_context *ev,
+int ev_set_debug(struct tevent_context *ev,
void (*debug)(void *context, enum ev_debug_level level,
const char *fmt, va_list ap),
void *context)
convenience function to setup debug messages on stderr
messages of level EV_DEBUG_WARNING and higher are printed
*/
-int ev_set_debug_stderr(struct event_context *ev)
+int ev_set_debug_stderr(struct tevent_context *ev)
{
return ev_set_debug(ev, ev_debug_stderr, ev);
}
* Applications using the library must decide where to
* redirect debugging messages
*/
-void ev_debug(struct event_context *ev, enum ev_debug_level level, const char *fmt, ...)
+void ev_debug(struct tevent_context *ev, enum ev_debug_level level, const char *fmt, ...)
{
va_list ap;
if (ev->debug_ops.debug == NULL) {
struct epoll_event_context {
/* a pointer back to the generic event_context */
- struct event_context *ev;
+ struct tevent_context *ev;
/* list of filedescriptor events */
- struct fd_event *fd_events;
+ struct tevent_fd *fd_events;
/* number of registered fd event handlers */
int num_fd_events;
return 0;
}
-static void epoll_add_event(struct epoll_event_context *epoll_ev, struct fd_event *fde);
+static void epoll_add_event(struct epoll_event_context *epoll_ev, struct tevent_fd *fde);
/*
reopen the epoll handle when our pid changes
*/
static void epoll_check_reopen(struct epoll_event_context *epoll_ev)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
if (epoll_ev->pid == getpid()) {
return;
/*
add the epoll event to the given fd_event
*/
-static void epoll_add_event(struct epoll_event_context *epoll_ev, struct fd_event *fde)
+static void epoll_add_event(struct epoll_event_context *epoll_ev, struct tevent_fd *fde)
{
struct epoll_event event;
/*
delete the epoll event for given fd_event
*/
-static void epoll_del_event(struct epoll_event_context *epoll_ev, struct fd_event *fde)
+static void epoll_del_event(struct epoll_event_context *epoll_ev, struct tevent_fd *fde)
{
struct epoll_event event;
/*
change the epoll event to the given fd_event
*/
-static void epoll_mod_event(struct epoll_event_context *epoll_ev, struct fd_event *fde)
+static void epoll_mod_event(struct epoll_event_context *epoll_ev, struct tevent_fd *fde)
{
struct epoll_event event;
if (epoll_ev->epoll_fd == -1) return;
}
}
-static void epoll_change_event(struct epoll_event_context *epoll_ev, struct fd_event *fde)
+static void epoll_change_event(struct epoll_event_context *epoll_ev, struct tevent_fd *fde)
{
bool got_error = (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR);
bool want_read = (fde->flags & EVENT_FD_READ);
}
for (i=0;i<ret;i++) {
- struct fd_event *fde = talloc_get_type(events[i].data.ptr,
- struct fd_event);
+ struct tevent_fd *fde = talloc_get_type(events[i].data.ptr,
+ struct tevent_fd);
uint16_t flags = 0;
if (fde == NULL) {
/*
create a epoll_event_context structure.
*/
-static int epoll_event_context_init(struct event_context *ev)
+static int epoll_event_context_init(struct tevent_context *ev)
{
int ret;
struct epoll_event_context *epoll_ev;
/*
destroy an fd_event
*/
-static int epoll_event_fd_destructor(struct fd_event *fde)
+static int epoll_event_fd_destructor(struct tevent_fd *fde)
{
- struct event_context *ev = fde->event_ctx;
+ struct tevent_context *ev = fde->event_ctx;
struct epoll_event_context *epoll_ev = talloc_get_type(ev->additional_data,
struct epoll_event_context);
add a fd based event
return NULL on failure (memory allocation error)
*/
-static struct fd_event *epoll_event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
+static struct tevent_fd *epoll_event_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int fd, uint16_t flags,
event_fd_handler_t handler,
void *private_data)
{
struct epoll_event_context *epoll_ev = talloc_get_type(ev->additional_data,
struct epoll_event_context);
- struct fd_event *fde;
+ struct tevent_fd *fde;
epoll_check_reopen(epoll_ev);
- fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event);
+ fde = talloc(mem_ctx?mem_ctx:ev, struct tevent_fd);
if (!fde) return NULL;
fde->event_ctx = ev;
/*
return the fd event flags
*/
-static uint16_t epoll_event_get_fd_flags(struct fd_event *fde)
+static uint16_t epoll_event_get_fd_flags(struct tevent_fd *fde)
{
return fde->flags;
}
/*
set the fd event flags
*/
-static void epoll_event_set_fd_flags(struct fd_event *fde, uint16_t flags)
+static void epoll_event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
- struct event_context *ev;
+ struct tevent_context *ev;
struct epoll_event_context *epoll_ev;
if (fde->flags == flags) return;
/*
do a single event loop using the events defined in ev
*/
-static int epoll_event_loop_once(struct event_context *ev)
+static int epoll_event_loop_once(struct tevent_context *ev)
{
struct epoll_event_context *epoll_ev = talloc_get_type(ev->additional_data,
struct epoll_event_context);
/*
return on failure or (with 0) if all fd events are removed
*/
-static int epoll_event_loop_wait(struct event_context *ev)
+static int epoll_event_loop_wait(struct tevent_context *ev)
{
struct epoll_event_context *epoll_ev = talloc_get_type(ev->additional_data,
struct epoll_event_context);
const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0),
void *context);
int ev_set_debug_stderr(struct tevent_context *ev);
-void ev_debug(struct event_context *ev, enum ev_debug_level level, const char *fmt, ...);
+void ev_debug(struct tevent_context *ev, enum ev_debug_level level, const char *fmt, ...);
/* aio event is private to the aio backend */
struct tevent_aio;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
-static int oop_event_context_destructor(struct event_context *ev)
+static int oop_event_context_destructor(struct tevent_context *ev)
{
oop_source_sys *oop_sys = ev->additional_data;
/*
create a oop_event_context structure.
*/
-static int oop_event_context_init(struct event_context *ev, void *private_data)
+static int oop_event_context_init(struct tevent_context *ev, void *private_data)
{
oop_source_sys *oop_sys = private_data;
static void *oop_event_fd_handler(oop_source *oop, int fd, oop_event oop_type, void *ptr)
{
- struct fd_event *fde = ptr;
+ struct tevent_fd *fde = ptr;
if (fd != fde->fd) return OOP_ERROR;
/*
destroy an fd_event
*/
-static int oop_event_fd_destructor(struct fd_event *fde)
+static int oop_event_fd_destructor(struct tevent_fd *fde)
{
- struct event_context *ev = fde->event_ctx;
+ struct tevent_context *ev = fde->event_ctx;
oop_source_sys *oop_sys = ev->additional_data;
oop_source *oop = oop_sys_source(oop_sys);
add a fd based event
return NULL on failure (memory allocation error)
*/
-static struct fd_event *oop_event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
+static struct tevent_fd *oop_event_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int fd, uint16_t flags,
event_fd_handler_t handler,
void *private_data)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
oop_source_sys *oop_sys = ev->additional_data;
oop_source *oop = oop_sys_source(oop_sys);
- fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event);
+ fde = talloc(mem_ctx?mem_ctx:ev, struct tevent_fd);
if (!fde) return NULL;
fde->event_ctx = ev;
/*
return the fd event flags
*/
-static uint16_t oop_event_get_fd_flags(struct fd_event *fde)
+static uint16_t oop_event_get_fd_flags(struct tevent_fd *fde)
{
return fde->flags;
}
/*
set the fd event flags
*/
-static void oop_event_set_fd_flags(struct fd_event *fde, uint16_t flags)
+static void oop_event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
oop_source_sys *oop_sys;
oop_source *oop;
fde->flags = flags;
}
-static int oop_event_timed_destructor(struct timed_event *te);
+static int oop_event_timed_destructor(struct tevent_timer *te);
-static int oop_event_timed_deny_destructor(struct timed_event *te)
+static int oop_event_timed_deny_destructor(struct tevent_timer *te)
{
return -1;
}
static void *oop_event_timed_handler(oop_source *oop, struct timeval t, void *ptr)
{
- struct timed_event *te = ptr;
+ struct tevent_timer *te = ptr;
/* deny the handler to free the event */
talloc_set_destructor(te, oop_event_timed_deny_destructor);
/*
destroy a timed event
*/
-static int oop_event_timed_destructor(struct timed_event *te)
+static int oop_event_timed_destructor(struct tevent_timer *te)
{
- struct event_context *ev = te->event_ctx;
+ struct tevent_context *ev = te->event_ctx;
oop_source_sys *oop_sys = ev->additional_data;
oop_source *oop = oop_sys_source(oop_sys);
add a timed event
return NULL on failure (memory allocation error)
*/
-static struct timed_event *oop_event_add_timed(struct event_context *ev, TALLOC_CTX *mem_ctx,
+static struct tevent_timer *oop_event_add_timed(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
struct timeval next_event,
event_timed_handler_t handler,
void *private_data)
{
oop_source_sys *oop_sys = ev->additional_data;
oop_source *oop = oop_sys_source(oop_sys);
- struct timed_event *te;
+ struct tevent_timer *te;
- te = talloc(mem_ctx?mem_ctx:ev, struct timed_event);
+ te = talloc(mem_ctx?mem_ctx:ev, struct tevent_timer);
if (te == NULL) return NULL;
te->event_ctx = ev;
/*
do a single event loop using the events defined in ev
*/
-static int oop_event_loop_once(struct event_context *ev)
+static int oop_event_loop_once(struct tevent_context *ev)
{
void *oop_ret;
oop_source_sys *oop_sys = ev->additional_data;
/*
return on failure or (with 0) if all fd events are removed
*/
-static int oop_event_loop_wait(struct event_context *ev)
+static int oop_event_loop_wait(struct tevent_context *ev)
{
void *oop_ret;
oop_source_sys *oop_sys = ev->additional_data;
struct select_event_context {
/* a pointer back to the generic event_context */
- struct event_context *ev;
+ struct tevent_context *ev;
/* list of filedescriptor events */
- struct fd_event *fd_events;
+ struct tevent_fd *fd_events;
/* list of timed events */
- struct timed_event *timed_events;
+ struct tevent_timer *timed_events;
/* the maximum file descriptor number in fd_events */
int maxfd;
/*
create a select_event_context structure.
*/
-static int select_event_context_init(struct event_context *ev)
+static int select_event_context_init(struct tevent_context *ev)
{
struct select_event_context *select_ev;
*/
static void calc_maxfd(struct select_event_context *select_ev)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
select_ev->maxfd = 0;
for (fde = select_ev->fd_events; fde; fde = fde->next) {
/*
destroy an fd_event
*/
-static int select_event_fd_destructor(struct fd_event *fde)
+static int select_event_fd_destructor(struct tevent_fd *fde)
{
- struct event_context *ev = fde->event_ctx;
+ struct tevent_context *ev = fde->event_ctx;
struct select_event_context *select_ev = talloc_get_type(ev->additional_data,
struct select_event_context);
add a fd based event
return NULL on failure (memory allocation error)
*/
-static struct fd_event *select_event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
+static struct tevent_fd *select_event_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int fd, uint16_t flags,
event_fd_handler_t handler,
void *private_data)
{
struct select_event_context *select_ev = talloc_get_type(ev->additional_data,
struct select_event_context);
- struct fd_event *fde;
+ struct tevent_fd *fde;
- fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event);
+ fde = talloc(mem_ctx?mem_ctx:ev, struct tevent_fd);
if (!fde) return NULL;
fde->event_ctx = ev;
/*
return the fd event flags
*/
-static uint16_t select_event_get_fd_flags(struct fd_event *fde)
+static uint16_t select_event_get_fd_flags(struct tevent_fd *fde)
{
return fde->flags;
}
/*
set the fd event flags
*/
-static void select_event_set_fd_flags(struct fd_event *fde, uint16_t flags)
+static void select_event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
- struct event_context *ev;
+ struct tevent_context *ev;
struct select_event_context *select_ev;
if (fde->flags == flags) return;
static int select_event_loop_select(struct select_event_context *select_ev, struct timeval *tvalp)
{
fd_set r_fds, w_fds;
- struct fd_event *fde;
+ struct tevent_fd *fde;
int selrtn;
uint32_t destruction_count = ++select_ev->destruction_count;
/*
do a single event loop using the events defined in ev
*/
-static int select_event_loop_once(struct event_context *ev)
+static int select_event_loop_once(struct tevent_context *ev)
{
struct select_event_context *select_ev = talloc_get_type(ev->additional_data,
struct select_event_context);
/*
return on failure or (with 0) if all fd events are removed
*/
-static int select_event_loop_wait(struct event_context *ev)
+static int select_event_loop_wait(struct tevent_context *ev)
{
struct select_event_context *select_ev = talloc_get_type(ev->additional_data,
struct select_event_context);
/*
this is part of the pipe hack needed to avoid the signal race condition
*/
-static void signal_pipe_handler(struct event_context *ev, struct fd_event *fde,
+static void signal_pipe_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
char c[16];
add a signal event
return NULL on failure (memory allocation error)
*/
-struct signal_event *common_event_add_signal(struct event_context *ev,
+struct signal_event *common_event_add_signal(struct tevent_context *ev,
TALLOC_CTX *mem_ctx,
int signum,
int sa_flags,
check if a signal is pending
return != 0 if a signal was pending
*/
-int common_event_check_signal(struct event_context *ev)
+int common_event_check_signal(struct tevent_context *ev)
{
int i;
struct std_event_context {
/* a pointer back to the generic event_context */
- struct event_context *ev;
+ struct tevent_context *ev;
/* list of filedescriptor events */
- struct fd_event *fd_events;
+ struct tevent_fd *fd_events;
/* the maximum file descriptor number in fd_events */
int maxfd;
talloc_set_destructor(std_ev, epoll_ctx_destructor);
}
-static void epoll_add_event(struct std_event_context *std_ev, struct fd_event *fde);
+static void epoll_add_event(struct std_event_context *std_ev, struct tevent_fd *fde);
/*
reopen the epoll handle when our pid changes
*/
static void epoll_check_reopen(struct std_event_context *std_ev)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
if (std_ev->pid == getpid()) {
return;
/*
add the epoll event to the given fd_event
*/
-static void epoll_add_event(struct std_event_context *std_ev, struct fd_event *fde)
+static void epoll_add_event(struct std_event_context *std_ev, struct tevent_fd *fde)
{
struct epoll_event event;
if (std_ev->epoll_fd == -1) return;
/*
delete the epoll event for given fd_event
*/
-static void epoll_del_event(struct std_event_context *std_ev, struct fd_event *fde)
+static void epoll_del_event(struct std_event_context *std_ev, struct tevent_fd *fde)
{
struct epoll_event event;
if (std_ev->epoll_fd == -1) return;
/*
change the epoll event to the given fd_event
*/
-static void epoll_mod_event(struct std_event_context *std_ev, struct fd_event *fde)
+static void epoll_mod_event(struct std_event_context *std_ev, struct tevent_fd *fde)
{
struct epoll_event event;
if (std_ev->epoll_fd == -1) return;
}
}
-static void epoll_change_event(struct std_event_context *std_ev, struct fd_event *fde)
+static void epoll_change_event(struct std_event_context *std_ev, struct tevent_fd *fde)
{
bool got_error = (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR);
bool want_read = (fde->flags & EVENT_FD_READ);
}
for (i=0;i<ret;i++) {
- struct fd_event *fde = talloc_get_type(events[i].data.ptr,
- struct fd_event);
+ struct tevent_fd *fde = talloc_get_type(events[i].data.ptr,
+ struct tevent_fd);
uint16_t flags = 0;
if (fde == NULL) {
/*
create a std_event_context structure.
*/
-static int std_event_context_init(struct event_context *ev)
+static int std_event_context_init(struct tevent_context *ev)
{
struct std_event_context *std_ev;
*/
static void calc_maxfd(struct std_event_context *std_ev)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
std_ev->maxfd = 0;
for (fde = std_ev->fd_events; fde; fde = fde->next) {
/*
destroy an fd_event
*/
-static int std_event_fd_destructor(struct fd_event *fde)
+static int std_event_fd_destructor(struct tevent_fd *fde)
{
- struct event_context *ev = fde->event_ctx;
+ struct tevent_context *ev = fde->event_ctx;
struct std_event_context *std_ev = talloc_get_type(ev->additional_data,
struct std_event_context);
add a fd based event
return NULL on failure (memory allocation error)
*/
-static struct fd_event *std_event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
+static struct tevent_fd *std_event_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int fd, uint16_t flags,
event_fd_handler_t handler,
void *private_data)
{
struct std_event_context *std_ev = talloc_get_type(ev->additional_data,
struct std_event_context);
- struct fd_event *fde;
+ struct tevent_fd *fde;
epoll_check_reopen(std_ev);
- fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event);
+ fde = talloc(mem_ctx?mem_ctx:ev, struct tevent_fd);
if (!fde) return NULL;
fde->event_ctx = ev;
/*
return the fd event flags
*/
-static uint16_t std_event_get_fd_flags(struct fd_event *fde)
+static uint16_t std_event_get_fd_flags(struct tevent_fd *fde)
{
return fde->flags;
}
/*
set the fd event flags
*/
-static void std_event_set_fd_flags(struct fd_event *fde, uint16_t flags)
+static void std_event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
- struct event_context *ev;
+ struct tevent_context *ev;
struct std_event_context *std_ev;
if (fde->flags == flags) return;
static int std_event_loop_select(struct std_event_context *std_ev, struct timeval *tvalp)
{
fd_set r_fds, w_fds;
- struct fd_event *fde;
+ struct tevent_fd *fde;
int selrtn;
uint32_t destruction_count = ++std_ev->destruction_count;
/*
do a single event loop using the events defined in ev
*/
-static int std_event_loop_once(struct event_context *ev)
+static int std_event_loop_once(struct tevent_context *ev)
{
struct std_event_context *std_ev = talloc_get_type(ev->additional_data,
struct std_event_context);
/*
return on failure or (with 0) if all fd events are removed
*/
-static int std_event_loop_wait(struct event_context *ev)
+static int std_event_loop_wait(struct tevent_context *ev)
{
struct std_event_context *std_ev = talloc_get_type(ev->additional_data,
struct std_event_context);
/*
destroy a timed event
*/
-static int common_event_timed_destructor(struct timed_event *te)
+static int common_event_timed_destructor(struct tevent_timer *te)
{
- struct event_context *ev = talloc_get_type(te->event_ctx,
- struct event_context);
+ struct tevent_context *ev = talloc_get_type(te->event_ctx,
+ struct tevent_context);
DLIST_REMOVE(ev->timer_events, te);
return 0;
}
-static int common_event_timed_deny_destructor(struct timed_event *te)
+static int common_event_timed_deny_destructor(struct tevent_timer *te)
{
return -1;
}
add a timed event
return NULL on failure (memory allocation error)
*/
-struct timed_event *common_event_add_timed(struct event_context *ev, TALLOC_CTX *mem_ctx,
+struct tevent_timer *common_event_add_timed(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
struct timeval next_event,
event_timed_handler_t handler,
void *private_data)
{
- struct timed_event *te, *last_te, *cur_te;
+ struct tevent_timer *te, *last_te, *cur_te;
- te = talloc(mem_ctx?mem_ctx:ev, struct timed_event);
+ te = talloc(mem_ctx?mem_ctx:ev, struct tevent_timer);
if (te == NULL) return NULL;
te->event_ctx = ev;
return the delay untill the next timed event,
or zero if a timed event was triggered
*/
-struct timeval common_event_loop_timer_delay(struct event_context *ev)
+struct timeval common_event_loop_timer_delay(struct tevent_context *ev)
{
struct timeval current_time = ev_timeval_zero();
- struct timed_event *te = ev->timer_events;
+ struct tevent_timer *te = ev->timer_events;
if (!te) {
/* have a default tick time of 30 seconds. This guarantees
/**
* Initialize a torture context
*/
-struct torture_context *torture_context_init(struct event_context *event_ctx,
+struct torture_context *torture_context_init(struct tevent_context *event_ctx,
struct torture_results *results)
{
struct torture_context *torture = talloc_zero(event_ctx,
int level;
/** Event context */
- struct event_context *ev;
+ struct tevent_context *ev;
/** Loadparm context (will go away in favor of torture_setting_ at some point) */
struct loadparm_context *lp_ctx;
struct torture_tcase *tcase,
const char *name);
-struct torture_context *torture_context_init(struct event_context *event_ctx, struct torture_results *results);
+struct torture_context *torture_context_init(struct tevent_context *event_ctx, struct torture_results *results);
struct torture_results *torture_results_init(TALLOC_CTX *mem_ctx, const struct torture_ui_ops *ui_ops);
bool received_wack;
/* the timeout event */
- struct timed_event *te;
+ struct tevent_timer *te;
/* the name transaction id */
uint16_t name_trn_id;
*/
struct nbt_name_socket {
struct socket_context *sock;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct smb_iconv_convenience *iconv_convenience;
/* a queue of requests pending to be sent */
struct nbt_name_request *send_queue;
/* the fd event */
- struct fd_event *fde;
+ struct tevent_fd *fde;
/* mapping from name_trn_id to pending event */
struct idr_context *idr;
};
struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct smb_iconv_convenience *iconv_convenience);
struct nbt_name_request *nbt_name_query_send(struct nbt_name_socket *nbtsock,
struct nbt_name_query *io);
/*
handle a request timeout
*/
-static void nbt_name_socket_timeout(struct event_context *ev, struct timed_event *te,
+static void nbt_name_socket_timeout(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct nbt_name_request *req = talloc_get_type(private,
/*
handle fd events on a nbt_name_socket
*/
-static void nbt_name_socket_handler(struct event_context *ev, struct fd_event *fde,
+static void nbt_name_socket_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct nbt_name_socket *nbtsock = talloc_get_type(private,
then operations will use that event context
*/
_PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct smb_iconv_convenience *iconv_convenience)
{
struct nbt_name_socket *nbtsock;
static PyObject *py_nbt_node_init(PyTypeObject *self, PyObject *args, PyObject *kwargs)
{
- struct event_context *ev;
+ struct tevent_context *ev;
nbt_node_Object *ret = PyObject_New(nbt_node_Object, &nbt_node_Type);
ret->mem_ctx = talloc_new(NULL);
}
-static bool process_one(struct loadparm_context *lp_ctx, struct event_context *ev,
+static bool process_one(struct loadparm_context *lp_ctx, struct tevent_context *ev,
struct interface *ifaces, const char *name, int nbt_port)
{
TALLOC_CTX *tmp_ctx = talloc_new(NULL);
{
bool ret = true;
struct interface *ifaces;
- struct event_context *ev;
+ struct tevent_context *ev;
poptContext pc;
int opt;
enum {
struct auth_method_context *methods;
/* the event context to use for calls that can block */
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
/* the messaging context which can be used by backends */
struct messaging_context *msg_ctx;
NTSTATUS auth_nt_status_squash(NTSTATUS nt_status);
NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **methods,
- struct event_context *ev,
+ struct tevent_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
struct auth_context **auth_ctx);
NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
struct auth_context **auth_ctx);
NTSTATUS auth_init(void);
NTSTATUS auth_register(const struct auth_operations *ops);
NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
const char *nt4_domain,
#include "librpc/gen_ndr/misc.h"
struct ccache_container;
-struct event_context;
+struct tevent_context;
/* In order of priority */
enum credentials_obtained {
const char *cli_credentials_get_realm(struct cli_credentials *cred);
const char *cli_credentials_get_username(struct cli_credentials *cred);
int cli_credentials_get_krb5_context(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context);
int cli_credentials_get_ccache(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct ccache_container **ccc);
int cli_credentials_get_keytab(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct keytab_container **_ktc);
const char *cli_credentials_get_domain(struct cli_credentials *cred);
struct loadparm_context *lp_ctx);
const char *cli_credentials_get_principal(struct cli_credentials *cred, TALLOC_CTX *mem_ctx);
int cli_credentials_get_server_gss_creds(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct gssapi_creds_container **_gcc);
int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct gssapi_creds_container **_gcc);
void cli_credentials_set_kerberos_state(struct cli_credentials *creds,
NTSTATUS cli_credentials_set_krb5_context(struct cli_credentials *cred,
struct smb_krb5_context *smb_krb5_context);
NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *serviceprincipal);
NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred,
const DATA_BLOB *nt_response,
enum credentials_obtained obtained);
int cli_credentials_set_keytab_name(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *keytab_name,
enum credentials_obtained obtained);
int cli_credentials_update_keytab(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx);
void cli_credentials_set_gensec_features(struct cli_credentials *creds, uint32_t gensec_features);
uint32_t cli_credentials_get_gensec_features(struct cli_credentials *creds);
int cli_credentials_set_ccache(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *name,
enum credentials_obtained obtained);
void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal);
enum credentials_use_kerberos cli_credentials_get_kerberos_state(struct cli_credentials *creds);
NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct ldb_context *ldb,
const char *base,
* @retval NTSTATUS error detailing any failure
*/
_PUBLIC_ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct ldb_context *ldb,
const char *base,
* @retval NTSTATUS error detailing any failure
*/
NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx)
{
NTSTATUS status;
* @retval NTSTATUS error detailing any failure
*/
_PUBLIC_ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *serviceprincipal)
{
#include "param/param.h"
_PUBLIC_ int cli_credentials_get_krb5_context(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context)
{
}
_PUBLIC_ int cli_credentials_set_ccache(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *name,
enum credentials_obtained obtained)
static int cli_credentials_new_ccache(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct ccache_container **_ccc)
{
}
_PUBLIC_ int cli_credentials_get_ccache(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct ccache_container **ccc)
{
}
_PUBLIC_ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct gssapi_creds_container **_gcc)
{
*/
int cli_credentials_set_client_gss_creds(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
gss_cred_id_t gssapi_cred,
enum credentials_obtained obtained)
* it will be generated from the password.
*/
_PUBLIC_ int cli_credentials_get_keytab(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct keytab_container **_ktc)
{
* FILE:/etc/krb5.keytab), open it and attach it */
_PUBLIC_ int cli_credentials_set_keytab_name(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *keytab_name,
enum credentials_obtained obtained)
}
_PUBLIC_ int cli_credentials_update_keytab(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx)
{
krb5_error_code ret;
/* Get server gss credentials (in gsskrb5, this means the keytab) */
_PUBLIC_ int cli_credentials_get_server_gss_creds(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct gssapi_creds_container **_gcc)
{
/* Manually prototyped here to avoid needing gss headers in most callers */
int cli_credentials_set_client_gss_creds(struct cli_credentials *cred,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
gss_cred_id_t gssapi_cred,
enum credentials_obtained obtained);
@note The mem_ctx is only a parent and may be NULL.
*/
static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct gensec_settings *settings,
struct messaging_context *msg,
struct gensec_security **gensec_security)
*/
_PUBLIC_ NTSTATUS gensec_client_start(TALLOC_CTX *mem_ctx,
struct gensec_security **gensec_security,
- struct event_context *ev,
+ struct tevent_context *ev,
struct gensec_settings *settings)
{
NTSTATUS status;
@note The mem_ctx is only a parent and may be NULL.
*/
_PUBLIC_ NTSTATUS gensec_server_start(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct gensec_settings *settings,
struct messaging_context *msg,
struct gensec_security **gensec_security)
return gensec_security->ops->update(gensec_security, out_mem_ctx, in, out);
}
-static void gensec_update_async_timed_handler(struct event_context *ev, struct timed_event *te,
+static void gensec_update_async_timed_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *ptr)
{
struct gensec_update_request *req = talloc_get_type(ptr, struct gensec_update_request);
void *private_data)
{
struct gensec_update_request *req = NULL;
- struct timed_event *te = NULL;
+ struct tevent_timer *te = NULL;
req = talloc(gensec_security, struct gensec_update_request);
if (!req) goto failed;
struct auth_session_info;
struct cli_credentials;
struct gensec_settings;
-struct event_context;
+struct tevent_context;
struct gensec_update_request {
struct gensec_security *gensec_security;
enum gensec_role gensec_role;
bool subcontext;
uint32_t want_features;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct messaging_context *msg_ctx; /* only valid as server */
struct socket_address *my_addr, *peer_addr;
struct gensec_settings *settings;
NTSTATUS gensec_socket_init(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
struct socket_context *current_socket,
- struct event_context *ev,
+ struct tevent_context *ev,
void (*recv_handler)(void *, uint16_t),
void *recv_private,
struct socket_context **new_socket);
struct gensec_security **gensec_security);
NTSTATUS gensec_client_start(TALLOC_CTX *mem_ctx,
struct gensec_security **gensec_security,
- struct event_context *ev,
+ struct tevent_context *ev,
struct gensec_settings *settings);
NTSTATUS gensec_start_mech_by_sasl_list(struct gensec_security *gensec_security,
const char **sasl_names);
uint8_t auth_type, uint8_t auth_level);
const char *gensec_get_name_by_authtype(struct gensec_security *gensec_security, uint8_t authtype);
NTSTATUS gensec_server_start(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct gensec_settings *settings,
struct messaging_context *msg,
struct gensec_security **gensec_security);
/**
connect to the schannel ldb
*/
-struct ldb_context *schannel_db_connect(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx,
+struct ldb_context *schannel_db_connect(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx)
{
char *path;
}
NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct creds_CredentialState *creds)
{
}
NTSTATUS schannel_fetch_session_key(TALLOC_CTX *mem_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
const char *computer_name,
const char *domain,
struct gensec_socket {
struct gensec_security *gensec_security;
struct socket_context *socket;
- struct event_context *ev;
+ struct tevent_context *ev;
struct packet_context *packet;
DATA_BLOB read_buffer; /* SASL packets are turned into liniarlised data here, for reading */
size_t orig_send_len;
}
}
-static void gensec_socket_trigger_read(struct event_context *ev,
- struct timed_event *te,
+static void gensec_socket_trigger_read(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t, void *private)
{
struct gensec_socket *gensec_socket = talloc_get_type(private, struct gensec_socket);
NTSTATUS gensec_socket_init(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
struct socket_context *current_socket,
- struct event_context *ev,
+ struct tevent_context *ev,
void (*recv_handler)(void *, uint16_t),
void *recv_private,
struct socket_context **new_socket)
struct socket_context *sock;
/* the fd event */
- struct fd_event *fde;
+ struct tevent_fd *fde;
NTSTATUS status;
DATA_BLOB request, reply;
/*
handle request timeouts
*/
-static void smb_krb5_request_timeout(struct event_context *event_ctx,
- struct timed_event *te, struct timeval t,
+static void smb_krb5_request_timeout(struct tevent_context *event_ctx,
+ struct tevent_timer *te, struct timeval t,
void *private)
{
struct smb_krb5_socket *smb_krb5 = talloc_get_type(private, struct smb_krb5_socket);
/*
handle fd events on a smb_krb5_socket
*/
-static void smb_krb5_socket_handler(struct event_context *ev, struct fd_event *fde,
+static void smb_krb5_socket_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct smb_krb5_socket *smb_krb5 = talloc_get_type(private, struct smb_krb5_socket);
struct addrinfo *ai, *a;
struct smb_krb5_socket *smb_krb5;
- struct event_context *ev = talloc_get_type(data, struct event_context);
+ struct tevent_context *ev = talloc_get_type(data, struct tevent_context);
DATA_BLOB send_blob = data_blob_const(send_buf->data, send_buf->length);
}
krb5_error_code smb_krb5_init_context(void *parent_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context)
{
krb5_log_facility *logf;
};
-struct event_context;
+struct tevent_context;
struct loadparm_context;
-krb5_error_code smb_krb5_init_context(void *parent_ctx, struct event_context *ev,
+krb5_error_code smb_krb5_init_context(void *parent_ctx, struct tevent_context *ev,
struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context);
void smb_krb5_free_context(struct smb_krb5_context *smb_krb5_context);
} callback;
};
-static void auth_check_password_async_timed_handler(struct event_context *ev, struct timed_event *te,
+static void auth_check_password_async_timed_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *ptr)
{
struct auth_check_password_request *req = talloc_get_type(ptr, struct auth_check_password_request);
nt_status = NT_STATUS_NO_SUCH_USER; /* If all the modules say 'not for me', then this is reasonable */
for (method = auth_ctx->methods; method; method = method->next) {
NTSTATUS result;
- struct timed_event *te = NULL;
+ struct tevent_timer *te = NULL;
/* check if the module wants to chek the password */
result = method->ops->want_check(method, req, user_info);
- Allow the caller to specify the methods to use
***************************************************************************/
_PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **methods,
- struct event_context *ev,
+ struct tevent_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
struct auth_context **auth_ctx)
- Uses default auth_methods, depending on server role and smb.conf settings
***************************************************************************/
_PUBLIC_ NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
struct auth_context **auth_ctx)
when the caller doesn't need a session_info
*/
_PUBLIC_ NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
const char *nt4_domain,
/* Used in the gensec_gssapi and gensec_krb5 server-side code, where the PAC isn't available */
NTSTATUS sam_get_server_info_principal(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *principal,
struct auth_serversupplied_info **server_info)
#include "auth/session_proto.h"
_PUBLIC_ struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx)
{
NTSTATUS nt_status;
}
_PUBLIC_ NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info **_session_info)
{
}
_PUBLIC_ NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct auth_serversupplied_info *server_info,
struct auth_session_info **_session_info)
#include "librpc/gen_ndr/netlogon.h"
-struct event_context;
+struct tevent_context;
/* Create a security token for a session SYSTEM (the most
* trusted/prvilaged account), including the local machine account as
const char *netbios_name,
struct auth_serversupplied_info **_server_info) ;
NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct auth_serversupplied_info *server_info,
struct auth_session_info **_session_info) ;
union netr_Validation *validation,
struct auth_serversupplied_info **_server_info);
NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info **_session_info);
struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx);
}
static struct dd_iohandle * open_file(struct resolve_context *resolve_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
const char * which, const char **ports,
struct smbcli_options *smb_options,
const char *socket_options,
return(handle);
}
-static int copy_files(struct event_context *ev, struct loadparm_context *lp_ctx)
+static int copy_files(struct tevent_context *ev, struct loadparm_context *lp_ctx)
{
uint8_t * iobuf; /* IO buffer. */
uint64_t iomax; /* Size of the IO buffer. */
{
int i;
const char ** dd_args;
- struct event_context *ev;
+ struct tevent_context *ev;
poptContext pctx;
struct poptOption poptions[] = {
struct smbcli_options;
struct smbcli_session_options;
-struct event_context;
+struct tevent_context;
struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
const char * path,
const char **ports,
uint64_t io_size, int options,
}
static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
const char * host,
const char **ports,
const char * share,
}
static struct dd_iohandle * open_cifs_handle(struct resolve_context *resolve_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
const char * host,
const char **ports,
const char * share,
/* ------------------------------------------------------------------------- */
struct dd_iohandle * dd_open_path(struct resolve_context *resolve_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
const char * path,
const char **ports,
uint64_t io_size,
try and browse available shares on a host
****************************************************************************/
static bool browse_host(struct loadparm_context *lp_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
const char *query_host)
{
struct dcerpc_pipe *p;
return a connection to a server
*******************************************************/
static bool do_connect(struct smbclient_context *ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct resolve_context *resolve_ctx,
const char *specified_server, const char **ports,
const char *specified_share,
handle a -L query
****************************************************************************/
static int do_host_query(struct loadparm_context *lp_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
const char *query_host,
const char *workgroup)
{
static int do_message_op(const char *netbios_name, const char *desthost,
const char **destports, const char *destip,
int name_type,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct resolve_context *resolve_ctx,
struct smbcli_options *options,
struct smb_iconv_convenience *iconv_convenience,
int rc = 0;
int name_type = 0x20;
TALLOC_CTX *mem_ctx;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
struct smbclient_context *ctx;
const char *cmdstr = NULL;
struct smbcli_options smb_options;
/*
open a sidmap context - use talloc_free to close
*/
-struct sidmap_context *sidmap_open(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx,
+struct sidmap_context *sidmap_open(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx)
{
struct sidmap_context *sidmap;
static void dreplsrv_periodic_run(struct dreplsrv_service *service);
-static void dreplsrv_periodic_handler_te(struct event_context *ev, struct timed_event *te,
+static void dreplsrv_periodic_handler_te(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *ptr)
{
struct dreplsrv_service *service = talloc_get_type(ptr, struct dreplsrv_service);
WERROR dreplsrv_periodic_schedule(struct dreplsrv_service *service, uint32_t next_interval)
{
TALLOC_CTX *tmp_mem;
- struct timed_event *new_te;
+ struct tevent_timer *new_te;
struct timeval next_time;
/* prevent looping */
struct timeval next_event;
/* here we have a reference to the timed event the schedules the periodic stuff */
- struct timed_event *te;
+ struct tevent_timer *te;
} periodic;
/*
}
NTSTATUS crack_name_to_nt4_name(TALLOC_CTX *mem_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
uint32_t format_offered,
const char *name,
}
NTSTATUS crack_auto_name_to_nt4_name(TALLOC_CTX *mem_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
const char *name,
const char **nt4_domain,
static int samldb_search_template(struct samldb_ctx *ac)
{
- struct event_context *ev;
+ struct tevent_context *ev;
struct loadparm_context *lparm_ctx;
struct ldb_context *templates_ldb;
char *templates_ldb_path;
}
struct cli_credentials *samdb_credentials(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx)
{
struct cli_credentials *cred = cli_credentials_init(mem_ctx);
return an opaque context pointer on success, or NULL on failure
*/
struct ldb_context *samdb_connect(TALLOC_CTX *mem_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info *session_info)
{
struct ldb_context *templates_ldb;
char *templates_ldb_path;
struct ldb_dn *basedn;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct loadparm_context *lp_ctx;
templates_ldb = talloc_get_type(ldb_get_opaque(ldb, "templates_ldb"), struct ldb_context);
Create the SID list for this user.
****************************************************************************/
NTSTATUS security_token_create(TALLOC_CTX *mem_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct dom_sid *user_sid,
struct dom_sid *group_sid,
struct dsdb_extended_replicated_object;
struct dsdb_extended_replicated_objects;
struct loadparm_context;
-struct event_context;
+struct tevent_context;
#include "librpc/gen_ndr/security.h"
#include "lib/ldb/include/ldb.h"
setup the privilege mask for this security token based on our
local SAM
*/
-NTSTATUS samdb_privilege_setup(struct event_context *ev_ctx,
+NTSTATUS samdb_privilege_setup(struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx, struct security_token *token)
{
void *samctx;
* code */
NTSTATUS kdc_hdb_samba4_create(TALLOC_CTX *mem_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
krb5_context context, struct HDB **db, const char *arg)
{
/* Disgusting hack to get a mem_ctx and lp_ctx into the hdb plugin, when
* used as a keytab */
TALLOC_CTX *kdc_mem_ctx;
-struct event_context *kdc_ev_ctx;
+struct tevent_context *kdc_ev_ctx;
struct loadparm_context *kdc_lp_ctx;
/* hold all the info needed to send a reply */
struct kdc_socket {
struct socket_context *sock;
struct kdc_server *kdc;
- struct fd_event *fde;
+ struct tevent_fd *fde;
/* a queue of outgoing replies that have been deferred */
struct kdc_reply *send_queue;
/*
handle fd events on a KDC socket
*/
-static void kdc_socket_handler(struct event_context *ev, struct fd_event *fde,
+static void kdc_socket_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct kdc_socket *kdc_socket = talloc_get_type(private, struct kdc_socket);
struct socket_address;
extern TALLOC_CTX *kdc_mem_ctx;
-extern struct event_context *kdc_ev_ctx;
+extern struct tevent_context *kdc_ev_ctx;
extern struct loadparm_context *kdc_lp_ctx;
bool kpasswdd_process(struct kdc_server *kdc,
struct kpasswd_socket {
struct socket_context *sock;
struct kdc_server *kdc;
- struct fd_event *fde;
+ struct tevent_fd *fde;
/* a queue of outgoing replies that have been deferred */
struct kdc_reply *send_queue;
/*
Idle timeout handler
*/
-static void ldapsrv_conn_idle_timeout(struct event_context *ev,
- struct timed_event *te,
+static void ldapsrv_conn_idle_timeout(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t,
void *private)
{
packet_queue_run(conn->packet);
}
-static void ldapsrv_conn_init_timeout(struct event_context *ev,
- struct timed_event *te,
+static void ldapsrv_conn_init_timeout(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t,
void *private)
{
/*
add a socket address to the list of events, one event per port
*/
-static NTSTATUS add_socket(struct event_context *event_context,
+static NTSTATUS add_socket(struct tevent_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
const char *address, struct ldapsrv_service *ldap_service)
int max_page_size;
int search_timeout;
- struct timed_event *ite;
- struct timed_event *te;
+ struct tevent_timer *ite;
+ struct tevent_timer *te;
} limits;
};
#include "librpc/gen_ndr/misc.h"
struct com_context;
-struct event_context;
+struct tevent_context;
struct com_context
{
struct dcom_client_context *dcom;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct com_extension {
uint32_t id;
void *data;
struct dcom_interface_p *dcom_get_local_iface_p(struct GUID *ipid);
-WERROR com_init_ctx(struct com_context **ctx, struct event_context *event_ctx);
+WERROR com_init_ctx(struct com_context **ctx, struct tevent_context *event_ctx);
WERROR com_create_object(struct com_context *ctx, struct GUID *clsid, int num_ifaces, struct GUID *iid, struct IUnknown **ip, WERROR *results);
WERROR com_get_class_object(struct com_context *ctx, struct GUID *clsid, struct GUID *iid, struct IUnknown **ip);
NTSTATUS com_init(void);
#include "lib/events/events.h"
#include "librpc/gen_ndr/com_dcom.h"
-WERROR com_init_ctx(struct com_context **ctx, struct event_context *event_ctx)
+WERROR com_init_ctx(struct com_context **ctx, struct tevent_context *event_ctx)
{
*ctx = talloc(NULL, struct com_context);
if (event_ctx == NULL) {
#define __LIB_EVENTS_H__
#define TEVENT_COMPAT_DEFINES 1
#include <../lib/tevent/tevent.h>
-struct event_context *s4_event_context_init(TALLOC_CTX *mem_ctx);
-struct event_context *event_context_find(TALLOC_CTX *mem_ctx);
+struct tevent_context *s4_event_context_init(TALLOC_CTX *mem_ctx);
+struct tevent_context *event_context_find(TALLOC_CTX *mem_ctx);
#endif /* __LIB_EVENTS_H__ */
This samba4 specific call sets the samba4 debug handler.
*/
-struct event_context *s4_event_context_init(TALLOC_CTX *mem_ctx)
+struct tevent_context *s4_event_context_init(TALLOC_CTX *mem_ctx)
{
- struct event_context *ev;
+ struct tevent_context *ev;
ev = event_context_init_byname(mem_ctx, NULL);
if (ev) {
The mem_ctx is required
The event_ctx is required
*/
-struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx)
+struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx)
{
struct ldb_context *ldb;
int ret;
int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type)
{
- struct event_context *ev;
+ struct tevent_context *ev;
if (!handle) {
return LDB_ERR_UNAVAILABLE;
ldb->create_perms = perms;
}
-void ldb_set_event_context(struct ldb_context *ldb, struct event_context *ev)
+void ldb_set_event_context(struct ldb_context *ldb, struct tevent_context *ev)
{
ldb->ev_ctx = ev;
}
-struct event_context * ldb_get_event_context(struct ldb_context *ldb)
+struct tevent_context * ldb_get_event_context(struct ldb_context *ldb)
{
return ldb->ev_ctx;
}
LDB_SCOPE_SUBTREE=2};
struct ldb_context;
-struct event_context;
+struct tevent_context;
/* debugging uses one of the following levels */
enum ldb_debug_level {LDB_DEBUG_FATAL, LDB_DEBUG_ERROR,
int ldb_set_timeout_from_prev_req(struct ldb_context *ldb, struct ldb_request *oldreq, struct ldb_request *newreq);
void ldb_set_create_perms(struct ldb_context *ldb, unsigned int perms);
void ldb_set_modules_dir(struct ldb_context *ldb, const char *path);
-struct event_context;
-void ldb_set_event_context(struct ldb_context *ldb, struct event_context *ev);
-struct event_context * ldb_get_event_context(struct ldb_context *ldb);
+struct tevent_context;
+void ldb_set_event_context(struct ldb_context *ldb, struct tevent_context *ev);
+struct tevent_context * ldb_get_event_context(struct ldb_context *ldb);
/**
Initialise ldbs' global information
\return pointer to ldb_context that should be free'd (using talloc_free())
at the end of the program.
*/
-struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx);
+struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx);
/**
Connect to a database.
char *modules_dir;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
};
#ifndef ARRAY_SIZE
struct ildb_private {
struct ldap_connection *ldap;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
};
struct ildb_context {
ctx->req->callback(ctx->req, ares);
}
-static void ildb_auto_done_callback(struct event_context *ev,
- struct timed_event *te,
+static void ildb_auto_done_callback(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t,
void *private_data)
{
return LDB_ERR_OPERATIONS_ERROR;
}
-static void ildb_request_timeout(struct event_context *ev, struct timed_event *te,
+static void ildb_request_timeout(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private_data)
{
struct ildb_context *ac = talloc_get_type(private_data, struct ildb_context);
{
struct ildb_private *ildb;
struct ildb_context *ac;
- struct timed_event *te;
+ struct tevent_timer *te;
int ret;
ildb = talloc_get_type(module->private_data, struct ildb_private);
return lret;
}
-static void lldb_timeout(struct event_context *ev,
- struct timed_event *te,
+static void lldb_timeout(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t,
void *private_data)
{
lldb_request_done(ac->req, NULL, LDB_ERR_TIME_LIMIT_EXCEEDED);
}
-static void lldb_callback(struct event_context *ev,
- struct timed_event *te,
+static void lldb_callback(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t,
void *private_data)
{
struct lldb_context *ac;
- struct timed_event *lte;
+ struct tevent_timer *lte;
struct timeval tv;
LDAPMessage *result;
int lret;
return false;
}
-static void lldb_auto_done_callback(struct event_context *ev,
- struct timed_event *te,
+static void lldb_auto_done_callback(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t,
void *private_data)
{
{
struct lldb_private *lldb;
struct lldb_context *ac;
- struct event_context *ev;
- struct timed_event *te;
+ struct tevent_context *ev;
+ struct tevent_timer *te;
struct timeval tv;
int ret;
req->callback(req, ares);
}
-static void ltdb_timeout(struct event_context *ev,
- struct timed_event *te,
+static void ltdb_timeout(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t,
void *private_data)
{
ltdb_request_extended_done(ctx->req, ext, ret);
}
-static void ltdb_callback(struct event_context *ev,
- struct timed_event *te,
+static void ltdb_callback(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t,
void *private_data)
{
static int ltdb_handle_request(struct ldb_module *module,
struct ldb_request *req)
{
- struct event_context *ev;
+ struct tevent_context *ev;
struct ltdb_context *ac;
- struct timed_event *te;
+ struct tevent_timer *te;
struct timeval tv;
if (check_critical_controls(req->controls)) {
struct ldb_dn *base;
enum ldb_scope scope;
const char * const *attrs;
- struct timed_event *timeout_event;
+ struct tevent_timer *timeout_event;
};
/* special record types */
TODO: We need an error_string parameter
*/
struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *url,
struct auth_session_info *session_info,
struct ldb_dn;
struct cli_credentials;
struct loadparm_context;
-struct event_context;
+struct tevent_context;
char *wrap_casefold(void *context, void *mem_ctx, const char *s, size_t n);
struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *url,
struct auth_session_info *session_info,
struct messaging_context *msg_ctx;
struct irpc_list *irpc;
void *data;
- struct event_context *ev;
+ struct tevent_context *ev;
};
/* don't allow calls to take too long */
const char *dir,
struct server_id server_id,
struct smb_iconv_convenience *iconv_convenience,
- struct event_context *ev);
+ struct tevent_context *ev);
struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx,
const char *dir,
struct smb_iconv_convenience *iconv_convenience,
- struct event_context *ev);
+ struct tevent_context *ev);
NTSTATUS messaging_send_ptr(struct messaging_context *msg, struct server_id server,
uint32_t msg_type, void *ptr);
void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void *private);
struct idr_context *idr;
const char **names;
struct timeval start_time;
- struct timed_event *retry_te;
+ struct tevent_timer *retry_te;
struct {
- struct event_context *ev;
- struct fd_event *fde;
+ struct tevent_context *ev;
+ struct tevent_fd *fde;
} event;
};
/*
retry backed off messages
*/
-static void msg_retry_timer(struct event_context *ev, struct timed_event *te,
+static void msg_retry_timer(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct messaging_context *msg = talloc_get_type(private,
/*
handle a socket event
*/
-static void messaging_handler(struct event_context *ev, struct fd_event *fde,
+static void messaging_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct messaging_context *msg = talloc_get_type(private,
const char *dir,
struct server_id server_id,
struct smb_iconv_convenience *iconv_convenience,
- struct event_context *ev)
+ struct tevent_context *ev)
{
struct messaging_context *msg;
NTSTATUS status;
struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx,
const char *dir,
struct smb_iconv_convenience *iconv_convenience,
- struct event_context *ev)
+ struct tevent_context *ev)
{
struct server_id id;
ZERO_STRUCT(id);
/*
timeout a irpc request
*/
-static void irpc_timeout(struct event_context *ev, struct timed_event *te,
+static void irpc_timeout(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct irpc_request *irpc = talloc_get_type(private, struct irpc_request);
PyObject *py_messaging_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs)
{
- struct event_context *ev;
+ struct tevent_context *ev;
const char *kwnames[] = { "own_id", "messaging_path", NULL };
PyObject *own_id = Py_None;
const char *messaging_path = NULL;
PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs)
{
- struct event_context *ev;
+ struct tevent_context *ev;
const char *kwnames[] = { "server", "own_id", "messaging_path", NULL };
char *server;
const char *messaging_path = NULL;
struct irpc_test_data
{
struct messaging_context *msg_ctx1, *msg_ctx2;
- struct event_context *ev;
+ struct tevent_context *ev;
};
/*
/*
a deferred reply to echodata
*/
-static void deferred_echodata(struct event_context *ev, struct timed_event *te,
+static void deferred_echodata(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct irpc_message *irpc = talloc_get_type(private, struct irpc_message);
*/
static bool test_ping_speed(struct torture_context *tctx)
{
- struct event_context *ev;
+ struct tevent_context *ev;
struct messaging_context *msg_client_ctx;
struct messaging_context *msg_server_ctx;
int ping_count = 0;
_PUBLIC_ WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct hive_key **root)
{
WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct hive_key **k)
{
struct cli_credentials;
struct auth_session_info;
-struct event_context;
+struct tevent_context;
WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct hive_key **root);
WERROR hive_key_get_info(TALLOC_CTX *mem_ctx, const struct hive_key *key,
WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct hive_key **k);
};
struct auth_session_info;
-struct event_context;
+struct tevent_context;
struct loadparm_context;
/**
WERROR reg_open_samba(TALLOC_CTX *mem_ctx,
struct registry_context **ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info *session_info,
struct cli_credentials *credentials);
struct auth_session_info *session_info,
struct cli_credentials *credentials,
struct loadparm_context *lp_ctx,
- const char *location, struct event_context *ev);
+ const char *location, struct tevent_context *ev);
WERROR reg_open_wine(struct registry_context **ctx, const char *path);
struct auth_session_info *session_info,
struct cli_credentials *credentials,
struct loadparm_context *lp_ctx,
- const char *location, struct event_context *ev)
+ const char *location, struct tevent_context *ev)
{
NTSTATUS status;
struct dcerpc_pipe *p;
*/
static WERROR mount_samba_hive(struct registry_context *ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info *auth_info,
struct cli_credentials *creds,
_PUBLIC_ WERROR reg_open_samba(TALLOC_CTX *mem_ctx,
struct registry_context **ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info *session_info,
struct cli_credentials *credentials)
#include "lib/registry/tools/common.h"
struct registry_context *reg_common_open_remote(const char *remote,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct cli_credentials *creds)
{
}
struct registry_key *reg_common_open_file(const char *path,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct cli_credentials *creds)
{
}
struct registry_context *reg_common_open_local(struct cli_credentials *creds,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx)
{
WERROR error;
enum reg_backend { REG_UNKNOWN, REG_LOCAL, REG_REMOTE, REG_NULL };
static struct registry_context *open_backend(poptContext pc,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
enum reg_backend backend,
const char *remote_host)
};
TALLOC_CTX *ctx;
void *callback_data;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
struct reg_diff_callbacks *callbacks;
ctx = talloc_init("regdiff");
struct registry_context *h;
const char *file = NULL;
const char *remote = NULL;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
struct poptOption long_options[] = {
POPT_AUTOHELP
{"remote", 'R', POPT_ARG_STRING, &remote, 0, "connect to specified remote server", NULL},
poptContext pc;
const char *remote = NULL;
struct regshell_context *ctx;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
bool ret = true;
struct poptOption long_options[] = {
POPT_AUTOHELP
poptContext pc;
struct registry_context *h = NULL;
struct registry_key *start_key = NULL;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
WERROR error;
bool fullpath = false, no_values = false;
struct poptOption long_options[] = {
uint32_t flags;
};
-static void socket_connect_handler(struct event_context *ev,
- struct fd_event *fde,
+static void socket_connect_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
uint16_t flags, void *private);
/*
*/
static void socket_send_connect(struct composite_context *result)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
struct connect_state *state = talloc_get_type(result->private_data,
struct connect_state);
struct socket_address *my_address,
struct socket_address *server_address,
uint32_t flags,
- struct event_context *event_ctx)
+ struct tevent_context *event_ctx)
{
struct composite_context *result;
struct connect_state *state;
/*
handle write events on connect completion
*/
-static void socket_connect_handler(struct event_context *ev,
- struct fd_event *fde,
+static void socket_connect_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct composite_context *result =
struct socket_address *my_address,
struct socket_address *server_address,
uint32_t flags,
- struct event_context *ev)
+ struct tevent_context *ev)
{
struct composite_context *ctx;
ctx = socket_connect_send(sock, my_address,
};
static void continue_resolve_name(struct composite_context *creq);
-static void connect_multi_timer(struct event_context *ev,
- struct timed_event *te,
+static void connect_multi_timer(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval tv, void *p);
static void connect_multi_next_socket(struct composite_context *result);
static void continue_one(struct composite_context *creq);
int num_server_ports,
uint16_t *server_ports,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx)
+ struct tevent_context *event_ctx)
{
struct composite_context *result;
struct connect_multi_state *multi;
/*
a timer has gone off telling us that we should try the next port
*/
-static void connect_multi_timer(struct event_context *ev,
- struct timed_event *te,
+static void connect_multi_timer(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval tv, void *p)
{
struct composite_context *result = talloc_get_type(p, struct composite_context);
const char *server_address,
int num_server_ports, uint16_t *server_ports,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct socket_context **result,
uint16_t *result_port)
{
#ifndef _SAMBA_SOCKET_H
#define _SAMBA_SOCKET_H
-struct event_context;
+struct tevent_context;
struct socket_context;
enum socket_type {
struct socket_address *my_address,
struct socket_address *server_address,
uint32_t flags,
- struct event_context *event_ctx);
+ struct tevent_context *event_ctx);
NTSTATUS socket_connect_recv(struct composite_context *ctx);
NTSTATUS socket_connect_ev(struct socket_context *sock,
struct socket_address *my_address,
struct socket_address *server_address,
uint32_t flags,
- struct event_context *ev);
+ struct tevent_context *ev);
struct composite_context *socket_connect_multi_send(TALLOC_CTX *mem_ctx,
const char *server_address,
int num_server_ports,
uint16_t *server_ports,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx);
+ struct tevent_context *event_ctx);
NTSTATUS socket_connect_multi_recv(struct composite_context *ctx,
TALLOC_CTX *mem_ctx,
struct socket_context **result,
NTSTATUS socket_connect_multi(TALLOC_CTX *mem_ctx, const char *server_address,
int num_server_ports, uint16_t *server_ports,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct socket_context **result,
uint16_t *port);
void set_socket_options(int fd, const char *options);
DATA_BLOB blob, blob2;
size_t sent, nread;
TALLOC_CTX *mem_ctx = tctx;
- struct event_context *ev = tctx->ev;
+ struct tevent_context *ev = tctx->ev;
struct interface *ifaces;
status = socket_create("ip", SOCKET_TYPE_STREAM, &sock1, 0);
uint32_t num_read;
uint32_t initial_read;
struct socket_context *sock;
- struct event_context *ev;
+ struct tevent_context *ev;
size_t packet_size;
void *private;
- struct fd_event *fde;
+ struct tevent_fd *fde;
bool serialise;
int processing;
bool recv_disable;
time on a socket. This can matter for code that relies on not
getting more than one packet per event
*/
-_PUBLIC_ void packet_set_event_context(struct packet_context *pc, struct event_context *ev)
+_PUBLIC_ void packet_set_event_context(struct packet_context *pc, struct tevent_context *ev)
{
pc->ev = ev;
}
/*
tell the packet layer the fde for the socket
*/
-_PUBLIC_ void packet_set_fde(struct packet_context *pc, struct fd_event *fde)
+_PUBLIC_ void packet_set_fde(struct packet_context *pc, struct tevent_fd *fde)
{
pc->fde = fde;
}
/*
used to put packets on event boundaries
*/
-static void packet_next_event(struct event_context *ev, struct timed_event *te,
+static void packet_next_event(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct packet_context *pc = talloc_get_type(private, struct packet_context);
*/
struct packet_context;
-struct event_context;
-struct fd_event;
+struct tevent_context;
+struct tevent_fd;
typedef NTSTATUS (*packet_full_request_fn_t)(void *private,
DATA_BLOB blob, size_t *packet_size);
void packet_set_private(struct packet_context *pc, void *private);
void packet_set_full_request(struct packet_context *pc, packet_full_request_fn_t callback);
void packet_set_socket(struct packet_context *pc, struct socket_context *sock);
-void packet_set_event_context(struct packet_context *pc, struct event_context *ev);
-void packet_set_fde(struct packet_context *pc, struct fd_event *fde);
+void packet_set_event_context(struct packet_context *pc, struct tevent_context *ev);
+void packet_set_fde(struct packet_context *pc, struct tevent_fd *fde);
void packet_set_serialise(struct packet_context *pc);
void packet_set_initial_read(struct packet_context *pc, uint32_t initial_read);
void packet_set_nofree(struct packet_context *pc);
/* hold per connection tls data */
struct tls_context {
struct socket_context *socket;
- struct fd_event *fde;
+ struct tevent_fd *fde;
bool tls_enabled;
#if ENABLE_GNUTLS
gnutls_session session;
*/
struct socket_context *tls_init_server(struct tls_params *params,
struct socket_context *socket_ctx,
- struct fd_event *fde,
+ struct tevent_fd *fde,
const char *plain_chars)
{
struct tls_context *tls;
setup for a new client connection
*/
struct socket_context *tls_init_client(struct socket_context *socket_ctx,
- struct fd_event *fde,
+ struct tevent_fd *fde,
const char *ca_path)
{
struct tls_context *tls;
*/
struct socket_context *tls_init_server(struct tls_params *params,
struct socket_context *socket,
- struct fd_event *fde,
+ struct tevent_fd *fde,
const char *plain_chars)
{
return NULL;
setup for a new client connection
*/
struct socket_context *tls_init_client(struct socket_context *socket,
- struct fd_event *fde,
+ struct tevent_fd *fde,
const char *ca_path)
{
return NULL;
*/
struct socket_context *tls_init_server(struct tls_params *parms,
struct socket_context *sock,
- struct fd_event *fde,
+ struct tevent_fd *fde,
const char *plain_chars);
/*
call tls_init_client() on each new client connection
*/
struct socket_context *tls_init_client(struct socket_context *sock,
- struct fd_event *fde,
+ struct tevent_fd *fde,
const char *cafile);
/*
/*
handle request timeouts
*/
-static void cldap_request_timeout(struct event_context *event_ctx,
- struct timed_event *te, struct timeval t,
+static void cldap_request_timeout(struct tevent_context *event_ctx,
+ struct tevent_timer *te, struct timeval t,
void *private)
{
struct cldap_request *req = talloc_get_type(private, struct cldap_request);
/*
handle fd events on a cldap_socket
*/
-static void cldap_socket_handler(struct event_context *ev, struct fd_event *fde,
+static void cldap_socket_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct cldap_socket *cldap = talloc_get_type(private, struct cldap_socket);
then operations will use that event context
*/
struct cldap_socket *cldap_socket_init(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct smb_iconv_convenience *iconv_convenience)
{
struct cldap_socket *cldap;
/* the ldap message_id */
int message_id;
- struct timed_event *te;
+ struct tevent_timer *te;
/* the encoded request */
DATA_BLOB encoded;
*/
struct cldap_socket {
struct socket_context *sock;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct smb_iconv_convenience *iconv_convenience;
/* the fd event */
- struct fd_event *fde;
+ struct tevent_fd *fde;
/* a queue of outgoing requests */
struct cldap_request *send_queue;
};
struct cldap_socket *cldap_socket_init(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct smb_iconv_convenience *iconv_convenience);
NTSTATUS cldap_set_incoming_handler(struct cldap_socket *cldap,
void (*handler)(struct cldap_socket *, struct ldap_message *,
*/
bool smbcli_socket_connect(struct smbcli_state *cli, const char *server,
const char **ports,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct resolve_context *resolve_ctx,
struct smbcli_options *options,
struct smb_iconv_convenience *iconv_convenience,
const char *socket_options,
struct cli_credentials *credentials,
struct resolve_context *resolve_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct smb_iconv_convenience *iconv_convenience,
and initialize it
*/
_PUBLIC_ struct composite_context *composite_create(TALLOC_CTX *mem_ctx,
- struct event_context *ev)
+ struct tevent_context *ev)
{
struct composite_context *c;
and allows the caller to ignore the fact that the composite
function completed early
*/
-static void composite_trigger(struct event_context *ev, struct timed_event *te,
+static void composite_trigger(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *ptr)
{
struct composite_context *c = talloc_get_type(ptr, struct composite_context);
#include "libcli/raw/interfaces.h"
-struct event_context;
+struct tevent_context;
/*
this defines the structures associated with "composite"
NTSTATUS status;
/* the event context we are using */
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
/* information on what to do on completion */
struct {
struct rpc_request;
struct nbt_name_request;
-struct composite_context *composite_create(TALLOC_CTX *mem_ctx, struct event_context *ev);
+struct composite_context *composite_create(TALLOC_CTX *mem_ctx, struct tevent_context *ev);
bool composite_nomem(const void *p, struct composite_context *ctx);
void composite_continue(struct composite_context *ctx,
struct composite_context *new_ctx,
/*
handle fd events on a nbt_dgram_socket
*/
-static void dgm_socket_handler(struct event_context *ev, struct fd_event *fde,
+static void dgm_socket_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct nbt_dgram_socket *dgmsock = talloc_get_type(private,
then operations will use that event context
*/
struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct smb_iconv_convenience *iconv_convenience)
{
struct nbt_dgram_socket *dgmsock;
*/
struct nbt_dgram_socket {
struct socket_context *sock;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct smb_iconv_convenience *iconv_convenience;
/* the fd event */
- struct fd_event *fde;
+ struct tevent_fd *fde;
/* a queue of outgoing requests */
struct nbt_dgram_request *send_queue;
struct socket_address *),
void *private);
struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct smb_iconv_convenience *);
const char *dgram_mailslot_name(struct nbt_dgram_packet *packet);
struct dom_sid *domain_sid,
struct smb_iconv_convenience *iconv_convenience,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct messaging_context *msg_ctx)
{
struct composite_context *c, *creq;
struct dom_sid *domain_sid,
struct smb_iconv_convenience *iconv_convenience,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct messaging_context *msg_ctx,
int *num_dcs, struct nbt_dc_name **dcs)
{
bool *controls_decoded;
};
-struct event_context;
+struct tevent_context;
struct cli_credentials;
struct dom_sid;
struct asn1_data;
*/
_PUBLIC_ struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
- struct event_context *ev)
+ struct tevent_context *ev)
{
struct ldap_connection *conn;
/*
handle ldap socket events
*/
-static void ldap_io_handler(struct event_context *ev, struct fd_event *fde,
+static void ldap_io_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private_data)
{
struct ldap_connection *conn = talloc_get_type(private_data,
/*
called on timeout of a ldap request
*/
-static void ldap_request_timeout(struct event_context *ev, struct timed_event *te,
+static void ldap_request_timeout(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private_data)
{
struct ldap_request *req = talloc_get_type(private_data, struct ldap_request);
/*
called on completion of a one-way ldap request
*/
-static void ldap_request_complete(struct event_context *ev, struct timed_event *te,
+static void ldap_request_complete(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private_data)
{
struct ldap_request *req = talloc_get_type(private_data, struct ldap_request);
void *private_data;
} async;
- struct timed_event *time_event;
+ struct tevent_timer *time_event;
};
char *last_error;
struct {
- struct event_context *event_ctx;
- struct fd_event *fde;
+ struct tevent_context *event_ctx;
+ struct tevent_fd *fde;
} event;
struct packet_context *packet;
struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
- struct event_context *ev);
+ struct tevent_context *ev);
NTSTATUS ldap_connect(struct ldap_connection *conn, const char *url);
struct composite_context *ldap_connect_send(struct ldap_connection *conn,
};
struct cli_credentials;
-struct event_context;
+struct tevent_context;
/* passed to br lock code. */
enum brl_type {
const char **ports,
const char *host_name,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
const char *socket_options)
{
struct composite_context *result, *ctx;
const char *host_addr, const char **ports,
const char *host_name,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
const char *socket_options,
struct smbcli_socket **result)
{
_PUBLIC_ struct smbcli_socket *smbcli_sock_connect_byname(const char *host, const char **ports,
TALLOC_CTX *mem_ctx,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
const char *socket_options)
{
int name_type = NBT_NAME_SERVER;
/*
an event has happened on the socket
*/
-static void smbcli_transport_event_handler(struct event_context *ev,
- struct fd_event *fde,
+static void smbcli_transport_event_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct smbcli_transport *transport = talloc_get_type(private,
return mid;
}
-static void idle_handler(struct event_context *ev,
- struct timed_event *te, struct timeval t, void *private)
+static void idle_handler(struct tevent_context *ev,
+ struct tevent_timer *te, struct timeval t, void *private)
{
struct smbcli_transport *transport = talloc_get_type(private,
struct smbcli_transport);
/*
handle timeouts of individual smb requests
*/
-static void smbcli_timeout_handler(struct event_context *ev, struct timed_event *te,
+static void smbcli_timeout_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct smbcli_request *req = talloc_get_type(private, struct smbcli_request);
const char *socket_options,
struct cli_credentials *credentials,
struct resolve_context *resolve_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct smbcli_options *options,
struct smbcli_session_options *session_options,
struct smb_iconv_convenience *iconv_convenience,
/* the event handle for waiting for socket IO */
struct {
- struct event_context *ctx;
- struct fd_event *fde;
- struct timed_event *te;
+ struct tevent_context *ctx;
+ struct tevent_fd *fde;
+ struct tevent_timer *te;
} event;
};
struct smbcli_socket *smbcli_sock_connect_byname(const char *host, const char **ports,
TALLOC_CTX *mem_ctx,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
const char *socket_options);
void smbcli_sock_dead(struct smbcli_socket *sock);
broadcast name resolution method - async send
*/
struct composite_context *resolve_name_bcast_send(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
void *userdata, uint32_t flags,
uint16_t port,
struct nbt_name *name)
char **names;
pid_t child;
int child_fd;
- struct fd_event *fde;
- struct event_context *event_ctx;
+ struct tevent_fd *fde;
+ struct tevent_context *event_ctx;
};
/*
/*
handle a read event on the pipe
*/
-static void pipe_handler(struct event_context *ev, struct fd_event *fde,
+static void pipe_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private_data)
{
struct composite_context *c = talloc_get_type(private_data, struct composite_context);
getaddrinfo() or dns_lookup() name resolution method - async send
*/
struct composite_context *resolve_name_dns_ex_send(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
void *privdata,
uint32_t flags,
uint16_t port,
getaddrinfo() (with fallback to dns_lookup()) name resolution method - async send
*/
struct composite_context *resolve_name_host_send(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
void *privdata, uint32_t flags,
uint16_t port,
struct nbt_name *name)
nbtlist name resolution method - async send
*/
struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
uint32_t flags,
uint16_t port,
struct nbt_name *name,
uint32_t flags,
uint16_t port,
struct nbt_name *name,
- struct event_context *event_ctx)
+ struct tevent_context *event_ctx)
{
struct composite_context *c;
struct resolve_state *state;
struct composite_context *resolve_name_send(struct resolve_context *ctx,
struct nbt_name *name,
- struct event_context *event_ctx)
+ struct tevent_context *event_ctx)
{
return resolve_name_all_send(ctx, 0, 0, name, event_ctx);
}
struct nbt_name *name,
TALLOC_CTX *mem_ctx,
const char **reply_addr,
- struct event_context *ev)
+ struct tevent_context *ev)
{
struct composite_context *c = resolve_name_send(ctx, name, ev);
return resolve_name_recv(c, mem_ctx, reply_addr);
#define __LIBCLI_RESOLVE_H__
struct socket_address;
-struct event_context;
+struct tevent_context;
#include "../libcli/nbt/libnbt.h"
#define RESOLVE_NAME_FLAG_OVERWRITE_PORT 0x00000008
typedef struct composite_context *(*resolve_name_send_fn)(TALLOC_CTX *mem_ctx,
- struct event_context *,
+ struct tevent_context *,
void *privdata,
uint32_t flags,
uint16_t port,
static bool test_async_resolve(struct torture_context *tctx)
{
struct nbt_name n;
- struct event_context *ev;
+ struct tevent_context *ev;
int timelimit = torture_setting_int(tctx, "timelimit", 2);
const char *host = torture_setting_string(tctx, "host", NULL);
int count = 0;
*/
struct composite_context *resolve_name_wins_send(
TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
void *userdata,
uint32_t flags,
uint16_t port,
const char *share,
struct resolve_context *resolve_ctx,
struct cli_credentials *credentials,
- struct event_context *ev,
+ struct tevent_context *ev,
struct smbcli_options *options,
const char *socket_options,
struct gensec_settings *gensec_settings)
struct resolve_context *resolve_ctx,
struct cli_credentials *credentials,
struct smb2_tree **tree,
- struct event_context *ev,
+ struct tevent_context *ev,
struct smbcli_options *options,
const char *socket_options,
struct gensec_settings *gensec_settings)
};
struct cli_credentials;
-struct event_context;
+struct tevent_context;
struct resolve_context;
struct gensec_settings;
#include "libcli/smb2/smb2_proto.h"
/*
an event has happened on the socket
*/
-static void smb2_transport_event_handler(struct event_context *ev,
- struct fd_event *fde,
+static void smb2_transport_event_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct smb2_transport *transport = talloc_get_type(private,
/*
handle timeouts of individual smb requests
*/
-static void smb2_timeout_handler(struct event_context *ev, struct timed_event *te,
+static void smb2_timeout_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct smb2_request *req = talloc_get_type(private, struct smb2_request);
talloc_set_destructor(req, smb2_request_destructor);
}
-static void idle_handler(struct event_context *ev,
- struct timed_event *te, struct timeval t, void *private)
+static void idle_handler(struct tevent_context *ev,
+ struct tevent_timer *te, struct timeval t, void *private)
{
struct smb2_transport *transport = talloc_get_type(private,
struct smb2_transport);
struct composite_context *smb_composite_connect_send(struct smb_composite_connect *io,
TALLOC_CTX *mem_ctx,
struct resolve_context *resolve_ctx,
- struct event_context *event_ctx)
+ struct tevent_context *event_ctx)
{
struct composite_context *c;
struct connect_state *state;
*/
NTSTATUS smb_composite_connect(struct smb_composite_connect *io, TALLOC_CTX *mem_ctx,
struct resolve_context *resolve_ctx,
- struct event_context *ev)
+ struct tevent_context *ev)
{
struct composite_context *c = smb_composite_connect_send(io, mem_ctx, resolve_ctx, ev);
return smb_composite_connect_recv(c, mem_ctx);
}
struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetchfile *io,
- struct event_context *event_ctx)
+ struct tevent_context *event_ctx)
{
struct composite_context *c;
struct fetchfile_state *state;
*/
struct wbc_context *wbc_init(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- struct event_context *event_ctx)
+ struct tevent_context *event_ctx)
{
struct wbc_context *ctx;
NTSTATUS status;
struct wbc_context {
struct messaging_context *msg_ctx;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct server_id *ids;
};
struct wbc_context *wbc_init(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
- struct event_context *event_ctx);
+ struct tevent_context *event_ctx);
struct composite_context *wbc_sids_to_xids_send(struct wbc_context *wbc_ctx,
TALLOC_CTX *mem_ctx,
}
}
-static void wrepl_request_timeout_handler(struct event_context *ev, struct timed_event *te,
+static void wrepl_request_timeout_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *ptr)
{
struct wrepl_request *req = talloc_get_type(ptr, struct wrepl_request);
/*
handler for winrepl events
*/
-static void wrepl_handler(struct event_context *ev, struct fd_event *fde,
+static void wrepl_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct wrepl_socket *wrepl_socket = talloc_get_type(private,
operations will use that event context
*/
struct wrepl_socket *wrepl_socket_init(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct smb_iconv_convenience *iconv_convenience)
{
struct wrepl_socket *wrepl_socket;
initialise a wrepl_socket from an already existing connection
*/
struct wrepl_socket *wrepl_socket_merge(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct socket_context *sock,
struct packet_context *pack)
{
/*
callback from wrepl_request_trigger()
*/
-static void wrepl_request_trigger_handler(struct event_context *ev, struct timed_event *te,
+static void wrepl_request_trigger_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *ptr)
{
struct wrepl_request *req = talloc_get_type(ptr, struct wrepl_request);
*/
static struct wrepl_request *wrepl_request_finished(struct wrepl_request *req, NTSTATUS status)
{
- struct timed_event *te;
+ struct tevent_timer *te;
if (req->state == WREPL_REQUEST_RECV) {
DLIST_REMOVE(req->wrepl_socket->recv_queue, req);
struct packet_context *packet;
struct {
- struct event_context *ctx;
- struct fd_event *fde;
+ struct tevent_context *ctx;
+ struct tevent_fd *fde;
} event;
/* a queue of replies waiting to be received */
bool trigger;
NTSTATUS status;
- struct timed_event *te;
+ struct tevent_timer *te;
struct wrepl_packet *packet;
#include "param/param.h"
#include "libcli/resolve/resolve.h"
-struct libnet_context *libnet_context_init(struct event_context *ev,
+struct libnet_context *libnet_context_init(struct tevent_context *ev,
struct loadparm_context *lp_ctx)
{
struct libnet_context *ctx;
/* name resolution methods */
struct resolve_context *resolve_ctx;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct loadparm_context *lp_ctx;
};
#include "lib/events/events.h"
static NTSTATUS samdump_keytab_handle_user(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx,
+ struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *keytab_name,
struct netr_DELTA_ENUM *delta)
struct libnet_samdump_keytab_data {
const char *keytab_name;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
struct loadparm_context *lp_ctx;
};
const char *targetdir;
struct loadparm_context *lp_ctx;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
};
static NTSTATUS vampire_prepare_db(void *private_data,
/* FIXME: This prototype should be in param/pyparam.h */
struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx);
-static struct libnet_context *py_net_ctx(PyObject *obj, struct event_context *ev)
+static struct libnet_context *py_net_ctx(PyObject *obj, struct tevent_context *ev)
{
/* FIXME: Use obj */
return libnet_context_init(ev, py_default_loadparm_context(NULL));
NTSTATUS status;
PyObject *result;
TALLOC_CTX *mem_ctx;
- struct event_context *ev;
+ struct tevent_context *ev;
struct libnet_context *libnet_ctx;
const char *kwnames[] = { "domain_name", "netbios_name", "join_type", "level", NULL };
the event context is optional
*/
static struct dcerpc_connection *dcerpc_connection_init(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct smb_iconv_convenience *ic)
{
struct dcerpc_connection *c;
}
/* initialise a dcerpc pipe. */
-_PUBLIC_ struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct event_context *ev,
+_PUBLIC_ struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct smb_iconv_convenience *ic)
{
struct dcerpc_pipe *p;
/*
handle timeouts of individual dcerpc requests
*/
-static void dcerpc_timeout_handler(struct event_context *ev, struct timed_event *te,
+static void dcerpc_timeout_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct rpc_request *req = talloc_get_type(private, struct rpc_request);
return the event context for a dcerpc pipe
used by callers who wish to operate asynchronously
*/
-_PUBLIC_ struct event_context *dcerpc_event_context(struct dcerpc_pipe *p)
+_PUBLIC_ struct tevent_context *dcerpc_event_context(struct dcerpc_pipe *p)
{
return p->conn->event_ctx;
}
NTSTATUS status;
while (req->state != RPC_REQUEST_DONE) {
- struct event_context *ctx = dcerpc_event_context(req->p);
+ struct tevent_context *ctx = dcerpc_event_context(req->p);
if (event_loop_once(ctx) != 0) {
return NT_STATUS_CONNECTION_DISCONNECTED;
}
uint32_t flags;
struct dcerpc_security security_state;
const char *binding_string;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct smb_iconv_convenience *iconv_convenience;
/** Directory in which to save ndrdump-parseable files */
const char *binding,
const struct ndr_interface_table *table,
struct cli_credentials *credentials,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx);
NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req);
struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
void *r);
const char *dcerpc_server_name(struct dcerpc_pipe *p);
-struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct event_context *ev,
+struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct smb_iconv_convenience *ic);
NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe *p,
struct smbcli_tree *tree,
struct dcerpc_binding *binding,
const struct ndr_interface_table *table,
struct cli_credentials *credentials,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx);
NTSTATUS dcerpc_pipe_connect_b_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
struct dcerpc_binding *binding,
const struct ndr_interface_table *table,
struct cli_credentials *credentials,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx);
const char *dcerpc_errstr(TALLOC_CTX *mem_ctx, uint32_t fault_code);
struct cli_credentials *credentials,
struct loadparm_context *lp_ctx,
uint8_t auth_level);
-struct event_context *dcerpc_event_context(struct dcerpc_pipe *p);
+struct tevent_context *dcerpc_event_context(struct dcerpc_pipe *p);
NTSTATUS dcerpc_init(struct loadparm_context *lp_ctx);
struct smbcli_tree *dcerpc_smb_tree(struct dcerpc_connection *c);
uint16_t dcerpc_smb_fnum(struct dcerpc_connection *c);
const char *binding,
const struct ndr_interface_table *table,
struct cli_credentials *credentials,
- struct event_context *ev, struct loadparm_context *lp_ctx);
+ struct tevent_context *ev, struct loadparm_context *lp_ctx);
NTSTATUS dcerpc_pipe_connect_recv(struct composite_context *c,
TALLOC_CTX *mem_ctx,
struct dcerpc_pipe **pp);
NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding,
- const struct ndr_interface_table *table, struct event_context *ev,
+ const struct ndr_interface_table *table, struct tevent_context *ev,
struct loadparm_context *lp_ctx);
struct composite_context* dcerpc_secondary_auth_connection_send(struct dcerpc_pipe *p,
struct dcerpc_binding *binding,
/*
handle timeouts of a dcerpc connect
*/
-static void dcerpc_connect_timeout_handler(struct event_context *ev, struct timed_event *te,
+static void dcerpc_connect_timeout_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private)
{
struct composite_context *c = talloc_get_type(private, struct composite_context);
struct dcerpc_binding *binding,
const struct ndr_interface_table *table,
struct cli_credentials *credentials,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx)
{
struct composite_context *c;
struct pipe_connect_state *s;
- struct event_context *new_ev = NULL;
+ struct tevent_context *new_ev = NULL;
/* composite context allocation and setup */
c = composite_create(parent_ctx, ev);
struct dcerpc_binding *binding,
const struct ndr_interface_table *table,
struct cli_credentials *credentials,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx)
{
struct composite_context *c;
const char *binding,
const struct ndr_interface_table *table,
struct cli_credentials *credentials,
- struct event_context *ev, struct loadparm_context *lp_ctx)
+ struct tevent_context *ev, struct loadparm_context *lp_ctx)
{
struct composite_context *c;
struct pipe_conn_state *s;
const char *binding,
const struct ndr_interface_table *table,
struct cli_credentials *credentials,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx)
{
struct composite_context *c;
/* transport private information used by general socket pipe transports */
struct sock_private {
- struct fd_event *fde;
+ struct tevent_fd *fde;
struct socket_context *sock;
char *server_name;
/*
called when a IO is triggered by the events system
*/
-static void sock_io_handler(struct event_context *ev, struct fd_event *fde,
+static void sock_io_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct dcerpc_connection *p = talloc_get_type(private,
struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
struct dcerpc_binding *binding,
const struct ndr_interface_table *table,
- struct event_context *ev,
+ struct tevent_context *ev,
struct loadparm_context *lp_ctx)
{
struct composite_context *c;
Get endpoint mapping for rpc connection
*/
_PUBLIC_ NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding,
- const struct ndr_interface_table *table, struct event_context *ev,
+ const struct ndr_interface_table *table, struct tevent_context *ev,
struct loadparm_context *lp_ctx)
{
struct composite_context *c;
struct loadparm_context *lp_ctx = NULL;
PyObject *py_lp_ctx = Py_None, *py_credentials = Py_None, *py_basis = Py_None;
TALLOC_CTX *mem_ctx = NULL;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
NTSTATUS status;
const char *kwnames[] = {
struct loadparm_context *lp_ctx = NULL;
PyObject *py_lp_ctx = Py_None, *py_credentials = Py_None;
TALLOC_CTX *mem_ctx = NULL;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
NTSTATUS status;
PyObject *syntax, *py_basis = Py_None;
/*
handle name refresh timer events
*/
-static void name_refresh_handler(struct event_context *ev, struct timed_event *te,
+static void name_refresh_handler(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private_data)
{
struct nbtd_iface_name *iname = talloc_get_type(private_data, struct nbtd_iface_name);
}
-static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te,
+static void nbtd_wins_refresh(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private_data);
/*
retry a WINS name registration
*/
-static void nbtd_wins_register_retry(struct event_context *ev, struct timed_event *te,
+static void nbtd_wins_register_retry(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private_data)
{
struct nbtd_iface_name *iname = talloc_get_type(private_data, struct nbtd_iface_name);
/*
refresh a WINS name registration
*/
-static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te,
+static void nbtd_wins_refresh(struct tevent_context *ev, struct tevent_timer *te,
struct timeval t, void *private_data)
{
struct nbtd_iface_name *iname = talloc_get_type(private_data, struct nbtd_iface_name);
return NBT_RCODE_SVR;
}
-static bool winsdb_check_or_add_module_list(struct event_context *ev_ctx,
+static bool winsdb_check_or_add_module_list(struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx, struct winsdb_handle *h)
{
int trans;
}
struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx,
- struct event_context *ev_ctx,
+ struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
const char *owner,
enum winsdb_handle_caller caller)
};
struct ldb_message;
-struct event_context;
+struct tevent_context;
#include "nbt_server/wins/winsdb_proto.h"
struct {
struct nbtd_server *nbtd_server;
uint16_t nbt_port;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct nbt_name *name;
uint32_t num_addresses;
const char **addresses;
struct wins_release_demand_io {
struct {
struct nbtd_server *nbtd_server;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct nbt_name *name;
uint16_t nb_flags;
uint32_t num_addresses;
struct ntptr_context {
const struct ntptr_ops *ops;
void *private_data;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
struct loadparm_context *lp_ctx;
};
/*
create a ntptr_context with a specified NTPTR backend
*/
-NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx,
+NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx,
struct loadparm_context *lp_ctx,
const char *providor, struct ntptr_context **_ntptr)
{
connect to the SPOOLSS database
return a ldb_context pointer on success, or NULL on failure
*/
-static struct ldb_context *sptr_db_connect(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx, struct loadparm_context *lp_ctx)
+static struct ldb_context *sptr_db_connect(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx)
{
return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lp_spoolss_url(lp_ctx), system_session(mem_ctx, lp_ctx),
NULL, 0, NULL);