Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/include/messages.h

    r740 r988  
    44   Copyright (C) Andrew Tridgell 2000
    55   Copyright (C) 2001, 2002 by Martin Pool
    6    
     6
    77   This program is free software; you can redistribute it and/or modify
    88   it under the terms of the GNU General Public License as published by
    99   the Free Software Foundation; either version 3 of the License, or
    1010   (at your option) any later version.
    11    
     11
    1212   This program is distributed in the hope that it will be useful,
    1313   but WITHOUT ANY WARRANTY; without even the implied warranty of
    1414   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1515   GNU General Public License for more details.
    16    
     16
    1717   You should have received a copy of the GNU General Public License
    1818   along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    4343#define FLAG_MSG_SMBD                   0x0002
    4444#define FLAG_MSG_NMBD                   0x0004
    45 #define FLAG_MSG_PRINT_NOTIFY           0x0008
     45#define FLAG_MSG_WINBIND                0x0008
    4646#define FLAG_MSG_PRINT_GENERAL          0x0010
    4747/* dbwrap messages 4001-4999 */
    4848#define FLAG_MSG_DBWRAP                 0x0020
    49 
    50 
    51 /*
    52  * Virtual Node Numbers are identifying a node within a cluster. Ctdbd sets
    53  * this, we retrieve our vnn from it.
    54  */
    55 
    56 #define NONCLUSTER_VNN (0xFFFFFFFF)
    5749
    5850/*
     
    6860
    6961#include "librpc/gen_ndr/server_id.h"
     62#include "lib/util/data_blob.h"
     63#include "system/network.h"
    7064
    71 #ifdef CLUSTER_SUPPORT
    7265#define MSG_BROADCAST_PID_STR   "0:0"
    73 #else
    74 #define MSG_BROADCAST_PID_STR   "0"
    75 #endif
    7666
    7767struct messaging_context;
    7868struct messaging_rec;
    7969
    80 /*
    81  * struct messaging_context belongs to messages.c, but because we still have
    82  * messaging_dispatch, we need it here. Once we get rid of signals for
    83  * notifying processes, this will go.
    84  */
    85 
    86 struct messaging_context {
    87         struct server_id id;
    88         struct event_context *event_ctx;
    89         struct messaging_callback *callbacks;
    90 
    91         struct messaging_backend *local;
    92         struct messaging_backend *remote;
    93 };
    94 
    9570struct messaging_backend {
    96         NTSTATUS (*send_fn)(struct messaging_context *msg_ctx,
    97                             struct server_id pid, int msg_type,
    98                             const DATA_BLOB *data,
    99                             struct messaging_backend *backend);
     71        int (*send_fn)(struct server_id src,
     72                       struct server_id pid, int msg_type,
     73                       const struct iovec *iov, int iovlen,
     74                       const int *fds, size_t num_fds,
     75                       struct messaging_backend *backend);
    10076        void *private_data;
    10177};
    10278
    103 NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
    104                             TALLOC_CTX *mem_ctx,
    105                             struct messaging_backend **presult);
    106 
    107 bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx);
    108 
    109 NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
    110                               TALLOC_CTX *mem_ctx,
    111                               struct messaging_backend **presult);
     79int messaging_ctdbd_init(struct messaging_context *msg_ctx,
     80                         TALLOC_CTX *mem_ctx,
     81                         struct messaging_backend **presult);
    11282struct ctdbd_connection *messaging_ctdbd_connection(void);
    11383
     
    11686                      const void *buf, size_t len,
    11787                      int *n_sent);
    118 struct event_context *messaging_event_context(struct messaging_context *msg_ctx);
    11988struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
    120                                          struct server_id server_id,
    121                                          struct event_context *ev);
     89                                         struct tevent_context *ev);
    12290
    12391struct server_id messaging_server_id(const struct messaging_context *msg_ctx);
     92struct tevent_context *messaging_tevent_context(
     93        struct messaging_context *msg_ctx);
     94struct server_id_db *messaging_names_db(struct messaging_context *msg_ctx);
    12495
    12596/*
    12697 * re-init after a fork
    12798 */
    128 NTSTATUS messaging_reinit(struct messaging_context *msg_ctx,
    129                           struct server_id id);
     99NTSTATUS messaging_reinit(struct messaging_context *msg_ctx);
    130100
    131101NTSTATUS messaging_register(struct messaging_context *msg_ctx,
     
    139109void messaging_deregister(struct messaging_context *ctx, uint32_t msg_type,
    140110                          void *private_data);
     111
     112/**
     113 * CAVEAT:
     114 *
     115 * While the messaging_send*() functions are synchronuous by API,
     116 * they trigger a tevent-based loop upon sending bigger messages.
     117 *
     118 * Hence callers should not use these in purely synchonous code,
     119 * but run a tevent_loop instead.
     120 */
    141121NTSTATUS messaging_send(struct messaging_context *msg_ctx,
    142122                        struct server_id server,
    143123                        uint32_t msg_type, const DATA_BLOB *data);
     124
    144125NTSTATUS messaging_send_buf(struct messaging_context *msg_ctx,
    145126                            struct server_id server, uint32_t msg_type,
    146                             const uint8 *buf, size_t len);
    147 void messaging_dispatch_rec(struct messaging_context *msg_ctx,
    148                             struct messaging_rec *rec);
     127                            const uint8_t *buf, size_t len);
     128int messaging_send_iov_from(struct messaging_context *msg_ctx,
     129                            struct server_id src, struct server_id dst,
     130                            uint32_t msg_type,
     131                            const struct iovec *iov, int iovlen,
     132                            const int *fds, size_t num_fds);
     133NTSTATUS messaging_send_iov(struct messaging_context *msg_ctx,
     134                            struct server_id server, uint32_t msg_type,
     135                            const struct iovec *iov, int iovlen,
     136                            const int *fds, size_t num_fds);
     137
     138struct tevent_req *messaging_filtered_read_send(
     139        TALLOC_CTX *mem_ctx, struct tevent_context *ev,
     140        struct messaging_context *msg_ctx,
     141        bool (*filter)(struct messaging_rec *rec, void *private_data),
     142        void *private_data);
     143int messaging_filtered_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
     144                                 struct messaging_rec **presult);
     145
     146struct tevent_req *messaging_read_send(TALLOC_CTX *mem_ctx,
     147                                       struct tevent_context *ev,
     148                                       struct messaging_context *msg,
     149                                       uint32_t msg_type);
     150int messaging_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
     151                        struct messaging_rec **presult);
     152
     153struct tevent_req *messaging_handler_send(
     154        TALLOC_CTX *mem_ctx, struct tevent_context *ev,
     155        struct messaging_context *msg_ctx, uint32_t msg_type,
     156        bool (*handler)(struct messaging_context *msg_ctx,
     157                        struct messaging_rec **rec, void *private_data),
     158        void *private_data);
     159int messaging_handler_recv(struct tevent_req *req);
     160
     161int messaging_cleanup(struct messaging_context *msg_ctx, pid_t pid);
     162
     163bool messaging_parent_dgm_cleanup_init(struct messaging_context *msg);
    149164
    150165#include "librpc/gen_ndr/ndr_messaging.h"
Note: See TracChangeset for help on using the changeset viewer.