summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-04 22:48:23 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-04 22:48:23 +0100
commitaf744e0954bbe9ddfa2e3da173e79de65e640a4c (patch)
tree78b98c28e6d54c5339c12f2f942883d5088fda84 /source3/include
parentce47b69d8e318bbb3642d27aa0451e2914c92be7 (diff)
parent2c0faaf5d921fe57a88d3b999067458e8774c6f6 (diff)
downloadsamba-af744e0954bbe9ddfa2e3da173e79de65e640a4c.tar.gz
samba-af744e0954bbe9ddfa2e3da173e79de65e640a4c.tar.bz2
samba-af744e0954bbe9ddfa2e3da173e79de65e640a4c.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/async_req.h30
-rw-r--r--source3/include/async_sock.h10
-rw-r--r--source3/include/packet.h6
-rw-r--r--source3/include/proto.h29
-rw-r--r--source3/include/smb.h3
5 files changed, 58 insertions, 20 deletions
diff --git a/source3/include/async_req.h b/source3/include/async_req.h
index 14a30696c4..1b8dbf3346 100644
--- a/source3/include/async_req.h
+++ b/source3/include/async_req.h
@@ -97,13 +97,6 @@ struct async_req {
NTSTATUS status;
/**
- * @brief The event context we are using
- *
- * The event context that this async request works on.
- */
- struct event_context *event_ctx;
-
- /**
* @brief What to do on completion
*
* This is used for the user of an async request, fn is called when
@@ -122,7 +115,7 @@ struct async_req {
} async;
};
-struct async_req *async_req_new(TALLOC_CTX *mem_ctx, struct event_context *ev);
+struct async_req *async_req_new(TALLOC_CTX *mem_ctx);
char *async_req_print(TALLOC_CTX *mem_ctx, struct async_req *req);
@@ -130,7 +123,8 @@ void async_req_done(struct async_req *req);
void async_req_error(struct async_req *req, NTSTATUS status);
-bool async_post_status(struct async_req *req, NTSTATUS status);
+bool async_post_status(struct async_req *req, struct event_context *ev,
+ NTSTATUS status);
bool async_req_nomem(const void *p, struct async_req *req);
@@ -138,4 +132,22 @@ bool async_req_is_error(struct async_req *req, NTSTATUS *status);
NTSTATUS async_req_simple_recv(struct async_req *req);
+bool async_req_set_timeout(struct async_req *req, struct event_context *ev,
+ struct timeval to);
+
+struct async_req *async_wait_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct timeval to);
+
+NTSTATUS async_wait_recv(struct async_req *req);
+
+struct async_req_queue;
+
+struct async_req_queue *async_req_queue_init(TALLOC_CTX *mem_ctx);
+
+bool async_req_enqueue(struct async_req_queue *queue,
+ struct event_context *ev,
+ struct async_req *req,
+ void (*trigger)(struct async_req *req));
+
#endif
diff --git a/source3/include/async_sock.h b/source3/include/async_sock.h
index f0cd5fdaa4..c6f95d64d5 100644
--- a/source3/include/async_sock.h
+++ b/source3/include/async_sock.h
@@ -24,7 +24,7 @@
ssize_t async_syscall_result_ssize_t(struct async_req *req, int *perrno);
size_t async_syscall_result_size_t(struct async_req *req, int *perrno);
-ssize_t async_syscall_result_int(struct async_req *req, int *perrno);
+int async_syscall_result_int(struct async_req *req, int *perrno);
struct async_req *async_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
int fd, const void *buffer, size_t length,
@@ -32,9 +32,11 @@ struct async_req *async_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
struct async_req *async_recv(TALLOC_CTX *mem_ctx, struct event_context *ev,
int fd, void *buffer, size_t length,
int flags);
-struct async_req *async_connect(TALLOC_CTX *mem_ctx, struct event_context *ev,
- int fd, const struct sockaddr *address,
- socklen_t address_len);
+struct async_req *async_connect_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ int fd, const struct sockaddr *address,
+ socklen_t address_len);
+NTSTATUS async_connect_recv(struct async_req *req, int *perrno);
struct async_req *sendall_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
int fd, const void *buffer, size_t length,
diff --git a/source3/include/packet.h b/source3/include/packet.h
index 05974da8fc..03331da750 100644
--- a/source3/include/packet.h
+++ b/source3/include/packet.h
@@ -44,12 +44,14 @@ NTSTATUS packet_fd_read_sync(struct packet_context *ctx);
* Handle an incoming packet:
* Return False if none is available
* Otherwise return True and store the callback result in *status
+ * Callback must either talloc_move or talloc_free buf
*/
bool packet_handler(struct packet_context *ctx,
- bool (*full_req)(const DATA_BLOB *data,
+ bool (*full_req)(const uint8_t *buf,
+ size_t available,
size_t *length,
void *private_data),
- NTSTATUS (*callback)(const DATA_BLOB *data,
+ NTSTATUS (*callback)(uint8_t *buf, size_t length,
void *private_data),
void *private_data,
NTSTATUS *status);
diff --git a/source3/include/proto.h b/source3/include/proto.h
index e1e98eb125..09f12ceb86 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1457,10 +1457,21 @@ int open_socket_in(int type,
int dlevel,
const struct sockaddr_storage *psock,
bool rebind);
-int open_socket_out(int type,
- const struct sockaddr_storage *pss,
- uint16_t port,
- int timeout);
+NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port,
+ int timeout, int *pfd);
+struct async_req *open_socket_out_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ const struct sockaddr_storage *pss,
+ uint16_t port,
+ int timeout);
+NTSTATUS open_socket_out_recv(struct async_req *req, int *pfd);
+struct async_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct timeval wait_time,
+ const struct sockaddr_storage *pss,
+ uint16_t port,
+ int timeout);
+NTSTATUS open_socket_out_defer_recv(struct async_req *req, int *pfd);
bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs,
int timeout, int *fd_index, int *fd);
int open_udp_socket(const char *host, int port);
@@ -7970,4 +7981,14 @@ NTSTATUS idmap_sid_to_gid(const char *domname, DOM_SID *sid, gid_t *gid);
NTSTATUS nss_info_template_init( void );
+/* Misc protos */
+
+struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
+ struct wb_context *wb_ctx, bool need_priv,
+ const struct winbindd_request *wb_req);
+NTSTATUS wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presponse);
+struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx);
+
+
#endif /* _PROTO_H_ */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index a8a2d98154..7fd4fbb553 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -27,7 +27,7 @@
#define _SMB_H
/* logged when starting the various Samba daemons */
-#define COPYRIGHT_STARTUP_MESSAGE "Copyright Andrew Tridgell and the Samba Team 1992-2008"
+#define COPYRIGHT_STARTUP_MESSAGE "Copyright Andrew Tridgell and the Samba Team 1992-2009"
#if defined(LARGE_SMB_OFF_T)
@@ -369,6 +369,7 @@ struct share_mode_entry;
struct uuid;
struct named_mutex;
struct pcap_cache;
+struct wb_context;
struct vfs_fsp_data {
struct vfs_fsp_data *next;