Attempt to fix the merged build
[jra/samba/.git] / libcli / nbt / libnbt.h
index e03352d7cf5944c3375a84c34c0404d39d9f74d1..a37a213b08666af4db83820cfa97125a284cbe75 100644 (file)
@@ -60,7 +60,7 @@ struct nbt_name_request {
        bool received_wack;
 
        /* the timeout event */
-       struct timed_event *te;
+       struct tevent_timer *te;
 
        /* the name transaction id */
        uint16_t name_trn_id;
@@ -94,14 +94,14 @@ struct nbt_name_request {
 */
 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;
@@ -122,8 +122,6 @@ struct nbt_name_socket {
                                struct socket_address *);
                void *private_data;
        } unexpected;
-
-       uint32_t wack_timeout;
 };
 
 
@@ -277,8 +275,11 @@ struct nbt_name_release {
 };
 
 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);
+void nbt_name_socket_handle_response_packet(struct nbt_name_request *req,
+                                           struct nbt_name_packet *packet,
+                                           struct socket_address *src);
 struct nbt_name_request *nbt_name_query_send(struct nbt_name_socket *nbtsock,
                                             struct nbt_name_query *io);
 NTSTATUS nbt_name_query_recv(struct nbt_name_request *req,
@@ -326,14 +327,18 @@ NTSTATUS nbt_set_incoming_handler(struct nbt_name_socket *nbtsock,
                                  void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *,
                                                  struct socket_address *),
                                  void *private_data);
+NTSTATUS nbt_set_unexpected_handler(struct nbt_name_socket *nbtsock,
+                                   void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *,
+                                                   struct socket_address *),
+                                   void *private_data);
 NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
                             struct socket_address *dest,
                             struct nbt_name_packet *request);
 
 
-NDR_SCALAR_PROTO(wrepl_nbt_name, const struct nbt_name *);
-NDR_SCALAR_PROTO(nbt_string, const char *);
-NDR_BUFFER_PROTO(nbt_name, struct nbt_name);
+NDR_SCALAR_PROTO(wrepl_nbt_name, const struct nbt_name *)
+NDR_SCALAR_PROTO(nbt_string, const char *)
+NDR_BUFFER_PROTO(nbt_name, struct nbt_name)
 NTSTATUS nbt_rcode_to_ntstatus(uint8_t rcode);
 
 struct composite_context;