summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-11-14 01:04:13 +0000
committerJeremy Allison <jra@samba.org>1998-11-14 01:04:13 +0000
commit24ca89bfb03fb82e975eff94070275ee403cd0f9 (patch)
tree3a6816c1c78780a2dae2f50a84c141be1f236b91 /source3/nmbd
parent744c34be2a053501a0fabd1c31a77e95f711f3e3 (diff)
downloadsamba-24ca89bfb03fb82e975eff94070275ee403cd0f9.tar.gz
samba-24ca89bfb03fb82e975eff94070275ee403cd0f9.tar.bz2
samba-24ca89bfb03fb82e975eff94070275ee403cd0f9.zip
Removed acconfig.h configure configure.in include/config.h.in: Made smbwrapper not made
by default. nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include file problem...sigh. Jeremy. (This used to be commit 9ee8f39aed8772a05c203161b4ae6b7d90d67481)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/asyncdns.c4
-rw-r--r--source3/nmbd/nmbd_become_dmb.c8
-rw-r--r--source3/nmbd/nmbd_become_lmb.c12
-rw-r--r--source3/nmbd/nmbd_browsesync.c8
-rw-r--r--source3/nmbd/nmbd_elections.c4
-rw-r--r--source3/nmbd/nmbd_incomingdgrams.c26
-rw-r--r--source3/nmbd/nmbd_incomingrequests.c28
-rw-r--r--source3/nmbd/nmbd_logonnames.c2
-rw-r--r--source3/nmbd/nmbd_mynames.c2
-rw-r--r--source3/nmbd/nmbd_namelistdb.c20
-rw-r--r--source3/nmbd/nmbd_namequery.c16
-rw-r--r--source3/nmbd/nmbd_nameregister.c20
-rw-r--r--source3/nmbd/nmbd_namerelease.c16
-rw-r--r--source3/nmbd/nmbd_nodestatus.c8
-rw-r--r--source3/nmbd/nmbd_packets.c46
-rw-r--r--source3/nmbd/nmbd_subnetdb.c2
-rw-r--r--source3/nmbd/nmbd_winsproxy.c6
-rw-r--r--source3/nmbd/nmbd_winsserver.c70
-rw-r--r--source3/nmbd/nmbd_workgroupdb.c2
19 files changed, 150 insertions, 150 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c
index 3054ad7353..67e55ebd50 100644
--- a/source3/nmbd/asyncdns.c
+++ b/source3/nmbd/asyncdns.c
@@ -305,7 +305,7 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
dns_queue = p;
}
- DEBUG(3,("added DNS query for %s\n", namestr(question)));
+ DEBUG(3,("added DNS query for %s\n", nmb_namestr(question)));
return True;
}
@@ -321,7 +321,7 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
char *qname = question->name;
struct in_addr dns_ip;
- DEBUG(3,("DNS search for %s - ", namestr(question)));
+ DEBUG(3,("DNS search for %s - ", nmb_namestr(question)));
/* Unblock TERM signal so we can be killed in DNS lookup. */
BlockSignals(False, SIGTERM);
diff --git a/source3/nmbd/nmbd_become_dmb.c b/source3/nmbd/nmbd_become_dmb.c
index cfaec3378d..cbef1db4b7 100644
--- a/source3/nmbd/nmbd_become_dmb.c
+++ b/source3/nmbd/nmbd_become_dmb.c
@@ -74,7 +74,7 @@ in workgroup %s on subnet %s\n",
DEBUG(0,("become_domain_master_fail: Failed to become a domain master browser for \
workgroup %s on subnet %s. Couldn't register name %s.\n",
- work->work_group, subrec->subnet_name, namestr(fail_name)));
+ work->work_group, subrec->subnet_name, nmb_namestr(fail_name)));
}
/****************************************************************************
@@ -213,7 +213,7 @@ static void become_domain_master_query_success(struct subnet_record *subrec,
{
dbgtext( "become_domain_master_query_success():\n" );
dbgtext( "Our address (%s) ", inet_ntoa(ip) );
- dbgtext( "returned in query for name %s ", namestr(nmbname) );
+ dbgtext( "returned in query for name %s ", nmb_namestr(nmbname) );
dbgtext( "(domain master browser name) " );
dbgtext( "on subnet %s.\n", subrec->subnet_name );
dbgtext( "Continuing with domain master code.\n" );
@@ -249,7 +249,7 @@ static void become_domain_master_query_fail(struct subnet_record *subrec,
{
DEBUG(0,("become_domain_master_query_fail: Error %d returned when \
querying WINS server for name %s.\n",
- fail_code, namestr(question_name)));
+ fail_code, nmb_namestr(question_name)));
return;
}
@@ -344,7 +344,7 @@ static void become_domain_master_browser_wins(char *workgroup_name)
DEBUG(0,("become_domain_master_browser_wins: querying WINS server at IP %s \
for domain master browser name %s on workgroup %s\n",
- inet_ntoa(unicast_subnet->myip), namestr(&nmbname), workgroup_name));
+ inet_ntoa(unicast_subnet->myip), nmb_namestr(&nmbname), workgroup_name));
query_name(unicast_subnet, nmbname.name, nmbname.name_type,
become_domain_master_query_success,
diff --git a/source3/nmbd/nmbd_become_lmb.c b/source3/nmbd/nmbd_become_lmb.c
index 80609cf504..f3fa69132e 100644
--- a/source3/nmbd/nmbd_become_lmb.c
+++ b/source3/nmbd/nmbd_become_lmb.c
@@ -148,7 +148,7 @@ static void unbecome_local_master_success(struct subnet_record *subrec,
memcpy((char *)&force_new_election, userdata->data, sizeof(BOOL));
DEBUG(3,("unbecome_local_master_success: released name %s.\n",
- namestr(released_name)));
+ nmb_namestr(released_name)));
/* Now reset the workgroup and server state. */
reset_workgroup_state( subrec, released_name->name, force_new_election );
@@ -178,7 +178,7 @@ static void unbecome_local_master_fail(struct subnet_record *subrec, struct resp
memcpy((char *)&force_new_election, userdata->data, sizeof(BOOL));
DEBUG(0,("unbecome_local_master_fail: failed to release name %s. \
-Removing from namelist anyway.\n", namestr(fail_name)));
+Removing from namelist anyway.\n", nmb_namestr(fail_name)));
/* Do it anyway. */
namerec = find_name_on_subnet(subrec, fail_name, FIND_SELF_NAME);
@@ -244,7 +244,7 @@ static void release_msbrowse_name_success(struct subnet_record *subrec,
struct in_addr released_ip)
{
DEBUG(4,("release_msbrowse_name_success: Released name %s on subnet %s\n.",
- namestr(released_name), subrec->subnet_name ));
+ nmb_namestr(released_name), subrec->subnet_name ));
/* Remove the permanent MSBROWSE name added into the unicast subnet. */
remove_permanent_name_from_unicast( subrec, released_name);
@@ -261,7 +261,7 @@ static void release_msbrowse_name_fail( struct subnet_record *subrec,
struct name_record *namerec;
DEBUG(4,("release_msbrowse_name_fail: Failed to release name %s on subnet %s\n.",
- namestr(fail_name), subrec->subnet_name ));
+ nmb_namestr(fail_name), subrec->subnet_name ));
/* Release the name anyway. */
namerec = find_name_on_subnet(subrec, fail_name, FIND_SELF_NAME);
@@ -424,7 +424,7 @@ static void become_local_master_fail2(struct subnet_record *subrec,
struct work_record *work = find_workgroup_on_subnet( subrec, fail_name->name);
DEBUG(0,("become_local_master_fail2: failed to register name %s on subnet %s. \
-Failed to become a local master browser.\n", namestr(fail_name), subrec->subnet_name));
+Failed to become a local master browser.\n", nmb_namestr(fail_name), subrec->subnet_name));
if(!work)
{
@@ -508,7 +508,7 @@ in workgroup %s on subnet %s\n",
DEBUG(0,("become_local_master_fail1: Failed to become a local master browser for \
workgroup %s on subnet %s. Couldn't register name %s.\n",
- work->work_group, subrec->subnet_name, namestr(fail_name)));
+ work->work_group, subrec->subnet_name, nmb_namestr(fail_name)));
}
/******************************************************************
diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c
index 4d8b76daa7..eafcc79c0a 100644
--- a/source3/nmbd/nmbd_browsesync.c
+++ b/source3/nmbd/nmbd_browsesync.c
@@ -141,7 +141,7 @@ static void announce_local_master_browser_to_domain_master_browser( struct work_
{
dbgtext( "announce_local_master_browser_to_domain_master_browser:\n" );
dbgtext( "Sending local master announce to " );
- dbgtext( "%s for workgroup %s.\n", namestr(&work->dmb_name),
+ dbgtext( "%s for workgroup %s.\n", nmb_namestr(&work->dmb_name),
work->work_group );
}
@@ -161,7 +161,7 @@ static void sync_with_dmb(struct work_record *work)
{
dbgtext( "sync_with_dmb:\n" );
dbgtext( "Initiating sync with domain master browser " );
- dbgtext( "%s ", namestr(&work->dmb_name) );
+ dbgtext( "%s ", nmb_namestr(&work->dmb_name) );
dbgtext( "at IP %s ", inet_ntoa(work->dmb_addr) );
dbgtext( "for workgroup %s\n", work->work_group );
}
@@ -364,7 +364,7 @@ static void find_domain_master_name_query_fail(struct subnet_record *subrec,
dbgtext( "find_domain_master_name_query_fail:\n" );
dbgtext( "Unable to find the Domain Master Browser name " );
dbgtext( "%s for the workgroup %s.\n",
- namestr(question_name), question_name->name );
+ nmb_namestr(question_name), question_name->name );
dbgtext( "Unable to sync browse lists in this workgroup.\n" );
}
}
@@ -593,7 +593,7 @@ static void find_all_domain_master_names_query_fail(struct subnet_record *subrec
{
dbgtext( "find_domain_master_name_query_fail:\n" );
dbgtext( "WINS server did not reply to a query for name " );
- dbgtext( "%s.\nThis means it ", namestr(question_name) );
+ dbgtext( "%s.\nThis means it ", nmb_namestr(question_name) );
dbgtext( "is probably not a Samba 1.9.18 or above WINS server.\n" );
}
}
diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c
index cd310639e9..915528b31a 100644
--- a/source3/nmbd/nmbd_elections.c
+++ b/source3/nmbd/nmbd_elections.c
@@ -197,7 +197,7 @@ void run_elections(time_t t)
make_nmb_name(&nmbname, work->work_group, 0x1e, scope);
if(find_name_on_subnet( subrec, &nmbname, FIND_SELF_NAME)==NULL) {
DEBUG(8,("run_elections: Cannot send election packet yet as name %s not \
-yet registered on subnet %s\n", namestr(&nmbname), subrec->subnet_name ));
+yet registered on subnet %s\n", nmb_namestr(&nmbname), subrec->subnet_name ));
continue;
}
@@ -368,7 +368,7 @@ BOOL check_elections(void)
make_nmb_name(&nmbname, work->work_group, 0x1e, scope);
if(find_name_on_subnet( subrec, &nmbname, FIND_SELF_NAME)==NULL) {
DEBUG(8,("check_elections: Cannot send election packet yet as name %s not \
-yet registered on subnet %s\n", namestr(&nmbname), subrec->subnet_name ));
+yet registered on subnet %s\n", nmb_namestr(&nmbname), subrec->subnet_name ));
continue;
}
diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c
index e6c4ab2771..41aaebd9b1 100644
--- a/source3/nmbd/nmbd_incomingdgrams.c
+++ b/source3/nmbd/nmbd_incomingdgrams.c
@@ -114,7 +114,7 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p
DEBUG(3,("process_host_announce: from %s<%02x> IP %s to \
%s for server %s.\n", source_name, source_name[15], inet_ntoa(p->ip),
- namestr(&dgram->dest_name),announce_name));
+ nmb_namestr(&dgram->dest_name),announce_name));
DEBUG(5,("process_host_announce: ttl=%d server type=%08x comment=%s\n",
ttl, servertype,comment));
@@ -213,7 +213,7 @@ void process_workgroup_announce(struct subnet_record *subrec, struct packet_stru
DEBUG(3,("process_workgroup_announce: from %s<%02x> IP %s to \
%s for workgroup %s.\n", source_name, source_name[15], inet_ntoa(p->ip),
- namestr(&dgram->dest_name),workgroup_announce_name));
+ nmb_namestr(&dgram->dest_name),workgroup_announce_name));
DEBUG(5,("process_workgroup_announce: ttl=%d server type=%08x master browser=%s\n",
ttl, servertype, master_name));
@@ -222,7 +222,7 @@ void process_workgroup_announce(struct subnet_record *subrec, struct packet_stru
if (!strequal(dgram->dest_name.name, MSBROWSE) || (dgram->dest_name.name_type != 0x1))
{
DEBUG(0,("process_workgroup_announce: from IP %s should be to __MSBROWSE__<0x01> not %s\n",
- inet_ntoa(p->ip), namestr(&dgram->dest_name)));
+ inet_ntoa(p->ip), nmb_namestr(&dgram->dest_name)));
return;
}
@@ -267,7 +267,7 @@ void process_local_master_announce(struct subnet_record *subrec, struct packet_s
DEBUG(3,("process_local_master_announce: from %s<%02x> IP %s to \
%s for server %s.\n", source_name, source_name[15], inet_ntoa(p->ip),
- namestr(&dgram->dest_name),server_name));
+ nmb_namestr(&dgram->dest_name),server_name));
DEBUG(5,("process_local_master_announce: ttl=%d server type=%08x comment=%s\n",
ttl, servertype, comment));
@@ -440,7 +440,7 @@ void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct
DEBUG(3,("process_lm_host_announce: LM Announcement from %s<%02x> IP %s to \
%s for server %s.\n", source_name, source_name[15], inet_ntoa(p->ip),
- namestr(&dgram->dest_name),announce_name));
+ nmb_namestr(&dgram->dest_name),announce_name));
DEBUG(5,("process_lm_host_announce: os=(%d,%d) ttl=%d server type=%08x comment=%s\n",
osmajor, osminor, ttl, servertype,comment));
@@ -552,7 +552,7 @@ static void send_backup_list_response(struct subnet_record *subrec,
bzero(outbuf,sizeof(outbuf));
DEBUG(3,("send_backup_list_response: sending backup list for workgroup %s to %s IP %s\n",
- work->work_group, namestr(send_to_name), inet_ntoa(sendto_ip)));
+ work->work_group, nmb_namestr(send_to_name), inet_ntoa(sendto_ip)));
p = outbuf;
@@ -632,8 +632,8 @@ void process_get_backup_list_request(struct subnet_record *subrec,
char *workgroup_name = dgram->dest_name.name;
DEBUG(3,("process_get_backup_list_request: request from %s IP %s to %s.\n",
- namestr(&dgram->source_name), inet_ntoa(p->ip),
- namestr(&dgram->dest_name)));
+ nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
+ nmb_namestr(&dgram->dest_name)));
/* We have to be a master browser, or a domain master browser
for the requested workgroup. That means it must be our
@@ -707,7 +707,7 @@ void process_reset_browser(struct subnet_record *subrec,
DEBUG(1,("process_reset_browser: received diagnostic browser reset \
request from %s IP %s state=0x%X\n",
- namestr(&dgram->source_name), inet_ntoa(p->ip), state));
+ nmb_namestr(&dgram->source_name), inet_ntoa(p->ip), state));
/* Stop being a local master browser on all our broadcast subnets. */
if (state & 0x1)
@@ -758,8 +758,8 @@ void process_announce_request(struct subnet_record *subrec, struct packet_struct
char *workgroup_name = dgram->dest_name.name;
DEBUG(3,("process_announce_request: Announce request from %s IP %s to %s.\n",
- namestr(&dgram->source_name), inet_ntoa(p->ip),
- namestr(&dgram->dest_name)));
+ nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
+ nmb_namestr(&dgram->dest_name)));
/* We only send announcement requests on our workgroup. */
if(strequal(workgroup_name, global_myworkgroup) == False)
@@ -794,8 +794,8 @@ void process_lm_announce_request(struct subnet_record *subrec, struct packet_str
char *workgroup_name = dgram->dest_name.name;
DEBUG(3,("process_lm_announce_request: Announce request from %s IP %s to %s.\n",
- namestr(&dgram->source_name), inet_ntoa(p->ip),
- namestr(&dgram->dest_name)));
+ nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
+ nmb_namestr(&dgram->dest_name)));
/* We only send announcement requests on our workgroup. */
if(strequal(workgroup_name, global_myworkgroup) == False)
diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c
index 97d223b291..dd5a23e0b0 100644
--- a/source3/nmbd/nmbd_incomingrequests.c
+++ b/source3/nmbd/nmbd_incomingrequests.c
@@ -81,7 +81,7 @@ void process_name_release_request(struct subnet_record *subrec,
*/
DEBUG(0,("process_name_release_request: unicast name release request \
received for name %s from IP %s on subnet %s. Error - should be sent to WINS server\n",
- namestr(question), inet_ntoa(owner_ip), subrec->subnet_name));
+ nmb_namestr(question), inet_ntoa(owner_ip), subrec->subnet_name));
send_name_release_response(FMT_ERR, p);
return;
@@ -89,7 +89,7 @@ received for name %s from IP %s on subnet %s. Error - should be sent to WINS ser
DEBUG(3,("process_name_release_request: Name release on name %s, \
subnet %s from owner IP %s\n",
- namestr(&nmb->question.question_name),
+ nmb_namestr(&nmb->question.question_name),
subrec->subnet_name, inet_ntoa(owner_ip)));
/* If someone is releasing a broadcast group name, just ignore it. */
@@ -107,7 +107,7 @@ subnet %s from owner IP %s\n",
{
DEBUG(6,("process_name_release_request: FTP OnNet bug workaround. Ignoring \
group release name %s from IP %s on subnet %s with no group bit set.\n",
- namestr(question), inet_ntoa(owner_ip), subrec->subnet_name ));
+ nmb_namestr(question), inet_ntoa(owner_ip), subrec->subnet_name ));
return;
}
@@ -121,7 +121,7 @@ group release name %s from IP %s on subnet %s with no group bit set.\n",
rcode = ACT_ERR;
DEBUG(0, ("process_name_release_request: Attempt to release name %s from IP %s \
on subnet %s being rejected as it is one of our names.\n",
- namestr(&nmb->question.question_name), inet_ntoa(owner_ip), subrec->subnet_name));
+ nmb_namestr(&nmb->question.question_name), inet_ntoa(owner_ip), subrec->subnet_name));
}
if(rcode == 0)
@@ -177,7 +177,7 @@ void process_name_refresh_request(struct subnet_record *subrec,
*/
DEBUG(0,("process_name_refresh_request: unicast name registration request \
received for name %s from IP %s on subnet %s. Error - should be sent to WINS server\n",
- namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+ nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
send_name_registration_response(FMT_ERR, 0, p);
return;
@@ -187,7 +187,7 @@ received for name %s from IP %s on subnet %s. Error - should be sent to WINS ser
refreshes. */
DEBUG(3,("process_name_refresh_request: Name refresh for name %s \
-IP %s on subnet %s\n", namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+IP %s on subnet %s\n", nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
}
@@ -220,14 +220,14 @@ void process_name_registration_request(struct subnet_record *subrec,
*/
DEBUG(0,("process_name_registration_request: unicast name registration request \
received for name %s from IP %s on subnet %s. Error - should be sent to WINS server\n",
- namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+ nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
send_name_registration_response(FMT_ERR, 0, p);
return;
}
DEBUG(3,("process_name_registration_request: Name registration for name %s \
-IP %s on subnet %s\n", namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+IP %s on subnet %s\n", nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
/* See if the name already exists. */
namerec = find_name_on_subnet(subrec, question, FIND_ANY_NAME);
@@ -266,7 +266,7 @@ IP %s on subnet %s\n", namestr(question), inet_ntoa(from_ip), subrec->subnet_nam
update_name_ttl(namerec, ttl);
DEBUG(3,("process_name_registration_request: Updated name record %s \
-with IP %s on subnet %s\n",namestr(&namerec->name),inet_ntoa(from_ip), subrec->subnet_name));
+with IP %s on subnet %s\n",nmb_namestr(&namerec->name),inet_ntoa(from_ip), subrec->subnet_name));
return;
}
}
@@ -328,14 +328,14 @@ void process_node_status_request(struct subnet_record *subrec, struct packet_str
struct name_record *namerec;
DEBUG(3,("process_node_status_request: status request for name %s from IP %s on \
-subnet %s.\n", namestr(&nmb->question.question_name), inet_ntoa(p->ip),
+subnet %s.\n", nmb_namestr(&nmb->question.question_name), inet_ntoa(p->ip),
subrec->subnet_name));
if((namerec = find_name_on_subnet(subrec, &nmb->question.question_name,
FIND_SELF_NAME)) == 0)
{
DEBUG(1,("process_node_status_request: status request for name %s from IP %s on \
-subnet %s - name not found.\n", namestr(&nmb->question.question_name),
+subnet %s - name not found.\n", nmb_namestr(&nmb->question.question_name),
inet_ntoa(p->ip), subrec->subnet_name));
return;
@@ -462,7 +462,7 @@ void process_name_query_request(struct subnet_record *subrec, struct packet_stru
int i;
DEBUG(3,("process_name_query_request: Name query from %s on subnet %s for name %s\n",
- inet_ntoa(p->ip), subrec->subnet_name, namestr(question)));
+ inet_ntoa(p->ip), subrec->subnet_name, nmb_namestr(question)));
/* Look up the name in the cache - if the request is a broadcast request that
came from a subnet we don't know about then search all the broadcast subnets
@@ -479,7 +479,7 @@ void process_name_query_request(struct subnet_record *subrec, struct packet_stru
&& ( (namerec->data.death_time != PERMANENT_TTL)
&& (namerec->data.death_time < p->timestamp) ) )
{
- DEBUG(5,("process_name_query_request: expired name %s\n", namestr(&namerec->name)));
+ DEBUG(5,("process_name_query_request: expired name %s\n", nmb_namestr(&namerec->name)));
namerec = NULL;
}
@@ -526,7 +526,7 @@ void process_name_query_request(struct subnet_record *subrec, struct packet_stru
{
DEBUG(5,("process_name_query_request: name %s is a WINS proxy name and is also \
on the same subnet (%s) as the requestor. Not replying.\n",
- namestr(&namerec->name), subrec->subnet_name ));
+ nmb_namestr(&namerec->name), subrec->subnet_name ));
return;
}
}
diff --git a/source3/nmbd/nmbd_logonnames.c b/source3/nmbd/nmbd_logonnames.c
index 4486fb2840..471a64377d 100644
--- a/source3/nmbd/nmbd_logonnames.c
+++ b/source3/nmbd/nmbd_logonnames.c
@@ -68,7 +68,7 @@ in workgroup %s on subnet %s\n",
DEBUG(0,("become_logon_server_fail: Failed to become a domain master for \
workgroup %s on subnet %s. Couldn't register name %s.\n",
- work->work_group, subrec->subnet_name, namestr(fail_name)));
+ work->work_group, subrec->subnet_name, nmb_namestr(fail_name)));
}
diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c
index 4a4e102786..64cb8ea9e9 100644
--- a/source3/nmbd/nmbd_mynames.c
+++ b/source3/nmbd/nmbd_mynames.c
@@ -40,7 +40,7 @@ static void my_name_register_failed(struct subnet_record *subrec,
struct response_record *rrec, struct nmb_name *nmbname)
{
DEBUG(0,("my_name_register_failed: Failed to register my name %s on subnet %s.\n",
- namestr(nmbname), subrec->subnet_name));
+ nmb_namestr(nmbname), subrec->subnet_name));
}
/****************************************************************************
diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c
index f9b2e3da9a..1493c87f8a 100644
--- a/source3/nmbd/nmbd_namelistdb.c
+++ b/source3/nmbd/nmbd_namelistdb.c
@@ -125,16 +125,16 @@ struct name_record *find_name_on_subnet( struct subnet_record *subrec,
{
DEBUG( 9,
( "find_name_on_subnet: on subnet %s - self name %s NOT FOUND\n",
- subrec->subnet_name, namestr(nmbname) ) );
+ subrec->subnet_name, nmb_namestr(nmbname) ) );
return( NULL );
}
DEBUG( 9, ("find_name_on_subnet: on subnet %s - found name %s source=%d\n",
- subrec->subnet_name, namestr(nmbname), name_ret->data.source) );
+ subrec->subnet_name, nmb_namestr(nmbname), name_ret->data.source) );
return( name_ret );
}
DEBUG( 9,
( "find_name_on_subnet: on subnet %s - name %s NOT FOUND\n",
- subrec->subnet_name, namestr(nmbname) ) );
+ subrec->subnet_name, nmb_namestr(nmbname) ) );
return( NULL );
} /* find_name_on_subnet */
@@ -243,7 +243,7 @@ struct name_record *add_name_to_subnet( struct subnet_record *subrec,
DEBUG( 3, ( "add_name_to_subnet: Added netbios name %s with first IP %s \
ttl=%d nb_flags=%2x to subnet %s\n",
- namestr( &namerec->name ),
+ nmb_namestr( &namerec->name ),
inet_ntoa( *iplist ),
ttl,
(unsigned int)nb_flags,
@@ -292,7 +292,7 @@ void standard_fail_register( struct subnet_record *subrec,
DEBUG( 0, ( "standard_fail_register: Failed to register/refresh name %s \
on subnet %s\n",
- namestr(nmbname), subrec->subnet_name) );
+ nmb_namestr(nmbname), subrec->subnet_name) );
/* Remove the name from the subnet. */
if( namerec )
@@ -399,7 +399,7 @@ void standard_success_release( struct subnet_record *subrec,
{
DEBUG( 0, ( "standard_success_release: Name release for name %s IP %s \
on subnet %s. Name was not found on subnet.\n",
- namestr(nmbname),
+ nmb_namestr(nmbname),
inet_ntoa(released_ip),
subrec->subnet_name) );
return;
@@ -413,7 +413,7 @@ on subnet %s. Name was not found on subnet.\n",
if( namerec->data.num_ips == orig_num )
DEBUG( 0, ( "standard_success_release: Name release for name %s IP %s \
on subnet %s. This ip is not known for this name.\n",
- namestr(nmbname),
+ nmb_namestr(nmbname),
inet_ntoa(released_ip),
subrec->subnet_name ) );
}
@@ -443,13 +443,13 @@ void expire_names_on_subnet(struct subnet_record *subrec, time_t t)
{
DEBUG( 3, ( "expire_names_on_subnet: Subnet %s not expiring SELF \
name %s\n",
- subrec->subnet_name, namestr(&namerec->name) ) );
+ subrec->subnet_name, nmb_namestr(&namerec->name) ) );
namerec->data.death_time += 300;
namerec->subnet->namelist_changed = True;
continue;
}
DEBUG(3,("expire_names_on_subnet: Subnet %s - removing expired name %s\n",
- subrec->subnet_name, namestr(&namerec->name)));
+ subrec->subnet_name, nmb_namestr(&namerec->name)));
remove_name_from_namelist( subrec, namerec );
}
@@ -541,7 +541,7 @@ static void dump_subnet_namelist( struct subnet_record *subrec, FILE *fp)
namerec;
namerec = (struct name_record *)ubi_trNext( namerec ) )
{
- fprintf(fp,"\tName = %s\t", namestr(&namerec->name));
+ fprintf(fp,"\tName = %s\t", nmb_namestr(&namerec->name));
switch(namerec->data.source)
{
case LMHOSTS_NAME:
diff --git a/source3/nmbd/nmbd_namequery.c b/source3/nmbd/nmbd_namequery.c
index 7c2b0d4d76..fae045882f 100644
--- a/source3/nmbd/nmbd_namequery.c
+++ b/source3/nmbd/nmbd_namequery.c
@@ -56,7 +56,7 @@ static void query_name_response(struct subnet_record *subrec,
the response but don't send out any more query requests. */
DEBUG(5,("query_name_response: WACK from WINS server %s in querying \
-name %s on subnet %s.\n", inet_ntoa(p->ip), namestr(question_name), subrec->subnet_name));
+name %s on subnet %s.\n", inet_ntoa(p->ip), nmb_namestr(question_name), subrec->subnet_name));
rrec->repeat_count = 0;
/* How long we should wait for. */
@@ -70,7 +70,7 @@ name %s on subnet %s.\n", inet_ntoa(p->ip), namestr(question_name), subrec->subn
DEBUG(5,("query_name_response: On subnet %s - negative response \
from IP %s for name %s. Error code was %d.\n", subrec->subnet_name, inet_ntoa(p->ip),
- namestr(question_name), nmb->header.rcode));
+ nmb_namestr(question_name), nmb->header.rcode));
}
else
{
@@ -79,7 +79,7 @@ from IP %s for name %s. Error code was %d.\n", subrec->subnet_name, inet_ntoa(p-
putip((char *)&answer_ip,&nmb->answers->rdata[2]);
DEBUG(5,("query_name_response: On subnet %s - positive response from IP %s \
for name %s. IP of that name is %s\n", subrec->subnet_name, inet_ntoa(p->ip),
- namestr(question_name), inet_ntoa(answer_ip)));
+ nmb_namestr(question_name), inet_ntoa(answer_ip)));
/* Interestingly, we could add these names to our namelists, and
change nmbd to a model that checked its own name cache first,
@@ -91,7 +91,7 @@ for name %s. IP of that name is %s\n", subrec->subnet_name, inet_ntoa(p->ip),
{
DEBUG(0,("query_name_response: Multiple (%d) responses received for a query on \
subnet %s for name %s. This response was from IP %s\n",
- rrec->num_msgs, subrec->subnet_name, namestr(question_name),
+ rrec->num_msgs, subrec->subnet_name, nmb_namestr(question_name),
inet_ntoa(p->ip) ));
/* We have already called the success or fail function, so we
@@ -131,7 +131,7 @@ static void query_name_timeout_response(struct subnet_record *subrec,
if(failed)
{
DEBUG(5,("query_name_timeout_response: No response to querying name %s on subnet %s.\n",
- namestr(question_name), subrec->subnet_name));
+ nmb_namestr(question_name), subrec->subnet_name));
if(rrec->fail_fn)
(*rrec->fail_fn)(subrec, rrec, question_name, 0);
@@ -204,7 +204,7 @@ BOOL query_name(struct subnet_record *subrec, char *name, int type,
if(rrec.rdlength > MAX_DGRAM_SIZE)
{
DEBUG(0,("query_name: nmbd internal error - there are %d ip addresses for name %s.\n",
- namerec->data.num_ips, namestr(&nmbname) ));
+ namerec->data.num_ips, nmb_namestr(&nmbname) ));
return False;
}
@@ -229,7 +229,7 @@ BOOL query_name(struct subnet_record *subrec, char *name, int type,
&nmbname) == NULL)
{
DEBUG(0,("query_name: Failed to send packet trying to query name %s\n",
- namestr(&nmbname)));
+ nmb_namestr(&nmbname)));
return True;
}
return False;
@@ -258,7 +258,7 @@ BOOL query_name_from_wins_server(struct in_addr ip_to,
&nmbname) == NULL)
{
DEBUG(0,("query_name_from_wins_server: Failed to send packet trying to query name %s\n",
- namestr(&nmbname)));
+ nmb_namestr(&nmbname)));
return True;
}
return False;
diff --git a/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c
index 05b549d30f..069e262987 100644
--- a/source3/nmbd/nmbd_nameregister.c
+++ b/source3/nmbd/nmbd_nameregister.c
@@ -57,7 +57,7 @@ static void register_name_response(struct subnet_record *subrec,
if(!nmb_name_equal(question_name, answer_name))
{
DEBUG(0,("register_name_response: Answer name %s differs from question \
-name %s.\n", namestr(answer_name), namestr(question_name)));
+name %s.\n", nmb_namestr(answer_name), nmb_namestr(question_name)));
return;
}
@@ -80,7 +80,7 @@ name %s.\n", namestr(answer_name), namestr(question_name)));
rrec->num_msgs--;
DEBUG(5,("register_name_response: Ignoring broadcast response to \
-registration of name %s due to old Samba server bug.\n", namestr(answer_name)));
+registration of name %s due to old Samba server bug.\n", nmb_namestr(answer_name)));
return;
}
#endif /* OLD_SAMBA_SERVER_HACK */
@@ -88,7 +88,7 @@ registration of name %s due to old Samba server bug.\n", namestr(answer_name)));
/* Someone else has the name. Log the problem. */
DEBUG(1,("register_name_response: Failed to register \
name %s on subnet %s via broadcast. Error code was %d. Reject came from IP %s\n",
- namestr(answer_name),
+ nmb_namestr(answer_name),
subrec->subnet_name, nmb->header.rcode, inet_ntoa(p->ip)));
success = False;
}
@@ -102,7 +102,7 @@ name %s on subnet %s via broadcast. Error code was %d. Reject came from IP %s\n"
DEBUG(0,("register_name_response: server at IP %s rejected our \
name registration of %s with error code %d.\n", inet_ntoa(p->ip),
- namestr(answer_name), nmb->header.rcode));
+ nmb_namestr(answer_name), nmb->header.rcode));
}
else if(nmb->header.opcode == NMB_WACK_OPCODE)
@@ -111,7 +111,7 @@ name registration of %s with error code %d.\n", inet_ntoa(p->ip),
the response but don't send out any more register requests. */
DEBUG(5,("register_name_response: WACK from WINS server %s in registering \
-name %s on subnet %s.\n", inet_ntoa(p->ip), namestr(answer_name), subrec->subnet_name));
+name %s on subnet %s.\n", inet_ntoa(p->ip), nmb_namestr(answer_name), subrec->subnet_name));
rrec->repeat_count = 0;
/* How long we should wait for. */
@@ -130,7 +130,7 @@ name %s on subnet %s.\n", inet_ntoa(p->ip), namestr(answer_name), subrec->subnet
}
DEBUG(5,("register_name_response: %s in registering name %s on subnet %s.\n",
- success ? "success" : "failure", namestr(answer_name), subrec->subnet_name));
+ success ? "success" : "failure", nmb_namestr(answer_name), subrec->subnet_name));
if(success)
{
@@ -213,7 +213,7 @@ responding.\n", inet_ntoa(rrec->packet->ip)));
}
DEBUG(5,("register_name_timeout_response: %s in registering name %s on subnet %s.\n",
- success ? "success" : "failure", namestr(question_name), subrec->subnet_name));
+ success ? "success" : "failure", nmb_namestr(question_name), subrec->subnet_name));
if(success)
{
/* Enter the registered name into the subnet name database before calling
@@ -302,7 +302,7 @@ static BOOL multihomed_register_name( struct nmb_name *nmbname, uint16 nb_flags,
ip_list[i]) == NULL)
{
DEBUG(0,("multihomed_register_name: Failed to send packet trying to \
-register name %s IP %s\n", namestr(nmbname), inet_ntoa(ip_list[i]) ));
+register name %s IP %s\n", nmb_namestr(nmbname), inet_ntoa(ip_list[i]) ));
free((char *)ip_list);
return True;
@@ -352,7 +352,7 @@ BOOL register_name(struct subnet_record *subrec,
nb_flags) == NULL)
{
DEBUG(0,("register_name: Failed to send packet trying to register name %s\n",
- namestr(&nmbname)));
+ nmb_namestr(&nmbname)));
return True;
}
return False;
@@ -387,7 +387,7 @@ BOOL refresh_name(struct subnet_record *subrec, struct name_record *namerec,
namerec->data.ip[i]) == NULL)
{
DEBUG(0,("refresh_name: Failed to send packet trying to refresh name %s\n",
- namestr(&namerec->name)));
+ nmb_namestr(&namerec->name)));
return True;
}
}
diff --git a/source3/nmbd/nmbd_namerelease.c b/source3/nmbd/nmbd_namerelease.c
index 558ab6ab16..1cdc78e6a0 100644
--- a/source3/nmbd/nmbd_namerelease.c
+++ b/source3/nmbd/nmbd_namerelease.c
@@ -53,7 +53,7 @@ static void release_name_response(struct subnet_record *subrec,
if(!nmb_name_equal(question_name, answer_name))
{
DEBUG(0,("release_name_response: Answer name %s differs from question \
-name %s.\n", namestr(answer_name), namestr(question_name)));
+name %s.\n", nmb_namestr(answer_name), nmb_namestr(question_name)));
return;
}
@@ -61,7 +61,7 @@ name %s.\n", namestr(answer_name), namestr(question_name)));
{
/* Someone sent a response. This shouldn't happen/ */
DEBUG(1,("release_name_response: A response for releasing name %s was received on a \
-broadcast subnet %s. This should not happen !\n", namestr(answer_name), subrec->subnet_name));
+broadcast subnet %s. This should not happen !\n", nmb_namestr(answer_name), subrec->subnet_name));
return;
}
else
@@ -74,7 +74,7 @@ broadcast subnet %s. This should not happen !\n", namestr(answer_name), subrec->
DEBUG(0,("release_name_response: WINS server at IP %s rejected our \
name release of name %s with error code %d.\n", inet_ntoa(p->ip),
- namestr(answer_name), nmb->header.rcode));
+ nmb_namestr(answer_name), nmb->header.rcode));
}
else if(nmb->header.opcode == NMB_WACK_OPCODE)
@@ -83,7 +83,7 @@ name release of name %s with error code %d.\n", inet_ntoa(p->ip),
the response but don't send out any more release requests. */
DEBUG(5,("release_name_response: WACK from WINS server %s in releasing \
-name %s on subnet %s.\n", inet_ntoa(p->ip), namestr(answer_name), subrec->subnet_name));
+name %s on subnet %s.\n", inet_ntoa(p->ip), nmb_namestr(answer_name), subrec->subnet_name));
rrec->repeat_count = 0;
/* How long we should wait for. */
@@ -94,7 +94,7 @@ name %s on subnet %s.\n", inet_ntoa(p->ip), namestr(answer_name), subrec->subnet
}
DEBUG(5,("release_name_response: %s in releasing name %s on subnet %s.\n",
- success ? "success" : "failure", namestr(answer_name), subrec->subnet_name));
+ success ? "success" : "failure", nmb_namestr(answer_name), subrec->subnet_name));
if(success)
{
@@ -171,7 +171,7 @@ responding.\n", inet_ntoa(rrec->packet->ip)));
}
DEBUG(5,("release_name_timeout_response: %s in releasing name %s on subnet %s.\n",
- success ? "success" : "failure", namestr(question_name), subrec->subnet_name));
+ success ? "success" : "failure", nmb_namestr(question_name), subrec->subnet_name));
if(success && rrec->success_fn)
{
@@ -204,7 +204,7 @@ BOOL release_name(struct subnet_record *subrec, struct name_record *namerec,
if((namerec->data.source != SELF_NAME) || !NAME_IS_ACTIVE(namerec))
{
DEBUG(0,("release_name: Cannot release name %s from subnet %s. Source was %d \n",
- namestr(&namerec->name), subrec->subnet_name, namerec->data.source));
+ nmb_namestr(&namerec->name), subrec->subnet_name, namerec->data.source));
return True;
}
@@ -230,7 +230,7 @@ BOOL release_name(struct subnet_record *subrec, struct name_record *namerec,
namerec->data.ip[i]) == NULL)
{
DEBUG(0,("release_name: Failed to send packet trying to release name %s IP %s\n",
- namestr(&namerec->name), inet_ntoa(namerec->data.ip[i]) ));
+ nmb_namestr(&namerec->name), inet_ntoa(namerec->data.ip[i]) ));
return True;
}
}
diff --git a/source3/nmbd/nmbd_nodestatus.c b/source3/nmbd/nmbd_nodestatus.c
index 196c0f0ba7..d8af09b398 100644
--- a/source3/nmbd/nmbd_nodestatus.c
+++ b/source3/nmbd/nmbd_nodestatus.c
@@ -44,12 +44,12 @@ static void node_status_response(struct subnet_record *subrec,
if(!nmb_name_equal(question_name, answer_name))
{
DEBUG(0,("node_status_response: Answer name %s differs from question \
-name %s.\n", namestr(answer_name), namestr(question_name)));
+name %s.\n", nmb_namestr(answer_name), nmb_namestr(question_name)));
return;
}
DEBUG(5,("node_status_response: response from name %s on subnet %s.\n",
- namestr(answer_name), subrec->subnet_name));
+ nmb_namestr(answer_name), subrec->subnet_name));
/* Just send the whole answer resource record for the success function
to parse. */
@@ -70,7 +70,7 @@ static void node_status_timeout_response(struct subnet_record *subrec,
struct nmb_name *question_name = &sent_nmb->question.question_name;
DEBUG(5,("node_status_timeout_response: failed to get node status from name %s on subnet %s\n",
- namestr(question_name), subrec->subnet_name));
+ nmb_namestr(question_name), subrec->subnet_name));
if( rrec->fail_fn)
(*rrec->fail_fn)(subrec, rrec);
@@ -92,7 +92,7 @@ BOOL node_status(struct subnet_record *subrec, struct nmb_name *nmbname,
success_fn, fail_fn, userdata, nmbname, send_ip)==NULL)
{
DEBUG(0,("node_status: Failed to send packet trying to get node status for \
-name %s, IP address %s\n", namestr(nmbname), inet_ntoa(send_ip)));
+name %s, IP address %s\n", nmb_namestr(nmbname), inet_ntoa(send_ip)));
return True;
}
return False;
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index d7049a270f..ce785b40a4 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -279,7 +279,7 @@ static BOOL initiate_name_query_packet( struct packet_struct *packet)
nmb->header.nm_flags.recursion_desired = True;
DEBUG(4,("initiate_name_query_packet: sending query for name %s (bcast=%s) to IP %s\n",
- namestr(&nmb->question.question_name),
+ nmb_namestr(&nmb->question.question_name),
BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet );
@@ -301,7 +301,7 @@ static BOOL initiate_name_query_packet_from_wins_server( struct packet_struct *p
nmb->header.nm_flags.recursion_desired = False;
DEBUG(4,("initiate_name_query_packet_from_wins_server: sending query for name %s (bcast=%s) to IP %s\n",
- namestr(&nmb->question.question_name),
+ nmb_namestr(&nmb->question.question_name),
BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet );
@@ -325,7 +325,7 @@ static BOOL initiate_name_register_packet( struct packet_struct *packet,
return False;
DEBUG(4,("initiate_name_register_packet: sending registration for name %s (bcast=%s) to IP %s\n",
- namestr(&nmb->additional->rr_name),
+ nmb_namestr(&nmb->additional->rr_name),
BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet );
@@ -353,7 +353,7 @@ static BOOL initiate_multihomed_name_register_packet( struct packet_struct *pack
DEBUG(4,("initiate_multihomed_name_register_packet: sending registration \
for name %s IP %s (bcast=%s) to IP %s\n",
- namestr(&nmb->additional->rr_name), inet_ntoa(*register_ip),
+ nmb_namestr(&nmb->additional->rr_name), inet_ntoa(*register_ip),
BOOLSTR(nmb->header.nm_flags.bcast), second_ip_buf ));
return send_netbios_packet( packet );
@@ -377,7 +377,7 @@ static BOOL initiate_name_refresh_packet( struct packet_struct *packet,
return False;
DEBUG(4,("initiate_name_refresh_packet: sending refresh for name %s (bcast=%s) to IP %s\n",
- namestr(&nmb->additional->rr_name),
+ nmb_namestr(&nmb->additional->rr_name),
BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet );
@@ -401,7 +401,7 @@ static BOOL initiate_name_release_packet( struct packet_struct *packet,
return False;
DEBUG(4,("initiate_name_release_packet: sending release for name %s (bcast=%s) to IP %s\n",
- namestr(&nmb->additional->rr_name),
+ nmb_namestr(&nmb->additional->rr_name),
BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet );
@@ -423,7 +423,7 @@ static BOOL initiate_node_status_packet( struct packet_struct *packet )
nmb->question.question_type = QUESTION_TYPE_NB_STATUS;
DEBUG(4,("initiate_node_status_packet: sending node status request for name %s to IP %s\n",
- namestr(&nmb->question.question_name),
+ nmb_namestr(&nmb->question.question_name),
inet_ntoa(packet->ip)));
return send_netbios_packet( packet );
@@ -898,7 +898,7 @@ void reply_netbios_packet(struct packet_struct *orig_packet,
default:
{
DEBUG(0,("reply_netbios_packet: Unknown packet type: %s %s to ip %s\n",
- packet_type, namestr(&orig_nmb->question.question_name),
+ packet_type, nmb_namestr(&orig_nmb->question.question_name),
inet_ntoa(packet.ip)));
return;
@@ -907,7 +907,7 @@ void reply_netbios_packet(struct packet_struct *orig_packet,
DEBUG(4,("reply_netbios_packet: sending a reply of packet type: %s %s to ip %s \
for id %hu\n",
- packet_type, namestr(&orig_nmb->question.question_name),
+ packet_type, nmb_namestr(&orig_nmb->question.question_name),
inet_ntoa(packet.ip), orig_nmb->header.name_trn_id));
nmb->header.name_trn_id = orig_nmb->header.name_trn_id;
@@ -1033,7 +1033,7 @@ mismatch with our scope (%s).\n", inet_ntoa(p->ip), dgram->dest_name.scope, scop
if (is_myname(dgram->source_name.name))
{
DEBUG(0,("process_browse_packet: Discarding datagram from IP %s. Source name \
-%s is one of our names !\n", inet_ntoa(p->ip), namestr(&dgram->source_name)));
+%s is one of our names !\n", inet_ntoa(p->ip), nmb_namestr(&dgram->source_name)));
return;
}
@@ -1090,7 +1090,7 @@ mismatch with our scope (%s).\n", inet_ntoa(p->ip), dgram->dest_name.scope, scop
/* We never send ANN_GetBackupListReq so we
should never get these. */
DEBUG(0,("process_browse_packet: Discarding GetBackupListResponse \
-packet from %s IP %s\n", namestr(&dgram->source_name), inet_ntoa(p->ip)));
+packet from %s IP %s\n", nmb_namestr(&dgram->source_name), inet_ntoa(p->ip)));
break;
}
case ANN_ResetBrowserState:
@@ -1117,8 +1117,8 @@ packet from %s IP %s\n", namestr(&dgram->source_name), inet_ntoa(p->ip)));
debug_browse_data(buf, len);
DEBUG(10,("process_browse_packet: On subnet %s ignoring browse packet \
command ANN_BecomeBackup from %s IP %s to %s\n",
- subrec->subnet_name, namestr(&dgram->source_name),
- inet_ntoa(p->ip), namestr(&dgram->dest_name)));
+ subrec->subnet_name, nmb_namestr(&dgram->source_name),
+ inet_ntoa(p->ip), nmb_namestr(&dgram->dest_name)));
break;
}
default:
@@ -1126,8 +1126,8 @@ command ANN_BecomeBackup from %s IP %s to %s\n",
debug_browse_data(buf, len);
DEBUG(0,("process_browse_packet: On subnet %s ignoring browse packet \
command code %d from %s IP %s to %s\n",
- subrec->subnet_name, command, namestr(&dgram->source_name),
- inet_ntoa(p->ip), namestr(&dgram->dest_name)));
+ subrec->subnet_name, command, nmb_namestr(&dgram->source_name),
+ inet_ntoa(p->ip), nmb_namestr(&dgram->dest_name)));
}
}
}
@@ -1154,7 +1154,7 @@ mismatch with our scope (%s).\n", inet_ntoa(p->ip), dgram->dest_name.scope, scop
if (is_myname(dgram->source_name.name))
{
DEBUG(0,("process_lanman_packet: Discarding datagram from IP %s. Source name \
-%s is one of our names !\n", inet_ntoa(p->ip), namestr(&dgram->source_name)));
+%s is one of our names !\n", inet_ntoa(p->ip), nmb_namestr(&dgram->source_name)));
return;
}
@@ -1175,8 +1175,8 @@ mismatch with our scope (%s).\n", inet_ntoa(p->ip), dgram->dest_name.scope, scop
{
DEBUG(0,("process_lanman_packet: On subnet %s ignoring browse packet \
command code %d from %s IP %s to %s\n",
- subrec->subnet_name, command, namestr(&dgram->source_name),
- inet_ntoa(p->ip), namestr(&dgram->dest_name)));
+ subrec->subnet_name, command, nmb_namestr(&dgram->source_name),
+ inet_ntoa(p->ip), nmb_namestr(&dgram->dest_name)));
}
}
}
@@ -1218,7 +1218,7 @@ static void process_dgram(struct packet_struct *p)
if (!listening(p,&dgram->dest_name))
{
DEBUG(5,("process_dgram: ignoring dgram packet sent to name %s from %s\n",
- namestr(&dgram->dest_name), inet_ntoa(p->ip)));
+ nmb_namestr(&dgram->dest_name), inet_ntoa(p->ip)));
return;
}
@@ -1229,7 +1229,7 @@ static void process_dgram(struct packet_struct *p)
/* Don't process error packets etc yet */
DEBUG(5,("process_dgram: ignoring dgram packet sent to name %s from IP %s as it is \
an error packet of type %x\n",
- namestr(&dgram->dest_name), inet_ntoa(p->ip), dgram->header.msg_type));
+ nmb_namestr(&dgram->dest_name), inet_ntoa(p->ip), dgram->header.msg_type));
return;
}
@@ -1244,7 +1244,7 @@ static void process_dgram(struct packet_struct *p)
buf2 = smb_base(buf) + SVAL(buf,smb_vwv12);
DEBUG(4,("process_dgram: datagram from %s to %s IP %s for %s of type %d len=%d\n",
- namestr(&dgram->source_name),namestr(&dgram->dest_name),
+ nmb_namestr(&dgram->source_name),nmb_namestr(&dgram->dest_name),
inet_ntoa(p->ip), smb_buf(buf),CVAL(buf2,0),len));
@@ -1940,8 +1940,8 @@ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len,
p.packet_type = DGRAM_PACKET;
DEBUG(4,("send_mailslot: Sending to mailslot %s from %s IP %s ", mailslot,
- namestr(&dgram->source_name), inet_ntoa(src_ip)));
- DEBUG(4,("to %s IP %s\n", namestr(&dgram->dest_name), inet_ntoa(dest_ip)));
+ nmb_namestr(&dgram->source_name), inet_ntoa(src_ip)));
+ DEBUG(4,("to %s IP %s\n", nmb_namestr(&dgram->dest_name), inet_ntoa(dest_ip)));
debug_browse_data(buf, len);
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index edc930c205..527efa9dd8 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/nmbd/nmbd_subnetdb.c
@@ -96,7 +96,7 @@ static int namelist_entry_compare( ubi_trItemPtr Item, ubi_trNodePtr Node )
Debug1( "nmbd_subnetdb:namelist_entry_compare()\n" );
Debug1( "%d == memcmp( \"%s\", \"%s\", %d )\n",
memcmp( Item, &(NR->name), sizeof(struct nmb_name) ),
- namestr(Iname), namestr(&NR->name), sizeof(struct nmb_name) );
+ nmb_namestr(Iname), nmb_namestr(&NR->name), sizeof(struct nmb_name) );
}
return( memcmp( Item, &(NR->name), sizeof(struct nmb_name) ) );
diff --git a/source3/nmbd/nmbd_winsproxy.c b/source3/nmbd/nmbd_winsproxy.c
index 2084d3915a..43beb9acd8 100644
--- a/source3/nmbd/nmbd_winsproxy.c
+++ b/source3/nmbd/nmbd_winsproxy.c
@@ -55,7 +55,7 @@ static void wins_proxy_name_query_request_success( struct subnet_record *subrec,
if(num_ips == 0)
{
DEBUG(0,("wins_proxy_name_query_request_success: Invalid number of IP records (0) \
-returned for name %s.\n", namestr(nmbname) ));
+returned for name %s.\n", nmb_namestr(nmbname) ));
return;
}
@@ -104,7 +104,7 @@ returned for name %s.\n", namestr(nmbname) ));
DEBUG( 5, ( "wins_proxy_name_query_request_success: name %s is a WINS \
proxy name and is also on the same subnet (%s) as the requestor. \
Not replying.\n",
- namestr(&namerec->name),
+ nmb_namestr(&namerec->name),
orig_broadcast_subnet->subnet_name ) );
return;
}
@@ -130,7 +130,7 @@ static void wins_proxy_name_query_request_fail(struct subnet_record *subrec,
struct nmb_name *question_name, int fail_code)
{
DEBUG(4,("wins_proxy_name_query_request_fail: WINS server returned error code %d for lookup \
-of name %s.\n", fail_code, namestr(question_name) ));
+of name %s.\n", fail_code, nmb_namestr(question_name) ));
}
/****************************************************************************
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index 5dc350152f..0906715af4 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -402,12 +402,12 @@ void wins_process_name_refresh_request(struct subnet_record *subrec,
DEBUG(0,("wins_process_name_refresh_request: broadcast name refresh request \
received for name %s from IP %s on subnet %s. Error - should not be sent to WINS server\n",
- namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+ nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
return;
}
DEBUG(3,("wins_process_name_refresh_request: Name refresh for name %s \
-IP %s\n", namestr(question), inet_ntoa(from_ip) ));
+IP %s\n", nmb_namestr(question), inet_ntoa(from_ip) ));
/*
* See if the name already exists.
@@ -424,7 +424,7 @@ IP %s\n", namestr(question), inet_ntoa(from_ip) ));
if(namerec == NULL)
{
DEBUG(3,("wins_process_name_refresh_request: Name refresh for name %s and \
-the name does not exist. Treating as registration.\n", namestr(question) ));
+the name does not exist. Treating as registration.\n", nmb_namestr(question) ));
wins_process_name_registration_request(subrec,p);
return;
}
@@ -437,7 +437,7 @@ the name does not exist. Treating as registration.\n", namestr(question) ));
if((namerec != NULL) && ((group && !NAME_GROUP(namerec)) || (!group && NAME_GROUP(namerec))) )
{
DEBUG(3,("wins_process_name_refresh_request: Name %s group bit = %s \
-does not match group bit in WINS for this name.\n", namestr(question), group ? "True" : "False" ));
+does not match group bit in WINS for this name.\n", nmb_namestr(question), group ? "True" : "False" ));
send_wins_name_registration_response(RFS_ERR, 0, p);
return;
}
@@ -483,7 +483,7 @@ does not match group bit in WINS for this name.\n", namestr(question), group ? "
*/
DEBUG(3,("wins_process_name_refresh_request: Name refresh for name %s with IP %s and \
-is IP is not known to the name.\n", namestr(question), inet_ntoa(from_ip) ));
+is IP is not known to the name.\n", nmb_namestr(question), inet_ntoa(from_ip) ));
send_wins_name_registration_response(RFS_ERR, 0, p);
return;
}
@@ -510,7 +510,7 @@ static void wins_register_query_success(struct subnet_record *subrec,
memcpy((char *)&orig_reg_packet, userdata->data, sizeof(struct packet_struct *));
DEBUG(3,("wins_register_query_success: Original client at IP %s still wants the \
-name %s. Rejecting registration request.\n", inet_ntoa(ip), namestr(question_name) ));
+name %s. Rejecting registration request.\n", inet_ntoa(ip), nmb_namestr(question_name) ));
send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet);
@@ -563,7 +563,7 @@ static void wins_register_query_fail(struct subnet_record *subrec,
wins_process_name_registration_request(subrec, orig_reg_packet);
else
DEBUG(2,("wins_register_query_fail: The state of the WINS database changed between \
-querying for name %s in order to replace it and this reply.\n", namestr(question_name) ));
+querying for name %s in order to replace it and this reply.\n", nmb_namestr(question_name) ));
orig_reg_packet->locked = False;
free_packet(orig_reg_packet);
@@ -650,12 +650,12 @@ void wins_process_name_registration_request(struct subnet_record *subrec,
DEBUG(0,("wins_process_name_registration_request: broadcast name registration request \
received for name %s from IP %s on subnet %s. Error - should not be sent to WINS server\n",
- namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+ nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
return;
}
DEBUG(3,("wins_process_name_registration_request: %s name registration for name %s \
-IP %s\n", registering_group_name ? "Group" : "Unique", namestr(question), inet_ntoa(from_ip) ));
+IP %s\n", registering_group_name ? "Group" : "Unique", nmb_namestr(question), inet_ntoa(from_ip) ));
/*
* See if the name already exists.
@@ -674,7 +674,7 @@ IP %s\n", registering_group_name ? "Group" : "Unique", namestr(question), inet_n
|| (namerec->data.source == DNSFAIL_NAME) ) )
{
DEBUG(5,("wins_process_name_registration_request: Name (%s) in WINS was \
-a dns lookup - removing it.\n", namestr(question) ));
+a dns lookup - removing it.\n", nmb_namestr(question) ));
remove_name_from_namelist( subrec, namerec );
namerec = NULL;
}
@@ -688,7 +688,7 @@ a dns lookup - removing it.\n", namestr(question) ));
{
DEBUG( 3, ( "wins_process_name_registration_request: Attempt \
to register name %s. Name already exists in WINS with source type %d.\n",
- namestr(question), namerec->data.source ));
+ nmb_namestr(question), namerec->data.source ));
send_wins_name_registration_response(RFS_ERR, 0, p);
return;
}
@@ -715,7 +715,7 @@ to register name %s. Name already exists in WINS with source type %d.\n",
if(!registering_group_name && (question->name_type == 0x1d))
{
DEBUG(3,("wins_process_name_registration_request: Ignoring request \
-to register name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
+to register name %s from IP %s.", nmb_namestr(question), inet_ntoa(p->ip) ));
send_wins_name_registration_response(0, ttl, p);
return;
}
@@ -734,7 +734,7 @@ to register name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
*/
DEBUG(3,("wins_process_name_registration_request: Adding IP %s to group name %s.\n",
- inet_ntoa(from_ip), namestr(question) ));
+ inet_ntoa(from_ip), nmb_namestr(question) ));
/*
* Check the ip address is not already in the group.
*/
@@ -752,7 +752,7 @@ to register name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
*/
DEBUG(3,("wins_process_name_registration_request: Attempt to register name %s. Name \
-already exists in WINS as a GROUP name.\n", namestr(question) ));
+already exists in WINS as a GROUP name.\n", nmb_namestr(question) ));
send_wins_name_registration_response(RFS_ERR, 0, p);
return;
}
@@ -774,7 +774,7 @@ already exists in WINS as a GROUP name.\n", namestr(question) ));
if(!ismyip(from_ip))
{
DEBUG(3,("wins_process_name_registration_request: Attempt to register name %s. Name \
-is one of our (WINS server) names. Denying registration.\n", namestr(question) ));
+is one of our (WINS server) names. Denying registration.\n", nmb_namestr(question) ));
send_wins_name_registration_response(RFS_ERR, 0, p);
return;
}
@@ -903,7 +903,7 @@ static void wins_multihomed_register_query_success(struct subnet_record *subrec,
if( (namerec == NULL) || (namerec->data.source != REGISTER_NAME) )
{
DEBUG(3,("wins_multihomed_register_query_success: name %s is not in the correct state to add \
-a subsequent IP addess.\n", namestr(question_name) ));
+a subsequent IP addess.\n", nmb_namestr(question_name) ));
send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet);
orig_reg_packet->locked = False;
@@ -940,7 +940,7 @@ static void wins_multihomed_register_query_fail(struct subnet_record *subrec,
memcpy((char *)&orig_reg_packet, userdata->data, sizeof(struct packet_struct *));
DEBUG(3,("wins_multihomed_register_query_fail: Registering machine at IP %s failed to answer \
-query successfully for name %s.\n", inet_ntoa(orig_reg_packet->ip), namestr(question_name) ));
+query successfully for name %s.\n", inet_ntoa(orig_reg_packet->ip), nmb_namestr(question_name) ));
send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet);
orig_reg_packet->locked = False;
@@ -977,7 +977,7 @@ void wins_process_multihomed_name_registration_request( struct subnet_record *su
DEBUG(0,("wins_process_multihomed_name_registration_request: broadcast name registration request \
received for name %s from IP %s on subnet %s. Error - should not be sent to WINS server\n",
- namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+ nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
return;
}
@@ -989,12 +989,12 @@ received for name %s from IP %s on subnet %s. Error - should not be sent to WINS
{
DEBUG(0,("wins_process_multihomed_name_registration_request: group name registration request \
received for name %s from IP %s on subnet %s. Errror - group names should not be multihomed.\n",
- namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+ nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
return;
}
DEBUG(3,("wins_process_multihomed_name_registration_request: name registration for name %s \
-IP %s\n", namestr(question), inet_ntoa(from_ip) ));
+IP %s\n", nmb_namestr(question), inet_ntoa(from_ip) ));
/*
* Deal with policy regarding 0x1d names.
@@ -1003,7 +1003,7 @@ IP %s\n", namestr(question), inet_ntoa(from_ip) ));
if(question->name_type == 0x1d)
{
DEBUG(3,("wins_process_multihomed_name_registration_request: Ignoring request \
-to register name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
+to register name %s from IP %s.", nmb_namestr(question), inet_ntoa(p->ip) ));
send_wins_name_registration_response(0, ttl, p);
return;
}
@@ -1025,7 +1025,7 @@ to register name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
|| (namerec->data.source == DNSFAIL_NAME) ) )
{
DEBUG(5,("wins_process_multihomed_name_registration_request: Name (%s) in WINS was a dns lookup \
-- removing it.\n", namestr(question) ));
+- removing it.\n", nmb_namestr(question) ));
remove_name_from_namelist( subrec, namerec);
namerec = NULL;
}
@@ -1039,7 +1039,7 @@ to register name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
{
DEBUG( 3, ( "wins_process_multihomed_name_registration_request: Attempt \
to register name %s. Name already exists in WINS with source type %d.\n",
- namestr(question), namerec->data.source ));
+ nmb_namestr(question), namerec->data.source ));
send_wins_name_registration_response(RFS_ERR, 0, p);
return;
}
@@ -1051,7 +1051,7 @@ to register name %s. Name already exists in WINS with source type %d.\n",
if((namerec != NULL) && NAME_GROUP(namerec))
{
DEBUG(3,("wins_process_multihomed_name_registration_request: Attempt to register name %s. Name \
-already exists in WINS as a GROUP name.\n", namestr(question) ));
+already exists in WINS as a GROUP name.\n", nmb_namestr(question) ));
send_wins_name_registration_response(RFS_ERR, 0, p);
return;
}
@@ -1072,7 +1072,7 @@ already exists in WINS as a GROUP name.\n", namestr(question) ));
if(!ismyip(from_ip))
{
DEBUG(3,("wins_process_multihomed_name_registration_request: Attempt to register name %s. Name \
-is one of our (WINS server) names. Denying registration.\n", namestr(question) ));
+is one of our (WINS server) names. Denying registration.\n", nmb_namestr(question) ));
send_wins_name_registration_response(RFS_ERR, 0, p);
return;
}
@@ -1310,7 +1310,7 @@ void wins_process_name_query_request(struct subnet_record *subrec,
struct name_record *namerec = NULL;
DEBUG(3,("wins_process_name_query: name query for name %s from IP %s\n",
- namestr(question), inet_ntoa(p->ip) ));
+ nmb_namestr(question), inet_ntoa(p->ip) ));
/*
* Special name code. If the queried name is *<1b> then search
@@ -1336,7 +1336,7 @@ void wins_process_name_query_request(struct subnet_record *subrec,
if( namerec->data.source == DNSFAIL_NAME )
{
DEBUG(3,("wins_process_name_query: name query for name %s returning DNS fail.\n",
- namestr(question) ));
+ nmb_namestr(question) ));
send_wins_name_query_response(NAM_ERR, p, namerec);
return;
}
@@ -1349,13 +1349,13 @@ void wins_process_name_query_request(struct subnet_record *subrec,
&& (namerec->data.death_time < p->timestamp) )
{
DEBUG(3,("wins_process_name_query: name query for name %s - name expired. Returning fail.\n",
- namestr(question) ));
+ nmb_namestr(question) ));
send_wins_name_query_response(NAM_ERR, p, namerec);
return;
}
DEBUG(3,("wins_process_name_query: name query for name %s returning first IP %s.\n",
- namestr(question), inet_ntoa(namerec->data.ip[0]) ));
+ nmb_namestr(question), inet_ntoa(namerec->data.ip[0]) ));
send_wins_name_query_response(0, p, namerec);
return;
@@ -1370,7 +1370,7 @@ void wins_process_name_query_request(struct subnet_record *subrec,
{
DEBUG(3,("wins_process_name_query: name query for name %s not found - doing dns lookup.\n",
- namestr(question) ));
+ nmb_namestr(question) ));
queue_dns_query(p, question, &namerec);
return;
@@ -1430,12 +1430,12 @@ void wins_process_name_release_request(struct subnet_record *subrec,
DEBUG(0,("wins_process_name_release_request: broadcast name registration request \
received for name %s from IP %s on subnet %s. Error - should not be sent to WINS server\n",
- namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
+ nmb_namestr(question), inet_ntoa(from_ip), subrec->subnet_name));
return;
}
DEBUG(3,("wins_process_name_release_request: %s name release for name %s \
-IP %s\n", releasing_group_name ? "Group" : "Unique", namestr(question), inet_ntoa(from_ip) ));
+IP %s\n", releasing_group_name ? "Group" : "Unique", nmb_namestr(question), inet_ntoa(from_ip) ));
/*
* Deal with policy regarding 0x1d names.
@@ -1444,7 +1444,7 @@ IP %s\n", releasing_group_name ? "Group" : "Unique", namestr(question), inet_nto
if(!releasing_group_name && (question->name_type == 0x1d))
{
DEBUG(3,("wins_process_name_release_request: Ignoring request \
-to release name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
+to release name %s from IP %s.", nmb_namestr(question), inet_ntoa(p->ip) ));
send_wins_name_release_response(0, p);
return;
}
@@ -1483,7 +1483,7 @@ to release name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
{
DEBUG(3,("wins_process_name_release_request: Refusing request to \
release name %s as IP %s is not one of the known IP's for this name.\n",
- namestr(question), inet_ntoa(from_ip) ));
+ nmb_namestr(question), inet_ntoa(from_ip) ));
send_wins_name_release_response(NAM_ERR, p);
return;
}
@@ -1576,7 +1576,7 @@ void wins_write_database(BOOL background)
int i;
struct tm *tm;
- DEBUGADD(4,("%-19s ", namestr(&namerec->name) ));
+ DEBUGADD(4,("%-19s ", nmb_namestr(&namerec->name) ));
if( namerec->data.death_time != PERMANENT_TTL )
{
diff --git a/source3/nmbd/nmbd_workgroupdb.c b/source3/nmbd/nmbd_workgroupdb.c
index ac25127e82..2546b848a8 100644
--- a/source3/nmbd/nmbd_workgroupdb.c
+++ b/source3/nmbd/nmbd_workgroupdb.c
@@ -236,7 +236,7 @@ static void fail_register(struct subnet_record *subrec, struct response_record *
struct nmb_name *nmbname)
{
DEBUG(0,("fail_register: Failed to register name %s on subnet %s.\n",
- namestr(nmbname), subrec->subnet_name));
+ nmb_namestr(nmbname), subrec->subnet_name));
}
/****************************************************************************