#define SMBffirst 0x82 /* find first */
#define SMBfunique 0x83 /* find unique */
#define SMBfclose 0x84 /* find close */
+#define SMBkeepalive 0x85 /* keepalive */
#define SMBinvalid 0xFE /* invalid command */
/* Extended 2.0 protocol */
{
unsigned char buf[4];
- buf[0] = 0x85;
+ buf[0] = SMBkeepalive;
buf[1] = buf[2] = buf[3] = 0;
return(write_socket_data(client,(char *)buf,4) == 4);
len = smb_len(inbuf);
msg_type = CVAL(inbuf,0);
- if (msg_type == 0x85)
+ if (msg_type == SMBkeepalive)
DEBUG(5,("Got keepalive packet\n"));
}
return len;
/* Ignore session keepalives. */
- if(CVAL(inbuf,0) != 0x85)
+ if(CVAL(inbuf,0) != SMBkeepalive)
break;
}
}
/* Ignore session keepalive packets. */
- if(CVAL(buffer,0) != 0x85)
+ if(CVAL(buffer,0) != SMBkeepalive)
break;
}
show_msg(buffer);
do {
ret = receive_message_or_smb(inbuf,bufsize,timeout);
- got_keepalive = (ret && (CVAL(inbuf,0) == 0x85));
+ got_keepalive = (ret && (CVAL(inbuf,0) == SMBkeepalive));
} while (ret && got_keepalive);
return ret;
if (msg_type == 0)
show_msg(inbuf);
- else if(msg_type == 0x85)
+ else if(msg_type == SMBkeepalive)
return; /* Keepalive packet. */
nread = construct_reply(inbuf,outbuf,nread,max_send);
case 0x89: /* session keepalive request
(some old clients produce this?) */
- CVAL(outbuf,0) = 0x85;
+ CVAL(outbuf,0) = SMBkeepalive;
CVAL(outbuf,3) = 0;
break;
DEBUG(0,("Unexpected session response\n"));
break;
- case 0x85: /* session keepalive */
+ case SMBkeepalive: /* session keepalive */
default:
return(0);
}