Add two new helpers iscsi_pdu_set_[datasn|bufferoffset]()
These two helpers can be used to set the corresponding fields in a DATAOUT PDU
This commit is contained in:
12
lib/pdu.c
12
lib/pdu.c
@@ -318,12 +318,24 @@ iscsi_pdu_set_cmdsn(struct iscsi_pdu *pdu, uint32_t cmdsn)
|
||||
*(uint32_t *)&pdu->outdata.data[24] = htonl(cmdsn);
|
||||
}
|
||||
|
||||
void
|
||||
iscsi_pdu_set_datasn(struct iscsi_pdu *pdu, uint32_t datasn)
|
||||
{
|
||||
*(uint32_t *)&pdu->outdata.data[36] = htonl(datasn);
|
||||
}
|
||||
|
||||
void
|
||||
iscsi_pdu_set_expstatsn(struct iscsi_pdu *pdu, uint32_t expstatsnsn)
|
||||
{
|
||||
*(uint32_t *)&pdu->outdata.data[28] = htonl(expstatsnsn);
|
||||
}
|
||||
|
||||
void
|
||||
iscsi_pdu_set_bufferoffset(struct iscsi_pdu *pdu, uint32_t bufferoffset)
|
||||
{
|
||||
*(uint32_t *)&pdu->outdata.data[40] = htonl(bufferoffset);
|
||||
}
|
||||
|
||||
void
|
||||
iscsi_pdu_set_cdb(struct iscsi_pdu *pdu, struct scsi_task *task)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user