if (!pktin) { fxp_internal_error("did not receive a valid SFTP packet\n"); return 0; }
int fxp_setstat(char *fname, struct fxp_attrs attrs){    struct sftp_packet *pktin, *pktout;    int id;    pktout = sftp_pkt_init(SSH_FXP_SETSTAT);    sftp_pkt_adduint32(pktout, 0x678); /* request id */    sftp_pkt_addstring(pktout, fname);    sftp_pkt_addattrs(pktout, attrs);    sftp_send(pktout);    pktin = sftp_recv();    id = sftp_pkt_getuint32(pktin);    if (id != 0x678) {	fxp_internal_error("request ID mismatch\n");	return 0;    }    id = fxp_got_status(pktin);    if (id != 1) {    	return 0;    }    return 1;}