diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/includes.h | 2 | ||||
-rw-r--r-- | source3/include/nameserv.h | 18 | ||||
-rw-r--r-- | source3/include/proto.h | 22 |
3 files changed, 33 insertions, 9 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index ad65bcc607..5b29b27547 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -223,7 +223,9 @@ Here come some platform specific sections #define USE_SETSID #define HAVE_BZERO #define HAVE_MEMMOVE +#if _LINUX_C_LIB_VERSION_MAJOR >= 5 #define USE_SETFS +#endif #ifdef SHADOW_PWD #ifndef crypt #define crypt pw_encrypt diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h index 51f5ec8479..32ee625fa4 100644 --- a/source3/include/nameserv.h +++ b/source3/include/nameserv.h @@ -22,7 +22,7 @@ /* NTAS uses 2, NT uses 1, WfWg uses 0 */ #define MAINTAIN_LIST 2 -#define ELECTION_VERSION 2 +#define ELECTION_VERSION 1 #define MAX_DGRAM_SIZE (80*18+64) #define MIN_DGRAM_SIZE 12 @@ -255,3 +255,19 @@ struct packet_struct }; +#define AM_MASTER(work) (work->ServerType & SV_TYPE_MASTER_BROWSER) +#define AM_BACKUP(work) (work->ServerType & SV_TYPE_BACKUP_BROWSER) +#define AM_DOMCTL(work) (work->ServerType & SV_TYPE_DOMAIN_CTRL) + + +#define ANN_HostAnnouncement 1 +#define ANN_AnnouncementRequest 2 +#define ANN_Election 8 +#define ANN_GetBackupListReq 9 +#define ANN_GetBackupListResp 10 +#define ANN_BecomeBackup 11 +#define ANN_DomainAnnouncement 12 +#define ANN_MasterAnnouncement 13 +#define ANN_ResetBrowserState 14 +#define ANN_LocalMasterAnnouncement 15 + diff --git a/source3/include/proto.h b/source3/include/proto.h index face79d255..a3f522b274 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -51,6 +51,7 @@ BOOL dptr_fill(char *buf1,unsigned int key); BOOL dptr_zero(char *buf); void *dptr_fetch(char *buf,int *num); void *dptr_fetch_lanman2(char *params,int dptr_num); +BOOL dir_check_ftype(int cnum,int mode,struct stat *st,int dirtype); BOOL get_dir_entry(int cnum,char *mask,int dirtype,char *fname,int *size,int *mode,time_t *date,BOOL check_descend); void *OpenDir(char *name); void CloseDir(void *p); @@ -99,21 +100,26 @@ int reply_sendstrt(char *inbuf,char *outbuf); int reply_sendtxt(char *inbuf,char *outbuf); int reply_sendend(char *inbuf,char *outbuf); void announce_request(struct work_record *work, struct in_addr ip); -void do_announce_request(char *info, char *to_name, int announce_type, int from, +void do_announce_request(char *info, char *to_name, int announce_type, + int from, int to, struct in_addr dest_ip); void announce_backup(void); void announce_host(void); void announce_master(void); -struct work_record *remove_workgroup(struct domain_record *d, struct work_record *work); +struct work_record *remove_workgroup(struct domain_record *d, + struct work_record *work); void expire_browse_cache(time_t t); struct work_record *find_workgroupstruct(struct domain_record *d, fstring name, BOOL add); struct domain_record *find_domain(struct in_addr source_ip); -struct domain_record *add_domain_entry(struct in_addr source_ip, struct in_addr source_mask, +struct domain_record *add_domain_entry(struct in_addr source_ip, + struct in_addr source_mask, char *name, BOOL add); struct browse_cache_record *add_browser_entry(char *name, int type, char *wg, time_t ttl, struct in_addr ip); -struct server_record *add_server_entry(struct domain_record *d, struct work_record *work, - char *name,int servertype, int ttl,char *comment, +struct server_record *add_server_entry(struct domain_record *d, + struct work_record *work, + char *name,int servertype, + int ttl,char *comment, BOOL replace); void write_browse_list(void); void expire_servers(time_t t); @@ -137,7 +143,6 @@ void reply_netbios_packet(struct packet_struct *p1,int trn_id,int rcode,int opco char *data,int len); uint16 initiate_netbios_packet(int fd,int quest_type,char *name,int name_type, int nb_flags,BOOL bcast,BOOL recurse,struct in_addr to_ip); -void send_name_reg(void); void queue_netbios_pkt_wins(int fd,int quest_type,enum cmd_type cmd, char *name,int name_type,int nb_flags, BOOL bcast,BOOL recurse,struct in_addr to_ip); @@ -162,6 +167,7 @@ struct name_record *add_netbios_entry(char *name, int type, int nb_flags, int tt void remove_name_entry(char *name,int type); void add_name_entry(char *name,int type,int nb_flags); void add_my_names(void); +void refresh_my_names(time_t t); void expire_names(time_t t); void response_name_release(struct packet_struct *p); void reply_name_release(struct packet_struct *p); @@ -174,7 +180,8 @@ void process_nmb(struct packet_struct *p); void reset_server(char *name, int state, struct in_addr ip); void tell_become_backup(void); void do_browser_lists(void); -void sync_server(enum cmd_type cmd, char *serv_name, char *work_name, int name_type, +void sync_server(enum cmd_type cmd, char *serv_name, char *work_name, + int name_type, struct in_addr ip); void update_from_reg(char *name, int type, struct in_addr ip); void add_my_domains(void); @@ -464,7 +471,6 @@ BOOL yesno(char *p); char *fgets_slash(char *s2,int maxlen,FILE *f); int set_filelen(int fd, long len); int byte_checksum(char *buf,int len); -void setbuffer(FILE *f,char *buf,int bufsize); char *dirname_dos(char *path,char *buf); void *Realloc(void *p,int size); void Abort(void ); |