1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-10 04:23:50 +03:00

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 9ee8f39aed)
This commit is contained in:
Jeremy Allison
1998-11-14 01:04:13 +00:00
parent 744c34be2a
commit 24ca89bfb0
26 changed files with 638 additions and 576 deletions

View File

@@ -13,6 +13,7 @@
#undef aclent_t #undef aclent_t
#undef HAVE_CONNECT #undef HAVE_CONNECT
#undef HAVE_SHORT_INO_T #undef HAVE_SHORT_INO_T
#undef WITH_SMBWRAPPER
#undef WITH_AFS #undef WITH_AFS
#undef WITH_DFS #undef WITH_DFS
#undef SUNOS5 #undef SUNOS5

847
source3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -206,7 +206,7 @@ case "$host_os" in
*bsd*) LDSHFLAGS="-shared -Bshareable" *bsd*) LDSHFLAGS="-shared -Bshareable"
;; ;;
*irix*) AC_DEFINE(IRIX) *irix*) AC_DEFINE(IRIX)
WRAP32=bin/smbwrapper.32.so ATTEMPT_WRAP32_BUILD=yes
;; ;;
*aix*) AC_DEFINE(AIX);; *aix*) AC_DEFINE(AIX);;
*hpux*) AC_DEFINE(HPUX);; *hpux*) AC_DEFINE(HPUX);;
@@ -237,18 +237,6 @@ if test x$PICFLAG = x; then
fi fi
fi fi
WRAP="bin/smbsh bin/smbwrapper.so"
# Conditions under which smbwrapper should not be built.
if test x$PICFLAG = x; then
echo No support for PIC code - disabling smbwrapper and smbsh
WRAP=""
elif test x$ac_cv_func_syscall = xno; then
AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh])
WRAP=""
fi
################ ################
AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[ AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[
@@ -552,6 +540,43 @@ if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then
AC_DEFINE(HAVE_SYSV_IPC) AC_DEFINE(HAVE_SYSV_IPC)
fi fi
#################################################
# check for smbwrapper support
AC_MSG_CHECKING(whether to use smbwrapper)
AC_ARG_WITH(smbwrapper,
[ --with-smbwrapper Include SMB wrapper support
--without-smbwrapper Don't include SMB wrapper support (default)],
[ case "$withval" in
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_SMBWRAPPER)
WRAP="bin/smbsh bin/smbwrapper.so"
if test x$ATTEMPT_WRAP32_BUILD = x; then
WRAP32=""
else
WRAP32=bin/smbwrapper.32.so
fi
# Conditions under which smbwrapper should not be built.
if test x$PICFLAG = x; then
echo No support for PIC code - disabling smbwrapper and smbsh
WRAP=""
WRAP32=""
elif test x$ac_cv_func_syscall = xno; then
AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh])
WRAP=""
WRAP32=""
fi
;;
*)
AC_MSG_RESULT(no)
;;
esac ],
AC_MSG_RESULT(no)
)
################################################# #################################################
# check for the AFS filesystem # check for the AFS filesystem
AC_MSG_CHECKING(whether to use AFS) AC_MSG_CHECKING(whether to use AFS)

View File

@@ -70,6 +70,7 @@
#undef aclent_t #undef aclent_t
#undef HAVE_CONNECT #undef HAVE_CONNECT
#undef HAVE_SHORT_INO_T #undef HAVE_SHORT_INO_T
#undef WITH_SMBWRAPPER
#undef WITH_AFS #undef WITH_AFS
#undef WITH_DFS #undef WITH_DFS
#undef SUNOS5 #undef SUNOS5

View File

@@ -495,7 +495,7 @@ BOOL find_master_ip(char *group, struct in_addr *master_ip);
/*The following definitions come from libsmb/nmblib.c */ /*The following definitions come from libsmb/nmblib.c */
void debug_nmb_packet(struct packet_struct *p); void debug_nmb_packet(struct packet_struct *p);
char *namestr(struct nmb_name *n); char *nmb_namestr(struct nmb_name *n);
struct packet_struct *copy_packet(struct packet_struct *packet); struct packet_struct *copy_packet(struct packet_struct *packet);
void free_packet(struct packet_struct *packet); void free_packet(struct packet_struct *packet);
struct packet_struct *read_packet(int fd,enum packet_type packet_type); struct packet_struct *read_packet(int fd,enum packet_type packet_type);

View File

@@ -2541,7 +2541,7 @@ BOOL cli_reestablish_connection(struct cli_state *cli)
fstrcpy(dest_host, cli->full_dest_host_name); fstrcpy(dest_host, cli->full_dest_host_name);
DEBUG(5,("cli_reestablish_connection: %s connecting to %s (ip %s) - %s [%s]\n", DEBUG(5,("cli_reestablish_connection: %s connecting to %s (ip %s) - %s [%s]\n",
namestr(&calling), namestr(&called), nmb_namestr(&calling), nmb_namestr(&called),
inet_ntoa(cli->dest_ip), inet_ntoa(cli->dest_ip),
cli->user_name, cli->domain)); cli->user_name, cli->domain));
@@ -2571,7 +2571,7 @@ BOOL cli_establish_connection(struct cli_state *cli,
BOOL do_shutdown, BOOL do_tcon) BOOL do_shutdown, BOOL do_tcon)
{ {
DEBUG(5,("cli_establish_connection: %s connecting to %s (%s) - %s [%s]\n", DEBUG(5,("cli_establish_connection: %s connecting to %s (%s) - %s [%s]\n",
namestr(calling), namestr(called), inet_ntoa(*dest_ip), nmb_namestr(calling), nmb_namestr(called), inet_ntoa(*dest_ip),
cli->user_name, cli->domain)); cli->user_name, cli->domain));
/* establish connection */ /* establish connection */
@@ -2586,7 +2586,7 @@ BOOL cli_establish_connection(struct cli_state *cli,
if (!cli_connect(cli, dest_host, dest_ip)) if (!cli_connect(cli, dest_host, dest_ip))
{ {
DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n", DEBUG(1,("cli_establish_connection: failed to connect to %s (%s)\n",
namestr(calling), inet_ntoa(*dest_ip))); nmb_namestr(calling), inet_ntoa(*dest_ip)));
return False; return False;
} }
} }

