diff options
author | Jeremy Allison <jra@samba.org> | 1997-10-17 23:08:07 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1997-10-17 23:08:07 +0000 |
commit | 6904c2de080b2a9702800e9e4126386ced20569d (patch) | |
tree | 1d8d96383035c3fbec9b3c1085960586b98394a5 /source/lib/interface.c | |
parent | 92e7092af1daf9349ca9fb00cd27c0ddc21b37d9 (diff) | |
download | samba-6904c2de080b2a9702800e9e4126386ced20569d.tar.gz samba-6904c2de080b2a9702800e9e4126386ced20569d.tar.xz samba-6904c2de080b2a9702800e9e4126386ced20569d.zip |
.cvsignore: Added make_smbcodepage
interface.c: Added is_local_net().
locking.c: Added Fix for zero length share files from Gerald Werner <wernerg@mfldclin.edu>
plus a race condition fix for the fix.
nameannounce.c: Made function static.
namedbresp.c: extern int ClientDGRAM removed - not used.
namedbserver.c: extern int ClientDGRAM removed - not used.
namedbsubnet.c: Added code to make sockets per subnet.
namepacket.c: Added code to read from all sockets & filter.
nameresp.c: extern int ClientDGRAM removed - not used.
nameserv.c: Indentation tidyup :-).
nameserv.h: Added sockets to struct subnet.
nameservresp.c: Improved debug message.
nmbd.c: Changed to terminte on listen_for_packets exiting.
nmbsync.c: extern int ClientDGRAM & ClientNMB removed - not used.
proto.h: The usual.
util.c: Fixed debug message.
Jeremy (jallison@whistle.com)
Diffstat (limited to 'source/lib/interface.c')
-rw-r--r-- | source/lib/interface.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/lib/interface.c b/source/lib/interface.c index 1dc605ff2fd..c920cc0cfcf 100644 --- a/source/lib/interface.c +++ b/source/lib/interface.c @@ -400,6 +400,18 @@ BOOL ismybcast(struct in_addr bcast) } /**************************************************************************** + check if a packet is from a local (known) net + **************************************************************************/ +BOOL is_local_net(struct in_addr from) +{ + struct interface *i; + for (i=local_interfaces;i;i=i->next) + if((from.s_addr & i->nmask.s_addr) == (i->ip.s_addr & i->nmask.s_addr)) + return True; + return False; +} + +/**************************************************************************** how many interfaces do we have **************************************************************************/ int iface_count(void) |