544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
|
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
|
-
+
+
+
+
+
-
+
|
return NULL;
}
}
/*
* Open a file.
*/
struct sftp_request *fxp_open_send(char *path, int type)
struct sftp_request *fxp_open_send(char *path, int type,
struct fxp_attrs *attrs)
{
struct sftp_request *req = sftp_alloc_request();
struct sftp_packet *pktout;
pktout = sftp_pkt_init(SSH_FXP_OPEN);
sftp_pkt_adduint32(pktout, req->id);
sftp_pkt_addstring(pktout, path);
sftp_pkt_adduint32(pktout, type);
if (attrs)
sftp_pkt_addattrs(pktout, *attrs);
else
sftp_pkt_adduint32(pktout, 0); /* (FIXME) empty ATTRS structure */
sftp_pkt_adduint32(pktout, 0); /* empty ATTRS structure */
sftp_send(pktout);
return req;
}
struct fxp_handle *fxp_open_recv(struct sftp_packet *pktin,
struct sftp_request *req)
|