View File

@@ -66,7 +66,7 @@ static void debug_nmb_res_rec(struct res_rec *res, char *hdr)
DEBUGADD( 4, ( " %s: nmb_name=%s rr_type=%d rr_class=%d ttl=%d\n", DEBUGADD( 4, ( " %s: nmb_name=%s rr_type=%d rr_class=%d ttl=%d\n",
hdr, hdr,
namestr(&res->rr_name), nmb_namestr(&res->rr_name),
res->rr_type, res->rr_type,
res->rr_class, res->rr_class,
res->ttl ) ); res->ttl ) );
@@ -131,7 +131,7 @@ void debug_nmb_packet(struct packet_struct *p)
if (nmb->header.qdcount) if (nmb->header.qdcount)
{ {
DEBUGADD( 4, ( " question: q_name=%s q_type=%d q_class=%d\n", DEBUGADD( 4, ( " question: q_name=%s q_type=%d q_class=%d\n",
namestr(&nmb->question.question_name), nmb_namestr(&nmb->question.question_name),
nmb->question.question_type, nmb->question.question_type,
nmb->question.question_class) ); nmb->question.question_class) );
} }
@@ -289,7 +289,7 @@ static int put_nmb_name(char *buf,int offset,struct nmb_name *name)
/******************************************************************* /*******************************************************************
useful for debugging messages useful for debugging messages
******************************************************************/ ******************************************************************/
char *namestr(struct nmb_name *n) char *nmb_namestr(struct nmb_name *n)
{ {
static int i=0; static int i=0;
static fstring ret[4]; static fstring ret[4];

View File

@@ -305,7 +305,7 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
dns_queue = p; 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; return True;
} }
@@ -321,7 +321,7 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
char *qname = question->name; char *qname = question->name;
struct in_addr dns_ip; 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. */ /* Unblock TERM signal so we can be killed in DNS lookup. */
BlockSignals(False, SIGTERM); BlockSignals(False, SIGTERM);

View File

