summaryrefslogtreecommitdiff
path: root/source3/namepacket.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-07-17 18:33:36 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-07-17 18:33:36 +0000
commit25b30c08dce8c04b7b98c02ac1de61d7aa76798f (patch)
tree5d9cebebe73e69021e3fd0b5583db3a871543969 /source3/namepacket.c
parenta17469475973ca4e682753b6cfad7170577810fb (diff)
downloadsamba-25b30c08dce8c04b7b98c02ac1de61d7aa76798f.tar.gz
samba-25b30c08dce8c04b7b98c02ac1de61d7aa76798f.tar.bz2
samba-25b30c08dce8c04b7b98c02ac1de61d7aa76798f.zip
lots of changes to nmbd
lkcl (This used to be commit 45d3b2644733333c657c48a69719fec72881f7df)
Diffstat (limited to 'source3/namepacket.c')
-rw-r--r--source3/namepacket.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/source3/namepacket.c b/source3/namepacket.c
index 5afdb8af0e..acedbc0151 100644
--- a/source3/namepacket.c
+++ b/source3/namepacket.c
@@ -40,6 +40,40 @@ extern struct in_addr ipgrp;
static uint16 name_trn_id=0;
+
+/***************************************************************************
+ updates the unique transaction identifier
+ **************************************************************************/
+void debug_browse_data(char *outbuf, int len)
+{
+ int i,j;
+ for (i = 0; i < len; i+= 16)
+ {
+ DEBUG(4, ("%3x char ", i));
+
+ for (j = 0; j < 16; j++)
+ {
+ unsigned char x = outbuf[i+j];
+ if (x < 32 || x > 127) x = '.';
+
+ if (i+j >= len) break;
+ DEBUG(4, ("%c", x));
+ }
+
+ DEBUG(4, (" hex ", i));
+
+ for (j = 0; j < 16; j++)
+ {
+ if (i+j >= len) break;
+ DEBUG(4, (" %02x", outbuf[i+j]));
+ }
+
+ DEBUG(4, ("\n"));
+ }
+
+}
+
+
/***************************************************************************
updates the unique transaction identifier
**************************************************************************/
@@ -138,7 +172,7 @@ void initiate_netbios_packet(uint16 *id,
reply to a netbios name packet
****************************************************************************/
void reply_netbios_packet(struct packet_struct *p1,int trn_id,
- int rcode,int opcode, BOOL recurse,
+ int rcode, int rcv_code, int opcode, BOOL recurse,
struct nmb_name *rr_name,int rr_type,int rr_class,int ttl,
char *data,int len)
{
@@ -150,7 +184,7 @@ void reply_netbios_packet(struct packet_struct *p1,int trn_id,
p = *p1;
- switch (rr_type)
+ switch (rcv_code)
{
case NMB_STATUS:
{
@@ -539,5 +573,9 @@ BOOL send_mailslot_reply(char *mailslot,int fd,char *buf,int len,char *srcname,
p.timestamp = time(NULL);
p.packet_type = DGRAM_PACKET;
+ DEBUG(4,("send mailslot %s from %s %s", mailslot,
+ inet_ntoa(src_ip),namestr(&dgram->source_name)));
+ DEBUG(4,("to %s %s\n", inet_ntoa(dest_ip),namestr(&dgram->dest_name)));
+
return(send_packet(&p));
}