forked from linux-nvme/nvme-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccessors.h
More file actions
1551 lines (1362 loc) · 48.3 KB
/
accessors.h
File metadata and controls
1551 lines (1362 loc) · 48.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* This file is part of libnvme.
*
* Copyright (c) 2025, Dell Technologies Inc. or its subsidiaries.
* Authors: Martin Belanger <[email protected]>
*
* ____ _ _ ____ _
* / ___| ___ _ __ ___ _ __ __ _| |_ ___ __| | / ___|___ __| | ___
* | | _ / _ \ '_ \ / _ \ '__/ _` | __/ _ \/ _` | | | / _ \ / _` |/ _ \
* | |_| | __/ | | | __/ | | (_| | || __/ (_| | | |__| (_) | (_| | __/
* \____|\___|_| |_|\___|_| \__,_|\__\___|\__,_| \____\___/ \__,_|\___|
*
* Auto-generated struct member accessors (setter/getter)
*
* To update run: meson compile -C [BUILD-DIR] update-accessors
* Or: make update-accessors
*/
#ifndef _ACCESSORS_H_
#define _ACCESSORS_H_
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <nvme/types.h>
/* Forward declarations. These are internal (opaque) structs. */
struct libnvme_fabrics_config;
struct libnvme_path;
struct libnvme_ns;
struct libnvme_ctrl;
struct libnvme_subsystem;
struct libnvme_host;
struct libnvme_fabric_options;
/****************************************************************************
* Accessors for: struct libnvme_fabrics_config
****************************************************************************/
/**
* libnvme_fabrics_config_set_queue_size() - Set queue_size.
* @p: The &struct libnvme_fabrics_config instance to update.
* @queue_size: Value to assign to the queue_size field.
*/
void libnvme_fabrics_config_set_queue_size(
struct libnvme_fabrics_config *p,
int queue_size);
/**
* libnvme_fabrics_config_get_queue_size() - Get queue_size.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the queue_size field.
*/
int libnvme_fabrics_config_get_queue_size(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_nr_io_queues() - Set nr_io_queues.
* @p: The &struct libnvme_fabrics_config instance to update.
* @nr_io_queues: Value to assign to the nr_io_queues field.
*/
void libnvme_fabrics_config_set_nr_io_queues(
struct libnvme_fabrics_config *p,
int nr_io_queues);
/**
* libnvme_fabrics_config_get_nr_io_queues() - Get nr_io_queues.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the nr_io_queues field.
*/
int libnvme_fabrics_config_get_nr_io_queues(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_reconnect_delay() - Set reconnect_delay.
* @p: The &struct libnvme_fabrics_config instance to update.
* @reconnect_delay: Value to assign to the reconnect_delay field.
*/
void libnvme_fabrics_config_set_reconnect_delay(
struct libnvme_fabrics_config *p,
int reconnect_delay);
/**
* libnvme_fabrics_config_get_reconnect_delay() - Get reconnect_delay.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the reconnect_delay field.
*/
int libnvme_fabrics_config_get_reconnect_delay(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_ctrl_loss_tmo() - Set ctrl_loss_tmo.
* @p: The &struct libnvme_fabrics_config instance to update.
* @ctrl_loss_tmo: Value to assign to the ctrl_loss_tmo field.
*/
void libnvme_fabrics_config_set_ctrl_loss_tmo(
struct libnvme_fabrics_config *p,
int ctrl_loss_tmo);
/**
* libnvme_fabrics_config_get_ctrl_loss_tmo() - Get ctrl_loss_tmo.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the ctrl_loss_tmo field.
*/
int libnvme_fabrics_config_get_ctrl_loss_tmo(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_fast_io_fail_tmo() - Set fast_io_fail_tmo.
* @p: The &struct libnvme_fabrics_config instance to update.
* @fast_io_fail_tmo: Value to assign to the fast_io_fail_tmo field.
*/
void libnvme_fabrics_config_set_fast_io_fail_tmo(
struct libnvme_fabrics_config *p,
int fast_io_fail_tmo);
/**
* libnvme_fabrics_config_get_fast_io_fail_tmo() - Get fast_io_fail_tmo.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the fast_io_fail_tmo field.
*/
int libnvme_fabrics_config_get_fast_io_fail_tmo(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_keep_alive_tmo() - Set keep_alive_tmo.
* @p: The &struct libnvme_fabrics_config instance to update.
* @keep_alive_tmo: Value to assign to the keep_alive_tmo field.
*/
void libnvme_fabrics_config_set_keep_alive_tmo(
struct libnvme_fabrics_config *p,
int keep_alive_tmo);
/**
* libnvme_fabrics_config_get_keep_alive_tmo() - Get keep_alive_tmo.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the keep_alive_tmo field.
*/
int libnvme_fabrics_config_get_keep_alive_tmo(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_nr_write_queues() - Set nr_write_queues.
* @p: The &struct libnvme_fabrics_config instance to update.
* @nr_write_queues: Value to assign to the nr_write_queues field.
*/
void libnvme_fabrics_config_set_nr_write_queues(
struct libnvme_fabrics_config *p,
int nr_write_queues);
/**
* libnvme_fabrics_config_get_nr_write_queues() - Get nr_write_queues.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the nr_write_queues field.
*/
int libnvme_fabrics_config_get_nr_write_queues(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_nr_poll_queues() - Set nr_poll_queues.
* @p: The &struct libnvme_fabrics_config instance to update.
* @nr_poll_queues: Value to assign to the nr_poll_queues field.
*/
void libnvme_fabrics_config_set_nr_poll_queues(
struct libnvme_fabrics_config *p,
int nr_poll_queues);
/**
* libnvme_fabrics_config_get_nr_poll_queues() - Get nr_poll_queues.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the nr_poll_queues field.
*/
int libnvme_fabrics_config_get_nr_poll_queues(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_tos() - Set tos.
* @p: The &struct libnvme_fabrics_config instance to update.
* @tos: Value to assign to the tos field.
*/
void libnvme_fabrics_config_set_tos(struct libnvme_fabrics_config *p, int tos);
/**
* libnvme_fabrics_config_get_tos() - Get tos.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the tos field.
*/
int libnvme_fabrics_config_get_tos(const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_keyring_id() - Set keyring_id.
* @p: The &struct libnvme_fabrics_config instance to update.
* @keyring_id: Value to assign to the keyring_id field.
*/
void libnvme_fabrics_config_set_keyring_id(
struct libnvme_fabrics_config *p,
long keyring_id);
/**
* libnvme_fabrics_config_get_keyring_id() - Get keyring_id.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the keyring_id field.
*/
long libnvme_fabrics_config_get_keyring_id(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_tls_key_id() - Set tls_key_id.
* @p: The &struct libnvme_fabrics_config instance to update.
* @tls_key_id: Value to assign to the tls_key_id field.
*/
void libnvme_fabrics_config_set_tls_key_id(
struct libnvme_fabrics_config *p,
long tls_key_id);
/**
* libnvme_fabrics_config_get_tls_key_id() - Get tls_key_id.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the tls_key_id field.
*/
long libnvme_fabrics_config_get_tls_key_id(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_tls_configured_key_id() - Setter.
* @p: The &struct libnvme_fabrics_config instance to update.
* @tls_configured_key_id: Value to assign to the tls_configured_key_id field.
*/
void libnvme_fabrics_config_set_tls_configured_key_id(
struct libnvme_fabrics_config *p,
long tls_configured_key_id);
/**
* libnvme_fabrics_config_get_tls_configured_key_id() - Getter.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the tls_configured_key_id field.
*/
long libnvme_fabrics_config_get_tls_configured_key_id(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_duplicate_connect() - Set duplicate_connect.
* @p: The &struct libnvme_fabrics_config instance to update.
* @duplicate_connect: Value to assign to the duplicate_connect field.
*/
void libnvme_fabrics_config_set_duplicate_connect(
struct libnvme_fabrics_config *p,
bool duplicate_connect);
/**
* libnvme_fabrics_config_get_duplicate_connect() - Get duplicate_connect.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the duplicate_connect field.
*/
bool libnvme_fabrics_config_get_duplicate_connect(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_disable_sqflow() - Set disable_sqflow.
* @p: The &struct libnvme_fabrics_config instance to update.
* @disable_sqflow: Value to assign to the disable_sqflow field.
*/
void libnvme_fabrics_config_set_disable_sqflow(
struct libnvme_fabrics_config *p,
bool disable_sqflow);
/**
* libnvme_fabrics_config_get_disable_sqflow() - Get disable_sqflow.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the disable_sqflow field.
*/
bool libnvme_fabrics_config_get_disable_sqflow(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_hdr_digest() - Set hdr_digest.
* @p: The &struct libnvme_fabrics_config instance to update.
* @hdr_digest: Value to assign to the hdr_digest field.
*/
void libnvme_fabrics_config_set_hdr_digest(
struct libnvme_fabrics_config *p,
bool hdr_digest);
/**
* libnvme_fabrics_config_get_hdr_digest() - Get hdr_digest.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the hdr_digest field.
*/
bool libnvme_fabrics_config_get_hdr_digest(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_data_digest() - Set data_digest.
* @p: The &struct libnvme_fabrics_config instance to update.
* @data_digest: Value to assign to the data_digest field.
*/
void libnvme_fabrics_config_set_data_digest(
struct libnvme_fabrics_config *p,
bool data_digest);
/**
* libnvme_fabrics_config_get_data_digest() - Get data_digest.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the data_digest field.
*/
bool libnvme_fabrics_config_get_data_digest(
const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_tls() - Set tls.
* @p: The &struct libnvme_fabrics_config instance to update.
* @tls: Value to assign to the tls field.
*/
void libnvme_fabrics_config_set_tls(struct libnvme_fabrics_config *p, bool tls);
/**
* libnvme_fabrics_config_get_tls() - Get tls.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the tls field.
*/
bool libnvme_fabrics_config_get_tls(const struct libnvme_fabrics_config *p);
/**
* libnvme_fabrics_config_set_concat() - Set concat.
* @p: The &struct libnvme_fabrics_config instance to update.
* @concat: Value to assign to the concat field.
*/
void libnvme_fabrics_config_set_concat(
struct libnvme_fabrics_config *p,
bool concat);
/**
* libnvme_fabrics_config_get_concat() - Get concat.
* @p: The &struct libnvme_fabrics_config instance to query.
*
* Return: The value of the concat field.
*/
bool libnvme_fabrics_config_get_concat(const struct libnvme_fabrics_config *p);
/****************************************************************************
* Accessors for: struct libnvme_path
****************************************************************************/
/**
* libnvme_path_set_name() - Set name.
* @p: The &struct libnvme_path instance to update.
* @name: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_path_set_name(struct libnvme_path *p, const char *name);
/**
* libnvme_path_get_name() - Get name.
* @p: The &struct libnvme_path instance to query.
*
* Return: The value of the name field, or NULL if not set.
*/
const char *libnvme_path_get_name(const struct libnvme_path *p);
/**
* libnvme_path_set_sysfs_dir() - Set sysfs_dir.
* @p: The &struct libnvme_path instance to update.
* @sysfs_dir: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_path_set_sysfs_dir(struct libnvme_path *p, const char *sysfs_dir);
/**
* libnvme_path_get_sysfs_dir() - Get sysfs_dir.
* @p: The &struct libnvme_path instance to query.
*
* Return: The value of the sysfs_dir field, or NULL if not set.
*/
const char *libnvme_path_get_sysfs_dir(const struct libnvme_path *p);
/**
* libnvme_path_set_ana_state() - Set ana_state.
* @p: The &struct libnvme_path instance to update.
* @ana_state: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_path_set_ana_state(struct libnvme_path *p, const char *ana_state);
/**
* libnvme_path_get_ana_state() - Get ana_state.
* @p: The &struct libnvme_path instance to query.
*
* Return: The value of the ana_state field, or NULL if not set.
*/
const char *libnvme_path_get_ana_state(const struct libnvme_path *p);
/**
* libnvme_path_set_numa_nodes() - Set numa_nodes.
* @p: The &struct libnvme_path instance to update.
* @numa_nodes: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_path_set_numa_nodes(
struct libnvme_path *p,
const char *numa_nodes);
/**
* libnvme_path_get_numa_nodes() - Get numa_nodes.
* @p: The &struct libnvme_path instance to query.
*
* Return: The value of the numa_nodes field, or NULL if not set.
*/
const char *libnvme_path_get_numa_nodes(const struct libnvme_path *p);
/**
* libnvme_path_set_grpid() - Set grpid.
* @p: The &struct libnvme_path instance to update.
* @grpid: Value to assign to the grpid field.
*/
void libnvme_path_set_grpid(struct libnvme_path *p, int grpid);
/**
* libnvme_path_get_grpid() - Get grpid.
* @p: The &struct libnvme_path instance to query.
*
* Return: The value of the grpid field.
*/
int libnvme_path_get_grpid(const struct libnvme_path *p);
/****************************************************************************
* Accessors for: struct libnvme_ns
****************************************************************************/
/**
* libnvme_ns_set_nsid() - Set nsid.
* @p: The &struct libnvme_ns instance to update.
* @nsid: Value to assign to the nsid field.
*/
void libnvme_ns_set_nsid(struct libnvme_ns *p, __u32 nsid);
/**
* libnvme_ns_get_nsid() - Get nsid.
* @p: The &struct libnvme_ns instance to query.
*
* Return: The value of the nsid field.
*/
__u32 libnvme_ns_get_nsid(const struct libnvme_ns *p);
/**
* libnvme_ns_set_name() - Set name.
* @p: The &struct libnvme_ns instance to update.
* @name: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_ns_set_name(struct libnvme_ns *p, const char *name);
/**
* libnvme_ns_get_name() - Get name.
* @p: The &struct libnvme_ns instance to query.
*
* Return: The value of the name field, or NULL if not set.
*/
const char *libnvme_ns_get_name(const struct libnvme_ns *p);
/**
* libnvme_ns_set_sysfs_dir() - Set sysfs_dir.
* @p: The &struct libnvme_ns instance to update.
* @sysfs_dir: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_ns_set_sysfs_dir(struct libnvme_ns *p, const char *sysfs_dir);
/**
* libnvme_ns_get_sysfs_dir() - Get sysfs_dir.
* @p: The &struct libnvme_ns instance to query.
*
* Return: The value of the sysfs_dir field, or NULL if not set.
*/
const char *libnvme_ns_get_sysfs_dir(const struct libnvme_ns *p);
/**
* libnvme_ns_set_lba_shift() - Set lba_shift.
* @p: The &struct libnvme_ns instance to update.
* @lba_shift: Value to assign to the lba_shift field.
*/
void libnvme_ns_set_lba_shift(struct libnvme_ns *p, int lba_shift);
/**
* libnvme_ns_get_lba_shift() - Get lba_shift.
* @p: The &struct libnvme_ns instance to query.
*
* Return: The value of the lba_shift field.
*/
int libnvme_ns_get_lba_shift(const struct libnvme_ns *p);
/**
* libnvme_ns_set_lba_size() - Set lba_size.
* @p: The &struct libnvme_ns instance to update.
* @lba_size: Value to assign to the lba_size field.
*/
void libnvme_ns_set_lba_size(struct libnvme_ns *p, int lba_size);
/**
* libnvme_ns_get_lba_size() - Get lba_size.
* @p: The &struct libnvme_ns instance to query.
*
* Return: The value of the lba_size field.
*/
int libnvme_ns_get_lba_size(const struct libnvme_ns *p);
/**
* libnvme_ns_set_meta_size() - Set meta_size.
* @p: The &struct libnvme_ns instance to update.
* @meta_size: Value to assign to the meta_size field.
*/
void libnvme_ns_set_meta_size(struct libnvme_ns *p, int meta_size);
/**
* libnvme_ns_get_meta_size() - Get meta_size.
* @p: The &struct libnvme_ns instance to query.
*
* Return: The value of the meta_size field.
*/
int libnvme_ns_get_meta_size(const struct libnvme_ns *p);
/**
* libnvme_ns_set_lba_count() - Set lba_count.
* @p: The &struct libnvme_ns instance to update.
* @lba_count: Value to assign to the lba_count field.
*/
void libnvme_ns_set_lba_count(struct libnvme_ns *p, uint64_t lba_count);
/**
* libnvme_ns_get_lba_count() - Get lba_count.
* @p: The &struct libnvme_ns instance to query.
*
* Return: The value of the lba_count field.
*/
uint64_t libnvme_ns_get_lba_count(const struct libnvme_ns *p);
/**
* libnvme_ns_set_lba_util() - Set lba_util.
* @p: The &struct libnvme_ns instance to update.
* @lba_util: Value to assign to the lba_util field.
*/
void libnvme_ns_set_lba_util(struct libnvme_ns *p, uint64_t lba_util);
/**
* libnvme_ns_get_lba_util() - Get lba_util.
* @p: The &struct libnvme_ns instance to query.
*
* Return: The value of the lba_util field.
*/
uint64_t libnvme_ns_get_lba_util(const struct libnvme_ns *p);
/****************************************************************************
* Accessors for: struct libnvme_ctrl
****************************************************************************/
/**
* libnvme_ctrl_get_name() - Get name.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the name field, or NULL if not set.
*/
const char *libnvme_ctrl_get_name(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_sysfs_dir() - Get sysfs_dir.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the sysfs_dir field, or NULL if not set.
*/
const char *libnvme_ctrl_get_sysfs_dir(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_firmware() - Get firmware.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the firmware field, or NULL if not set.
*/
const char *libnvme_ctrl_get_firmware(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_model() - Get model.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the model field, or NULL if not set.
*/
const char *libnvme_ctrl_get_model(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_numa_node() - Get numa_node.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the numa_node field, or NULL if not set.
*/
const char *libnvme_ctrl_get_numa_node(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_queue_count() - Get queue_count.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the queue_count field, or NULL if not set.
*/
const char *libnvme_ctrl_get_queue_count(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_serial() - Get serial.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the serial field, or NULL if not set.
*/
const char *libnvme_ctrl_get_serial(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_sqsize() - Get sqsize.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the sqsize field, or NULL if not set.
*/
const char *libnvme_ctrl_get_sqsize(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_transport() - Get transport.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the transport field, or NULL if not set.
*/
const char *libnvme_ctrl_get_transport(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_subsysnqn() - Get subsysnqn.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the subsysnqn field, or NULL if not set.
*/
const char *libnvme_ctrl_get_subsysnqn(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_traddr() - Get traddr.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the traddr field, or NULL if not set.
*/
const char *libnvme_ctrl_get_traddr(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_trsvcid() - Get trsvcid.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the trsvcid field, or NULL if not set.
*/
const char *libnvme_ctrl_get_trsvcid(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_dhchap_host_key() - Set dhchap_host_key.
* @p: The &struct libnvme_ctrl instance to update.
* @dhchap_host_key: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_ctrl_set_dhchap_host_key(
struct libnvme_ctrl *p,
const char *dhchap_host_key);
/**
* libnvme_ctrl_get_dhchap_host_key() - Get dhchap_host_key.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the dhchap_host_key field, or NULL if not set.
*/
const char *libnvme_ctrl_get_dhchap_host_key(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_dhchap_ctrl_key() - Set dhchap_ctrl_key.
* @p: The &struct libnvme_ctrl instance to update.
* @dhchap_ctrl_key: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_ctrl_set_dhchap_ctrl_key(
struct libnvme_ctrl *p,
const char *dhchap_ctrl_key);
/**
* libnvme_ctrl_get_dhchap_ctrl_key() - Get dhchap_ctrl_key.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the dhchap_ctrl_key field, or NULL if not set.
*/
const char *libnvme_ctrl_get_dhchap_ctrl_key(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_keyring() - Set keyring.
* @p: The &struct libnvme_ctrl instance to update.
* @keyring: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_ctrl_set_keyring(struct libnvme_ctrl *p, const char *keyring);
/**
* libnvme_ctrl_get_keyring() - Get keyring.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the keyring field, or NULL if not set.
*/
const char *libnvme_ctrl_get_keyring(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_tls_key_identity() - Set tls_key_identity.
* @p: The &struct libnvme_ctrl instance to update.
* @tls_key_identity: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_ctrl_set_tls_key_identity(
struct libnvme_ctrl *p,
const char *tls_key_identity);
/**
* libnvme_ctrl_get_tls_key_identity() - Get tls_key_identity.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the tls_key_identity field, or NULL if not set.
*/
const char *libnvme_ctrl_get_tls_key_identity(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_tls_key() - Set tls_key.
* @p: The &struct libnvme_ctrl instance to update.
* @tls_key: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_ctrl_set_tls_key(struct libnvme_ctrl *p, const char *tls_key);
/**
* libnvme_ctrl_get_tls_key() - Get tls_key.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the tls_key field, or NULL if not set.
*/
const char *libnvme_ctrl_get_tls_key(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_cntrltype() - Get cntrltype.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the cntrltype field, or NULL if not set.
*/
const char *libnvme_ctrl_get_cntrltype(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_cntlid() - Get cntlid.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the cntlid field, or NULL if not set.
*/
const char *libnvme_ctrl_get_cntlid(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_dctype() - Get dctype.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the dctype field, or NULL if not set.
*/
const char *libnvme_ctrl_get_dctype(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_phy_slot() - Get phy_slot.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the phy_slot field, or NULL if not set.
*/
const char *libnvme_ctrl_get_phy_slot(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_host_traddr() - Get host_traddr.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the host_traddr field, or NULL if not set.
*/
const char *libnvme_ctrl_get_host_traddr(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_get_host_iface() - Get host_iface.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the host_iface field, or NULL if not set.
*/
const char *libnvme_ctrl_get_host_iface(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_discovery_ctrl() - Set discovery_ctrl.
* @p: The &struct libnvme_ctrl instance to update.
* @discovery_ctrl: Value to assign to the discovery_ctrl field.
*/
void libnvme_ctrl_set_discovery_ctrl(
struct libnvme_ctrl *p,
bool discovery_ctrl);
/**
* libnvme_ctrl_get_discovery_ctrl() - Get discovery_ctrl.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the discovery_ctrl field.
*/
bool libnvme_ctrl_get_discovery_ctrl(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_unique_discovery_ctrl() - Set unique_discovery_ctrl.
* @p: The &struct libnvme_ctrl instance to update.
* @unique_discovery_ctrl: Value to assign to the unique_discovery_ctrl field.
*/
void libnvme_ctrl_set_unique_discovery_ctrl(
struct libnvme_ctrl *p,
bool unique_discovery_ctrl);
/**
* libnvme_ctrl_get_unique_discovery_ctrl() - Get unique_discovery_ctrl.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the unique_discovery_ctrl field.
*/
bool libnvme_ctrl_get_unique_discovery_ctrl(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_discovered() - Set discovered.
* @p: The &struct libnvme_ctrl instance to update.
* @discovered: Value to assign to the discovered field.
*/
void libnvme_ctrl_set_discovered(struct libnvme_ctrl *p, bool discovered);
/**
* libnvme_ctrl_get_discovered() - Get discovered.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the discovered field.
*/
bool libnvme_ctrl_get_discovered(const struct libnvme_ctrl *p);
/**
* libnvme_ctrl_set_persistent() - Set persistent.
* @p: The &struct libnvme_ctrl instance to update.
* @persistent: Value to assign to the persistent field.
*/
void libnvme_ctrl_set_persistent(struct libnvme_ctrl *p, bool persistent);
/**
* libnvme_ctrl_get_persistent() - Get persistent.
* @p: The &struct libnvme_ctrl instance to query.
*
* Return: The value of the persistent field.
*/
bool libnvme_ctrl_get_persistent(const struct libnvme_ctrl *p);
/****************************************************************************
* Accessors for: struct libnvme_subsystem
****************************************************************************/
/**
* libnvme_subsystem_get_name() - Get name.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the name field, or NULL if not set.
*/
const char *libnvme_subsystem_get_name(const struct libnvme_subsystem *p);
/**
* libnvme_subsystem_get_sysfs_dir() - Get sysfs_dir.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the sysfs_dir field, or NULL if not set.
*/
const char *libnvme_subsystem_get_sysfs_dir(const struct libnvme_subsystem *p);
/**
* libnvme_subsystem_get_subsysnqn() - Get subsysnqn.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the subsysnqn field, or NULL if not set.
*/
const char *libnvme_subsystem_get_subsysnqn(const struct libnvme_subsystem *p);
/**
* libnvme_subsystem_get_model() - Get model.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the model field, or NULL if not set.
*/
const char *libnvme_subsystem_get_model(const struct libnvme_subsystem *p);
/**
* libnvme_subsystem_get_serial() - Get serial.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the serial field, or NULL if not set.
*/
const char *libnvme_subsystem_get_serial(const struct libnvme_subsystem *p);
/**
* libnvme_subsystem_get_firmware() - Get firmware.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the firmware field, or NULL if not set.
*/
const char *libnvme_subsystem_get_firmware(const struct libnvme_subsystem *p);
/**
* libnvme_subsystem_get_subsystype() - Get subsystype.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the subsystype field, or NULL if not set.
*/
const char *libnvme_subsystem_get_subsystype(const struct libnvme_subsystem *p);
/**
* libnvme_subsystem_set_application() - Set application.
* @p: The &struct libnvme_subsystem instance to update.
* @application: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_subsystem_set_application(
struct libnvme_subsystem *p,
const char *application);
/**
* libnvme_subsystem_get_application() - Get application.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the application field, or NULL if not set.
*/
const char *libnvme_subsystem_get_application(
const struct libnvme_subsystem *p);
/**
* libnvme_subsystem_set_iopolicy() - Set iopolicy.
* @p: The &struct libnvme_subsystem instance to update.
* @iopolicy: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_subsystem_set_iopolicy(
struct libnvme_subsystem *p,
const char *iopolicy);
/**
* libnvme_subsystem_get_iopolicy() - Get iopolicy.
* @p: The &struct libnvme_subsystem instance to query.
*
* Return: The value of the iopolicy field, or NULL if not set.
*/
const char *libnvme_subsystem_get_iopolicy(const struct libnvme_subsystem *p);
/****************************************************************************
* Accessors for: struct libnvme_host
****************************************************************************/
/**
* libnvme_host_get_hostnqn() - Get hostnqn.
* @p: The &struct libnvme_host instance to query.
*
* Return: The value of the hostnqn field, or NULL if not set.
*/
const char *libnvme_host_get_hostnqn(const struct libnvme_host *p);
/**
* libnvme_host_get_hostid() - Get hostid.
* @p: The &struct libnvme_host instance to query.
*
* Return: The value of the hostid field, or NULL if not set.
*/
const char *libnvme_host_get_hostid(const struct libnvme_host *p);
/**
* libnvme_host_set_dhchap_host_key() - Set dhchap_host_key.
* @p: The &struct libnvme_host instance to update.
* @dhchap_host_key: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_host_set_dhchap_host_key(
struct libnvme_host *p,
const char *dhchap_host_key);
/**
* libnvme_host_get_dhchap_host_key() - Get dhchap_host_key.
* @p: The &struct libnvme_host instance to query.
*
* Return: The value of the dhchap_host_key field, or NULL if not set.
*/
const char *libnvme_host_get_dhchap_host_key(const struct libnvme_host *p);
/**
* libnvme_host_set_hostsymname() - Set hostsymname.
* @p: The &struct libnvme_host instance to update.
* @hostsymname: New string; a copy is stored. Pass NULL to clear.
*/
void libnvme_host_set_hostsymname(
struct libnvme_host *p,
const char *hostsymname);
/**
* libnvme_host_get_hostsymname() - Get hostsymname.