@@ -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 \ 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", 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( "become_domain_master_query_success():\n" );
dbgtext( "Our address (%s) ", inet_ntoa(ip) ); 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( "(domain master browser name) " );
dbgtext( "on subnet %s.\n", subrec->subnet_name ); dbgtext( "on subnet %s.\n", subrec->subnet_name );
dbgtext( "Continuing with domain master code.\n" ); 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 \ DEBUG(0,("become_domain_master_query_fail: Error %d returned when \
querying WINS server for name %s.\n", querying WINS server for name %s.\n",
fail_code, namestr(question_name))); fail_code, nmb_namestr(question_name)));
return; 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 \ DEBUG(0,("become_domain_master_browser_wins: querying WINS server at IP %s \
for domain master browser name %s on workgroup %s\n", 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, query_name(unicast_subnet, nmbname.name, nmbname.name_type,
become_domain_master_query_success, become_domain_master_query_success,

View File

@@ -148,7 +148,7 @@ static void unbecome_local_master_success(struct subnet_record *subrec,
memcpy((char *)&force_new_election, userdata->data, sizeof(BOOL)); memcpy((char *)&force_new_election, userdata->data, sizeof(BOOL));
DEBUG(3,("unbecome_local_master_success: released name %s.\n", DEBUG(3,("unbecome_local_master_success: released name %s.\n",
namestr(released_name))); nmb_namestr(released_name)));
/* Now reset the workgroup and server state. */ /* Now reset the workgroup and server state. */
reset_workgroup_state( subrec, released_name->name, force_new_election ); 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)); memcpy((char *)&force_new_election, userdata->data, sizeof(BOOL));
DEBUG(0,("unbecome_local_master_fail: failed to release name %s. \ 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. */ /* Do it anyway. */
namerec = find_name_on_subnet(subrec, fail_name, FIND_SELF_NAME); 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) struct in_addr released_ip)
{ {
DEBUG(4,("release_msbrowse_name_success: Released name %s on subnet %s\n.", 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 the permanent MSBROWSE name added into the unicast subnet. */
remove_permanent_name_from_unicast( subrec, released_name); 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; struct name_record *namerec;
DEBUG(4,("release_msbrowse_name_fail: Failed to release name %s on subnet %s\n.", 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. */ /* Release the name anyway. */
namerec = find_name_on_subnet(subrec, fail_name, FIND_SELF_NAME); 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); 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. \ 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) 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 \ 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", 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)));
} }
/****************************************************************** /******************************************************************

View File

@@ -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( "announce_local_master_browser_to_domain_master_browser:\n" );
dbgtext( "Sending local master announce to " ); 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 ); work->work_group );
} }
@@ -161,7 +161,7 @@ static void sync_with_dmb(struct work_record *work)
{ {
dbgtext( "sync_with_dmb:\n" ); dbgtext( "sync_with_dmb:\n" );
dbgtext( "Initiating sync with domain master browser " ); 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( "at IP %s ", inet_ntoa(work->dmb_addr) );
dbgtext( "for workgroup %s\n", work->work_group ); 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( "find_domain_master_name_query_fail:\n" );
dbgtext( "Unable to find the Domain Master Browser name " ); dbgtext( "Unable to find the Domain Master Browser name " );
dbgtext( "%s for the workgroup %s.\n", 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" ); 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( "find_domain_master_name_query_fail:\n" );
dbgtext( "WINS server did not reply to a query for name " ); 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" ); dbgtext( "is probably not a Samba 1.9.18 or above WINS server.\n" );
} }
} }

View File

@@ -197,7 +197,7 @@ void run_elections(time_t t)
make_nmb_name(&nmbname, work->work_group, 0x1e, scope); make_nmb_name(&nmbname, work->work_group, 0x1e, scope);
if(find_name_on_subnet( subrec, &nmbname, FIND_SELF_NAME)==NULL) { if(find_name_on_subnet( subrec, &nmbname, FIND_SELF_NAME)==NULL) {
DEBUG(8,("run_elections: Cannot send election packet yet as name %s not \ 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; continue;
} }
@@ -368,7 +368,7 @@ BOOL check_elections(void)
make_nmb_name(&nmbname, work->work_group, 0x1e, scope); make_nmb_name(&nmbname, work->work_group, 0x1e, scope);
if(find_name_on_subnet( subrec, &nmbname, FIND_SELF_NAME)==NULL) { if(find_name_on_subnet( subrec, &nmbname, FIND_SELF_NAME)==NULL) {
DEBUG(8,("check_elections: Cannot send election packet yet as name %s not \ 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; continue;
} }

View File

@@ -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 \ 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), %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", DEBUG(5,("process_host_announce: ttl=%d server type=%08x comment=%s\n",
ttl, servertype,comment)); 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 \ 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), %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", DEBUG(5,("process_workgroup_announce: ttl=%d server type=%08x master browser=%s\n",
ttl, servertype, master_name)); 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)) 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", 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; 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 \ 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), %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", DEBUG(5,("process_local_master_announce: ttl=%d server type=%08x comment=%s\n",
ttl, servertype, comment)); 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 \ 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), %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", DEBUG(5,("process_lm_host_announce: os=(%d,%d) ttl=%d server type=%08x comment=%s\n",
osmajor, osminor, ttl, servertype,comment)); osmajor, osminor, ttl, servertype,comment));
@@ -552,7 +552,7 @@ static void send_backup_list_response(struct subnet_record *subrec,
bzero(outbuf,sizeof(outbuf)); bzero(outbuf,sizeof(outbuf));
DEBUG(3,("send_backup_list_response: sending backup list for workgroup %s to %s IP %s\n", 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; p = outbuf;
@@ -632,8 +632,8 @@ void process_get_backup_list_request(struct subnet_record *subrec,
char *workgroup_name = dgram->dest_name.name; char *workgroup_name = dgram->dest_name.name;
DEBUG(3,("process_get_backup_list_request: request from %s IP %s to %s.\n", DEBUG(3,("process_get_backup_list_request: request from %s IP %s to %s.\n",
namestr(&dgram->source_name), inet_ntoa(p->ip), nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
namestr(&dgram->dest_name))); nmb_namestr(&dgram->dest_name)));
/* We have to be a master browser, or a domain master browser /* We have to be a master browser, or a domain master browser
for the requested workgroup. That means it must be our 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 \ DEBUG(1,("process_reset_browser: received diagnostic browser reset \
request from %s IP %s state=0x%X\n", 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. */ /* Stop being a local master browser on all our broadcast subnets. */
if (state & 0x1) 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; char *workgroup_name = dgram->dest_name.name;
DEBUG(3,("process_announce_request: Announce request from %s IP %s to %s.\n", DEBUG(3,("process_announce_request: Announce request from %s IP %s to %s.\n",
namestr(&dgram->source_name), inet_ntoa(p->ip), nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
namestr(&dgram->dest_name))); nmb_namestr(&dgram->dest_name)));
/* We only send announcement requests on our workgroup. */ /* We only send announcement requests on our workgroup. */
if(strequal(workgroup_name, global_myworkgroup) == False) 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; char *workgroup_name = dgram->dest_name.name;
DEBUG(3,("process_lm_announce_request: Announce request from %s IP %s to %s.\n", DEBUG(3,("process_lm_announce_request: Announce request from %s IP %s to %s.\n",
namestr(&dgram->source_name), inet_ntoa(p->ip), nmb_namestr(&dgram->source_name), inet_ntoa(p->ip),
namestr(&dgram->dest_name))); nmb_namestr(&dgram->dest_name)));
/* We only send announcement requests on our workgroup. */ /* We only send announcement requests on our workgroup. */
if(strequal(workgroup_name, global_myworkgroup) == False) if(strequal(workgroup_name, global_myworkgroup) == False)

View File

@@ -81,7 +81,7 @@ void process_name_release_request(struct subnet_record *subrec,
*/ */
DEBUG(0,("process_name_release_request: unicast name release request \ 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", 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); send_name_release_response(FMT_ERR, p);
return; 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, \ DEBUG(3,("process_name_release_request: Name release on name %s, \
subnet %s from owner IP %s\n", 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))); subrec->subnet_name, inet_ntoa(owner_ip)));
/* If someone is releasing a broadcast group name, just ignore it. */ /* 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 \ 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", 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; return;
} }
@@ -121,7 +121,7 @@ group release name %s from IP %s on subnet %s with no group bit set.\n",
rcode = ACT_ERR; rcode = ACT_ERR;
DEBUG(0, ("process_name_release_request: Attempt to release name %s from IP %s \ 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", 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) 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 \ 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", 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); send_name_registration_response(FMT_ERR, 0, p);
return; return;
@@ -187,7 +187,7 @@ received for name %s from IP %s on subnet %s. Error - should be sent to WINS ser
refreshes. */ refreshes. */
DEBUG(3,("process_name_refresh_request: Name refresh for name %s \ 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 \ 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", 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); send_name_registration_response(FMT_ERR, 0, p);
return; return;
} }
DEBUG(3,("process_name_registration_request: Name registration for name %s \ 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. */ /* See if the name already exists. */
namerec = find_name_on_subnet(subrec, question, FIND_ANY_NAME); 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); update_name_ttl(namerec, ttl);
DEBUG(3,("process_name_registration_request: Updated name record %s \ 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; return;
} }
} }
@@ -328,14 +328,14 @@ void process_node_status_request(struct subnet_record *subrec, struct packet_str
struct name_record *namerec; struct name_record *namerec;
DEBUG(3,("process_node_status_request: status request for name %s from IP %s on \ 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)); subrec->subnet_name));
if((namerec = find_name_on_subnet(subrec, &nmb->question.question_name, if((namerec = find_name_on_subnet(subrec, &nmb->question.question_name,
FIND_SELF_NAME)) == 0) FIND_SELF_NAME)) == 0)
{ {
DEBUG(1,("process_node_status_request: status request for name %s from IP %s on \ 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)); inet_ntoa(p->ip), subrec->subnet_name));
return; return;
@@ -462,7 +462,7 @@ void process_name_query_request(struct subnet_record *subrec, struct packet_stru
int i; int i;
DEBUG(3,("process_name_query_request: Name query from %s on subnet %s for name %s\n", 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 /* 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 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 != PERMANENT_TTL)
&& (namerec->data.death_time < p->timestamp) ) ) && (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; 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 \ 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", 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; return;
} }
} }

View File

@@ -68,7 +68,7 @@ in workgroup %s on subnet %s\n",
DEBUG(0,("become_logon_server_fail: Failed to become a domain master for \ DEBUG(0,("become_logon_server_fail: Failed to become a domain master for \
workgroup %s on subnet %s. Couldn't register name %s.\n", 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)));
} }

View File

@@ -40,7 +40,7 @@ static void my_name_register_failed(struct subnet_record *subrec,
struct response_record *rrec, struct nmb_name *nmbname) struct response_record *rrec, struct nmb_name *nmbname)
{ {
DEBUG(0,("my_name_register_failed: Failed to register my name %s on subnet %s.\n", 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));
} }
/**************************************************************************** /****************************************************************************

View File

@@ -125,16 +125,16 @@ struct name_record *find_name_on_subnet( struct subnet_record *subrec,
{ {
DEBUG( 9, DEBUG( 9,
( "find_name_on_subnet: on subnet %s - self name %s NOT FOUND\n", ( "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 ); return( NULL );
} }
DEBUG( 9, ("find_name_on_subnet: on subnet %s - found name %s source=%d\n", 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 ); return( name_ret );
} }
DEBUG( 9, DEBUG( 9,
( "find_name_on_subnet: on subnet %s - name %s NOT FOUND\n", ( "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 ); return( NULL );
} /* find_name_on_subnet */ } /* 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 \ DEBUG( 3, ( "add_name_to_subnet: Added netbios name %s with first IP %s \
ttl=%d nb_flags=%2x to subnet %s\n", ttl=%d nb_flags=%2x to subnet %s\n",
namestr( &namerec->name ), nmb_namestr( &namerec->name ),
inet_ntoa( *iplist ), inet_ntoa( *iplist ),
ttl, ttl,
(unsigned int)nb_flags, (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 \ DEBUG( 0, ( "standard_fail_register: Failed to register/refresh name %s \
on subnet %s\n", on subnet %s\n",
namestr(nmbname), subrec->subnet_name) ); nmb_namestr(nmbname), subrec->subnet_name) );
/* Remove the name from the subnet. */ /* Remove the name from the subnet. */
if( namerec ) 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 \ DEBUG( 0, ( "standard_success_release: Name release for name %s IP %s \
on subnet %s. Name was not found on subnet.\n", on subnet %s. Name was not found on subnet.\n",
namestr(nmbname), nmb_namestr(nmbname),
inet_ntoa(released_ip), inet_ntoa(released_ip),
subrec->subnet_name) ); subrec->subnet_name) );
return; return;
@@ -413,7 +413,7 @@ on subnet %s. Name was not found on subnet.\n",
if( namerec->data.num_ips == orig_num ) if( namerec->data.num_ips == orig_num )
DEBUG( 0, ( "standard_success_release: Name release for name %s IP %s \ DEBUG( 0, ( "standard_success_release: Name release for name %s IP %s \
on subnet %s. This ip is not known for this name.\n", on subnet %s. This ip is not known for this name.\n",
namestr(nmbname), nmb_namestr(nmbname),
inet_ntoa(released_ip), inet_ntoa(released_ip),
subrec->subnet_name ) ); 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 \ DEBUG( 3, ( "expire_names_on_subnet: Subnet %s not expiring SELF \
name %s\n", name %s\n",
subrec->subnet_name, namestr(&namerec->name) ) ); subrec->subnet_name, nmb_namestr(&namerec->name) ) );
namerec->data.death_time += 300; namerec->data.death_time += 300;
namerec->subnet->namelist_changed = True; namerec->subnet->namelist_changed = True;
continue; continue;
} }
DEBUG(3,("expire_names_on_subnet: Subnet %s - removing expired name %s\n", 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 ); remove_name_from_namelist( subrec, namerec );
} }
@@ -541,7 +541,7 @@ static void dump_subnet_namelist( struct subnet_record *subrec, FILE *fp)
namerec; namerec;
namerec = (struct name_record *)ubi_trNext( 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) switch(namerec->data.source)
{ {
case LMHOSTS_NAME: case LMHOSTS_NAME:

View File

@@ -56,7 +56,7 @@ static void query_name_response(struct subnet_record *subrec,
the response but don't send out any more query requests. */ the response but don't send out any more query requests. */
DEBUG(5,("query_name_response: WACK from WINS server %s in querying \ 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; rrec->repeat_count = 0;
/* How long we should wait for. */ /* 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 \ 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), 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 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]); putip((char *)&answer_ip,&nmb->answers->rdata[2]);
DEBUG(5,("query_name_response: On subnet %s - positive response from IP %s \ 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), 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 /* Interestingly, we could add these names to our namelists, and
change nmbd to a model that checked its own name cache first, 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 \ 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", 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) )); inet_ntoa(p->ip) ));
/* We have already called the success or fail function, so we /* 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) if(failed)
{ {
DEBUG(5,("query_name_timeout_response: No response to querying name %s on subnet %s.\n", 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) if(rrec->fail_fn)
(*rrec->fail_fn)(subrec, rrec, question_name, 0); (*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) if(rrec.rdlength > MAX_DGRAM_SIZE)
{ {
DEBUG(0,("query_name: nmbd internal error - there are %d ip addresses for name %s.\n", 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; return False;
} }
@@ -229,7 +229,7 @@ BOOL query_name(struct subnet_record *subrec, char *name, int type,
&nmbname) == NULL) &nmbname) == NULL)
{ {
DEBUG(0,("query_name: Failed to send packet trying to query name %s\n", DEBUG(0,("query_name: Failed to send packet trying to query name %s\n",
namestr(&nmbname))); nmb_namestr(&nmbname)));
return True; return True;
} }
return False; return False;
@@ -258,7 +258,7 @@ BOOL query_name_from_wins_server(struct in_addr ip_to,
&nmbname) == NULL) &nmbname) == NULL)
{ {
DEBUG(0,("query_name_from_wins_server: Failed to send packet trying to query name %s\n", 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 True;
} }
return False; return False;

View File

@@ -57,7 +57,7 @@ static void register_name_response(struct subnet_record *subrec,
if(!nmb_name_equal(question_name, answer_name)) if(!nmb_name_equal(question_name, answer_name))
{ {
DEBUG(0,("register_name_response: Answer name %s differs from question \ 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; return;
} }
@@ -80,7 +80,7 @@ name %s.\n", namestr(answer_name), namestr(question_name)));
rrec->num_msgs--; rrec->num_msgs--;
DEBUG(5,("register_name_response: Ignoring broadcast response to \ 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; return;
} }
#endif /* OLD_SAMBA_SERVER_HACK */ #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. */ /* Someone else has the name. Log the problem. */
DEBUG(1,("register_name_response: Failed to register \ 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", 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))); subrec->subnet_name, nmb->header.rcode, inet_ntoa(p->ip)));
success = False; 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 \ DEBUG(0,("register_name_response: server at IP %s rejected our \
name registration of %s with error code %d.\n", inet_ntoa(p->ip), 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) 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. */ the response but don't send out any more register requests. */
DEBUG(5,("register_name_response: WACK from WINS server %s in registering \ 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; rrec->repeat_count = 0;
/* How long we should wait for. */ /* 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", 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) 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", 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) if(success)
{ {
/* Enter the registered name into the subnet name database before calling /* 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) ip_list[i]) == NULL)
{ {
DEBUG(0,("multihomed_register_name: Failed to send packet trying to \ 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); free((char *)ip_list);
return True; return True;
@@ -352,7 +352,7 @@ BOOL register_name(struct subnet_record *subrec,
nb_flags) == NULL) nb_flags) == NULL)
{ {
DEBUG(0,("register_name: Failed to send packet trying to register name %s\n", DEBUG(0,("register_name: Failed to send packet trying to register name %s\n",
namestr(&nmbname))); nmb_namestr(&nmbname)));
return True; return True;
} }
return False; return False;
@@ -387,7 +387,7 @@ BOOL refresh_name(struct subnet_record *subrec, struct name_record *namerec,
namerec->data.ip[i]) == NULL) namerec->data.ip[i]) == NULL)
{ {
DEBUG(0,("refresh_name: Failed to send packet trying to refresh name %s\n", DEBUG(0,("refresh_name: Failed to send packet trying to refresh name %s\n",
namestr(&namerec->name))); nmb_namestr(&namerec->name)));
return True; return True;
} }
} }

View File

@@ -53,7 +53,7 @@ static void release_name_response(struct subnet_record *subrec,
if(!nmb_name_equal(question_name, answer_name)) if(!nmb_name_equal(question_name, answer_name))
{ {
DEBUG(0,("release_name_response: Answer name %s differs from question \ 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; return;
} }
@@ -61,7 +61,7 @@ name %s.\n", namestr(answer_name), namestr(question_name)));
{ {
/* Someone sent a response. This shouldn't happen/ */ /* Someone sent a response. This shouldn't happen/ */
DEBUG(1,("release_name_response: A response for releasing name %s was received on a \ 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; return;
} }
else 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 \ 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), 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) 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. */ the response but don't send out any more release requests. */
DEBUG(5,("release_name_response: WACK from WINS server %s in releasing \ 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; rrec->repeat_count = 0;
/* How long we should wait for. */ /* 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", 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) 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", 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) 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)) 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", 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; return True;
} }
@@ -230,7 +230,7 @@ BOOL release_name(struct subnet_record *subrec, struct name_record *namerec,
namerec->data.ip[i]) == NULL) namerec->data.ip[i]) == NULL)
{ {
DEBUG(0,("release_name: Failed to send packet trying to release name %s IP %s\n", 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; return True;
} }
} }

View File

@@ -44,12 +44,12 @@ static void node_status_response(struct subnet_record *subrec,
if(!nmb_name_equal(question_name, answer_name)) if(!nmb_name_equal(question_name, answer_name))
{ {
DEBUG(0,("node_status_response: Answer name %s differs from question \ 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; return;
} }
DEBUG(5,("node_status_response: response from name %s on subnet %s.\n", 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 /* Just send the whole answer resource record for the success function
to parse. */ 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; 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", 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) if( rrec->fail_fn)
(*rrec->fail_fn)(subrec, rrec); (*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) success_fn, fail_fn, userdata, nmbname, send_ip)==NULL)
{ {
DEBUG(0,("node_status: Failed to send packet trying to get node status for \ 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 True;
} }
return False; return False;

View File

@@ -279,7 +279,7 @@ static BOOL initiate_name_query_packet( struct packet_struct *packet)
nmb->header.nm_flags.recursion_desired = True; nmb->header.nm_flags.recursion_desired = True;
DEBUG(4,("initiate_name_query_packet: sending query for name %s (bcast=%s) to IP %s\n", 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))); BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet ); 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; 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", 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))); BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet ); return send_netbios_packet( packet );
@@ -325,7 +325,7 @@ static BOOL initiate_name_register_packet( struct packet_struct *packet,
return False; return False;
DEBUG(4,("initiate_name_register_packet: sending registration for name %s (bcast=%s) to IP %s\n", 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))); BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet ); 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 \ DEBUG(4,("initiate_multihomed_name_register_packet: sending registration \
for name %s IP %s (bcast=%s) to IP %s\n", 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 )); BOOLSTR(nmb->header.nm_flags.bcast), second_ip_buf ));
return send_netbios_packet( packet ); return send_netbios_packet( packet );
@@ -377,7 +377,7 @@ static BOOL initiate_name_refresh_packet( struct packet_struct *packet,
return False; return False;
DEBUG(4,("initiate_name_refresh_packet: sending refresh for name %s (bcast=%s) to IP %s\n", 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))); BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet ); return send_netbios_packet( packet );
@@ -401,7 +401,7 @@ static BOOL initiate_name_release_packet( struct packet_struct *packet,
return False; return False;
DEBUG(4,("initiate_name_release_packet: sending release for name %s (bcast=%s) to IP %s\n", 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))); BOOLSTR(nmb->header.nm_flags.bcast), inet_ntoa(packet->ip)));
return send_netbios_packet( packet ); 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; 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", 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))); inet_ntoa(packet->ip)));
return send_netbios_packet( packet ); return send_netbios_packet( packet );
@@ -898,7 +898,7 @@ void reply_netbios_packet(struct packet_struct *orig_packet,
default: default:
{ {
DEBUG(0,("reply_netbios_packet: Unknown packet type: %s %s to ip %s\n", 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))); inet_ntoa(packet.ip)));
return; 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 \ DEBUG(4,("reply_netbios_packet: sending a reply of packet type: %s %s to ip %s \
for id %hu\n", 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)); inet_ntoa(packet.ip), orig_nmb->header.name_trn_id));
nmb->header.name_trn_id = 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)) if (is_myname(dgram->source_name.name))
{ {
DEBUG(0,("process_browse_packet: Discarding datagram from IP %s. Source 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; 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 /* We never send ANN_GetBackupListReq so we
should never get these. */ should never get these. */
DEBUG(0,("process_browse_packet: Discarding GetBackupListResponse \ 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; break;
} }
case ANN_ResetBrowserState: 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_browse_data(buf, len);
DEBUG(10,("process_browse_packet: On subnet %s ignoring browse packet \ DEBUG(10,("process_browse_packet: On subnet %s ignoring browse packet \
command ANN_BecomeBackup from %s IP %s to %s\n", command ANN_BecomeBackup from %s IP %s to %s\n",
subrec->subnet_name, namestr(&dgram->source_name), subrec->subnet_name, nmb_namestr(&dgram->source_name),
inet_ntoa(p->ip), namestr(&dgram->dest_name))); inet_ntoa(p->ip), nmb_namestr(&dgram->dest_name)));
break; break;
} }
default: default:
@@ -1126,8 +1126,8 @@ command ANN_BecomeBackup from %s IP %s to %s\n",
debug_browse_data(buf, len); debug_browse_data(buf, len);
DEBUG(0,("process_browse_packet: On subnet %s ignoring browse packet \ DEBUG(0,("process_browse_packet: On subnet %s ignoring browse packet \
command code %d from %s IP %s to %s\n", command code %d from %s IP %s to %s\n",
subrec->subnet_name, command, namestr(&dgram->source_name), subrec->subnet_name, command, nmb_namestr(&dgram->source_name),
inet_ntoa(p->ip), namestr(&dgram->dest_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)) if (is_myname(dgram->source_name.name))
{ {
DEBUG(0,("process_lanman_packet: Discarding datagram from IP %s. Source 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; 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 \ DEBUG(0,("process_lanman_packet: On subnet %s ignoring browse packet \
command code %d from %s IP %s to %s\n", command code %d from %s IP %s to %s\n",
subrec->subnet_name, command, namestr(&dgram->source_name), subrec->subnet_name, command, nmb_namestr(&dgram->source_name),
inet_ntoa(p->ip), namestr(&dgram->dest_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)) if (!listening(p,&dgram->dest_name))
{ {
DEBUG(5,("process_dgram: ignoring dgram packet sent to name %s from %s\n", 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; return;
} }
@@ -1229,7 +1229,7 @@ static void process_dgram(struct packet_struct *p)
/* Don't process error packets etc yet */ /* Don't process error packets etc yet */
DEBUG(5,("process_dgram: ignoring dgram packet sent to name %s from IP %s as it is \ DEBUG(5,("process_dgram: ignoring dgram packet sent to name %s from IP %s as it is \
an error packet of type %x\n", 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; return;
} }
@@ -1244,7 +1244,7 @@ static void process_dgram(struct packet_struct *p)
buf2 = smb_base(buf) + SVAL(buf,smb_vwv12); 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", 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)); 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; p.packet_type = DGRAM_PACKET;
DEBUG(4,("send_mailslot: Sending to mailslot %s from %s IP %s ", mailslot, DEBUG(4,("send_mailslot: Sending to mailslot %s from %s IP %s ", mailslot,
namestr(&dgram->source_name), inet_ntoa(src_ip))); nmb_namestr(&dgram->source_name), inet_ntoa(src_ip)));
DEBUG(4,("to %s IP %s\n", namestr(&dgram->dest_name), inet_ntoa(dest_ip))); DEBUG(4,("to %s IP %s\n", nmb_namestr(&dgram->dest_name), inet_ntoa(dest_ip)));
debug_browse_data(buf, len); debug_browse_data(buf, len);

View File

@@ -96,7 +96,7 @@ static int namelist_entry_compare( ubi_trItemPtr Item, ubi_trNodePtr Node )
Debug1( "nmbd_subnetdb:namelist_entry_compare()\n" ); Debug1( "nmbd_subnetdb:namelist_entry_compare()\n" );
Debug1( "%d == memcmp( \"%s\", \"%s\", %d )\n", Debug1( "%d == memcmp( \"%s\", \"%s\", %d )\n",
memcmp( Item, &(NR->name), sizeof(struct nmb_name) ), 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) ) ); return( memcmp( Item, &(NR->name), sizeof(struct nmb_name) ) );

View File

@@ -55,7 +55,7 @@ static void wins_proxy_name_query_request_success( struct subnet_record *subrec,
if(num_ips == 0) if(num_ips == 0)
{ {
DEBUG(0,("wins_proxy_name_query_request_success: Invalid number of IP records (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; 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 \ 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. \ proxy name and is also on the same subnet (%s) as the requestor. \
Not replying.\n", Not replying.\n",
namestr(&namerec->name), nmb_namestr(&namerec->name),
orig_broadcast_subnet->subnet_name ) ); orig_broadcast_subnet->subnet_name ) );
return; 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) struct nmb_name *question_name, int fail_code)
{ {
DEBUG(4,("wins_proxy_name_query_request_fail: WINS server returned error code %d for lookup \ 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) ));
} }
/**************************************************************************** /****************************************************************************

View File

@@ -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 \ 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", 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; return;
} }
DEBUG(3,("wins_process_name_refresh_request: Name refresh for name %s \ 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. * See if the name already exists.
@@ -424,7 +424,7 @@ IP %s\n", namestr(question), inet_ntoa(from_ip) ));
if(namerec == NULL) if(namerec == NULL)
{ {
DEBUG(3,("wins_process_name_refresh_request: Name refresh for name %s and \ 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); wins_process_name_registration_request(subrec,p);
return; 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))) ) if((namerec != NULL) && ((group && !NAME_GROUP(namerec)) || (!group && NAME_GROUP(namerec))) )
{ {
DEBUG(3,("wins_process_name_refresh_request: Name %s group bit = %s \ 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); send_wins_name_registration_response(RFS_ERR, 0, p);
return; 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 \ 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); send_wins_name_registration_response(RFS_ERR, 0, p);
return; 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 *)); 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 \ 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); 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); wins_process_name_registration_request(subrec, orig_reg_packet);
else else
DEBUG(2,("wins_register_query_fail: The state of the WINS database changed between \ 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; orig_reg_packet->locked = False;
free_packet(orig_reg_packet); 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 \ 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", 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; return;
} }
DEBUG(3,("wins_process_name_registration_request: %s name registration for name %s \ 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. * 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) ) ) || (namerec->data.source == DNSFAIL_NAME) ) )
{ {
DEBUG(5,("wins_process_name_registration_request: Name (%s) in WINS was \ 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 ); remove_name_from_namelist( subrec, namerec );
namerec = NULL; namerec = NULL;
} }
@@ -688,7 +688,7 @@ a dns lookup - removing it.\n", namestr(question) ));
{ {
DEBUG( 3, ( "wins_process_name_registration_request: Attempt \ DEBUG( 3, ( "wins_process_name_registration_request: Attempt \
to register name %s. Name already exists in WINS with source type %d.\n", 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); send_wins_name_registration_response(RFS_ERR, 0, p);
return; 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)) if(!registering_group_name && (question->name_type == 0x1d))
{ {
DEBUG(3,("wins_process_name_registration_request: Ignoring request \ 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); send_wins_name_registration_response(0, ttl, p);
return; 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", 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. * 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 \ 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); send_wins_name_registration_response(RFS_ERR, 0, p);
return; return;
} }
@@ -774,7 +774,7 @@ already exists in WINS as a GROUP name.\n", namestr(question) ));
if(!ismyip(from_ip)) if(!ismyip(from_ip))
{ {
DEBUG(3,("wins_process_name_registration_request: Attempt to register name %s. Name \ 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); send_wins_name_registration_response(RFS_ERR, 0, p);
return; return;
} }
@@ -903,7 +903,7 @@ static void wins_multihomed_register_query_success(struct subnet_record *subrec,
if( (namerec == NULL) || (namerec->data.source != REGISTER_NAME) ) 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 \ 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); send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet);
orig_reg_packet->locked = False; 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 *)); 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 \ 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); send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet);
orig_reg_packet->locked = False; 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 \ 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", 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; 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 \ 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", 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; return;
} }
DEBUG(3,("wins_process_multihomed_name_registration_request: name registration for name %s \ 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. * Deal with policy regarding 0x1d names.
@@ -1003,7 +1003,7 @@ IP %s\n", namestr(question), inet_ntoa(from_ip) ));
if(question->name_type == 0x1d) if(question->name_type == 0x1d)
{ {
DEBUG(3,("wins_process_multihomed_name_registration_request: Ignoring request \ 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); send_wins_name_registration_response(0, ttl, p);
return; return;
} }
@@ -1025,7 +1025,7 @@ to register name %s from IP %s.", namestr(question), inet_ntoa(p->ip) ));
|| (namerec->data.source == DNSFAIL_NAME) ) ) || (namerec->data.source == DNSFAIL_NAME) ) )
{ {
DEBUG(5,("wins_process_multihomed_name_registration_request: Name (%s) in WINS was a dns lookup \ 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); remove_name_from_namelist( subrec, namerec);
namerec = NULL; 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 \ DEBUG( 3, ( "wins_process_multihomed_name_registration_request: Attempt \
to register name %s. Name already exists in WINS with source type %d.\n", 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); send_wins_name_registration_response(RFS_ERR, 0, p);
return; 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)) if((namerec != NULL) && NAME_GROUP(namerec))
{ {
DEBUG(3,("wins_process_multihomed_name_registration_request: Attempt to register name %s. Name \ 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); send_wins_name_registration_response(RFS_ERR, 0, p);
return; return;
} }
@@ -1072,7 +1072,7 @@ already exists in WINS as a GROUP name.\n", namestr(question) ));
if(!ismyip(from_ip)) if(!ismyip(from_ip))
{ {
DEBUG(3,("wins_process_multihomed_name_registration_request: Attempt to register name %s. Name \ 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); send_wins_name_registration_response(RFS_ERR, 0, p);
return; return;
} }
@@ -1310,7 +1310,7 @@ void wins_process_name_query_request(struct subnet_record *subrec,
struct name_record *namerec = NULL; struct name_record *namerec = NULL;
DEBUG(3,("wins_process_name_query: name query for name %s from IP %s\n", 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 * 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 ) if( namerec->data.source == DNSFAIL_NAME )
{ {
DEBUG(3,("wins_process_name_query: name query for name %s returning DNS fail.\n", 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); send_wins_name_query_response(NAM_ERR, p, namerec);
return; return;
} }
@@ -1349,13 +1349,13 @@ void wins_process_name_query_request(struct subnet_record *subrec,
&& (namerec->data.death_time < p->timestamp) ) && (namerec->data.death_time < p->timestamp) )
{ {
DEBUG(3,("wins_process_name_query: name query for name %s - name expired. Returning fail.\n", 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); send_wins_name_query_response(NAM_ERR, p, namerec);
return; return;
} }
DEBUG(3,("wins_process_name_query: name query for name %s returning first IP %s.\n", 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); send_wins_name_query_response(0, p, namerec);
return; 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", 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); queue_dns_query(p, question, &namerec);
return; 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 \ 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", 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; return;
} }
DEBUG(3,("wins_process_name_release_request: %s name release for name %s \ 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. * 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)) if(!releasing_group_name && (question->name_type == 0x1d))
{ {
DEBUG(3,("wins_process_name_release_request: Ignoring request \ 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); send_wins_name_release_response(0, p);
return; 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 \ 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", 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); send_wins_name_release_response(NAM_ERR, p);
return; return;
} }
@@ -1576,7 +1576,7 @@ void wins_write_database(BOOL background)
int i; int i;
struct tm *tm; struct tm *tm;
DEBUGADD(4,("%-19s ", namestr(&namerec->name) )); DEBUGADD(4,("%-19s ", nmb_namestr(&namerec->name) ));
if( namerec->data.death_time != PERMANENT_TTL ) if( namerec->data.death_time != PERMANENT_TTL )
{ {

View File

@@ -236,7 +236,7 @@ static void fail_register(struct subnet_record *subrec, struct response_record *
struct nmb_name *nmbname) struct nmb_name *nmbname)
{ {
DEBUG(0,("fail_register: Failed to register name %s on subnet %s.\n", DEBUG(0,("fail_register: Failed to register name %s on subnet %s.\n",
namestr(nmbname), subrec->subnet_name)); nmb_namestr(nmbname), subrec->subnet_name));
} }
/**************************************************************************** /****************************************************************************