s3:libads: Fix creating machine account using LDAP
[bbaumbach/samba-autobuild/.git] / source3 / include / nameserv.h
index 4377e3330a1cfcf5514c498cf4581ccc679cc964..29b2d876e0d91853a5ed0eb8c7ed058f5eebab6b 100644 (file)
@@ -199,7 +199,7 @@ enum logon_state {
 struct subnet_record;
 
 struct nmb_data {
-       uint16 nb_flags;         /* Netbios flags. */
+       uint16_t nb_flags;       /* Netbios flags. */
        int num_ips;             /* Number of ip entries. */
        struct in_addr *ip;      /* The ip list for this name. */
 
@@ -208,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 ! */
@@ -232,6 +232,15 @@ struct browse_cache_record {
        time_t         death_time; /* The time the record must be removed. */
 };
 
+/* used for server information: client, nameserv and ipc */
+struct server_info_struct {
+       fstring name;
+       uint32_t type;
+       fstring comment;
+       fstring domain; /* used ONLY in ipc.c NOT namework.c */
+       bool server_added; /* used ONLY in ipc.c NOT namework.c */
+};
+
 /* This is used to hold the list of servers in my domain, and is
    contained within lists of domains. */
 
@@ -280,7 +289,7 @@ struct work_record {
        bool    RunningElection;
        bool    needelection;
        int     ElectionCount;
-       uint32  ElectionCriterion;
+       uint32_t  ElectionCriterion;
 
        /* Domain master browser info. Used for efficient syncs. */
        struct nmb_name dmb_name;
@@ -328,7 +337,7 @@ typedef void (*fail_function)(struct subnet_record *, struct response_record *,
 typedef void (*register_name_success_function)( struct subnet_record *,
                                                 struct userdata_struct *,
                                                 struct nmb_name *,
-                                                uint16,
+                                                uint16_t,
                                                 int,
                                                 struct in_addr);
 typedef void (*register_name_fail_function)( struct subnet_record *,
@@ -346,7 +355,7 @@ typedef void (*release_name_fail_function)( struct subnet_record *,
 typedef void (*refresh_name_success_function)( struct subnet_record *,
                                                struct userdata_struct *, 
                                                struct nmb_name *,
-                                               uint16,
+                                               uint16_t,
                                                int,
                                                struct in_addr);
 typedef void (*refresh_name_fail_function)( struct subnet_record *,
@@ -377,7 +386,7 @@ struct response_record {
        struct response_record *next;
        struct response_record *prev;
 
-       uint16 response_id;
+       uint16_t response_id;
 
        /* Callbacks for packets received or not. */ 
        response_function resp_fn;
@@ -434,7 +443,9 @@ struct subnet_record {
        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. */
@@ -530,7 +541,8 @@ struct packet_struct
        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 {
@@ -539,17 +551,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
@@ -617,7 +618,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;