Lines Matching refs:len

97 	size_t len;  in fc_ct_ns_fill()  local
139 len = strnlen(fc_host_symbolic_name(lport->host), 255); in fc_ct_ns_fill()
140 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rspn) + len, in fc_ct_ns_fill()
144 fc_host_symbolic_name(lport->host), len); in fc_ct_ns_fill()
145 ct->payload.spn.fr_name_len = len; in fc_ct_ns_fill()
149 len = strnlen(fc_host_symbolic_name(lport->host), 255); in fc_ct_ns_fill()
150 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rsnn) + len, in fc_ct_ns_fill()
154 fc_host_symbolic_name(lport->host), len); in fc_ct_ns_fill()
155 ct->payload.snn.fr_name_len = len; in fc_ct_ns_fill()
167 const char *in, size_t len) in fc_ct_ms_fill_attr() argument
171 copied = strscpy(entry->value, in, len); in fc_ct_ms_fill_attr()
172 if (copied > 0 && copied + 1 < len) in fc_ct_ms_fill_attr()
173 memset(entry->value + copied + 1, 0, len - copied - 1); in fc_ct_ms_fill_attr()
191 size_t len; in fc_ct_ms_fill() local
200 len = sizeof(struct fc_fdmi_rhba); in fc_ct_ms_fill()
201 len -= sizeof(struct fc_fdmi_attr_entry); in fc_ct_ms_fill()
202 len += (numattrs * FC_FDMI_ATTR_ENTRY_HEADER_LEN); in fc_ct_ms_fill()
203 len += FC_FDMI_HBA_ATTR_NODENAME_LEN; in fc_ct_ms_fill()
204 len += FC_FDMI_HBA_ATTR_MANUFACTURER_LEN; in fc_ct_ms_fill()
205 len += FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN; in fc_ct_ms_fill()
206 len += FC_FDMI_HBA_ATTR_MODEL_LEN; in fc_ct_ms_fill()
207 len += FC_FDMI_HBA_ATTR_MODELDESCR_LEN; in fc_ct_ms_fill()
208 len += FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN; in fc_ct_ms_fill()
209 len += FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN; in fc_ct_ms_fill()
210 len += FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN; in fc_ct_ms_fill()
211 len += FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN; in fc_ct_ms_fill()
212 len += FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN; in fc_ct_ms_fill()
213 len += FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN; in fc_ct_ms_fill()
217 len += FC_FDMI_HBA_ATTR_NODESYMBLNAME_LEN; in fc_ct_ms_fill()
218 len += FC_FDMI_HBA_ATTR_VENDORSPECIFICINFO_LEN; in fc_ct_ms_fill()
219 len += FC_FDMI_HBA_ATTR_NUMBEROFPORTS_LEN; in fc_ct_ms_fill()
220 len += FC_FDMI_HBA_ATTR_FABRICNAME_LEN; in fc_ct_ms_fill()
221 len += FC_FDMI_HBA_ATTR_BIOSVERSION_LEN; in fc_ct_ms_fill()
222 len += FC_FDMI_HBA_ATTR_BIOSSTATE_LEN; in fc_ct_ms_fill()
223 len += FC_FDMI_HBA_ATTR_VENDORIDENTIFIER_LEN; in fc_ct_ms_fill()
226 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, in fc_ct_ms_fill()
243 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
244 len += FC_FDMI_HBA_ATTR_NODENAME_LEN; in fc_ct_ms_fill()
247 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
254 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
255 len += FC_FDMI_HBA_ATTR_MANUFACTURER_LEN; in fc_ct_ms_fill()
258 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
266 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
267 len += FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN; in fc_ct_ms_fill()
270 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
278 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
279 len += FC_FDMI_HBA_ATTR_MODEL_LEN; in fc_ct_ms_fill()
282 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
290 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
291 len += FC_FDMI_HBA_ATTR_MODELDESCR_LEN; in fc_ct_ms_fill()
294 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
302 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
303 len += FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN; in fc_ct_ms_fill()
306 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
314 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
315 len += FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN; in fc_ct_ms_fill()
318 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
326 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
327 len += FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN; in fc_ct_ms_fill()
330 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
338 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
339 len += FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN; in fc_ct_ms_fill()
342 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
350 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
351 len += FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN; in fc_ct_ms_fill()
354 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
364 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
365 len += FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN; in fc_ct_ms_fill()
368 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
376 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
377 len += FC_FDMI_HBA_ATTR_NODESYMBLNAME_LEN; in fc_ct_ms_fill()
380 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
388 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
389 len += FC_FDMI_HBA_ATTR_VENDORSPECIFICINFO_LEN; in fc_ct_ms_fill()
392 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
399 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
400 len += FC_FDMI_HBA_ATTR_NUMBEROFPORTS_LEN; in fc_ct_ms_fill()
403 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
410 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
411 len += FC_FDMI_HBA_ATTR_FABRICNAME_LEN; in fc_ct_ms_fill()
414 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
421 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
422 len += FC_FDMI_HBA_ATTR_BIOSVERSION_LEN; in fc_ct_ms_fill()
425 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
433 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
434 len += FC_FDMI_HBA_ATTR_BIOSSTATE_LEN; in fc_ct_ms_fill()
437 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
444 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
445 len += FC_FDMI_HBA_ATTR_VENDORIDENTIFIER_LEN; in fc_ct_ms_fill()
448 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
457 len = sizeof(struct fc_fdmi_rpa); in fc_ct_ms_fill()
458 len -= sizeof(struct fc_fdmi_attr_entry); in fc_ct_ms_fill()
459 len += (numattrs * FC_FDMI_ATTR_ENTRY_HEADER_LEN); in fc_ct_ms_fill()
460 len += FC_FDMI_PORT_ATTR_FC4TYPES_LEN; in fc_ct_ms_fill()
461 len += FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN; in fc_ct_ms_fill()
462 len += FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN; in fc_ct_ms_fill()
463 len += FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN; in fc_ct_ms_fill()
464 len += FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN; in fc_ct_ms_fill()
465 len += FC_FDMI_PORT_ATTR_HOSTNAME_LEN; in fc_ct_ms_fill()
471 len += FC_FDMI_PORT_ATTR_NODENAME_LEN; in fc_ct_ms_fill()
472 len += FC_FDMI_PORT_ATTR_PORTNAME_LEN; in fc_ct_ms_fill()
473 len += FC_FDMI_PORT_ATTR_SYMBOLICNAME_LEN; in fc_ct_ms_fill()
474 len += FC_FDMI_PORT_ATTR_PORTTYPE_LEN; in fc_ct_ms_fill()
475 len += FC_FDMI_PORT_ATTR_SUPPORTEDCLASSSRVC_LEN; in fc_ct_ms_fill()
476 len += FC_FDMI_PORT_ATTR_FABRICNAME_LEN; in fc_ct_ms_fill()
477 len += FC_FDMI_PORT_ATTR_CURRENTFC4TYPE_LEN; in fc_ct_ms_fill()
478 len += FC_FDMI_PORT_ATTR_PORTSTATE_LEN; in fc_ct_ms_fill()
479 len += FC_FDMI_PORT_ATTR_DISCOVEREDPORTS_LEN; in fc_ct_ms_fill()
480 len += FC_FDMI_PORT_ATTR_PORTID_LEN; in fc_ct_ms_fill()
484 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, in fc_ct_ms_fill()
499 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
500 len += FC_FDMI_PORT_ATTR_FC4TYPES_LEN; in fc_ct_ms_fill()
503 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
510 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
511 len += FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN; in fc_ct_ms_fill()
514 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
522 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
523 len += FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN; in fc_ct_ms_fill()
526 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
533 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
534 len += FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN; in fc_ct_ms_fill()
537 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
544 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
545 len += FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN; in fc_ct_ms_fill()
548 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
558 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
559 len += FC_FDMI_PORT_ATTR_HOSTNAME_LEN; in fc_ct_ms_fill()
562 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
579 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
580 len += FC_FDMI_PORT_ATTR_NODENAME_LEN; in fc_ct_ms_fill()
583 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
590 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
591 len += FC_FDMI_PORT_ATTR_PORTNAME_LEN; in fc_ct_ms_fill()
594 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
601 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
602 len += FC_FDMI_PORT_ATTR_SYMBOLICNAME_LEN; in fc_ct_ms_fill()
605 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
613 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
614 len += FC_FDMI_PORT_ATTR_PORTTYPE_LEN; in fc_ct_ms_fill()
617 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
624 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
625 len += FC_FDMI_PORT_ATTR_SUPPORTEDCLASSSRVC_LEN; in fc_ct_ms_fill()
628 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
635 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
636 len += FC_FDMI_PORT_ATTR_FABRICNAME_LEN; in fc_ct_ms_fill()
639 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
646 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
647 len += FC_FDMI_PORT_ATTR_CURRENTFC4TYPE_LEN; in fc_ct_ms_fill()
650 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
657 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
658 len += FC_FDMI_PORT_ATTR_PORTSTATE_LEN; in fc_ct_ms_fill()
661 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
668 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
669 len += FC_FDMI_PORT_ATTR_DISCOVEREDPORTS_LEN; in fc_ct_ms_fill()
672 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
679 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
680 len += FC_FDMI_PORT_ATTR_PORTID_LEN; in fc_ct_ms_fill()
683 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
690 len = sizeof(struct fc_fdmi_dprt); in fc_ct_ms_fill()
691 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, in fc_ct_ms_fill()
698 len = sizeof(struct fc_fdmi_dhba); in fc_ct_ms_fill()
699 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, in fc_ct_ms_fill()