include/nameserv.h

説明を見る。
00001 #ifndef _NAMESERV_H_
00002 #define _NAMESERV_H_
00003 /* 
00004    Unix SMB/CIFS implementation.
00005    NBT netbios header - version 2
00006    Copyright (C) Andrew Tridgell 1994-1998
00007    
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2 of the License, or
00011    (at your option) any later version.
00012    
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017    
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021    
00022 */
00023 
00024 #define INFO_VERSION    "INFO/version"
00025 #define INFO_COUNT      "INFO/num_entries"
00026 #define INFO_ID_HIGH    "INFO/id_high"
00027 #define INFO_ID_LOW     "INFO/id_low"
00028 #define ENTRY_PREFIX    "ENTRY/"
00029 
00030 #define PERMANENT_TTL 0
00031 
00032 /* NTAS uses 2, NT uses 1, WfWg uses 0 */
00033 #define MAINTAIN_LIST    2
00034 #define ELECTION_VERSION 1
00035 
00036 #define MAX_DGRAM_SIZE (576) /* tcp/ip datagram limit is 576 bytes */
00037 #define MIN_DGRAM_SIZE 12
00038 
00039 /*********************************************************
00040  Types of reply packet.
00041 **********************************************************/
00042 
00043 enum netbios_reply_type_code { NMB_QUERY, NMB_STATUS, NMB_REG, NMB_REG_REFRESH,
00044                                NMB_REL, NMB_WAIT_ACK, NMB_MULTIHOMED_REG,
00045                                WINS_REG, WINS_QUERY };
00046 
00047 /* From rfc1002, 4.2.1.2 */
00048 /* Question types. */
00049 #define QUESTION_TYPE_NB_QUERY  0x20
00050 #define QUESTION_TYPE_NB_STATUS 0x21
00051 
00052 /* Question class */
00053 #define QUESTION_CLASS_IN  0x1
00054 
00055 /* Opcode definitions */
00056 #define NMB_NAME_QUERY_OPCODE       0x0
00057 #define NMB_NAME_REG_OPCODE         0x05 /* see rfc1002.txt 4.2.2,3,5,6,7,8 */
00058 #define NMB_NAME_RELEASE_OPCODE     0x06 /* see rfc1002.txt 4.2.9,10,11 */
00059 #define NMB_WACK_OPCODE             0x07 /* see rfc1002.txt 4.2.16 */
00060 /* Ambiguity in rfc1002 about which of these is correct. */
00061 /* WinNT uses 8 by default but can be made to use 9. */
00062 #define NMB_NAME_REFRESH_OPCODE_8   0x08 /* see rfc1002.txt 4.2.4 */
00063 #define NMB_NAME_REFRESH_OPCODE_9   0x09 /* see rfc1002.txt 4.2.4 */
00064 #define NMB_NAME_MULTIHOMED_REG_OPCODE 0x0F /* Invented by Microsoft. */
00065 
00066 /* XXXX what about all the other types?? 0x1, 0x2, 0x3, 0x4, 0x8? */
00067 
00068 /* Resource record types. rfc1002 4.2.1.3 */
00069 #define RR_TYPE_A                  0x1
00070 #define RR_TYPE_NS                 0x2
00071 #define RR_TYPE_NULL               0xA
00072 #define RR_TYPE_NB                0x20
00073 #define RR_TYPE_NBSTAT            0x21
00074 
00075 /* Resource record class. */
00076 #define RR_CLASS_IN                0x1
00077 
00078 /* NetBIOS flags */
00079 #define NB_GROUP  0x80
00080 #define NB_PERM   0x02
00081 #define NB_ACTIVE 0x04
00082 #define NB_CONFL  0x08
00083 #define NB_DEREG  0x10
00084 #define NB_BFLAG  0x00 /* Broadcast node type. */
00085 #define NB_PFLAG  0x20 /* Point-to-point node type. */
00086 #define NB_MFLAG  0x40 /* Mixed bcast & p-p node type. */
00087 #define NB_HFLAG  0x60 /* Microsoft 'hybrid' node type. */
00088 #define NB_NODETYPEMASK 0x60
00089 /* Mask applied to outgoing NetBIOS flags. */
00090 #define NB_FLGMSK 0xE0
00091 
00092 /* The wins flags. Looks like the nbflags ! */
00093 #define WINS_UNIQUE     0x00 /* Unique record */
00094 #define WINS_NGROUP     0x01 /* Normal Group eg: 1B */
00095 #define WINS_SGROUP     0x02 /* Special Group eg: 1C */
00096 #define WINS_MHOMED     0x03 /* MultiHomed */
00097 
00098 #define WINS_ACTIVE     0x00 /* active record */
00099 #define WINS_RELEASED   0x04 /* released record */
00100 #define WINS_TOMBSTONED 0x08 /* tombstoned record */
00101 #define WINS_DELETED    0x0C /* deleted record */
00102 
00103 #define WINS_STATE_MASK 0x0C
00104 
00105 #define WINS_LOCAL      0x00 /* local record */
00106 #define WINS_REMOTE     0x10 /* remote record */
00107 
00108 #define WINS_BNODE      0x00 /* Broadcast node */
00109 #define WINS_PNODE      0x20 /* PtP node */
00110 #define WINS_MNODE      0x40 /* Mixed node */
00111 #define WINS_HNODE      0x60 /* Hybrid node */
00112 
00113 #define WINS_NONSTATIC  0x00 /* dynamic record */
00114 #define WINS_STATIC     0x80 /* static record */
00115 
00116 #define WINS_STATE_ACTIVE(p) (((p)->data.wins_flags & WINS_STATE_MASK) == WINS_ACTIVE)
00117 
00118 
00119 /* NetBIOS flag identifier. */
00120 #define NAME_GROUP(p)  ((p)->data.nb_flags & NB_GROUP)
00121 #define NAME_BFLAG(p) (((p)->data.nb_flags & NB_NODETYPEMASK) == NB_BFLAG)
00122 #define NAME_PFLAG(p) (((p)->data.nb_flags & NB_NODETYPEMASK) == NB_PFLAG)
00123 #define NAME_MFLAG(p) (((p)->data.nb_flags & NB_NODETYPEMASK) == NB_MFLAG)
00124 #define NAME_HFLAG(p) (((p)->data.nb_flags & NB_NODETYPEMASK) == NB_HFLAG)
00125 
00126 /* Samba name state for a name in a namelist. */
00127 #define NAME_IS_ACTIVE(p)        ((p)->data.nb_flags & NB_ACTIVE)
00128 #define NAME_IN_CONFLICT(p)      ((p)->data.nb_flags & NB_CONFL)
00129 #define NAME_IS_DEREGISTERING(p) ((p)->data.nb_flags & NB_DEREG)
00130 
00131 /* Error codes for NetBIOS requests. */
00132 #define FMT_ERR   0x1       /* Packet format error. */
00133 #define SRV_ERR   0x2       /* Internal server error. */
00134 #define NAM_ERR   0x3       /* Name does not exist. */
00135 #define IMP_ERR   0x4       /* Request not implemented. */
00136 #define RFS_ERR   0x5       /* Request refused. */
00137 #define ACT_ERR   0x6       /* Active error - name owned by another host. */
00138 #define CFT_ERR   0x7       /* Name in conflict error. */
00139 
00140 #define REFRESH_TIME (15*60)
00141 #define NAME_POLL_REFRESH_TIME (5*60)
00142 #define NAME_POLL_INTERVAL 15
00143 
00144 /* Workgroup state identifiers. */
00145 #define AM_POTENTIAL_MASTER_BROWSER(work) ((work)->mst_state == MST_POTENTIAL)
00146 #define AM_LOCAL_MASTER_BROWSER(work) ((work)->mst_state == MST_BROWSER)
00147 #define AM_DOMAIN_MASTER_BROWSER(work) ((work)->dom_state == DOMAIN_MST)
00148 #define AM_DOMAIN_MEMBER(work) ((work)->log_state == LOGON_SRV)
00149 
00150 /* Microsoft browser NetBIOS name. */
00151 #define MSBROWSE "\001\002__MSBROWSE__\002"
00152 
00153 /* Mail slots. */
00154 #define BROWSE_MAILSLOT    "\\MAILSLOT\\BROWSE"
00155 #define NET_LOGON_MAILSLOT "\\MAILSLOT\\NET\\NETLOGON"
00156 #define NT_LOGON_MAILSLOT  "\\MAILSLOT\\NET\\NTLOGON"
00157 #define LANMAN_MAILSLOT    "\\MAILSLOT\\LANMAN"
00158 
00159 /* Samba definitions for find_name_on_subnet(). */
00160 #define FIND_ANY_NAME   0
00161 #define FIND_SELF_NAME  1
00162 
00163 /*
00164  * The different name types that can be in namelists.
00165  *
00166  * SELF_NAME should only be on the broadcast and unicast subnets.
00167  * LMHOSTS_NAME should only be in the remote_broadcast_subnet.
00168  * REGISTER_NAME, DNS_NAME, DNSFAIL_NAME should only be in the wins_server_subnet.
00169  * WINS_PROXY_NAME should only be on the broadcast subnets.
00170  * PERMANENT_NAME can be on all subnets except remote_broadcast_subnet.
00171  *
00172  */
00173 
00174 enum name_source {LMHOSTS_NAME, REGISTER_NAME, SELF_NAME, DNS_NAME, 
00175                   DNSFAIL_NAME, PERMANENT_NAME, WINS_PROXY_NAME};
00176 enum node_type {B_NODE=0, P_NODE=1, M_NODE=2, NBDD_NODE=3};
00177 enum packet_type {NMB_PACKET, DGRAM_PACKET};
00178 
00179 enum master_state {
00180         MST_NONE,
00181         MST_POTENTIAL,
00182         MST_BACKUP,
00183         MST_MSB,
00184         MST_BROWSER,
00185         MST_UNBECOMING_MASTER
00186 };
00187 
00188 enum domain_state {
00189         DOMAIN_NONE,
00190         DOMAIN_WAIT,
00191         DOMAIN_MST
00192 };
00193 
00194 enum logon_state {
00195         LOGON_NONE,
00196         LOGON_WAIT,
00197         LOGON_SRV
00198 };
00199 
00200 struct subnet_record;
00201 
00202 struct nmb_data {
00203         uint16 nb_flags;         /* Netbios flags. */
00204         int num_ips;             /* Number of ip entries. */
00205         struct in_addr *ip;      /* The ip list for this name. */
00206 
00207         enum name_source source; /* Where the name came from. */
00208 
00209         time_t death_time; /* The time the record must be removed (do not remove if 0). */
00210         time_t refresh_time; /* The time the record should be refreshed. */
00211   
00212         SMB_BIG_UINT id;                /* unique id */
00213         struct in_addr wins_ip; /* the adress of the wins server this record comes from */
00214 
00215         int wins_flags;         /* similar to the netbios flags but different ! */
00216 };
00217 
00218 /* This structure represents an entry in a local netbios name list. */
00219 struct name_record {
00220         struct name_record *prev, *next;
00221         struct subnet_record *subnet;
00222         struct nmb_name       name;    /* The netbios name. */
00223         struct nmb_data       data;    /* The netbios data. */
00224 };
00225 
00226 /* Browser cache for synchronising browse lists. */
00227 struct browse_cache_record {
00228         struct browse_cache_record *prev, *next;
00229         unstring        lmb_name;
00230         unstring        work_group;
00231         struct in_addr ip;
00232         time_t         sync_time;
00233         time_t         death_time; /* The time the record must be removed. */
00234 };
00235 
00236 /* This is used to hold the list of servers in my domain, and is
00237    contained within lists of domains. */
00238 
00239 struct server_record {
00240         struct server_record *next;
00241         struct server_record *prev;
00242 
00243         struct subnet_record *subnet;
00244 
00245         struct server_info_struct serv;
00246         time_t death_time;  
00247 };
00248 
00249 /* A workgroup structure. It contains a list of servers. */
00250 struct work_record {
00251         struct work_record *next;
00252         struct work_record *prev;
00253 
00254         struct subnet_record *subnet;
00255 
00256         struct server_record *serverlist;
00257 
00258         /* Stage of development from non-local-master up to local-master browser. */
00259         enum master_state mst_state;
00260 
00261         /* Stage of development from non-domain-master to domain-master browser. */
00262         enum domain_state dom_state;
00263 
00264         /* Stage of development from non-logon-server to logon server. */
00265         enum logon_state log_state;
00266 
00267         /* Work group info. */
00268         unstring work_group;
00269         int     token;        /* Used when communicating with backup browsers. */
00270         unstring local_master_browser_name;      /* Current local master browser. */
00271 
00272         /* Announce info. */
00273         time_t lastannounce_time;
00274         int announce_interval;
00275         BOOL    needannounce;
00276 
00277         /* Timeout time for this workgroup. 0 means permanent. */
00278         time_t death_time;  
00279 
00280         /* Election info */
00281         BOOL    RunningElection;
00282         BOOL    needelection;
00283         int     ElectionCount;
00284         uint32  ElectionCriterion;
00285 
00286         /* Domain master browser info. Used for efficient syncs. */
00287         struct nmb_name dmb_name;
00288         struct in_addr dmb_addr;
00289 };
00290 
00291 /* typedefs needed to define copy & free functions for userdata. */
00292 struct userdata_struct;
00293 
00294 typedef struct userdata_struct * (*userdata_copy_fn)(struct userdata_struct *);
00295 typedef void (*userdata_free_fn)(struct userdata_struct *);
00296 
00297 /* Structure to define any userdata passed around. */
00298 
00299 struct userdata_struct {
00300         userdata_copy_fn copy_fn;
00301         userdata_free_fn free_fn;
00302         unsigned int userdata_len;
00303         char data[16]; /* 16 is to ensure alignment/padding on all systems */
00304 };
00305 
00306 struct response_record;
00307 struct packet_struct;
00308 struct res_rec;
00309 
00310 /* typedef to define the function called when this response packet comes in. */
00311 typedef void (*response_function)(struct subnet_record *, struct response_record *,
00312                                   struct packet_struct *);
00313 
00314 /* typedef to define the function called when this response record times out. */
00315 typedef void (*timeout_response_function)(struct subnet_record *,
00316                                           struct response_record *);
00317 
00318 /* typedef to define the function called when the request that caused this
00319    response record to be created is successful. */
00320 typedef void (*success_function)(struct subnet_record *, struct userdata_struct *, ...);
00321 
00322 /* typedef to define the function called when the request that caused this
00323    response record to be created is unsuccessful. */
00324 typedef void (*fail_function)(struct subnet_record *, struct response_record *, ...);
00325 
00326 /* List of typedefs for success and fail functions of the different query
00327    types. Used to catch any compile time prototype errors. */
00328 
00329 typedef void (*register_name_success_function)( struct subnet_record *,
00330                                                 struct userdata_struct *,
00331                                                 struct nmb_name *,
00332                                                 uint16,
00333                                                 int,
00334                                                 struct in_addr);
00335 typedef void (*register_name_fail_function)( struct subnet_record *,
00336                                              struct response_record *,
00337                                              struct nmb_name *);
00338 
00339 typedef void (*release_name_success_function)( struct subnet_record *,
00340                                                struct userdata_struct *, 
00341                                                struct nmb_name *,
00342                                                struct in_addr);
00343 typedef void (*release_name_fail_function)( struct subnet_record *,
00344                                             struct response_record *, 
00345                                             struct nmb_name *);
00346 
00347 typedef void (*refresh_name_success_function)( struct subnet_record *,
00348                                                struct userdata_struct *, 
00349                                                struct nmb_name *,
00350                                                uint16,
00351                                                int,
00352                                                struct in_addr);
00353 typedef void (*refresh_name_fail_function)( struct subnet_record *,
00354                                             struct response_record *,
00355                                             struct nmb_name *);
00356 
00357 typedef void (*query_name_success_function)( struct subnet_record *,
00358                                              struct userdata_struct *,
00359                                              struct nmb_name *,
00360                                              struct in_addr,
00361                                              struct res_rec *answers);
00362 
00363 typedef void (*query_name_fail_function)( struct subnet_record *,
00364                                           struct response_record *,    
00365                                           struct nmb_name *,
00366                                           int);  
00367 
00368 typedef void (*node_status_success_function)( struct subnet_record *,
00369                                               struct userdata_struct *,
00370                                               struct res_rec *,
00371                                               struct in_addr);
00372 typedef void (*node_status_fail_function)( struct subnet_record *,
00373                                            struct response_record *);
00374 
00375 /* Initiated name queries are recorded in this list to track any responses. */
00376 
00377 struct response_record {
00378         struct response_record *next;
00379         struct response_record *prev;
00380 
00381         uint16 response_id;
00382 
00383         /* Callbacks for packets received or not. */ 
00384         response_function resp_fn;
00385         timeout_response_function timeout_fn;
00386 
00387         /* Callbacks for the request succeeding or not. */
00388         success_function success_fn;
00389         fail_function fail_fn;
00390  
00391         struct packet_struct *packet;
00392 
00393         struct userdata_struct *userdata;
00394 
00395         int num_msgs;
00396 
00397         time_t repeat_time;
00398         time_t repeat_interval;
00399         int    repeat_count;
00400 
00401         /* Recursion protection. */
00402         BOOL in_expiration_processing;
00403 };
00404 
00405 /* A subnet structure. It contains a list of workgroups and netbios names. */
00406 
00407 /*
00408    B nodes will have their own, totally separate subnet record, with their
00409    own netbios name set. These do NOT interact with other subnet records'
00410    netbios names.
00411 */
00412 
00413 enum subnet_type {
00414         NORMAL_SUBNET              = 0,  /* Subnet listed in interfaces list. */
00415         UNICAST_SUBNET             = 1,  /* Subnet for unicast packets. */
00416         REMOTE_BROADCAST_SUBNET    = 2,  /* Subnet for remote broadcasts. */
00417         WINS_SERVER_SUBNET         = 3   /* Only created if we are a WINS server. */
00418 };
00419 
00420 struct subnet_record {
00421         struct subnet_record *next;
00422         struct subnet_record *prev;
00423 
00424         char  *subnet_name;      /* For Debug identification. */
00425         enum subnet_type type;   /* To catagorize the subnet. */
00426 
00427         struct work_record     *workgrouplist; /* List of workgroups. */
00428         struct name_record     *namelist;   /* List of netbios names. */
00429         struct response_record *responselist;  /* List of responses expected. */
00430 
00431         BOOL namelist_changed;
00432         BOOL work_changed;
00433 
00434         struct in_addr bcast_ip;
00435         struct in_addr mask_ip;
00436         struct in_addr myip;
00437         int nmb_sock;               /* socket to listen for unicast 137. */
00438         int dgram_sock;             /* socket to listen for unicast 138. */
00439 };
00440 
00441 /* A resource record. */
00442 struct res_rec {
00443         struct nmb_name rr_name;
00444         int rr_type;
00445         int rr_class;
00446         int ttl;
00447         int rdlength;
00448         char rdata[MAX_DGRAM_SIZE];
00449 };
00450 
00451 /* Define these so we can pass info back to caller of name_query */
00452 #define NM_FLAGS_RS 0x80 /* Response. Cheat     */
00453 #define NM_FLAGS_AA 0x40 /* Authoritative       */
00454 #define NM_FLAGS_TC 0x20 /* Truncated           */
00455 #define NM_FLAGS_RD 0x10 /* Recursion Desired   */
00456 #define NM_FLAGS_RA 0x08 /* Recursion Available */
00457 #define NM_FLAGS_B  0x01 /* Broadcast           */
00458 
00459 /* An nmb packet. */
00460 struct nmb_packet {
00461         struct {
00462                 int name_trn_id;
00463                 int opcode;
00464                 BOOL response;
00465                 struct {
00466                         BOOL bcast;
00467                         BOOL recursion_available;
00468                         BOOL recursion_desired;
00469                         BOOL trunc;
00470                         BOOL authoritative;
00471                 } nm_flags;
00472                 int rcode;
00473                 int qdcount;
00474                 int ancount;
00475                 int nscount;
00476                 int arcount;
00477         } header;
00478 
00479         struct {
00480                 struct nmb_name question_name;
00481                 int question_type;
00482                 int question_class;
00483         } question;
00484 
00485         struct res_rec *answers;
00486         struct res_rec *nsrecs;
00487         struct res_rec *additional;
00488 };
00489 
00490 /* msg_type field options - from rfc1002. */
00491 
00492 #define DGRAM_UNIQUE 0x10
00493 #define DGRAM_GROUP 0x11
00494 #define DGRAM_BROADCAST 0x12
00495 #define DGRAM_ERROR 0x13
00496 #define DGRAM_QUERY_REQUEST 0x14
00497 #define DGRAM_POSITIVE_QUERY_RESPONSE 0x15
00498 #define DGRAM_NEGATIVE_QUERT_RESPONSE 0x16
00499 
00500 /* A datagram - this normally contains SMB data in the data[] array. */
00501 
00502 struct dgram_packet {
00503         struct {
00504                 int msg_type;
00505                 struct {
00506                         enum node_type node_type;
00507                         BOOL first;
00508                         BOOL more;
00509                 } flags;
00510                 int dgm_id;
00511                 struct in_addr source_ip;
00512                 int source_port;
00513                 int dgm_length;
00514                 int packet_offset;
00515         } header;
00516         struct nmb_name source_name;
00517         struct nmb_name dest_name;
00518         int datasize;
00519         char data[MAX_DGRAM_SIZE];
00520 };
00521 
00522 /* Define a structure used to queue packets. This will be a linked
00523  list of nmb packets. */
00524 
00525 struct packet_struct
00526 {
00527         struct packet_struct *next;
00528         struct packet_struct *prev;
00529         BOOL locked;
00530         struct in_addr ip;
00531         int port;
00532         int fd;
00533         time_t timestamp;
00534         enum packet_type packet_type;
00535         union {
00536                 struct nmb_packet nmb;
00537                 struct dgram_packet dgram;
00538         } packet;
00539 };
00540 
00541 /* NETLOGON opcodes */
00542 
00543 #define QUERYFORPDC      7 /* Query for PDC. */
00544 #define SAM_UAS_CHANGE  10 /* Announce change to UAS or SAM. */
00545 #define QUERYFORPDC_R   12 /* Response to Query for PDC. */
00546 #define SAMLOGON        18
00547 #define SAMLOGON_R      19
00548 #define SAMLOGON_UNK_R  21
00549 #define SAMLOGON_AD_UNK_R 23
00550 #define SAMLOGON_AD_R   25
00551 
00552 /* Ids for netbios packet types. */
00553 
00554 #define ANN_HostAnnouncement         1
00555 #define ANN_AnnouncementRequest      2
00556 #define ANN_Election                 8
00557 #define ANN_GetBackupListReq         9
00558 #define ANN_GetBackupListResp       10
00559 #define ANN_BecomeBackup            11
00560 #define ANN_DomainAnnouncement      12
00561 #define ANN_MasterAnnouncement      13
00562 #define ANN_ResetBrowserState       14
00563 #define ANN_LocalMasterAnnouncement 15
00564 
00565 
00566 /* Broadcast packet announcement intervals, in minutes. */
00567 
00568 /* Attempt to add domain logon and domain master names. */
00569 #define CHECK_TIME_ADD_DOM_NAMES 5 
00570 
00571 /* Search for master browsers of workgroups samba knows about, 
00572    except default. */
00573 #define CHECK_TIME_MST_BROWSE       5 
00574 
00575 /* Request backup browser announcements from other servers. */
00576 #define CHECK_TIME_ANNOUNCE_BACKUP 15
00577 
00578 /* Request host announcements from other servers: min and max of interval. */
00579 #define CHECK_TIME_MIN_HOST_ANNCE   3
00580 #define CHECK_TIME_MAX_HOST_ANNCE  12
00581 
00582 /* Announce as master to WINS server and any Primary Domain Controllers. */
00583 #define CHECK_TIME_MST_ANNOUNCE    15
00584 
00585 /* Time between syncs from domain master browser to local master browsers. */
00586 #define CHECK_TIME_DMB_TO_LMB_SYNC    15
00587 
00588 /* Do all remote announcements this often. */
00589 #define REMOTE_ANNOUNCE_INTERVAL 180
00590 
00591 /* what is the maximum period between name refreshes. Note that this only
00592    affects non-permanent self names (in seconds) */
00593 #define MAX_REFRESH_TIME (60*20)
00594 
00595 /* The Extinction interval: 4 days, time a node will stay in released state  */
00596 #define EXTINCTION_INTERVAL (4*24*60*60)
00597 
00598 /* The Extinction time-out: 1 day, time a node will stay in deleted state */
00599 #define EXTINCTION_TIMEOUT (24*60*60)
00600 
00601 /* Macro's to enumerate subnets either with or without
00602    the UNICAST subnet. */
00603 
00604 extern struct subnet_record *subnetlist;
00605 extern struct subnet_record *unicast_subnet;
00606 extern struct subnet_record *wins_server_subnet;
00607 extern struct subnet_record *remote_broadcast_subnet;
00608 
00609 #define FIRST_SUBNET subnetlist
00610 #define NEXT_SUBNET_EXCLUDING_UNICAST(x) ((x)->next)
00611 #define NEXT_SUBNET_INCLUDING_UNICAST(x) (get_next_subnet_maybe_unicast((x)))
00612 
00613 /* wins replication record used between nmbd and wrepld */
00614 typedef struct _WINS_RECORD {
00615         char name[17];
00616         char type;
00617         int nb_flags;
00618         int wins_flags;
00619         SMB_BIG_UINT id;
00620         int num_ips;
00621         struct in_addr ip[25];
00622         struct in_addr wins_ip;
00623 } WINS_RECORD;
00624 
00625 /* To be removed. */
00626 enum state_type { TEST };
00627 #endif /* _NAMESERV_H_ */

Sambaに対してSat Aug 29 21:22:54 2009に生成されました。  doxygen 1.4.7