X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fiscsi%2Fiscsi-private.h;h=2c04c1249d311f56298c36564f63b4e022059e2c;hp=8c95b4d1655bab6ec5a065176d2b1dbca94a9e40;hb=a8b30ad4dcea31c68ca809d2a6e6e4c7c6c30398;hpb=cb522f25cada0d3429c69d0fbaa5bd337a422cdd diff --git a/ccan/iscsi/iscsi-private.h b/ccan/iscsi/iscsi-private.h index 8c95b4d1..2c04c124 100644 --- a/ccan/iscsi/iscsi-private.h +++ b/ccan/iscsi/iscsi-private.h @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2010 by Ronnie Sahlberg This program is free software; you can redistribute it and/or modify @@ -14,13 +14,11 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . */ +#ifndef CCAN_ISCSI_PRIVATE_H +#define CCAN_ISCSI_PRIVATE_H #include -#ifndef _U_ -#define _U_ -#endif - #ifndef discard_const #define discard_const(ptr) ((void *)((intptr_t)(ptr))) #endif @@ -124,9 +122,9 @@ void iscsi_pdu_set_cmdsn(struct iscsi_pdu *pdu, uint32_t cmdsn); void iscsi_pdu_set_lun(struct iscsi_pdu *pdu, uint32_t lun); void iscsi_pdu_set_expstatsn(struct iscsi_pdu *pdu, uint32_t expstatsnsn); void iscsi_pdu_set_expxferlen(struct iscsi_pdu *pdu, uint32_t expxferlen); -int iscsi_pdu_add_data(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, unsigned char *dptr, int dsize); +int iscsi_pdu_add_data(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, const unsigned char *dptr, int dsize); int iscsi_queue_pdu(struct iscsi_context *iscsi, struct iscsi_pdu *pdu); -int iscsi_add_data(struct iscsi_data *data, unsigned char *dptr, int dsize, int pdualignment); +int iscsi_add_data(struct iscsi_data *data, const unsigned char *dptr, int dsize, int pdualignment); int iscsi_set_random_isid(struct iscsi_context *iscsi); struct scsi_task; @@ -141,3 +139,5 @@ int iscsi_process_logout_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pd int iscsi_process_scsi_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, const unsigned char *hdr, int size); int iscsi_process_scsi_data_in(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, const unsigned char *hdr, int size, int *is_finished); int iscsi_process_nop_out_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, const unsigned char *hdr, int size); + +#endif /* CCAN_ISCSI_PRIVATE_H */