summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-01-04 17:12:17 +0100
committerVolker Lendecke <vl@samba.org>2011-01-07 13:28:03 +0100
commitb2c62d639d7fd565d39a999d500018b290b5279f (patch)
treea84e9d1e4a78289f6e4b627fdfdabc5ddf4d7b0b /source3/include
parent6a0a0478ad6f77e3279775dcb0dad51bc3b1457a (diff)
downloadsamba-b2c62d639d7fd565d39a999d500018b290b5279f.tar.gz
samba-b2c62d639d7fd565d39a999d500018b290b5279f.tar.bz2
samba-b2c62d639d7fd565d39a999d500018b290b5279f.zip
s3: Basic infrastructure for /tmp/.nmbd/unexpected
This provides the framework to replace the unexpected.tdb file. Nmbd will listen on /tmp/.nmbd/unexpected. A client interested in unexpected packets connects there. It sends a nb_packet_query plus a potential mailslot name for dgram packets. It waits for a single ack byte to avoid races. After that has happened, nmbd will pass down all matching packets through that socket. nb_packet_server_create and nb_packet_dispatch are the nmbd routines, nb_packet_reader_send/recv and nb_packet_read_send/recv are the client ones.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 385a5371be..6f18ee08e6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2933,6 +2933,28 @@ void clear_unexpected(time_t t);
struct packet_struct *receive_unexpected(enum packet_type packet_type, int id,
const char *mailslot_name);
+struct nb_packet_server;
+struct nb_packet_reader;
+
+NTSTATUS nb_packet_server_create(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ int max_clients,
+ struct nb_packet_server **presult);
+void nb_packet_dispatch(struct nb_packet_server *server,
+ struct packet_struct *p);
+struct tevent_req *nb_packet_reader_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ enum packet_type type,
+ int trn_id,
+ const char *mailslot_name);
+NTSTATUS nb_packet_reader_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+ struct nb_packet_reader **preader);
+struct tevent_req *nb_packet_read_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct nb_packet_reader *reader);
+NTSTATUS nb_packet_read_recv(struct tevent_req *req,
+ struct packet_struct **ppacket);
+
/* The following definitions come from locking/brlock.c */
bool brl_same_context(const struct lock_context *ctx1,