diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-06-06 11:43:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-06-06 11:43:09 +0000 |
commit | b9ae225b28f4707609e6436dad4be7ebdd7e181f (patch) | |
tree | de9b672d8fd9cbb0e79039f7ea543b4c4793a2d1 /source3/include | |
parent | f57b053db8b17041ef02588127a67f362af871b6 (diff) | |
download | samba-b9ae225b28f4707609e6436dad4be7ebdd7e181f.tar.gz samba-b9ae225b28f4707609e6436dad4be7ebdd7e181f.tar.bz2 samba-b9ae225b28f4707609e6436dad4be7ebdd7e181f.zip |
- added interface.c and removed all the references to myip, bcast_ip
and Netmask, instead replacing them with calls to routines in
interface.c
- got rid of old MAXINT define
- added code to ensure we only return one entry for each name in the ipc
enum routines
- added new_only option to add_netbios_entry() to prevent overwriting
of important names
- minor time handling fixup
(This used to be commit 7ed71b73ae745da099072eee36fc2700d1d91407)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/includes.h | 4 | ||||
-rw-r--r-- | source3/include/proto.h | 20 |
2 files changed, 14 insertions, 10 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index 5b29b27547..549407bc9e 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -899,10 +899,6 @@ extern char *getsmbpass(char *); #define FD_SETSIZE 255 #endif -#ifndef MAXINT -#define MAXINT ((((unsigned)1)<<(sizeof(int)*8-1))-1) -#endif - #ifndef __STDC__ #define const #endif diff --git a/source3/include/proto.h b/source3/include/proto.h index 8b39c4437b..2c7cb8a126 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -63,6 +63,13 @@ char *DirCacheCheck(char *path,char *name,int snum); void DirCacheFlush(int snum); void fault_setup(void (*fn)()); char *getsmbpass(char *prompt) ; +void load_interfaces(void); +void iface_set_default(char *ip,char *bcast,char *nmask); +BOOL ismyip(struct in_addr ip); +BOOL ismybcast(struct in_addr bcast); +struct in_addr *iface_bcast(struct in_addr ip); +struct in_addr *iface_nmask(struct in_addr ip); +struct in_addr *iface_ip(struct in_addr ip); int reply_trans(char *inbuf,char *outbuf); int interpret_coding_system(char *str, int def); char *lp_string(char *s); @@ -109,7 +116,8 @@ void announce_master(void); 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 work_record *find_workgroupstruct(struct domain_record *d, + fstring name, BOOL add); struct domain_record *find_domain(struct in_addr source_ip); void dump_workgroups(void); struct domain_record *add_domain_entry(struct in_addr source_ip, @@ -164,8 +172,11 @@ void remove_name(struct name_record *n); void dump_names(void); void remove_netbios_name(char *name,int type, enum name_source source, struct in_addr ip); -struct name_record *add_netbios_entry(char *name, int type, int nb_flags, int ttl, - enum name_source source, struct in_addr ip); +struct name_record *add_netbios_entry(char *name, int type, int nb_flags, + int ttl, + enum name_source source, + struct in_addr ip, + BOOL new_only); void remove_name_entry(char *name,int type); void add_name_entry(char *name,int type,int nb_flags); void add_my_names(void); @@ -466,9 +477,6 @@ BOOL string_sub(char *s,char *pattern,char *insert); BOOL do_match(char *str, char *regexp, int case_sig); BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2); void become_daemon(void); -void get_broadcast(struct in_addr *if_ipaddr, - struct in_addr *if_bcast, - struct in_addr *if_nmask); BOOL yesno(char *p); char *fgets_slash(char *s2,int maxlen,FILE *f); int set_filelen(int fd, long len); |