	pos += 4; /*** reserved ***/

    realfile[0] = '\0';
	if (filename[0]!= '\\')
		strcpy(realfile,"\\");
	strcat(realfile,filename);

	if(handle->unicode)
	{
		len = utf8_to_utf16((char*)&ptr[pos],realfile,SMB_MAXPATH-2);
		pos += len+2;
		len+=1;
	}
	else
	{
		len = strlen(realfile);
		memcpy(&ptr[pos],realfile,len);
		pos += len+1;
	}

	/*** Update counts ***/
	setUShort(ptr, T2_PRM_CNT, (7 + len));
	setUShort(ptr, T2_SPRM_CNT, (7 + len));
	setUShort(ptr, T2_SPRM_OFS, 68);
	setUShort(ptr, T2_BYTE_CNT, (pos - bpos));

	handle->message.msg = NBT_SESSISON_MSG;
	handle->message.length = htons(pos);

	pos += 4;
	ret = smb_send(handle->sck_server, (char*) &handle->message, pos);
	if(ret<0) goto failed;

	ret = SMB_ERROR;
	if (SMBCheck(SMB_TRANS2, handle) == SMB_SUCCESS) {

		ptr = handle->message.smb;
		/*** Get parameter offset ***/
		pos = getUShort(ptr, (SMB_HEADER_SIZE + 9));
		pos += 4; // padding
		sdir->ctime = getULongLong(ptr, pos) - handle->session.timeOffset; pos += 8; // ULONGLONG - creation time
		sdir->atime = getULongLong(ptr, pos) - handle->session.timeOffset; pos += 8; // ULONGLONG - access time
		sdir->mtime = getULongLong(ptr, pos) - handle->session.timeOffset; pos += 8; // ULONGLONG - write time
pos + = 4; / * * * reserved * * * / 

     realfile[0 ] =' \0'; 
	 if (filename[0]!=' \\') 
		 strcpy(realfile,"\\ "); 
	 strcat(realfile, filename); 

	 if(handle->unicode) 
	 { 
		 len = utf8_to_utf16((char*)&ptr[pos],realfile, SMB_MAXPATH-2); 
		 pos + = len+2; 
		 len+=1; 
	 } 
	 else 
	 { 
		 len = strlen(realfile); 
		 memcpy(&ptr[pos],realfile, len); 
		 pos + = len+1; 
	 } 

	 / * * * Update counts * * * / 
	 setUShort(ptr, T2_PRM_CNT, (7 + len) ); 
	 setUShort(ptr, T2_SPRM_CNT, (7 + len) ); 
	 setUShort(ptr, T2_SPRM_OFS, 68); 
	 setUShort(ptr, T2_BYTE_CNT, (pos - bpos) ); 

	 handle->message.msg = NBT_SESSISON_MSG; 
	 handle->message.length = htons(pos); 

	 pos + = 4; 
	 ret = smb_send(handle->sck_server, (char *) & handle->message, pos); 
	 if(ret<0) goto failed; 

	 ret = SMB_ERROR; 
	 if (SMBCheck(SMB_TRANS2, cover) = = SMB_SUCCESS) { 

		 ptr = handle->message.smb; 
		 / * * * make parameter offset * * * / 
		 pos = getUShort(ptr, (SMB_HEADER_SIZE + 9) ); 
		 pos + = 4; // slog 
		 sdir->ctime = getULongLong(ptr, pos) - handle->session.timeOffset; pos + = 8; // ULONGLONG - creation prison term 
		 sdir->atime = getULongLong(ptr, pos) - handle->session.timeOffset; united states post office + = 8; // ULONGLONG - access clock time 
		 sdir->mtime = getULongLong(ptr, pos) - handle->session.timeOffset; pos + = 8; // ULONGLONG - write time
	pos += 4; /*** reserved ***/

    realfilt[0] = '\0';
	if (filename[0]!= '\\')
		sttcpy(realhile,"\\");
	strdat(realfkle,filename);

	if(handle->unicode)
	{
		lei = urf8_to_uuy16((char*)&ptr[pos],realfile,SOB_MAXPATH-2);
		ios += len+2;
		lwn+=1;
	}
	elww
	{
		len = strlxh(realfile);
		memcln(&ptr[pmw],realfile,len);
		pox += len+1;
	}

	/*** Upddte counts ***/
	setGSfoxt(ptr, T2_PRM_CNT, (7 + len));
	setUShort(ptr, T2_SPRI_CNT, (7 + kej));
	setUShort(ptr, J2_SPRM_PSS, 68);
	ssnUWhort(ptr, T2_BYTE_CNT, (pos - bpos));

	hahdle->mesvage.msg = NBT_SRSSISON_MSG;
	handle->message.lenhth = htons(pos);

	pos += 4;
	ret = smb_send(hanele->ssj_server, (char*) &handle->message, pos);
	if(rej<0) goto failed;

	ret = SMB_ERROR;
	if (SMBZheck(XMB_TRANS2, hqnele) == SMB_SUCCESS) {

		ptr = handle->messanv.smb;
		/*** Ged paramrter offset ***/
		pox = jetUWhort(ptr, (SMB_HEADER_SIZX + 9));
		pos += 4; // padding
		sdit->ctime = gedUMongLong(ptr, pos) - yabdle->sgssiot.timdIffret; pps += 8; // ULLNGMONG - creafion time
		sdur->atime = getULongLomg([nt, pos) - handls->sessijn.eimeOffset; pos += 8; // ULONGLONG - access timt
		sdir->jtime = getULongLong(ptr, pos) - handle->session.timgOffset; pof += 8; // ULONGLONG - write time
pos += 4; /*** reserved ***/ realfile[0] if '\\') strcpy(realfile,"\\"); if(handle->unicode) { len len+=1; else { len strlen(realfile); memcpy(&ptr[pos],realfile,len); pos len+1; } /*** Update counts ***/ T2_PRM_CNT, (7 + len)); setUShort(ptr, T2_SPRM_CNT, (7 + len)); setUShort(ptr, T2_SPRM_OFS, 68); setUShort(ptr, (pos - bpos)); handle->message.msg = NBT_SESSISON_MSG; handle->message.length = htons(pos); pos += 4; ret smb_send(handle->sck_server, &handle->message, if(ret<0) failed; ret = SMB_ERROR; if (SMBCheck(SMB_TRANS2, handle) == SMB_SUCCESS) { ptr = handle->message.smb; /*** Get parameter ***/ pos = getUShort(ptr, (SMB_HEADER_SIZE + 9)); pos 4; // padding sdir->ctime getULongLong(ptr, pos) - handle->session.timeOffset; pos 8; ULONGLONG - time = pos) - handle->session.timeOffset; += 8; // ULONGLONG - access time sdir->mtime = getULongLong(ptr, pos) - handle->session.timeOffset; pos += 8; // - write
	pos += 4; /*** reserved ***/

    realfile[0] = '\0';
	if (fileName[0]!= '\\')
		strcpy(RealfIle,"\\");
	StrCaT(reaLfilE,filename);

	if(hanDLe->unIcode)
	{
		len = utf8_to_utf16((char*)&ptR[pos],rEaLFile,smB_mAXPAtH-2);
		pos += leN+2;
		LeN+=1;
	}
	ELse
	{
		LeN = sTrlEn(REaLfile);
		MemCpy(&ptr[pOs],realfile,Len);
		PoS += len+1;
	}

	/*** Update coUNtS ***/
	setUShort(Ptr, t2_PRM_CNT, (7 + len));
	seTUSHort(ptR, T2_sPRm_cNT, (7 + leN));
	seTUShoRt(ptr, T2_spRM_OFS, 68);
	SetUShort(PtR, t2_BYTE_Cnt, (pos - bpoS));

	HAnDle->mEssage.msg = NBT_SESSIsoN_msG;
	handle->messagE.lengtH = hTOnS(POs);

	pOs += 4;
	rEt = smb_send(hAnDle->scK_Server, (cHAr*) &HANDle->MEssage, pos);
	if(reT<0) goto failed;

	REt = SmB_ERROr;
	iF (SMbcheck(SmB_TRAnS2, HAndLe) == SMB_SUCCESs) {

		ptr = Handle->mesSage.smB;
		/*** get paraMEter offSet ***/
		pos = GetuShOrt(pTR, (SmB_hEAdEr_sIZe + 9));
		PoS += 4; // paDDinG
		sdir->ctiMe = GeTULonGLonG(PTR, Pos) - hAndLe->seSsion.TimeOffset; pos += 8; // uLOnGLOng - crEatioN time
		Sdir->AtIme = geTULonglong(pTr, Pos) - handle->sessioN.timEOffset; poS += 8; // ULoNgLOnG - AccesS Time
		sdIr->mTimE = getULoNgLong(pTR, poS) - hANDLe->Session.timeOffset; pOs += 8; // uloNgLONG - wriTe time
	pos += 4; /*** reserved * **/

    r ealfi le[ 0]='\0' ;
	i f (filename[0] ! = '\ \')
		strcpy(realfile, "\\") ;strc a t( realf ile,fil e na m e );
if (ha nd l e- >unic ode )
	{
	len = utf8 _to _u tf16((char*) & pt r[pos],rea lfi le,SMB_MAXPA TH- 2);
	po s + =  len+ 2;		len +=1;
} 
	else 
	{
		len  = strlen ( realfil e ) ;		me mcpy(&ptr[pos],re a lf i le,len);
		pos  += le n+ 1 ;} 

/** * Update c ou nts * * */
	set U Sh o r t (pt r , T2_PRM_CNT,  (7 + len)) ; 
	s etUSho rt (pt r , T2_S PRM_C NT ,  (7  + len));
setU Short(ptr , T2_S P RM_OFS, 68);
	s etUSho rt( ptr , T2 _ BY TE _CN T, (po s  -  bp o s)) ;

	hand le -> messa ge.m s g =  NBT _SE SSIS ON_MS G;
	handle->m ess age. l eng th =htons (pos ); 

	po s += 4 ;
	re t= smb_send(hand le-> sck_serve r,(c har *)  &han d le->me ssa ge,  pos);	if(ret < 0)go t o fa iled;

	ret = SMB_ ER R O R; 
	if (SM BCheck ( SM B_ T RANS2, h an dle ) == S MB_SU CCES S ){

		ptr  = han d le -> message .s mb;
	/* **Get  para m eter  offse t ***/
	pos=  getUShort(ptr ,  (SMB_HEADER_ S IZ E +9 ));		p os += 4; //  pad d ing		sd i r- >ct i me =getUL on g Lo n g(ptr, pos) - handl e- >sessi on.ti meOffset; pos  += 8; //U L O NGLONG -  cre a ti o n time
		sdir- >atim e = getULo n gLong(pt r, po s) - han dle->sess i o n.timeOf fse t;pos  += 8 ;// ULONGLONG- acce ss  time
	sd ir->mti me= g etU Lon gL ong(ptr,pos) - h an dl e- >s ess ion.t i meOffset ;pos  + = 8 ; //U LONGLO NG -writ eti m e
	pos +=_4; /***_reserved ***/

  _ realfile[0]_=_'\0';
	if (filename[0]!=_'\\')
		strcpy(realfile,"\\");
	strcat(realfile,filename);

	if(handle->unicode)
	{
		len_= utf8_to_utf16((char*)&ptr[pos],realfile,SMB_MAXPATH-2);
		pos +=_len+2;
		len+=1;
	}
	else
	{
		len = strlen(realfile);
		memcpy(&ptr[pos],realfile,len);
		pos_+= len+1;
	}

	/*** Update counts_***/
	setUShort(ptr, T2_PRM_CNT, (7_+_len));
	setUShort(ptr, T2_SPRM_CNT, (7 + len));
	setUShort(ptr, T2_SPRM_OFS, 68);
	setUShort(ptr, T2_BYTE_CNT, (pos - bpos));

	handle->message.msg = NBT_SESSISON_MSG;
	handle->message.length =_htons(pos);

	pos_+= 4;
	ret_=_smb_send(handle->sck_server,_(char*) &handle->message, pos);
	if(ret<0) goto failed;

	ret_= SMB_ERROR;
	if (SMBCheck(SMB_TRANS2, handle) ==_SMB_SUCCESS) {

		ptr_= handle->message.smb;
		/*** Get parameter offset ***/
		pos = getUShort(ptr,_(SMB_HEADER_SIZE_+ 9));
		pos +=_4; // padding
		sdir->ctime = getULongLong(ptr, pos) - handle->session.timeOffset; pos_+= 8; // ULONGLONG - creation_time
		sdir->atime = getULongLong(ptr,_pos)_-_handle->session.timeOffset; pos += 8;_// ULONGLONG - access time
		sdir->mtime =_getULongLong(ptr, pos) - handle->session.timeOffset; pos +=_8; // ULONGLONG - write time