Lines Matching defs:hdr

5727 scsi_transportid_sbuf(struct sbuf *sb, struct scsi_transportid_header *hdr,
5730 switch (hdr->format_protocol & SCSI_TRN_PROTO_MASK) {
5735 fcp = (struct scsi_transportid_fcp *)hdr;
5745 spi = (struct scsi_transportid_spi *)hdr;
5762 sbp = (struct scsi_transportid_1394 *)hdr;
5772 rdma = (struct scsi_transportid_rdma *)hdr;
5785 if ((hdr->format_protocol & SCSI_TRN_FORMAT_MASK) ==
5789 dev = (struct scsi_transportid_iscsi_device *)hdr;
5800 } else if ((hdr->format_protocol & SCSI_TRN_FORMAT_MASK) ==
5804 port = (struct scsi_transportid_iscsi_port *)hdr;
5813 (hdr->format_protocol &
5848 sas = (struct scsi_transportid_sas *)hdr;
5862 "%#x", hdr->format_protocol & SCSI_TRN_PROTO_MASK);
5868 sop = (struct scsi_transportid_sop *)hdr;
5886 hdr->format_protocol & SCSI_TRN_PROTO_MASK);
5980 struct scsi_transportid_header **hdr,
6025 *hdr = malloc(alloc_size, type, flags);
6027 *hdr = malloc(alloc_size);
6029 if (*hdr == NULL) {
6040 bzero(*hdr, alloc_size);
6046 fcp = (struct scsi_transportid_fcp *)(*hdr);
6055 sbp = (struct scsi_transportid_1394 *)(*hdr);
6064 sas = (struct scsi_transportid_sas *)(*hdr);
6081 scsi_parse_transportid_spi(char *id_str, struct scsi_transportid_header **hdr,
6155 *hdr = (struct scsi_transportid_header *)spi;
6165 scsi_parse_transportid_rdma(char *id_str, struct scsi_transportid_header **hdr,
6299 *hdr = (struct scsi_transportid_header *)rdma;
6316 scsi_parse_transportid_iscsi(char *id_str, struct scsi_transportid_header **hdr,
6416 *hdr = (struct scsi_transportid_header *)iscsi;
6427 scsi_parse_transportid_sop(char *id_str, struct scsi_transportid_header **hdr,
6577 *hdr = (struct scsi_transportid_header *)sop;
6585 * hdr: Storage will be allocated for the transport ID.
6597 struct scsi_transportid_header **hdr,
6645 scsi_proto_map[table_entry].value, transportid_str, hdr,
6653 retval = scsi_parse_transportid_spi(transportid_str, hdr,
6661 retval = scsi_parse_transportid_rdma(transportid_str, hdr,
6669 retval = scsi_parse_transportid_iscsi(transportid_str, hdr,
6677 retval = scsi_parse_transportid_sop(transportid_str, hdr,
6947 scsi_attrib_volcoh_sbuf(struct sbuf *sb, struct scsi_mam_attribute_header *hdr,
6962 field_size = scsi_2btoul(hdr->length);
6963 avail_len = valid_len - sizeof(*hdr);
6968 "length %u", scsi_2btoul(hdr->id), avail_len,
6981 cur_ptr = hdr->attribute;
7057 scsi_attrib_vendser_sbuf(struct sbuf *sb, struct scsi_mam_attribute_header *hdr,
7068 field_size = scsi_2btoul(hdr->length);
7069 avail_len = valid_len - sizeof(*hdr);
7074 "length %u", scsi_2btoul(hdr->id), avail_len,
7088 scsi_2btoul(hdr->id));
7093 vendser = (struct scsi_attrib_vendser *)hdr->attribute;
7117 scsi_attrib_hexdump_sbuf(struct sbuf *sb, struct scsi_mam_attribute_header *hdr,
7128 field_size = scsi_2btoul(hdr->length);
7129 avail_len = valid_len - sizeof(*hdr);
7131 num_ptr = hdr->attribute;
7142 scsi_attrib_int_sbuf(struct sbuf *sb, struct scsi_mam_attribute_header *hdr,
7152 number_size = scsi_2btoul(hdr->length);
7154 avail_len = valid_len - sizeof(*hdr);
7159 "length %u", scsi_2btoul(hdr->id), avail_len,
7176 print_number = hdr->attribute[0];
7179 print_number = scsi_2btoul(hdr->attribute);
7182 print_number = scsi_3btoul(hdr->attribute);
7185 print_number = scsi_4btoul(hdr->attribute);
7188 print_number = scsi_8btou64(hdr->attribute);
7195 retval = scsi_attrib_hexdump_sbuf(sb, hdr, valid_len,
7227 scsi_attrib_ascii_sbuf(struct sbuf *sb, struct scsi_mam_attribute_header *hdr,
7236 avail_len = valid_len - sizeof(*hdr);
7237 field_size = scsi_2btoul(hdr->length);
7255 cam_strvis_sbuf(sb, hdr->attribute, print_size, strvis_flags);
7271 "length %u", scsi_2btoul(hdr->id), avail_len,
7281 scsi_attrib_text_sbuf(struct sbuf *sb, struct scsi_mam_attribute_header *hdr,
7291 avail_len = valid_len - sizeof(*hdr);
7292 field_size = scsi_2btoul(hdr->length);
7303 if (hdr->attribute[i] == '\0')
7305 else if (((unsigned char)hdr->attribute[i] < 0x80)
7307 sbuf_putc(sb, hdr->attribute[i]);
7310 (unsigned char)hdr->attribute[i]);
7320 "length %u", scsi_2btoul(hdr->id), avail_len,
7352 struct scsi_mam_attribute_header *hdr, uint32_t output_flags,
7357 switch (hdr->byte2 & SMA_FORMAT_MASK) {
7359 retval = scsi_attrib_ascii_sbuf(sb, hdr, valid_len,
7363 if (scsi_2btoul(hdr->length) <= 8)
7364 retval = scsi_attrib_int_sbuf(sb, hdr, valid_len,
7368 retval = scsi_attrib_hexdump_sbuf(sb, hdr, valid_len,
7373 retval = scsi_attrib_text_sbuf(sb, hdr, valid_len,
7380 "format 0x%x", hdr->byte2 & SMA_FORMAT_MASK);
7396 struct scsi_mam_attribute_header *hdr,
7407 if (valid_len < sizeof(*hdr))
7410 id = scsi_2btoul(hdr->id);
7419 len = scsi_2btoul(hdr->length);
7442 (hdr->byte2 & SMA_READ_ONLY) ? "RO" : "RW");
7448 scsi_attrib_sbuf(struct sbuf *sb, struct scsi_mam_attribute_header *hdr,
7461 if (valid_len < sizeof(*hdr)) {
7466 id = scsi_2btoul(hdr->id);
7487 scsi_attrib_prefix_sbuf(sb, output_flags, hdr, valid_len,
7491 retval = entry->to_str(sb, hdr, valid_len, entry->flags,
7501 scsi_attrib_prefix_sbuf(sb, output_flags, hdr,
7503 retval = entry->to_str(sb, hdr, valid_len, entry->flags,
7510 scsi_attrib_prefix_sbuf(sb, output_flags, hdr, valid_len, NULL);
7513 retval = scsi_attrib_value_sbuf(sb, valid_len, hdr, output_flags,