Ignore:
Timestamp:
Sep 30, 2007, 3:42:50 AM (18 years ago)
Author:
Paul Smedley
Message:

Update trunk to 3.2.0pre1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/include/messages.h

    r1 r77  
    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
    9    the Free Software Foundation; either version 2 of the License, or
     9   the Free Software Foundation; either version of the License, or
    1010   (at your option) any later version.
    1111   
     
    1616   
    1717   You should have received a copy of the GNU General Public License
    18    along with this program; if not, write to the Free Software
    19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    2019*/
    2120
     
    2322#define _MESSAGES_H_
    2423
     24
     25
     26
     27
     28
     29
    2530/* general messages */
    26 #define MSG_DEBUG               1
    27 #define MSG_PING                2
    28 #define MSG_PONG                3
    29 #define MSG_PROFILE             4
    30 #define MSG_REQ_DEBUGLEVEL      5
    31 #define MSG_DEBUGLEVEL          6
    32 #define MSG_REQ_PROFILELEVEL    7
    33 #define MSG_PROFILELEVEL        8
    34 #define MSG_REQ_POOL_USAGE      9
    35 #define MSG_POOL_USAGE          10
     31#define MSG_DEBUG               1
     32#define MSG_PING                2
     33#define MSG_PONG                3
     34#define MSG_PROFILE             4
     35#define MSG_REQ_DEBUGLEVEL      5
     36#define MSG_DEBUGLEVEL          6
     37#define MSG_REQ_PROFILELEVEL    7
     38#define MSG_PROFILELEVEL        8
     39#define MSG_REQ_POOL_USAGE      9
     40#define MSG_POOL_USAGE         
    3641
    3742/* If dmalloc is included, set a steady-state mark */
    38 #define MSG_REQ_DMALLOC_MARK    11
     43#define MSG_REQ_DMALLOC_MARK   
    3944
    4045/* If dmalloc is included, dump to the dmalloc log a description of
    4146 * what has changed since the last MARK */
    42 #define MSG_REQ_DMALLOC_LOG_CHANGED     12
    43 
    44 #define MSG_SHUTDOWN            13
     47#define MSG_REQ_DMALLOC_LOG_CHANGED     
     48
     49#define MSG_SHUTDOWN           
    4550
    4651/* nmbd messages */
    47 #define MSG_FORCE_ELECTION 1001
    48 #define MSG_WINS_NEW_ENTRY 1002
    49 #define MSG_SEND_PACKET    1003
     52#define MSG_FORCE_ELECTION01
     53#define MSG_WINS_NEW_ENTRY02
     54#define MSG_SEND_PACKET03
    5055
    5156/* printing messages */
    5257/* #define MSG_PRINTER_NOTIFY  2001*/ /* Obsolete */
    53 #define MSG_PRINTER_NOTIFY2             2002
    54 
    55 #define MSG_PRINTER_DRVUPGRADE          2101
    56 #define MSG_PRINTERDATA_INIT_RESET      2102
    57 #define MSG_PRINTER_UPDATE              2103
    58 #define MSG_PRINTER_MOD                 2104
     58#define MSG_PRINTER_NOTIFY2             02
     59
     60#define MSG_PRINTER_DRVUPGRADE         
     61#define MSG_PRINTERDATA_INIT_RESET     
     62#define MSG_PRINTER_UPDATE             
     63#define MSG_PRINTER_MOD                 
    5964
    6065/* smbd messages */
    61 #define MSG_SMB_CONF_UPDATED 3001
    62 #define MSG_SMB_FORCE_TDIS   3002
    63 #define MSG_SMB_SAM_SYNC     3003
    64 #define MSG_SMB_SAM_REPL     3004
    65 #define MSG_SMB_UNLOCK       3005
    66 #define MSG_SMB_BREAK_REQUEST 3006
    67 #define MSG_SMB_BREAK_RESPONSE 3007
    68 #define MSG_SMB_ASYNC_LEVEL2_BREAK 3008
    69 #define MSG_SMB_OPEN_RETRY   3009
    70 #define MSG_SMB_KERNEL_BREAK 3010
    71 #define MSG_SMB_FILE_RENAME  3011
    72 #define MSG_SMB_INJECT_FAULT 3012
    73 #define MSG_SMB_BLOCKING_LOCK_CANCEL 3013
    74 #define MSG_SMB_NOTIFY       3014
    75 #define MSG_SMB_STAT_CACHE_DELETE 3015
     66#define MSG_SMB_CONF_UPDATED01
     67#define MSG_SMB_FORCE_TDIS02
     68#define MSG_SMB_SAM_SYNC03
     69#define MSG_SMB_SAM_REPL04
     70#define MSG_SMB_UNLOCK05
     71#define MSG_SMB_BREAK_REQUEST06
     72#define MSG_SMB_BREAK_RESPONSE07
     73#define MSG_SMB_ASYNC_LEVEL2_BREAK08
     74#define MSG_SMB_OPEN_RETRY09
     75#define MSG_SMB_KERNEL_BREAK
     76#define MSG_SMB_FILE_RENAME
     77#define MSG_SMB_INJECT_FAULT
     78#define MSG_SMB_BLOCKING_LOCK_CANCEL
     79#define MSG_SMB_NOTIFY
     80#define MSG_SMB_STAT_CACHE_DELETE
    7681/*
    7782 * Samba4 compatibility
    7883 */
    79 #define MSG_PVFS_NOTIFY       3016
     84#define MSG_PVFS_NOTIFY                 0x0310
     85/*
     86 * cluster reconfigure events
     87 */
     88#define MSG_SMB_BRL_VALIDATE            0x0311
     89#define MSG_SMB_RELEASE_IP              0x0312
    8090
    8191/* winbind messages */
    82 #define MSG_WINBIND_FINISHED     4001
    83 #define MSG_WINBIND_FORGET_STATE 4002
    84 #define MSG_WINBIND_ONLINE       4003
    85 #define MSG_WINBIND_OFFLINE      4004
    86 #define MSG_WINBIND_ONLINESTATUS 4005
    87 #define MSG_WINBIND_TRY_TO_GO_ONLINE 4006
    88 #define MSG_WINBIND_FAILED_TO_GO_ONLINE 4007
     92#define MSG_WINBIND_FINISHED            0x0401
     93#define MSG_WINBIND_FORGET_STATE        0x0402
     94#define MSG_WINBIND_ONLINE              0x0403
     95#define MSG_WINBIND_OFFLINE             0x0404
     96#define MSG_WINBIND_ONLINESTATUS        0x0405
     97#define MSG_WINBIND_TRY_TO_GO_ONLINE    0x0406
     98#define MSG_WINBIND_FAILED_TO_GO_ONLINE 0x0407
     99#define MSG_WINBIND_VALIDATE_CACHE      0x0408
     100
     101/* event messages */
     102#define MSG_DUMP_EVENT_LIST             0x0500
     103
     104/*
     105 * Special flags passed to message_send. Allocated from the top, lets see when
     106 * it collides with the message types in the lower 16 bits :-)
     107 */
     108
     109/*
     110 * Under high load, this message can be dropped. Use for notify-style
     111 * messages that are not critical for correct operation.
     112 */
     113#define MSG_FLAG_LOWPRIORITY            0x80000000
     114
    89115
    90116/* Flags to classify messages - used in message_send_all() */
    91117/* Sender will filter by flag. */
    92118
    93 #define FLAG_MSG_GENERAL        0x0001
    94 #define FLAG_MSG_SMBD           0x0002
    95 #define FLAG_MSG_NMBD           0x0004
    96 #define FLAG_MSG_PRINT_NOTIFY   0x0008
    97 #define FLAG_MSG_PRINT_GENERAL  0x0010
    98 
    99 struct process_id {
     119#define FLAG_MSG_GENERAL                0x0001
     120#define FLAG_MSG_SMBD                   0x0002
     121#define FLAG_MSG_NMBD                   0x0004
     122#define FLAG_MSG_PRINT_NOTIFY           0x0008
     123#define FLAG_MSG_PRINT_GENERAL          0x0010
     124
     125
     126/*
     127 * Virtual Node Numbers are identifying a node within a cluster. Ctdbd sets
     128 * this, we retrieve our vnn from it.
     129 */
     130
     131#define NONCLUSTER_VNN (0xFFFFFFFF)
     132
     133/*
     134 * ctdb gives us 64-bit server ids for messaging_send. This is done to avoid
     135 * pid clashes and to be able to register for special messages like "all
     136 * smbds".
     137 *
     138 * Normal individual server id's have the upper 32 bits to 0, I picked "1" for
     139 * Samba, other subsystems might use something else.
     140 */
     141
     142#define MSG_SRVID_SAMBA 0x0000000100000000LL
     143
     144
     145struct server_id {
    100146        pid_t pid;
     147
     148
     149
    101150};
    102151
    103 /*
    104  * Samba4 API compatibility layer
    105  */
    106 
    107 struct server_id {
    108         struct process_id id;
     152#ifdef CLUSTER_SUPPORT
     153#define MSG_BROADCAST_PID_STR   "0:0"
     154#else
     155#define MSG_BROADCAST_PID_STR   "0"
     156#endif
     157
     158struct messaging_context;
     159struct messaging_rec;
     160struct data_blob;
     161
     162/*
     163 * struct messaging_context belongs to messages.c, but because we still have
     164 * messaging_dispatch, we need it here. Once we get rid of signals for
     165 * notifying processes, this will go.
     166 */
     167
     168struct messaging_context {
     169        struct server_id id;
     170        struct event_context *event_ctx;
     171        struct messaging_callback *callbacks;
     172
     173        struct messaging_backend *local;
     174        struct messaging_backend *remote;
    109175};
    110176
     177
     178
     179
     180
     181
     182
     183
     184
     185
     186
     187
     188
     189
     190
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
    111228#endif
Note: See TracChangeset for help on using the changeset viewer.