/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
NBT netbios routines and daemon - version 2
Copyright (C) Andrew Tridgell 1994-1998
Copyright (C) Luke Kenneth Casson Leighton 1994-1998
extern int ClientDGRAM;
extern int global_nmb_port;
-extern int DEBUGLEVEL;
-
extern fstring myworkgroup;
extern char **my_netbios_names;
-extern struct in_addr ipzero;
/* This is the broadcast subnets database. */
struct subnet_record *subnetlist = NULL;
close(nmb_sock);
close(dgram_sock);
ZERO_STRUCTP(subrec);
- free((char *)subrec);
+ SAFE_FREE(subrec);
return(NULL);
}
{
int num_interfaces = iface_count();
int i;
- struct in_addr unicast_ip;
+ struct in_addr unicast_ip, ipzero;
extern struct in_addr loopback_ip;
if(num_interfaces == 0)
struct in_addr real_wins_ip;
real_wins_ip = wins_srv_ip();
- if (!zero_ip(real_wins_ip))
+ if (!is_zero_ip(real_wins_ip))
{
unicast_ip = real_wins_ip;
}
{
/* We should not be using a WINS server at all. Set the
ip address of the subnet to be zero. */
- unicast_ip = ipzero;
+ zero_ip(&unicast_ip);
}
/*
unicast_subnet = make_subnet( "UNICAST_SUBNET", UNICAST_SUBNET,
unicast_ip, unicast_ip, unicast_ip);
+ zero_ip(&ipzero);
+
remote_broadcast_subnet = make_subnet( "REMOTE_BROADCAST_SUBNET",
REMOTE_BROADCAST_SUBNET,
ipzero, ipzero, ipzero);
static int cache_we_are_a_wins_client = -1;
if(cache_we_are_a_wins_client == -1)
- cache_we_are_a_wins_client = (ip_equal(ipzero, unicast_subnet->myip) ?
+ cache_we_are_a_wins_client = (is_zero_ip(unicast_subnet->myip) ?
False : True);
return cache_we_are_a_wins_client;