Files
@ d6b9b2ac5869
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public-bincomp/vmkernel64/release/iscsi/vmkapi_iscsi_transport_compat.h
d6b9b2ac5869
35.9 KiB
text/x-chdr
ESXi-5.5-U2
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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 | /* **********************************************************
* Copyright 2007 - 2009 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
***********************************************************************
* iSCSI Externally Exported Interfaces */ /**
* \defgroup ISCSI ISCSI Interfaces
* @{
*
* \defgroup IscsiTransport iSCSI Transport public interfaces
*
* Vmkernel-specific iSCSI constants & types which are shared with
* user-mode and driver code.
* @{
*
***********************************************************************
*/
#ifndef _VMKAPI_ISCSI_TRANSPORT_COMPAT_H
#define _VMKAPI_ISCSI_TRANSPORT_COMPAT_H
/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
#include "scsi/vmkapi_scsi_types.h"
#include "net/vmkapi_net_types.h"
/* iSCSI Transport API Revision */
#define VMK_ISCSI_TRANSPORT_REVISION_MAJOR 1
#define VMK_ISCSI_TRANSPORT_REVISION_MINOR 0
#define VMK_ISCSI_TRANSPORT_REVISION_UPDATE 0
#define VMK_ISCSI_TRANSPORT_REVISION_PATCH_LEVEL 0
#define VMK_ISCSI_TRANSPORT_REVISION \
VMK_REVISION_NUMBER(VMK_ISCSI_TRANSPORT)
/** \endcond never */
#define VMK_ISCSI_MAX_PARAM_BUFFER_SZ (4096)
#define VMK_ISCSI_MAX_SSID_BUFFER_SZ (1024)
#define VMK_ISCSI_MAX_TRANSPORT_NAME_SZ (256)
#define VMK_ISCSI_MAX_TRANSPORT_DESC_SZ (256)
/**
* \brief iSCSI Parameters
*
* iSCSI parameters are passed from user space code and then resent
* to the media driver. The Media Drivers use these by name. The data
* for the parameter is always passed in as an ASCII string. For
* instance numeric parameter will be passed in as "1234\0".
*/
typedef enum {
/**
* \brief Specify Max Receive Data Segment Length.
*
*/
VMK_ISCSI_CONN_PARAM_MAX_RECV_DLENGTH = 0,
/**
* \brief Specify Max Transmit Data Segment Length.
*
*/
VMK_ISCSI_CONN_PARAM_MAX_XMIT_DLENGTH = 1,
/**
* \brief Enable/Disable Header Digest.
*
*/
VMK_ISCSI_CONN_PARAM_HDRDGST_EN = 2,
/**
* \brief Enable/Disable Data Digest.
*
*/
VMK_ISCSI_CONN_PARAM_DATADGST_EN = 3,
/**
* \brief Enable/Disable Initital R2T.
*
*/
VMK_ISCSI_SESS_PARAM_INITIAL_R2T_EN = 4,
/**
* \brief Specifiy Maximum Outstanding R2T.
*
*/
VMK_ISCSI_SESS_PARAM_MAX_R2T = 5,
/**
* \brief Enable/Disable Immediate Data.
*
*/
VMK_ISCSI_SESS_PARAM_IMM_DATA_EN = 6,
/**
* \brief Specify First Burst Size.
*
*/
VMK_ISCSI_SESS_PARAM_FIRST_BURST = 7,
/**
* \brief Specify Max Burst Size.
*
*/
VMK_ISCSI_SESS_PARAM_MAX_BURST = 8,
/**
* \brief Enable/Disable Ordered PDU.
*
*/
VMK_ISCSI_SESS_PARAM_PDU_INORDER_EN = 9,
/**
* \brief Enable/Disable Inorder Data Sequence Delivery.
*
*/
VMK_ISCSI_SESS_PARAM_DATASEQ_INORDER_EN = 10,
/**
* \brief Specify Error Recovery Level.
*
*/
VMK_ISCSI_SESS_PARAM_ERL = 11,
/**
* \brief Enable/Disable IF Marker.
*
*/
VMK_ISCSI_CONN_PARAM_IFMARKER_EN = 12,
/**
* \brief Enable/Disable OF Marker.
*
*/
VMK_ISCSI_CONN_PARAM_OFMARKER_EN = 13,
/**
* \brief Expected StatSN.
*
*/
VMK_ISCSI_CONN_PARAM_EXP_STATSN = 14,
/**
* \brief Specify Target Name.
*
*/
VMK_ISCSI_SESS_PARAM_TARGET_NAME = 15,
/**
* \brief Specify Target Portal Group Tag.
*
*/
VMK_ISCSI_SESS_PARAM_TPGT = 16,
/**
* \brief Specify Persistent Target Address (i.e Group Address).
*
*/
VMK_ISCSI_CONN_PARAM_PERSISTENT_ADDRESS = 17,
/**
* \brief Specify Persistent Socket Port.
*
*/
VMK_ISCSI_CONN_PARAM_PERSISTENT_PORT = 18,
/**
* \brief Specify Recovery Timeout.
*
*/
VMK_ISCSI_SESS_PARAM_SESS_RECOVERY_TMO = 19,
/**
* \brief Connected port.
*
*/
VMK_ISCSI_CONN_PARAM_CONN_PORT = 20,
/**
* \brief Connected Target address.
*
*/
VMK_ISCSI_CONN_PARAM_CONN_ADDRESS = 21,
/**
* \brief Specify outgoing authentication user name.
*
*/
VMK_ISCSI_SESS_PARAM_USERNAME = 22,
/**
* \brief Specify incoming authentication user name.
*
*/
VMK_ISCSI_SESS_PARAM_USERNAME_IN = 23,
/**
* \brief Specify outgoing authentication password.
*
*/
VMK_ISCSI_SESS_PARAM_PASSWORD = 24,
/**
* \brief Specify incoming authentication password.
*
*/
VMK_ISCSI_SESS_PARAM_PASSWORD_IN = 25,
/**
* \brief Enable/Disable FastAbort.
*
*/
VMK_ISCSI_SESS_PARAM_FAST_ABORT = 26,
/**
* \brief Specify "Initiator Session ID" for the session.
*
*/
VMK_ISCSI_SESS_PARAM_ISID = 27,
/**
* \brief Specify persistent ID used to uniqley identify the session.
*
*/
VMK_ISCSI_SESS_PARAM_SSID = 28,
/**
* \brief Report maximum session supported by transport driver.
*
*/
VMK_ISCSI_TRANS_PARAM_MAX_SESSIONS = 29,
/** \cond never */
VMK_ISCSI_TRANS_ISCSI_PARAM_MAX
/** \endcond never */
} vmk_IscsiTransIscsiParam;
/**
* \brief iSCSI HBA/host parameters
*/
typedef enum {
VMK_ISCSI_HOST_PARAM_HWADDRESS = 0,
VMK_ISCSI_HOST_PARAM_INITIATOR_NAME = 1,
VMK_ISCSI_HOST_PARAM_NETDEV_NAME = 2,
VMK_ISCSI_HOST_PARAM_IPADDRESS = 3,
/** \cond never */
VMK_ISCSI_TRANS_HOST_PARAM_MAX
/** \endcond never */
} vmk_IscsiTransHostParam;
/**
* \brief iSCSI transport discovery types
*/
typedef enum {
VMK_ISCSI_TGT_DSCVR_SEND_TARGETS = 1,
VMK_ISCSI_TGT_DSCVR_ISNS = 2,
VMK_ISCSI_TGT_DSCVR_SLP = 3,
} vmk_IscsiTransTgtDiscvr;
/**
* \brief iSCSI protocol specific error code
*/
typedef enum {
/**
* \brief No Error.
*
*/
VMK_ISCSI_OK = 0,
/**
* \brief Data packet sequence number incorrect.
*
*/
VMK_ISCSI_ERR_DATASN = 1001,
/**
* \brief Data packet offset number incorrect.
*
*/
VMK_ISCSI_ERR_DATA_OFFSET = 1002,
/**
* \brief Exceeded Max cmd sequence number.
*
*/
VMK_ISCSI_ERR_MAX_CMDSN = 1003,
/**
* \brief Command sequence number error.
*
*/
VMK_ISCSI_ERR_EXP_CMDSN = 1004,
/**
* \brief Invalid iSCSI OP code.
*
*/
VMK_ISCSI_ERR_BAD_OPCODE = 1005,
/**
* \brief Data length error.
*
*/
VMK_ISCSI_ERR_DATALEN = 1006,
/**
* \brief AHS Length error.
*
*/
VMK_ISCSI_ERR_AHSLEN = 1007,
/**
* \brief Generic Protocol violation.
*
*/
VMK_ISCSI_ERR_PROTO = 1008,
/**
* \brief Invalid LUN.
*
*/
VMK_ISCSI_ERR_LUN = 1009,
/**
* \brief Invalid ITT.
*
*/
VMK_ISCSI_ERR_BAD_ITT = 1010,
/**
* \brief Connection Failure.
*
*/
VMK_ISCSI_ERR_CONN_FAILED = 1011,
/**
* \brief Ready to send sequence error.
*
*/
VMK_ISCSI_ERR_R2TSN = 1012,
/**
* \brief Session Failed.
*
*/
VMK_ISCSI_ERR_SESSION_FAILED = 1013,
/**
* \brief Header Digest invalid.
*
*/
VMK_ISCSI_ERR_HDR_DGST = 1014,
/**
* \brief Data digest invalid.
*
*/
VMK_ISCSI_ERR_DATA_DGST = 1015,
/**
* \brief Invalid/Unsupported Parameter.
*
*/
VMK_ISCSI_ERR_PARAM_NOT_FOUND = 1016,
/**
* \brief Invalid iSCSI command.
*
*/
VMK_ISCSI_ERR_NO_SCSI_CMD = 1017,
} vmk_IscsiTransIscsiErrorCode;
/**
* \brief Flags for stopConnection
*/
typedef enum {
/**
* \brief The connection is going to be terminated.
*
*/
VMK_ISCSI_STOP_CONN_TERM = 0x1,
/**
* \brief The connection will be recovered.
*
*/
VMK_ISCSI_STOP_CONN_RECOVER = 0x3,
/**
* \brief For cleanup following reporting a connection error.
*
*/
VMK_ISCSI_STOP_CONN_CLEANUP_ONLY = 0xff
} vmk_IscsiStopConnMode;
/**
* \brief Transport capabilities.
*
* These flags presents iSCSI Data-Path capabilities.
*/
typedef enum {
/**
* \brief Transport driver supports Error Recovery Level 0.
*
*/
VMK_ISCSI_CAP_RECOVERY_L0 = 0,
/**
* \brief Transport driver supports Error Recovery Level 1.
*
*/
VMK_ISCSI_CAP_RECOVERY_L1 = 1,
/**
* \brief Transport driver supports Error Recovery Level 2.
*
*/
VMK_ISCSI_CAP_RECOVERY_L2 = 2,
/**
* \brief Transport driver supports multiple outstanding R2T's.
*
*/
VMK_ISCSI_CAP_MULTI_R2T = 3,
/**
* \brief Transport driver supports Header Digest.
*
*/
VMK_ISCSI_CAP_HDRDGST = 4,
/**
* \brief Transport driver supports Data Digest.
*
*/
VMK_ISCSI_CAP_DATADGST = 5,
/**
* \brief Transport driver supports Multiple Connections per session.
*
*/
VMK_ISCSI_CAP_MULTI_CONN = 6,
/**
* \brief Transport driver supports Text Negotiation.
*
*/
VMK_ISCSI_CAP_TEXT_NEGO = 7,
/**
* \brief Transport driver supports Marker PDU's.
*
*/
VMK_ISCSI_CAP_MARKERS = 8,
/**
* \brief Transport driver supports Firmware Data Base.
*
*/
VMK_ISCSI_CAP_FW_DB = 9,
/**
* \brief Transport driver supports Offloaded SendTargets Discovery.
*
*/
VMK_ISCSI_CAP_SENDTARGETS_OFFLOAD = 10,
/**
* \brief Transport driver supports Data Path Offload.
*
*/
VMK_ISCSI_CAP_DATA_PATH_OFFLOAD = 11,
/**
* \brief Session Creation with Target and Channel ID assigned by
* transport.
*
*/
VMK_ISCSI_CAP_SESSION_PERSISTENT = 12,
/**
* \brief Transport driver supports IPV6.
*
*/
VMK_ISCSI_CAP_IPV6 = 13,
/**
* \brief Transport driver supports RDMA protocol.
*
*/
VMK_ISCSI_CAP_RDMA = 14,
/**
* \brief User space socket creation style transport driver.
*
*/
VMK_ISCSI_CAP_USER_POLL = 15,
/**
* \brief Transport driver supports Kernel space poll.
*
*/
VMK_ISCSI_CAP_KERNEL_POLL = 16,
/**
* \brief Transport driver supports cleanup primitive to connection
* stop.
*
*/
VMK_ISCSI_CAP_CONN_CLEANUP = 17,
/** \cond never */
VMK_ISCSI_CAP_MAX
/** \endcond never */
} vmk_IscsiTransCapabilities;
/**
* \brief iSCSI transport property types
*
*/
typedef enum {
VMK_ISCSI_TRANSPORT_PROPERTY_TYPE_UNKNOWN = 0,
/**
* \brief ISCSI connection/session params
*
* \note This is a mask type property and 'value' if given
* during add/remove is ignored.
*/
VMK_ISCSI_TRANSPORT_PROPERTY_ISCSI_PARAM = 1,
/**
* \brief ISCSI host/hba params
*
* \note This is a mask type property and 'value' if given
* during add/remove is ignored.
*/
VMK_ISCSI_TRANSPORT_PROPERTY_HOST_PARAM = 2,
/**
* \brief ISCSI transport driver capabilities
*
* \note This is a mask type property and 'value' if given
* during add/remove is ignored.
*/
VMK_ISCSI_TRANSPORT_PROPERTY_CAPABILITIES = 3,
/** \cond never */
VMK_ISCSI_TRANSPORT_PROPERTY_TYPE_MAX
/** \endcond never */
} vmk_IscsiTransPropertyType;
/**
* \brief Endpoint poll status. Indicates whether or not availability of data on the
* connection endpoint.
*
*/
typedef enum vmk_IscsiTransPollStatus {
/** \brief Indicates the endpoint has no data available */
VMK_ISCSI_TRANSPORT_POLL_STATUS_NO_DATA = 0,
/** \brief Indicates the endpoint has some data available */
VMK_ISCSI_TRANSPORT_POLL_STATUS_DATA_AVAILABLE = 1,
} vmk_IscsiTransPollStatus;
/**
* \brief Generic Property, an opaque handle for the
* iscsi transport supported properties.
*
*/
typedef struct vmk_IscsiTransGenericProperty {
/**
* \brief Property type.
*
*/
vmk_IscsiTransPropertyType propertyType;
} vmk_IscsiTransGenericProperty;
/**
* \brief Session/connection parameter property.
*
*/
typedef vmk_IscsiTransGenericProperty *vmk_IscsiTransIscsiParamProperty;
/*
***********************************************************************
* vmk_IscsiTransportCreateIscsiParamProperty-- */ /**
*
* \brief Create an IscsiParam property object.
*
* \note This function will not block.
*
* \param[out] prop Pointer to the property object where allocated
* object is returned.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportCreateIscsiParamProperty(
vmk_IscsiTransIscsiParamProperty *prop);
/*
***********************************************************************
* vmk_IscsiTransportAddIscsiParamProperty-- */ /**
*
* \brief Add an supported IscsiParam for a given property object.
*
* \note This function will not block.
*
* \param[in] prop Property object.
* \param[in] param The IscsiParam property item to be added.
*
* \note It is not an error to add the same parameter to a property
* more than once.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IscsiTransportAddIscsiParamProperty(
vmk_IscsiTransIscsiParamProperty prop,
vmk_IscsiTransIscsiParam param);
/*
***********************************************************************
* vmk_IscsiTransportRemoveIscsiParamProperty-- */ /**
*
* \brief Remove an IscsiParam property item from the list for a
* given property object.
*
* \note This function will not block.
*
* \param[in] prop iSCSI Parameter property object.
* \param[in] param The IscsiParam property item to be removed.
*
* \note It is not an error to remove the same parameter from a
* property more than once.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IscsiTransportRemoveIscsiParamProperty(
vmk_IscsiTransIscsiParamProperty prop,
vmk_IscsiTransIscsiParam param);
/*
***********************************************************************
* vmk_IscsiTransportDestroyIscsiParamProperty-- */ /**
*
* \brief Destroy an IscsiParams property object and associated
* resources.
*
* \note This function will not block.
*
* \param[in] prop Property object to be destroyed.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportDestroyIscsiParamProperty(
vmk_IscsiTransIscsiParamProperty prop);
/**
* \brief Host parameter property.
*
*/
typedef vmk_IscsiTransGenericProperty *vmk_IscsiTransHostParamProperty;
/*
***********************************************************************
* vmk_IscsiTransportCreateHostParamProperty-- */ /**
*
* \brief Create an HostParam property object.
*
* \note This function will not block.
*
* \param[out] prop Pointer to the property object where allocated
* object is returned.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportCreateHostParamProperty(
vmk_IscsiTransHostParamProperty *prop);
/*
***********************************************************************
* vmk_IscsiTransportAddHostParamProperty-- */ /**
*
* \brief Add an supported HostParam for a given property object.
*
* \note This function will not block.
*
* \param[in] prop Property object.
* \param[in] param The HostParam property item to be added.
*
* \note It is not an error to add the same parameter to a property
* more than once.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IscsiTransportAddHostParamProperty(
vmk_IscsiTransHostParamProperty prop,
vmk_IscsiTransHostParam param);
/*
***********************************************************************
* vmk_IscsiTransportRemoveHostParamProperty-- */ /**
*
* \brief Remove an HostParam property item from the list for a
* given property object.
*
* \note This function will not block.
*
* \param[in] prop iSCSI Parameter property object.
* \param[in] param The HostParam property item to be removed.
*
* \note It is not an error to remove the same parameter from a
* property more than once.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IscsiTransportRemoveHostParamProperty(
vmk_IscsiTransHostParamProperty prop,
vmk_IscsiTransHostParam param);
/*
***********************************************************************
* vmk_IscsiTransportDestroyHostParamProperty-- */ /**
*
* \brief Destroy an HostParams property object and associated
* resources.
*
* \note This function will not block.
*
* \param[in] prop Property object to be destroyed.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportDestroyHostParamProperty(
vmk_IscsiTransHostParamProperty prop);
/**
* \brief Transport capabilities property.
*
*/
typedef vmk_IscsiTransGenericProperty *vmk_IscsiTransCapabilitiesProperty;
/*
***********************************************************************
* vmk_IscsiTransportCreateCapabilitiesProperty-- */ /**
*
* \brief Create an Capabilities property object.
*
* \note This function will not block.
*
* \param[out] prop Pointer to the property object where allocated
* object is returned.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportCreateCapabilitiesProperty(
vmk_IscsiTransCapabilitiesProperty *prop);
/*
***********************************************************************
* vmk_IscsiTransportAddCapabilitiesProperty-- */ /**
*
* \brief Add an supported Capabilities for a given property object.
*
* \note This function will not block.
*
* \param[in] prop Property object.
* \param[in] cap The Capabilities property item to be added.
*
* \note It is not an error to add the same capability to a property
* more than once.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IscsiTransportAddCapabilitiesProperty(
vmk_IscsiTransCapabilitiesProperty prop,
vmk_IscsiTransCapabilities cap);
/*
***********************************************************************
* vmk_IscsiTransportRemoveCapabilitiesProperty-- */ /**
*
* \brief Remove an Capabilities property item from the list for a
* given property object.
*
* \note This function will not block.
*
* \param[in] prop iSCSI Parameter property object.
* \param[in] cap The Capabilities property item to be removed.
*
* \note It is not an error to remove the same capability from a
* property more than once.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IscsiTransportRemoveCapabilitiesProperty(
vmk_IscsiTransCapabilitiesProperty prop,
vmk_IscsiTransCapabilities cap);
/*
***********************************************************************
* vmk_IscsiTransportDestroyCapabilitiesProperty-- */ /**
*
* \brief Destroy an Capabilitiess property object and associated
* resources.
*
* \note This function will not block.
*
* \param[in] prop Property object to be destroyed.
*
* \retval VMK_OK
* \retval VMK_BUSY
* \retval VMK_BAD_PARAM
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportDestroyCapabilitiesProperty(
vmk_IscsiTransCapabilitiesProperty prop);
/**
* \brief Transport driver limit "min-max" specifiers.
*
*/
typedef struct {
/**
* \brief Transport driver's minimum supported value.
*
* This structure to be used
*/
vmk_uint32 min;
/**
* \brief Transport driver's maximum supported value.
*
*/
vmk_uint32 max;
} vmk_IscsiTransportLimitMinMax;
/**
* \brief Transport driver limit "list" specifiers.
*/
typedef struct {
/**
* \brief Max number of allowed values in "value".
*
*/
vmk_uint32 count;
/**
* \brief List of values.
*
*/
vmk_uint32 value[0];
} vmk_IscsiTransportLimitList;
/**
* \brief Transport driver limit specifiers -- limit type.
*/
typedef enum {
/**
* \brief Transport driver does not support limits for the param.
*
*/
VMK_ISCSI_TRANPORT_LIMIT_TYPE_UNSUPPORTED = 0,
/**
* \brief Limits is of type Min-Max format.
*
*/
VMK_ISCSI_TRANPORT_LIMIT_TYPE_MINMAX = 1,
/**
* \brief Limits is of type list format.
*
*/
VMK_ISCSI_TRANPORT_LIMIT_TYPE_LIST = 2
} vmk_IscsiTransTransportParamLimitType;
/**
* \brief Specify driver min-max/list limit for iSCSI parameters.
*
* Once the driver registers it's transport template, iSCSI transport
* queries the driver for min-max values supported by driver for range
* related iSCSI parameters described in vmk_IscsiTransIscsiParam. If
* the driver doesn't support min-max values, it must set the "type" to
* VMK_ISCSI_TRANPORT_LIMIT_TYPE_UNSUPPORTED and return VMK_OK. In that
* case the transport uses RFC defined ranges as the min-max values as
* valid values. If the driver does support min-max/list values, then
* it must set the "type" to either VMK_ISCSI_TRANPORT_LIMIT_TYPE_LIST
* or VMK_ISCSI_TRANPORT_LIMIT_TYPE_MINMAX and fill in the "limit"
* accordingly. The given min-max/list values must be with in the
* allowed min-max/list as specififed in RFC (if specified in iSCSI
* specification) or as documented by iSCSI configuration guide.
*
* The driver can also specify it's default preferred value. The
* transport will try to use that for session/connection as far as
* possible.
*
* Driver is queried for following list of parameters to get driver's
* min-max/allowed list values (transport's min-max and default values
* also documented here):
*
* VMK_ISCSI_CONN_PARAM_MAX_RECV_DLENGTH:
* min:512, max: 16MB-1 default:256K
*
* VMK_ISCSI_SESS_PARAM_FIRST_BURST:
* min:512, max: 16MB-1 default:256K
*
* VMK_ISCSI_SESS_PARAM_MAX_BURST:
* min:512, max: 16MB-1 default:256K
*
* VMK_ISCSI_SESS_PARAM_PDU_INORDER_EN:
* list:Yes=1,N0=0 default:Yes
*
* VMK_ISCSI_SESS_PARAM_DATASEQ_INORDER_EN:
* list:Yes=1,No= default:Yes
*
* VMK_ISCSI_SESS_PARAM_INITIAL_R2T_EN:
* list:Yes=1,No=0 default:No
*
* VMK_ISCSI_SESS_PARAM_MAX_R2T:
* min:1, max: 64K default:1
*
* VMK_ISCSI_SESS_PARAM_IMM_DATA_EN:
* list:Yes=1,No=0 default:Yes
*
* VMK_ISCSI_SESS_PARAM_ERL:
* min:0 max:0 default:0
*
* VMK_ISCSI_CONN_PARAM_HDRDGST_EN:
* list:DIGEST_NONE=0,DIGEST_CRC32=1 default: both
*
* VMK_ISCSI_CONN_PARAM_DATADGST_EN:
* list:NONE=0,CRC32=1 default: both
*
* VMK_ISCSI_TRANSPORT_PARAM_MAX_SESSIONS:
* list:1-4096 default:4096
*
***********************************************************************
*/
typedef struct {
/**
* \brief Limit type
*
* As documented in vmk_IscsiTransTransportParamLimitType.
*/
vmk_IscsiTransTransportParamLimitType type;
/**
* \brief Indicates if media driver has a preferred value for
* the parameter.
*
*/
vmk_Bool hasPreferred;
/**
* \brief Transport driver's preferred value.
*
* If hasPreferred == VMK_TRUE, iSCSI transport will use this as
* the default value.
*/
vmk_uint32 preferred;
/**
* \brief Parameter name
*
* As documented in vmk_IscsiTransIscsiParam.
*/
vmk_IscsiTransIscsiParam param;
union{
vmk_IscsiTransportLimitMinMax minMax;
vmk_IscsiTransportLimitList list;
} limit;
} vmk_IscsiTransTransportParamLimits;
#define VMK_ISCSI_STATS_CUSTOM_DESC_MAX 64
/**
* \brief iSCSI transport connection custom stats.
*/
typedef struct {
/**
* \brief Custom statistic name.
*
*/
vmk_int8 desc[VMK_ISCSI_STATS_CUSTOM_DESC_MAX];
/**
* \brief Custom statistic data.
*
*/
vmk_uint64 value;
} vmk_IscsiTransCustomIscsiStats;
/**
* \brief iSCSI transport connection MIB-II stats
*/
typedef struct {
/* octets */
vmk_uint64 txdata_octets;
vmk_uint64 rxdata_octets;
/* xmit pdus */
vmk_uint32 noptx_pdus;
vmk_uint32 scsicmd_pdus;
vmk_uint32 tmfcmd_pdus;
vmk_uint32 login_pdus;
vmk_uint32 text_pdus;
vmk_uint32 dataout_pdus;
vmk_uint32 logout_pdus;
vmk_uint32 snack_pdus;
/* recv pdus */
vmk_uint32 noprx_pdus;
vmk_uint32 scsirsp_pdus;
vmk_uint32 tmfrsp_pdus;
vmk_uint32 textrsp_pdus;
vmk_uint32 datain_pdus;
vmk_uint32 logoutrsp_pdus;
vmk_uint32 r2t_pdus;
vmk_uint32 async_pdus;
vmk_uint32 rjt_pdus;
/* errors */
vmk_uint32 digest_err;
vmk_uint32 timeout_err;
/*
* iSCSI Custom Statistics support, i.e. Transport could
* extend existing MIB statistics with its own specific
* statistics up to ISCSI_STATS_CUSTOM_MAX.
*/
vmk_uint32 custom_length;
vmk_IscsiTransCustomIscsiStats custom[0]
VMK_ATTRIBUTE_ALIGN(sizeof(vmk_uint64));
} vmk_IscsiTransIscsiStats;
typedef vmk_AddrCookie vmk_IscsiNetHandle;
/*
***********************************************************************
* vmk_IscsiTansportGetVmkNic -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the vmkNIC name associated with a IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] vmkNic The vmkNic name.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetVmkNic(
vmk_IscsiNetHandle iscsiNetHandle,
char *vmkNic);
/*
***********************************************************************
* vmk_IscsiTransportGetUplink -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the uplink name associated with an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] uplink The uplink name.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetUplink(
vmk_IscsiNetHandle iscsiNetHandle,
char *uplink);
/*
***********************************************************************
* vmk_IscsiTransportGetSrcIP -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the Source IP Addr and family for an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] srcFamily Sockaddr family value.
* \param[out] srcIPAddr The source address.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetSrcIP(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *srcFamily,
vmk_uint8 *srcIPAddr);
/*
***********************************************************************
* vmk_IscsiTransportGetSrcSubnet -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the source subnet associated with an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] srcFamily Sockaddr family value.
* \param[out] srcSubnet The source subnet.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetSrcSubnet(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *srcFamily,
vmk_uint8 *srcSubnet);
/*
***********************************************************************
* vmk_IscsiTransportGetDstIP -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the destination IP addr and family for an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] dstFamily Sockadr family value.
* \param[out] dstIPAddr The destination IP address.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetDstIP(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *dstFamily,
vmk_uint8 *dstIPAddr);
/*
***********************************************************************
* vmk_IscsiTransportGetNextHopIP -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the next hop IP address associated with an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] nextHopFamily Sockaddr family value.
* \param[out] nextHopIPAddr The next hop IP address.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetNextHopIP(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *nextHopFamily,
vmk_uint8 *nextHopIPAddr);
/*
***********************************************************************
* vmk_IscsiTransportGetNextHopMAC -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the Next Hop MAC Address for an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] nextHopMAC The MAC address of the next hop.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetNextHopMAC(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_EthAddress nextHopMAC);
/*
***********************************************************************
* vmk_IscsiTransportGetSrcMAC -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the source MAC Address associated with an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] srcMAC The MAC address of the local interface.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetSrcMAC(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_EthAddress srcMAC);
/*
***********************************************************************
* vmk_IscsiTransportGetMtu -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the mtu associated with an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] mtu The mtu.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetMtu(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *mtu);
/*
***********************************************************************
* vmk_IscsiTransportGetPmtu -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the path mtu associated with an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] pmtu The pmtu.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetPmtu(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *pmtu);
/*
***********************************************************************
* vmk_IscsiTransportGetVlan -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the Vlan ID associated with an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] vlan The vlan ID.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetVlan(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *vlan);
/*
***********************************************************************
* vmk_IscsiTransportGetPVlan -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the private VLan ID associated with an IscsiNetHandle.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] pvlan The private vlan ID.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetPVlan(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *pvlan);
/*
***********************************************************************
* vmk_IscsiTransportGetPortReservation -- */ /**
*
* \ingroup IscsiTransport
* \brief Returns the start and number of reserved TCP ports.
*
* \note This function will not block.
*
* \param[in] iscsiNetHandle Net Handle for this connection.
* \param[out] firstPort The number of the first reserved port.
* \param[out] portCount The number of reserved ports.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Not a valid iscsi Net Handle.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_IscsiTransportGetPortReservation(
vmk_IscsiNetHandle iscsiNetHandle,
vmk_uint32 *firstPort,
vmk_uint32 *portCount);
#endif /* _VMKAPI_ISCSI_TRANSPORT_COMPAT_H */
/** @} */
/** @} */
|