Add a new helper function _set_itt() that can be used to set the itt of

a pdu, instead of having to twiddle the bits and bytes manually.
This commit is contained in:
Ronnie Sahlberg
2011-01-02 17:45:55 +11:00
parent 72f9d8fa82
commit 1569624fd2
2 changed files with 7 additions and 0 deletions

View File

@@ -280,6 +280,12 @@ iscsi_process_pdu(struct iscsi_context *iscsi, struct iscsi_in_pdu *in)
return 0;
}
void
iscsi_pdu_set_itt(struct iscsi_pdu *pdu, uint32_t itt)
{
*(uint32_t *)&pdu->outdata.data[16] = htonl(itt);
}
void
iscsi_pdu_set_pduflags(struct iscsi_pdu *pdu, unsigned char flags)
{