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. */
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 ! */
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. */
bool RunningElection;
bool needelection;
int ElectionCount;
- uint32 ElectionCriterion;
+ uint32_t ElectionCriterion;
/* Domain master browser info. Used for efficient syncs. */
struct nmb_name dmb_name;
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 *,
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 *,
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;
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. */
#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
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 {
} 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
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;