s3:client: s/Undefined/SMB_SIGNING_DEFAULT/
[kai/samba.git] / source3 / include / nameserv.h
index 1e867d620bc6975b52244950c206715335fb5559..53ffd6faec3c4a069c884688a45e767b9c60e1bb 100644 (file)
@@ -7,7 +7,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
 */
 
@@ -209,7 +208,7 @@ struct nmb_data {
        time_t death_time; /* The time the record must be removed (do not remove if 0). */
        time_t refresh_time; /* The time the record should be refreshed. */
   
-       SMB_BIG_UINT id;                /* unique id */
+       uint64_t id;            /* unique id */
        struct in_addr wins_ip; /* the adress of the wins server this record comes from */
 
        int wins_flags;         /* similar to the netbios flags but different ! */
@@ -217,7 +216,7 @@ struct nmb_data {
 
 /* This structure represents an entry in a local netbios name list. */
 struct name_record {
-       ubi_trNode            node[1];
+       struct name_record *prev, *next;
        struct subnet_record *subnet;
        struct nmb_name       name;    /* The netbios name. */
        struct nmb_data       data;    /* The netbios data. */
@@ -225,9 +224,9 @@ struct name_record {
 
 /* Browser cache for synchronising browse lists. */
 struct browse_cache_record {
-       ubi_dlNode     node[1];
-       nstring        lmb_name;
-       nstring        work_group;
+       struct browse_cache_record *prev, *next;
+       unstring        lmb_name;
+       unstring        work_group;
        struct in_addr ip;
        time_t         sync_time;
        time_t         death_time; /* The time the record must be removed. */
@@ -265,21 +264,21 @@ struct work_record {
        enum logon_state log_state;
 
        /* Work group info. */
-       nstring work_group;
+       unstring work_group;
        int     token;        /* Used when communicating with backup browsers. */
-       nstring local_master_browser_name;      /* Current local master browser. */
+       unstring local_master_browser_name;      /* Current local master browser. */
 
        /* Announce info. */
        time_t lastannounce_time;
        int announce_interval;
-       BOOL    needannounce;
+       bool    needannounce;
 
        /* Timeout time for this workgroup. 0 means permanent. */
        time_t death_time;  
 
        /* Election info */
-       BOOL    RunningElection;
-       BOOL    needelection;
+       bool    RunningElection;
+       bool    needelection;
        int     ElectionCount;
        uint32  ElectionCriterion;
 
@@ -399,7 +398,7 @@ struct response_record {
        int    repeat_count;
 
        /* Recursion protection. */
-       BOOL in_expiration_processing;
+       bool in_expiration_processing;
 };
 
 /* A subnet structure. It contains a list of workgroups and netbios names. */
@@ -425,17 +424,19 @@ struct subnet_record {
        enum subnet_type type;   /* To catagorize the subnet. */
 
        struct work_record     *workgrouplist; /* List of workgroups. */
-       ubi_trRoot              namelist[1];   /* List of netbios names. */
+       struct name_record     *namelist;   /* List of netbios names. */
        struct response_record *responselist;  /* List of responses expected. */
 
-       BOOL namelist_changed;
-       BOOL work_changed;
+       bool namelist_changed;
+       bool work_changed;
 
        struct in_addr bcast_ip;
        struct in_addr mask_ip;
        struct in_addr myip;
        int nmb_sock;               /* socket to listen for unicast 137. */
+       int nmb_bcast;              /* socket to listen for broadcast 137. */
        int dgram_sock;             /* socket to listen for unicast 138. */
+       int dgram_bcast;            /* socket to listen for broadcast 138. */
 };
 
 /* A resource record. */
@@ -461,13 +462,13 @@ struct nmb_packet {
        struct {
                int name_trn_id;
                int opcode;
-               BOOL response;
+               bool response;
                struct {
-                       BOOL bcast;
-                       BOOL recursion_available;
-                       BOOL recursion_desired;
-                       BOOL trunc;
-                       BOOL authoritative;
+                       bool bcast;
+                       bool recursion_available;
+                       bool recursion_desired;
+                       bool trunc;
+                       bool authoritative;
                } nm_flags;
                int rcode;
                int qdcount;
@@ -492,7 +493,9 @@ struct nmb_packet {
 #define DGRAM_UNIQUE 0x10
 #define DGRAM_GROUP 0x11
 #define DGRAM_BROADCAST 0x12
+/* defined in IDL
 #define DGRAM_ERROR 0x13
+*/
 #define DGRAM_QUERY_REQUEST 0x14
 #define DGRAM_POSITIVE_QUERY_RESPONSE 0x15
 #define DGRAM_NEGATIVE_QUERT_RESPONSE 0x16
@@ -504,8 +507,8 @@ struct dgram_packet {
                int msg_type;
                struct {
                        enum node_type node_type;
-                       BOOL first;
-                       BOOL more;
+                       bool first;
+                       bool more;
                } flags;
                int dgm_id;
                struct in_addr source_ip;
@@ -526,10 +529,11 @@ struct packet_struct
 {
        struct packet_struct *next;
        struct packet_struct *prev;
-       BOOL locked;
+       bool locked;
        struct in_addr ip;
        int port;
-       int fd;
+       int recv_fd;
+       int send_fd;
        time_t timestamp;
        enum packet_type packet_type;
        union {
@@ -538,17 +542,6 @@ struct packet_struct
        } packet;
 };
 
-/* NETLOGON opcodes */
-
-#define QUERYFORPDC     7 /* Query for PDC. */
-#define SAM_UAS_CHANGE  10 /* Announce change to UAS or SAM. */
-#define QUERYFORPDC_R  12 /* Response to Query for PDC. */
-#define SAMLOGON       18
-#define SAMLOGON_R     19
-#define SAMLOGON_UNK_R 21
-#define SAMLOGON_AD_UNK_R 23
-#define SAMLOGON_AD_R   25
-
 /* Ids for netbios packet types. */
 
 #define ANN_HostAnnouncement         1
@@ -616,7 +609,7 @@ typedef struct _WINS_RECORD {
        char type;
        int nb_flags;
        int wins_flags;
-       SMB_BIG_UINT id;
+       uint64_t id;
        int num_ips;
        struct in_addr ip[25];
        struct in_addr wins_ip;