Lines Matching full:len

97 	size_t len;  in fc_ct_ns_fill()  local
139 len = strnlen(fc_host_symbolic_name(lport->host), in fc_ct_ns_fill()
141 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rspn) + len, in fc_ct_ns_fill()
145 fc_host_symbolic_name(lport->host), len); in fc_ct_ns_fill()
146 ct->payload.spn.fr_name_len = len; in fc_ct_ns_fill()
150 len = strnlen(fc_host_symbolic_name(lport->host), in fc_ct_ns_fill()
152 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rsnn) + len, in fc_ct_ns_fill()
156 fc_host_symbolic_name(lport->host), len); in fc_ct_ns_fill()
157 ct->payload.snn.fr_name_len = len; in fc_ct_ns_fill()
169 const char *in, size_t len) in fc_ct_ms_fill_attr() argument
173 copied = strscpy(entry->value, in, len); in fc_ct_ms_fill_attr()
174 if (copied > 0 && copied + 1 < len) in fc_ct_ms_fill_attr()
175 memset(entry->value + copied + 1, 0, len - copied - 1); in fc_ct_ms_fill_attr()
193 size_t len; in fc_ct_ms_fill() local
202 len = sizeof(struct fc_fdmi_rhba); in fc_ct_ms_fill()
203 len -= sizeof(struct fc_fdmi_attr_entry); in fc_ct_ms_fill()
204 len += (numattrs * FC_FDMI_ATTR_ENTRY_HEADER_LEN); in fc_ct_ms_fill()
205 len += FC_FDMI_HBA_ATTR_NODENAME_LEN; in fc_ct_ms_fill()
206 len += FC_FDMI_HBA_ATTR_MANUFACTURER_LEN; in fc_ct_ms_fill()
207 len += FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN; in fc_ct_ms_fill()
208 len += FC_FDMI_HBA_ATTR_MODEL_LEN; in fc_ct_ms_fill()
209 len += FC_FDMI_HBA_ATTR_MODELDESCR_LEN; in fc_ct_ms_fill()
210 len += FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN; in fc_ct_ms_fill()
211 len += FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN; in fc_ct_ms_fill()
212 len += FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN; in fc_ct_ms_fill()
213 len += FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN; in fc_ct_ms_fill()
214 len += FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN; in fc_ct_ms_fill()
215 len += FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN; in fc_ct_ms_fill()
219 len += FC_FDMI_HBA_ATTR_NODESYMBLNAME_LEN; in fc_ct_ms_fill()
220 len += FC_FDMI_HBA_ATTR_VENDORSPECIFICINFO_LEN; in fc_ct_ms_fill()
221 len += FC_FDMI_HBA_ATTR_NUMBEROFPORTS_LEN; in fc_ct_ms_fill()
222 len += FC_FDMI_HBA_ATTR_FABRICNAME_LEN; in fc_ct_ms_fill()
223 len += FC_FDMI_HBA_ATTR_BIOSVERSION_LEN; in fc_ct_ms_fill()
224 len += FC_FDMI_HBA_ATTR_BIOSSTATE_LEN; in fc_ct_ms_fill()
225 len += FC_FDMI_HBA_ATTR_VENDORIDENTIFIER_LEN; in fc_ct_ms_fill()
228 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, in fc_ct_ms_fill()
245 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
246 len += FC_FDMI_HBA_ATTR_NODENAME_LEN; in fc_ct_ms_fill()
249 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
256 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
257 len += FC_FDMI_HBA_ATTR_MANUFACTURER_LEN; in fc_ct_ms_fill()
260 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
268 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
269 len += FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN; in fc_ct_ms_fill()
272 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
280 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
281 len += FC_FDMI_HBA_ATTR_MODEL_LEN; in fc_ct_ms_fill()
284 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
292 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
293 len += FC_FDMI_HBA_ATTR_MODELDESCR_LEN; in fc_ct_ms_fill()
296 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
304 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
305 len += FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN; in fc_ct_ms_fill()
308 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
316 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
317 len += FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN; in fc_ct_ms_fill()
320 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
328 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
329 len += FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN; in fc_ct_ms_fill()
332 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
340 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
341 len += FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN; in fc_ct_ms_fill()
344 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
352 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
353 len += FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN; in fc_ct_ms_fill()
356 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
366 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
367 len += FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN; in fc_ct_ms_fill()
370 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
378 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
379 len += FC_FDMI_HBA_ATTR_NODESYMBLNAME_LEN; in fc_ct_ms_fill()
382 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
390 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
391 len += FC_FDMI_HBA_ATTR_VENDORSPECIFICINFO_LEN; in fc_ct_ms_fill()
394 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
401 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
402 len += FC_FDMI_HBA_ATTR_NUMBEROFPORTS_LEN; in fc_ct_ms_fill()
405 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
412 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
413 len += FC_FDMI_HBA_ATTR_FABRICNAME_LEN; in fc_ct_ms_fill()
416 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
423 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
424 len += FC_FDMI_HBA_ATTR_BIOSVERSION_LEN; in fc_ct_ms_fill()
427 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
435 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
436 len += FC_FDMI_HBA_ATTR_BIOSSTATE_LEN; in fc_ct_ms_fill()
439 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
446 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
447 len += FC_FDMI_HBA_ATTR_VENDORIDENTIFIER_LEN; in fc_ct_ms_fill()
450 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
459 len = sizeof(struct fc_fdmi_rpa); in fc_ct_ms_fill()
460 len -= sizeof(struct fc_fdmi_attr_entry); in fc_ct_ms_fill()
461 len += (numattrs * FC_FDMI_ATTR_ENTRY_HEADER_LEN); in fc_ct_ms_fill()
462 len += FC_FDMI_PORT_ATTR_FC4TYPES_LEN; in fc_ct_ms_fill()
463 len += FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN; in fc_ct_ms_fill()
464 len += FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN; in fc_ct_ms_fill()
465 len += FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN; in fc_ct_ms_fill()
466 len += FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN; in fc_ct_ms_fill()
467 len += FC_FDMI_PORT_ATTR_HOSTNAME_LEN; in fc_ct_ms_fill()
473 len += FC_FDMI_PORT_ATTR_NODENAME_LEN; in fc_ct_ms_fill()
474 len += FC_FDMI_PORT_ATTR_PORTNAME_LEN; in fc_ct_ms_fill()
475 len += FC_FDMI_PORT_ATTR_SYMBOLICNAME_LEN; in fc_ct_ms_fill()
476 len += FC_FDMI_PORT_ATTR_PORTTYPE_LEN; in fc_ct_ms_fill()
477 len += FC_FDMI_PORT_ATTR_SUPPORTEDCLASSSRVC_LEN; in fc_ct_ms_fill()
478 len += FC_FDMI_PORT_ATTR_FABRICNAME_LEN; in fc_ct_ms_fill()
479 len += FC_FDMI_PORT_ATTR_CURRENTFC4TYPE_LEN; in fc_ct_ms_fill()
480 len += FC_FDMI_PORT_ATTR_PORTSTATE_LEN; in fc_ct_ms_fill()
481 len += FC_FDMI_PORT_ATTR_DISCOVEREDPORTS_LEN; in fc_ct_ms_fill()
482 len += FC_FDMI_PORT_ATTR_PORTID_LEN; in fc_ct_ms_fill()
486 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, in fc_ct_ms_fill()
501 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
502 len += FC_FDMI_PORT_ATTR_FC4TYPES_LEN; in fc_ct_ms_fill()
505 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
512 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
513 len += FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN; in fc_ct_ms_fill()
516 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
524 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
525 len += FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN; in fc_ct_ms_fill()
528 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
535 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
536 len += FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN; in fc_ct_ms_fill()
539 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
546 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
547 len += FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN; in fc_ct_ms_fill()
550 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
560 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
561 len += FC_FDMI_PORT_ATTR_HOSTNAME_LEN; in fc_ct_ms_fill()
564 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
581 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
582 len += FC_FDMI_PORT_ATTR_NODENAME_LEN; in fc_ct_ms_fill()
585 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
592 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
593 len += FC_FDMI_PORT_ATTR_PORTNAME_LEN; in fc_ct_ms_fill()
596 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
603 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
604 len += FC_FDMI_PORT_ATTR_SYMBOLICNAME_LEN; in fc_ct_ms_fill()
607 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
615 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
616 len += FC_FDMI_PORT_ATTR_PORTTYPE_LEN; in fc_ct_ms_fill()
619 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
626 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
627 len += FC_FDMI_PORT_ATTR_SUPPORTEDCLASSSRVC_LEN; in fc_ct_ms_fill()
630 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
637 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
638 len += FC_FDMI_PORT_ATTR_FABRICNAME_LEN; in fc_ct_ms_fill()
641 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
648 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
649 len += FC_FDMI_PORT_ATTR_CURRENTFC4TYPE_LEN; in fc_ct_ms_fill()
652 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
659 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
660 len += FC_FDMI_PORT_ATTR_PORTSTATE_LEN; in fc_ct_ms_fill()
663 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
670 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
671 len += FC_FDMI_PORT_ATTR_DISCOVEREDPORTS_LEN; in fc_ct_ms_fill()
674 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
681 len = FC_FDMI_ATTR_ENTRY_HEADER_LEN; in fc_ct_ms_fill()
682 len += FC_FDMI_PORT_ATTR_PORTID_LEN; in fc_ct_ms_fill()
685 put_unaligned_be16(len, &entry->len); in fc_ct_ms_fill()
692 len = sizeof(struct fc_fdmi_dprt); in fc_ct_ms_fill()
693 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, in fc_ct_ms_fill()
700 len = sizeof(struct fc_fdmi_dhba); in fc_ct_ms_fill()
701 ct = fc_ct_hdr_fill(fp, op, len, FC_FST_MGMT, in fc_ct_ms_fill()