stream_info_compat.h

Reference Documentation

product_line_custom
Napatech SmartNIC
category
Reference Information

Go to the documentation of this file.

1/* 2 * %NT_SOFTWARE_LICENSE% 3 */ 4 5/** 6 * @file 7 * 8 * This is the header file of the STREAMTYPE_INFO interface containing 9 * included for backward compatibility structures. 10 * 11 */ 12#ifndef __STREAM_INFO_COMPAT_H__ 13#define __STREAM_INFO_COMPAT_H__ 14 15#if !defined(_NT_NTAPI_NO_COMPAT) 16 17/***********************************************************************************************/ 18/* Info wismode version 0 */ 19/***********************************************************************************************/ 20/** 21 * Structure to hold information about WIS mode 22 */ 23struct NtInfoWis_s { 24 int supported; //!< Is WIS mode supported by the adapter - 1 supported, 0: not supported 25 enum NtWISMode_e mode; //!< Is WIS mode enabled 26}; 27 28 29/***********************************************************************************************/ 30/* Adapter info version 0 */ 31/***********************************************************************************************/ 32#define NT_INFO_CMD_READ_ADAPTER NT_INFO_CMD_READ_COMPAT_0 //!< Adapter info - the number of sensors, ports, PCI ID and bus ID 33/** 34 * This structure will return the adapter specific info 35 */ 36struct NtInfoAdapter_s { 37 uint8_t numSensors; //!< The number of sensors on this adapter 38 uint8_t Reserved1[3]; 39 uint8_t numLevel1Sensors; //!< The number of level 1 sensors on this adapter 40 uint8_t Reserved2[3]; 41 uint8_t portOffset; //!< The port numbers of this adapter start at this port offset 42 uint8_t Reserved3[3]; 43 uint8_t numPorts; //!< The number of ports on this adapter 44 uint8_t Reserved4[3]; 45 uint8_t numPhysicalAdapters; //!< The number of physical adapters grouped in this virtual adapter 46 uint8_t Reserved5[3]; 47 uint32_t numHostBuffersRx; //!< The number of RX host buffers on this adapter 48 uint32_t numHostBuffersTx; //!< The number of TX host buffers on this adapter 49 uint32_t numTsConnectors; //!< The number of time sync connectors on this adapter 50 enum NtAdapterType_e adapterType; //!< The adapter type 51 enum NtProductType_e productType; //!< The product line type 52 enum NtProfileType_e profile; //!< The profile the adapter is using 53 enum NtProductFamily_e productFamily; //!< The product family 54 char name[128]; //!< The adapter name 55 char serialNo[50]; //!< The adapter serial number 56 /** 57 * AVR version for Gen2 adapters: 58 * avr[0] = Main board AVR, 59 * avr[1] = Front board AVR 60 */ 61 struct NtversionAvr_s avr; 62 /** 63 * The bus ID is read as: 64 * 32-bit value, 65 * 4 x 8-bit values defining 66 * function, 67 * device, 68 * bus and 69 * slot 70 */ 71 union Ntbusid_u { 72 struct Ntbusid_s { 73 uint32_t function:8; //!< The PCI function number 74 uint32_t device:8; //!< The PCI device number 75 uint32_t bus:8; //!< The PCI bus number 76 uint32_t slot:8; //!< The PCI slot number 77 }s; 78 uint32_t value; //!< The slot, bus, device and function as a 32-bit value 79 } busid; 80 81 /** 82 * PCI ID is read as: 83 * 32-bit value, 84 * 2 x 16-bit values defining 85 * device ID and 86 * vendor ID 87 */ 88 union Ntpciid_u pciid; 89 /** 90 * The FPGA ID of the image currently running on the adapter. 91 * The format is: item-product-version-revision-build. 92 * For example, 200-9114-40-01-1023. 93 */ 94 union Ntfpgaid_u fpgaid; 95 uint32_t extendedDescriptor; //!< Is the adapter running with extended descriptors 96 enum NtPacketDescriptorType_e descriptorType; //!< The descriptor type used 97 enum NtTimestampType_e timestampType; //!< The timestamp type used by the adapter 98 enum NtTimestampMethod_e timestampMethod; //!< The timestamp method (SOF/EOF) used by the adapter 99}; 100 101/** 102 * NT_INFO_CMD_READ_ADAPTER specific data. 103 * The adapterNo must be initialized for the relevant adapter. 104 */ 105struct NtInfoCmdAdapter_s { 106 uint8_t adapterNo; //!< The adapter to query 107 uint8_t Reserved1[3]; 108 struct NtInfoAdapter_s data; //!< The adapter data 109}; 110 111/***********************************************************************************************/ 112/* Adapter info version 1 */ 113/***********************************************************************************************/ 114#define NT_INFO_CMD_READ_ADAPTER_V1 NT_INFO_CMD_READ_COMPAT_5 //!< Adapter info - the number of sensors, ports, PCI ID and bus ID 115/** 116 * This structure will return the adapter specific info 117 */ 118struct NtInfoAdapter_v1_s { 119 uint8_t numSensors; //!< The number of sensors on this adapter 120 uint8_t Reserved1[3]; 121 uint8_t numLevel1Sensors; //!< The number of level 1 sensors on this adapter 122 uint8_t Reserved2[3]; 123 uint8_t portOffset; //!< The port numbers of this adapter start at this port offset 124 uint8_t Reserved3[3]; 125 uint8_t numPorts; //!< The number of ports on this adapter 126 uint8_t Reserved4[3]; 127 uint8_t numPhysicalAdapters; //!< The number of physical adapters grouped in this virtual adapter 128 uint8_t Reserved5[3]; 129 uint32_t numHostBuffersRx; //!< The number of RX host buffers on this adapter 130 uint32_t numHostBuffersTx; //!< The number of TX host buffers on this adapter 131 uint32_t numTsConnectors; //!< The number of time sync connectors on this adapter 132 enum NtAdapterType_e adapterType; //!< The adapter type 133 enum NtProductType_e productType; //!< The product line type 134 enum NtProfileType_e profile; //!< The profile the adapter is using 135 uint32_t supportedProfilesBitmask; //!< The profiles supported by the adapter - the value is represented as a bitmask of @ref NtProfileType_e values 136 enum NtProductFamily_e productFamily; //!< The product family 137 char name[128]; //!< The adapter name 138 char serialNo[50]; //!< The adapter serial number 139 /** 140 * AVR version for Gen2 adapters: 141 * avr[0] = Main board AVR, 142 * avr[1] = Front board AVR 143 */ 144 struct NtversionAvr_s avr; 145 /** 146 * The bus ID is read as: 147 * 32-bit value, 148 * 4 x 8-bit values defining 149 * function, 150 * device, 151 * bus and 152 * slot 153 */ 154 union Ntbusid_v1_u { 155 struct Ntbusid_v1_s { 156 uint32_t function:8; //!< The PCI function number 157 uint32_t device:8; //!< The PCI device number 158 uint32_t bus:8; //!< The PCI bus number 159 uint32_t slot:8; //!< The PCI domain number 160 }s; 161 uint32_t value; //!< The domain, bus, device and function as a 32-bit value 162 } busid; 163 /** 164 * PCI ID is read as: 165 * 32-bit value, 166 * 2 x 16-bit values defining 167 * device ID and 168 * vendor ID 169 */ 170 union Ntpciid_u pciid; 171 /** 172 * The FPGA ID of the image currently running on the adapter. 173 * The format is: item-product-version-revision-build. 174 * For example, 200-9114-40-01-1023. 175 */ 176 union Ntfpgaid_u fpgaid; 177 uint32_t extendedDescriptor; //!< The extended descriptor in use by RX - if 0 then no extended is used 178 uint32_t supportedExtendedDescriptorsBitmask; //!< Bitmask of supported extended descriptors, for example, if bit 7 is set then extended descriptor 7 is supported, and if bit 8 it set then extended descriptor 8 is supported 179 enum NtPacketDescriptorType_e descriptorType; //!< The descriptor type used 180 enum NtTimestampType_e timestampType; //!< The time stamp type used by the adapter 181 enum NtTimestampMethod_e timestampMethod; //!< The time stamp method (SOF/EOF) used by the adapter 182 183 enum NtTxTimingMethod_e txTiming; //!< The TX timing 184 struct NtInfoWis_s wisMode; 185 enum NtTimestampInjectOffsetMode_e tsInjectModeOffset; //!< Time stamp injection offset mode 186 struct NtInfoGlobalSync_s globalSync; //!< Global sync status 187}; 188 189/** 190 * NT_INFO_CMD_READ_ADAPTER_V1 specific data. 191 * The adapterNo must be initialized for the relevant adapter. 192 */ 193struct NtInfoCmdAdapter_v1_s { 194 uint8_t adapterNo; //!< The adapter to query 195 uint8_t Reserved1[3]; 196 struct NtInfoAdapter_v1_s data; //!< The adapter data 197}; 198 199/***********************************************************************************************/ 200/* Adapter info version 2 */ 201/***********************************************************************************************/ 202#define NT_INFO_CMD_READ_ADAPTER_V2 NT_INFO_CMD_READ_COMPAT_7 //!< Adapter info - the number of sensors, ports, PCI ID and bus ID 203/** 204 * This structure will return the adapter specific info version 2. 205 * Must be a mirror of NtInfoAdapter_s with version 2 variables added 206 * to the bottom. 207 */ 208struct NtInfoAdapter_v2_s { 209 uint8_t numSensors; //!< The number of sensors on this adapter 210 uint8_t Reserved1[3]; 211 uint8_t numLevel1Sensors; //!< The number of level 1 sensors on this adapter 212 uint8_t Reserved2[3]; 213 uint8_t portOffset; //!< The port numbers of this adapter start at this port offset 214 uint8_t Reserved3[3]; 215 uint8_t numPorts; //!< The number of ports on this adapter 216 uint8_t Reserved4[3]; 217 uint8_t numPhysicalAdapters; //!< The number of physical adapters grouped in this virtual adapter 218 uint8_t Reserved5[3]; 219 uint32_t numHostBuffersRx; //!< The number of RX host buffers on this adapter 220 uint32_t numHostBuffersTx; //!< The number of TX host buffers on this adapter 221 uint32_t numTsConnectors; //!< The number of time sync connectors on this adapter 222 enum NtAdapterType_e adapterType; //!< The adapter type 223 enum NtProductType_e productType; //!< The product line type 224 enum NtProfileType_e profile; //!< The profile the adapter is using 225 uint32_t supportedProfilesBitmask; //!< The profiles supported by the adapter - the value is represented as a bitmask of @ref NtProfileType_e values 226 uint32_t adapterFeatures; //!< The features supported by the adapter - the value is represented as a bitmask of @ref NtFeatureType_e values 227 enum NtProductFamily_e productFamily; //!< The product family 228 char name[128]; //!< The adapter name 229 char serialNo[50]; //!< The adapter serial number 230 /** 231 * AVR version for Gen2 adapters: 232 * avr[0] = Main board AVR, 233 * avr[1] = Front board AVR 234 */ 235 struct NtversionAvr_s avr; 236 237 /** 238 * The bus ID is read as: 239 * 32-bit value, 240 * 4 x 8-bit values defining 241 * function, 242 * device, 243 * bus and 244 * slot 245 */ 246 union Ntbusid_v2_u { 247 struct Ntbusid_v2_s { 248 uint32_t function:8; //!< The PCI function number 249 uint32_t device:8; //!< The PCI device number 250 uint32_t bus:8; //!< The PCI bus number 251 uint32_t slot:8; //!< The PCI slot number 252 }s; 253 uint32_t value; //!< The slot, bus, device and function as a 32-bit value 254 } busid; 255 /** 256 * PCI ID is read as: 257 * 32-bit value, 258 * 2 x 16-bit values defining 259 * device ID and 260 * vendor ID 261 */ 262 union Ntpciid_u pciid; 263 struct NtInfoPCIeInfo_s pciInfo; //!< Information about the PCI bus. 264 /** 265 * The FPGA ID of the image currently running on the adapter. 266 * The format is: item-product-version-revision-build. 267 * For example, 200-9114-40-01-1023. 268 */ 269 union Ntfpgaid_u fpgaid; 270 struct NtInfoSDRAMInfo_s sdramInfo; //!< The SDRAM information 271 uint32_t extendedDescriptor; //!< The extended descriptor in use by RX - if 0 then no extended is used 272 uint32_t supportedExtendedDescriptorsBitmask; //!< Bitmask of supported extended descriptors, for example, if bit 7 is set then extended descriptor 7 is supported, and if bit 8 it set then extended descriptor 8 is supported 273 enum NtPacketDescriptorType_e descriptorType; //!< The descriptor type used 274 enum NtTimestampType_e timestampType; //!< The time stamp type used by the adapter 275 enum NtTimestampMethod_e timestampMethod; //!< The time stamp method (SOF/EOF) used by the adapter 276 enum NtTxTimingMethod_e txTiming; //!< The TX timing 277 struct NtInfoWis_s wisMode; 278 enum NtTimestampInjectOffsetMode_e tsInjectModeOffset; //!< Time stamp injection offset mode 279 struct NtInfoGlobalSync_s globalSync; //!< Global sync status 280}; 281 282/** 283 * NT_INFO_CMD_READ_ADAPTER_V2 specific data. 284 * The adapterNo must be initialized for the relevant adapter. 285 */ 286struct NtInfoCmdAdapter_v2_s { 287 uint8_t adapterNo; //!< The adapter to query 288 uint8_t Reserved1[3]; 289 struct NtInfoAdapter_v2_s data; //!< The adapter data 290}; 291 292/***********************************************************************************************/ 293/* Adapter info version 3 */ 294/***********************************************************************************************/ 295#define NT_INFO_CMD_READ_ADAPTER_V3 NT_INFO_CMD_READ_COMPAT_11 //!< Adapter info - the number of sensors, ports, PCI ID and bus ID 296 297/** 298 * This structure will return the adapter specific info version 3. 299 * Must be a mirror of NtInfoAdapter_s with version 3 variables added 300 * to the bottom. 301 */ 302struct NtInfoAdapter_v3_s { 303 uint8_t numSensors; //!< The number of sensors on this adapter 304 uint8_t Reserved1[3]; 305 uint8_t numLevel1Sensors; //!< The number of level 1 sensors on this adapter 306 uint8_t Reserved2[3]; 307 uint8_t portOffset; //!< The port numbers of this adapter start at this port offset 308 uint8_t Reserved3[3]; 309 uint8_t numPorts; //!< The number of ports on this adapter 310 uint8_t Reserved4[3]; 311 uint8_t numPhysicalAdapters; //!< The number of physical adapters grouped in this virtual adapter 312 uint8_t Reserved5[3]; 313 uint32_t numHostBuffersRx; //!< The number of RX host buffers on this adapter 314 uint32_t numHostBuffersTx; //!< The number of TX host buffers on this adapter 315 uint32_t numTsConnectors; //!< The number of time sync connectors on this adapter 316 enum NtAdapterType_e adapterType; //!< The adapter type 317 enum NtProductType_e productType; //!< The product line type 318 enum NtProfileType_e profile; //!< The profile the adapter is using 319 uint32_t supportedProfilesBitmask; //!< The profiles supported by the adapter - the value is represented as a bitmask of @ref NtProfileType_e values 320 uint32_t adapterFeatures; //!< The features supported by the adapter - the value is represented as a bitmask of @ref NtFeatureType_e values 321 enum NtProductFamily_e productFamily; //!< The product family 322 char name[128]; //!< The adapter name 323 char serialNo[50]; //!< The adapter serial number 324 /** 325 * AVR version for Gen2 adapters: 326 * avr[0] = Main board AVR, 327 * avr[1] = Front board AVR 328 */ 329 struct NtversionAvr_s avr; 330 331 /** 332 * The bus ID of the device 333 */ 334 union Ntbusid_v3_u { 335 struct Ntbusid_v3_s { 336 uint32_t function:3; //!< The PCI function number 337 uint32_t device:5; //!< The PCI device number 338 uint32_t bus:8; //!< The PCI bus number 339 uint32_t domain:16; //!< The PCI domain number 340 }s; 341 uint32_t value; //!< The domain, bus, device and function as a 32-bit value 342 } busid; 343 /** 344 * PCI ID is read as: 345 * 32-bit value, 346 * 2 x 16-bit values defining 347 * device ID and 348 * vendor ID 349 */ 350 union Ntpciid_u pciid; 351 struct NtInfoPCIeInfo_s pciInfo; //!< Information about the PCI bus. 352 /** 353 * The FPGA ID of the image currently running on the adapter. 354 * The format is: item-product-version-revision-build. 355 * For example, 200-9114-40-01-1023. 356 */ 357 union Ntfpgaid_u fpgaid; 358 struct NtInfoSDRAMInfo_s sdramInfo; //!< The SDRAM information 359 uint32_t extendedDescriptor; //!< The extended descriptor in use by RX - if 0 then no extended is used 360 uint32_t supportedExtendedDescriptorsBitmask; //!< Bitmask of supported extended descriptors, for example, if bit 7 is set then extended descriptor 7 is supported, and if bit 8 it set then extended descriptor 8 is supported 361 enum NtPacketDescriptorType_e descriptorType; //!< The descriptor type used 362 enum NtTimestampType_e timestampType; //!< The time stamp type used by the adapter 363 enum NtTimestampMethod_e timestampMethod; //!< The time stamp method (SOF/EOF) used by the adapter 364 enum NtTxTimingMethod_e txTiming; //!< The TX timing 365 struct NtInfoWis_s wisMode; 366 enum NtTimestampInjectOffsetMode_e tsInjectModeOffset; //!< Time stamp injection offset mode 367 struct NtInfoGlobalSync_s globalSync; //!< Global sync status 368}; 369 370/** 371 * NT_INFO_CMD_READ_ADAPTER_V3 specific data. 372 * The adapterNo must be initialized for the relevant adapter. 373 */ 374struct NtInfoCmdAdapter_v3_s { 375 uint8_t adapterNo; //!< The adapter to query 376 uint8_t Reserved1[3]; 377 struct NtInfoAdapter_v3_s data; //!< The adapter data 378}; 379 380 381/***********************************************************************************************/ 382/* Adapter info version 4 */ 383/***********************************************************************************************/ 384#define NT_INFO_CMD_READ_ADAPTER_V4 NT_INFO_CMD_READ_COMPAT_13 //!< Adapter info - the number of sensors, ports, PCI ID and bus ID 385 386enum { 387 AVR_NOT_VALID = 0, //!< No valid AVR data 388 AVR_VALID = 1, //!< Valid AVR data for mainboard and front board has been filled in the structure 389}; 390 391/** 392 * This structure will return the adapter specific info version 4. 393 * Must be a mirror of NtInfoAdapter_s with version 4 variables added 394 * to the bottom. 395 */ 396struct NtInfoAdapter_v4_s { 397 uint8_t numSensors; //!< The number of sensors on this adapter 398 uint8_t Reserved1[3]; 399 uint8_t numLevel1Sensors; //!< The number of level 1 sensors on this adapter 400 uint8_t Reserved2[3]; 401 uint8_t portOffset; //!< The port numbers of this adapter start at this port offset 402 uint8_t Reserved3[3]; 403 uint8_t numPorts; //!< The number of ports on this adapter 404 uint8_t Reserved4[3]; 405 uint8_t numPhysicalAdapters; //!< The number of physical adapters grouped in this virtual adapter 406 uint8_t Reserved5[3]; 407 uint32_t numHostBuffersRx; //!< The number of RX host buffers on this adapter 408 uint32_t numHostBuffersTx; //!< The number of TX host buffers on this adapter 409 uint32_t numTsConnectors; //!< The number of time sync connectors on this adapter 410 enum NtAdapterType_e adapterType; //!< The adapter type 411 enum NtProductType_e productType; //!< The product line type 412 enum NtProfileType_e profile; //!< The profile the adapter is using 413 uint32_t supportedProfilesBitmask; //!< The profiles supported by the adapter - the value is represented as a bitmask of @ref NtProfileType_e values 414 uint32_t adapterFeatures; //!< The features supported by the adapter - the value is represented as a bitmask of @ref NtFeatureType_e values 415 enum NtProductFamily_e productFamily; //!< The product family 416 char name[128]; //!< The adapter name 417 char serialNo[50]; //!< The adapter serial number 418 /** 419 * AVR version for Gen2 adapters: 420 * avr[0] = Main board AVR, 421 * avr[1] = Front board AVR 422 */ 423 struct NtversionAvr_s avr; 424 425 /** 426 * The bus ID of the device 427 */ 428 union Ntbusid_v4_u { 429 struct Ntbusid_v4_s { 430 uint32_t function:3; //!< The PCI function number 431 uint32_t device:5; //!< The PCI device number 432 uint32_t bus:8; //!< The PCI bus number 433 uint32_t domain:16; //!< The PCI domain number 434 }s; 435 uint32_t value; //!< The domain, bus, device and function as a 32-bit value 436 } busid; 437 /** 438 * PCI ID is read as: 439 * 32-bit value, 440 * 2 x 16-bit values defining 441 * device ID and 442 * vendor ID 443 */ 444 union Ntpciid_u pciid; 445 struct NtInfoPCIeInfo_s pciInfo; //!< Information about the PCI bus. 446 /** 447 * The FPGA ID of the image currently running on the adapter. 448 * The format is: item-product-version-revision-build. 449 * For example, 200-9114-40-01-1023. 450 */ 451 union Ntfpgaid_u fpgaid; 452 struct NtInfoSDRAMInfo_s sdramInfo; //!< The SDRAM information 453 uint32_t extendedDescriptor; //!< The extended descriptor in use by RX - if 0 then no extended is used 454 uint32_t supportedExtendedDescriptorsBitmask; //!< Bitmask of supported extended descriptors, for example, if bit 7 is set then extended descriptor 7 is supported, and if bit 8 it set then extended descriptor 8 is supported 455 enum NtPacketDescriptorType_e descriptorType; //!< The descriptor type used 456 enum NtTimestampType_e timestampType; //!< The time stamp type used by the adapter 457 enum NtTimestampMethod_e timestampMethod; //!< The time stamp method (SOF/EOF) used by the adapter 458 enum NtTxTimingMethod_e txTiming; //!< The TX timing 459 struct NtInfoWis_s wisMode; //!< Wis mode status 460 enum NtTimestampInjectOffsetMode_e tsInjectModeOffset; //!< Time stamp injection offset mode 461 struct NtInfoGlobalSync_s globalSync; //!< Global sync status 462 NtInfoBondingInfo_t bondingInfo; //!< Adapter Bonding status 463}; 464 465/** 466 * NT_INFO_CMD_READ_ADAPTER_V4 specific data. 467 * The adapterNo must be initialized for the relevant adapter. 468 */ 469struct NtInfoCmdAdapter_v4_s { 470 uint8_t adapterNo; //!< The adapter to query 471 uint8_t Reserved1[3]; 472 struct NtInfoAdapter_v4_s data; //!< The adapter data 473}; 474 475/***********************************************************************************************/ 476/* Adapter info version 5 */ 477/***********************************************************************************************/ 478#define NT_INFO_CMD_READ_ADAPTER_V5 NT_INFO_CMD_READ_COMPAT_17 //!< Adapter info - the number of sensors, ports, PCI ID and bus ID 479 480/** 481 * This structure will return the adapter specific info version 5. 482 * Must be a mirror of NtInfoAdapter_v4_s with version 5 variables added 483 * to the bottom. 484 */ 485struct NtInfoAdapter_v5_s { 486 uint8_t numSensors; //!< The number of sensors on this adapter 487 uint8_t Reserved1[3]; 488 uint8_t numLevel1Sensors; //!< The number of level 1 sensors on this adapter 489 uint8_t Reserved2[3]; 490 uint8_t portOffset; //!< The port numbers of this adapter start at this port offset 491 uint8_t Reserved3[3]; 492 uint8_t numPorts; //!< The number of ports on this adapter 493 uint8_t Reserved4[3]; 494 uint8_t numPhysicalAdapters; //!< The number of physical adapters grouped in this virtual adapter 495 uint8_t Reserved5[3]; 496 uint32_t numHostBuffersRx; //!< The number of RX host buffers on this adapter 497 uint32_t numHostBuffersTx; //!< The number of TX host buffers on this adapter 498 uint32_t numTsConnectors; //!< The number of time sync connectors on this adapter 499 enum NtAdapterType_e adapterType; //!< The adapter type 500 enum NtProductType_e productType; //!< The product line type 501 enum NtProfileType_e profile; //!< The profile the adapter is using 502 uint32_t supportedProfilesBitmask; //!< The profiles supported by the adapter - the value is represented as a bitmask of @ref NtProfileType_e values 503 uint32_t adapterFeatures; //!< The features supported by the adapter - the value is represented as a bitmask of @ref NtFeatureType_e values 504 enum NtProductFamily_e productFamily; //!< The product family 505 char name[128]; //!< The adapter name 506 char serialNo[50]; //!< The adapter serial number 507 /** 508 * AVR version for Gen2 adapters: 509 * avr[0] = Main board AVR, 510 * avr[1] = Front board AVR 511 */ 512 struct NtversionAvr_s avr; 513 514 /** 515 * The bus ID of the device 516 */ 517 union Ntbusid_v5_u { 518 struct Ntbusid_v5_s { 519 uint32_t function:3; //!< The PCI function number 520 uint32_t device:5; //!< The PCI device number 521 uint32_t bus:8; //!< The PCI bus number 522 uint32_t domain:16; //!< The PCI domain number 523 }s; 524 uint32_t value; //!< The domain, bus, device and function as a 32-bit value 525 } busid; 526 /** 527 * PCI ID is read as: 528 * 32-bit value, 529 * 2 x 16-bit values defining 530 * device ID and 531 * vendor ID 532 */ 533 union Ntpciid_u pciid; 534 struct NtInfoPCIeInfo_s pciInfo; //!< Information about the PCI bus. 535 /** 536 * The FPGA ID of the image currently running on the adapter. 537 * The format is: item-product-version-revision-build. 538 * For example, 200-9114-40-01-1023. 539 */ 540 union Ntfpgaid_u fpgaid; 541 struct NtInfoSDRAMInfo_s sdramInfo; //!< The SDRAM information 542 uint32_t extendedDescriptor; //!< The extended descriptor in use by RX - if 0 then no extended is used 543 uint32_t supportedExtendedDescriptorsBitmask; //!< Bitmask of supported extended descriptors, for example, if bit 7 is set then extended descriptor 7 is supported, and if bit 8 it set then extended descriptor 8 is supported 544 enum NtPacketDescriptorType_e descriptorType; //!< The descriptor type used 545 enum NtTimestampType_e timestampType; //!< The time stamp type used by the adapter 546 enum NtTimestampMethod_e timestampMethod; //!< The time stamp method (SOF/EOF) used by the adapter 547 enum NtTxTimingMethod_e txTiming; //!< The TX timing 548 struct NtInfoWis_v1_s wisMode; //!< Wis mode status 549 enum NtTimestampInjectOffsetMode_e tsInjectModeOffset; //!< Time stamp injection offset mode 550 struct NtInfoGlobalSync_s globalSync; //!< Global sync status 551 NtInfoBondingInfo_t bondingInfo; //!< Adapter Bonding status 552 enum NtFeatureLevel_e featureLevel; //!< Adapter/FPGA feature level 553}; 554 555/** 556 * NT_INFO_CMD_READ_ADAPTER_V6 specific data. 557 * The adapterNo must be initialized for the relevant adapter. 558 */ 559struct NtInfoCmdAdapter_v5_s { 560 uint8_t adapterNo; //!< The adapter to query 561 uint8_t Reserved1[3]; 562 struct NtInfoAdapter_v5_s data; //!< The adapter data 563}; 564 565/***********************************************************************************************/ 566/* Port info version 0 */ 567/***********************************************************************************************/ 568#define NT_INFO_CMD_READ_PORT NT_INFO_CMD_READ_COMPAT_1 //!< Port info - the port state, speed and duplex 569/** 570 * This structure will return the port specific information 571 */ 572typedef struct NtInfoPort_s { 573 enum NtPortType_e type; //!< The interface type 574 enum NtLinkState_e state; //!< The port up or down 575 enum NtLinkSpeed_e speed; //!< The interface speed 576 enum NtLinkDuplex_e duplex; //!< The duplex mode 577 int32_t flow; //!< 0 = No flow control, 1 = Flow control 578 enum NtLinkMDI_e mdi; //!< 0 = auto, 1 = MDI, 2 = MDIX 579 uint8_t macAddress[6]; //!< The MAC address of the interface 580 uint16_t maxFrameSize; //!< The current maximum frame size 581 /** 582 * Capabilities reflect what the port is capable of, that is what speed/duplex is possible. For example, 583 * if only 100 M full duplex is available, the capabilities would 584 * show: 585 * halfDuplexMask=0. 586 * fullDuplexMask=NT_LINK_SPEED_100M. 587 * Other capabilities are min/max transmit sizes. 588 */ 589 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 590 uint8_t adapterNo; //!< The adapter that has the port 591 uint8_t Reserved1[3]; 592 uint8_t numSensors; //!< The number of sensors on this port 593 uint8_t Reserved2[3]; 594 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 595 uint8_t Reserved3[3]; 596 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 597 uint8_t Reserved4[3]; 598 599 /** 600 * NIM model information 601 */ 602 enum NtNimIdentifier_e nim_id; //!< NIM identifier 603 uint8_t vendor_name[17]; //!< NIM Vendor name 604 uint8_t product_no[17]; //!< NIM product number 605 uint8_t serial_no[17]; //!< NIM serial number 606 uint8_t date[9]; //!< NIM vendors manufacturing date 607 uint8_t revision[5]; //!< NIM vendor revision 608 uint8_t power_level_req; //!< NIM required power level 609 uint8_t power_level_curr; //!< NIM current power level 610 struct NtNIMLinkLength_s link_length; 611} NtInfoPort_t; 612 613/** 614 * NT_INFO_CMD_READ_PORT specific data. 615 * The portNo must be initialized for the relevant port. 616 */ 617struct NtInfoCmdPort_s { 618 uint8_t portNo; //!< The port to query 619 uint8_t Reserved1[3]; 620 struct NtInfoPort_s data; //!< The port data 621}; 622/***********************************************************************************************/ 623/* Port info version 1 */ 624/***********************************************************************************************/ 625#define NT_INFO_CMD_READ_PORT_V1 NT_INFO_CMD_READ_COMPAT_6 //!< Port info - the port state, speed and duplex 626/** 627 * This structure will return the port specific information version 1. 628 * Must be a mirror of NtInfoPort_s with version 1 variables added 629 * to the bottom. 630 */ 631struct NtInfoPort_v1_s { 632 enum NtPortType_e type; //!< The interface type 633 enum NtLinkState_e state; //!< The port up or down 634 enum NtLinkSpeed_e speed; //!< The interface speed 635 enum NtLinkDuplex_e duplex; //!< The duplex mode 636 int32_t flow; //!< 0 = no flow control, 1 = flow control 637 enum NtLinkMDI_e mdi; //!< 1 = auto, 2 = MDI, 4 = MDIX 638 uint8_t macAddress[6]; //!< The MAC address of the interface 639 uint16_t maxFrameSize; //!< The current maximum frame size 640 /** 641 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example, 642 * if only 100 M full duplex is available, the capabilities would 643 * show: 644 * halfDuplexMask=0. 645 * fullDuplexMask=NT_LINK_SPEED_100M. 646 * Other capabilities are min/max transmit sizes. 647 */ 648 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 649 uint8_t adapterNo; //!< The adapter that has the port 650 uint8_t Reserved1[3]; 651 uint8_t numSensors; //!< The number of sensors on this port 652 uint8_t Reserved2[3]; 653 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 654 uint8_t Reserved3[3]; 655 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 656 uint8_t Reserved4[3]; 657 658 /** 659 * NIM model information 660 */ 661 enum NtNimIdentifier_e nim_id; //!< NIM identifier 662 uint8_t vendor_name[17]; //!< NIM Vendor name 663 uint8_t product_no[17]; //!< NIM product number 664 uint8_t serial_no[17]; //!< NIM serial number 665 uint8_t date[9]; //!< NIM vendors manufacturing date 666 uint8_t revision[5]; //!< NIM vendor revision 667 uint8_t power_level_req; //!< NIM required power level 668 uint8_t power_level_curr; //!< NIM current power level 669 struct NtNIMLinkLength_s link_length; 670 671 /** 672 * Adapter information 673 */ 674 struct NtInfoAdapter_v1_s adapterInfo; // Adapter information 675 /** 676 * Bypass port information 677 */ 678 struct NtBypassPortInfo_s bypass; // Bypass port information 679}; 680 681/** 682 * NT_INFO_CMD_READ_PORT_V1 specific data. 683 * The portNo must be initialized for the relevant port. 684 */ 685struct NtInfoCmdPort_v1_s { 686 uint8_t portNo; //!< The port to query 687 uint8_t Reserved1[3]; 688 struct NtInfoPort_v1_s data; //!< The port data 689}; 690 691 692/***********************************************************************************************/ 693/* Port info version 2 */ 694/***********************************************************************************************/ 695#define NT_INFO_CMD_READ_PORT_V2 NT_INFO_CMD_READ_COMPAT_8 //!< Port info - the port state, speed and duplex 696/** 697 * This structure will return the port specific information version 2. 698 * Must be a mirror of NtInfoPort_v1_s with version 2 variables added 699 * to the bottom. 700 */ 701struct NtInfoPort_v2_s { 702 enum NtPortType_e type; //!< The interface type 703 enum NtLinkState_e state; //!< The port up or down 704 enum NtLinkSpeed_e speed; //!< The interface speed 705 enum NtLinkDuplex_e duplex; //!< The duplex mode 706 int32_t flow; //!< 0 = no flow control, 1 = flow control 707 enum NtLinkMDI_e mdi; //!< 1 = auto, 2 = MDI, 4 = MDIX 708 uint8_t macAddress[6]; //!< The MAC address of the interface 709 uint16_t maxFrameSize; //!< The current maximum frame size 710 /** 711 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example, 712 * if only 100 M full duplex is available, the capabilities would 713 * show: 714 * halfDuplexMask=0. 715 * fullDuplexMask=NT_LINK_SPEED_100M. 716 * Other capabilities are min/max transmit sizes. 717 */ 718 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 719 uint8_t adapterNo; //!< The adapter that has the port 720 uint8_t Reserved1[3]; 721 uint8_t numSensors; //!< The number of sensors on this port 722 uint8_t Reserved2[3]; 723 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 724 uint8_t Reserved3[3]; 725 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 726 uint8_t Reserved4[3]; 727 728 /** 729 * NIM model information 730 */ 731 enum NtNimIdentifier_e nim_id; //!< NIM identifier 732 uint8_t vendor_name[17]; //!< NIM Vendor name 733 uint8_t product_no[17]; //!< NIM product number 734 uint8_t serial_no[17]; //!< NIM serial number 735 uint8_t date[9]; //!< NIM vendors manufacturing date 736 uint8_t revision[5]; //!< NIM vendor revision 737 uint8_t power_level_req; //!< NIM required power level 738 uint8_t power_level_curr; //!< NIM current power level 739 struct NtNIMLinkLength_s link_length; 740 741 /** 742 * Adapter information 743 */ 744 struct NtInfoAdapter_v2_s adapterInfo; // Adapter information 745 /** 746 * Bypass port information 747 */ 748 struct NtBypassPortInfo_s bypass; // Bypass port information 749}; 750 751/** 752 * NT_INFO_CMD_READ_PORT_V2 specific data. 753 * The portNo must be initialized for the relevant port. 754 */ 755struct NtInfoCmdPort_v2_s { 756 uint8_t portNo; //!< The port to query 757 uint8_t Reserved1[3]; 758 struct NtInfoPort_v2_s data; //!< The port data 759}; 760 761/***********************************************************************************************/ 762/* Port info version 3 */ 763/***********************************************************************************************/ 764#define NT_INFO_CMD_READ_PORT_V3 NT_INFO_CMD_READ_COMPAT_12 //!< Port info - the port state, speed and duplex 765 766 767/** 768 * This structure will return the port specific information version 3. 769 * Must be a mirror of NtInfoPort_v2_s with version 3 variables added 770 * to the bottom. 771 */ 772struct NtInfoPort_v3_s { 773 enum NtPortType_e type; //!< The interface type 774 enum NtLinkState_e state; //!< The port up or down 775 enum NtLinkSpeed_e speed; //!< The interface speed 776 enum NtLinkDuplex_e duplex; //!< The duplex mode 777 int32_t flow; //!< 0 = no flow control, 1 = flow control 778 enum NtLinkMDI_e mdi; //!< 1 = auto, 2 = MDI, 4 = MDIX 779 uint8_t macAddress[6]; //!< The MAC address of the interface 780 uint16_t maxFrameSize; //!< The current maximum frame size 781 /** 782 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example, 783 * if only 100 M full duplex is available, the capabilities would 784 * show: 785 * halfDuplexMask=0. 786 * fullDuplexMask=NT_LINK_SPEED_100M. 787 * Other capabilities are min/max transmit sizes. 788 */ 789 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 790 uint8_t adapterNo; //!< The adapter that has the port 791 uint8_t Reserved1[3]; 792 uint8_t numSensors; //!< The number of sensors on this port 793 uint8_t Reserved2[3]; 794 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 795 uint8_t Reserved3[3]; 796 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 797 uint8_t Reserved4[3]; 798 799 /** 800 * NIM model information 801 */ 802 enum NtNimIdentifier_e nim_id; //!< NIM identifier 803 uint8_t vendor_name[17]; //!< NIM Vendor name 804 uint8_t product_no[17]; //!< NIM product number 805 uint8_t serial_no[17]; //!< NIM serial number 806 uint8_t date[9]; //!< NIM vendors manufacturing date 807 uint8_t revision[5]; //!< NIM vendor revision 808 uint8_t power_level_req; //!< NIM required power level 809 uint8_t power_level_curr; //!< NIM current power level 810 struct NtNIMLinkLength_s link_length; 811 812 /** 813 * Adapter information 814 */ 815 struct NtInfoAdapter_v3_s adapterInfo; // Adapter information 816 /** 817 * Bypass port information 818 */ 819 struct NtBypassPortInfo_s bypass; // Bypass port information 820}; 821 822/** 823 * NT_INFO_CMD_READ_PORT_V3 specific data. 824 * The portNo must be initialized for the relevant port. 825 */ 826struct NtInfoCmdPort_v3_s { 827 uint8_t portNo; //!< The port to query 828 uint8_t Reserved1[3]; 829 struct NtInfoPort_v3_s data; //!< The port data 830}; 831 832 833/***********************************************************************************************/ 834/* Port info version 4 */ 835/***********************************************************************************************/ 836#define NT_INFO_CMD_READ_PORT_V4 NT_INFO_CMD_READ_COMPAT_14 //!< Port info - the port state, speed and duplex 837 838 839/** 840 * This structure will return the port specific information version 3. 841 * Must be a mirror of NtInfoPort_v3_s with version 4 variables added 842 * to the bottom. 843 */ 844struct NtInfoPort_v4_s { 845 enum NtPortType_e type; //!< The interface type 846 enum NtLinkState_e state; //!< The port up or down 847 enum NtLinkSpeed_e speed; //!< The interface speed 848 enum NtLinkDuplex_e duplex; //!< The duplex mode 849 int32_t flow; //!< 0 = no flow control, 1 = flow control 850 enum NtLinkMDI_e mdi; //!< 1 = auto, 2 = MDI, 4 = MDIX 851 uint8_t macAddress[6]; //!< The MAC address of the interface 852 uint16_t maxFrameSize; //!< The current maximum frame size 853 /** 854 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example, 855 * if only 100 M full duplex is available, the capabilities would 856 * show: 857 * halfDuplexMask=0. 858 * fullDuplexMask=NT_LINK_SPEED_100M. 859 * Other capabilities are min/max transmit sizes. 860 */ 861 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 862 uint8_t adapterNo; //!< The adapter that has the port 863 uint8_t Reserved1[3]; 864 uint8_t numSensors; //!< The number of sensors on this port 865 uint8_t Reserved2[3]; 866 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 867 uint8_t Reserved3[3]; 868 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 869 uint8_t Reserved4[3]; 870 871 /** 872 * NIM model information 873 */ 874 enum NtNimIdentifier_e nim_id; //!< NIM identifier 875 uint8_t vendor_name[17]; //!< NIM Vendor name 876 uint8_t product_no[17]; //!< NIM product number 877 uint8_t serial_no[17]; //!< NIM serial number 878 uint8_t date[9]; //!< NIM vendors manufacturing date 879 uint8_t revision[5]; //!< NIM vendor revision 880 uint8_t power_level_req; //!< NIM required power level 881 uint8_t power_level_curr; //!< NIM current power level 882 struct NtNIMLinkLength_s link_length; 883 884 /** 885 * Adapter information 886 */ 887 struct NtInfoAdapter_v4_s adapterInfo; // Adapter information 888 /** 889 * Bypass port information 890 */ 891 struct NtBypassPortInfo_s bypass; // Bypass port information 892}; 893 894 895/** 896 * NT_INFO_CMD_READ_PORT_V4 specific data. 897 * The portNo must be initialized for the relevant port. 898 */ 899struct NtInfoCmdPort_v4_s { 900 uint8_t portNo; //!< The port to query 901 uint8_t Reserved1[3]; 902 struct NtInfoPort_v4_s data; //!< The port data 903}; 904 905 906/***********************************************************************************************/ 907/* Port info version 5 */ 908/***********************************************************************************************/ 909#define NT_INFO_CMD_READ_PORT_V5 NT_INFO_CMD_READ_COMPAT_16 //!< Port info - the port state, speed and duplex 910 911/** 912 * This structure will return the port specific information version 5. 913 * Must be a mirror of NtInfoPort_v4_s with version 5 variables added 914 * to the bottom. 915 */ 916struct NtInfoPort_v5_s { 917 enum NtPortType_e type; //!< The interface type 918 enum NtLinkState_e state; //!< The port up or down 919 enum NtLinkSpeed_e speed; //!< The interface speed 920 enum NtLinkDuplex_e duplex; //!< The duplex mode 921 int32_t flow; //!< 0 = no flow control, 1 = flow control 922 enum NtLinkMDI_e mdi; //!< 1 = auto, 2 = MDI, 4 = MDIX 923 uint8_t macAddress[6]; //!< The MAC address of the interface 924 uint16_t maxFrameSize; //!< The current maximum frame size 925 /** 926 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example, 927 * if only 100 M full duplex is available, the capabilities would 928 * show: 929 * halfDuplexMask=0. 930 * fullDuplexMask=NT_LINK_SPEED_100M. 931 * Other capabilities are min/max transmit sizes. 932 */ 933 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 934 uint8_t adapterNo; //!< The adapter that has the port 935 uint8_t Reserved1[3]; 936 uint8_t numSensors; //!< The number of sensors on this port 937 uint8_t Reserved2[3]; 938 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 939 uint8_t Reserved3[3]; 940 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 941 uint8_t Reserved4[3]; 942 943 /** 944 * NIM model information 945 */ 946 enum NtNimIdentifier_e nim_id; //!< NIM identifier 947 uint8_t vendor_name[17]; //!< NIM Vendor name 948 uint8_t product_no[17]; //!< NIM product number 949 uint8_t serial_no[17]; //!< NIM serial number 950 uint8_t date[9]; //!< NIM vendors manufacturing date 951 uint8_t revision[5]; //!< NIM vendor revision 952 uint8_t power_level_req; //!< NIM required power level 953 uint8_t power_level_curr; //!< NIM current power level 954 struct NtNIMLinkLength_s link_length; 955 956 /** 957 * Adapter information 958 */ 959 struct NtInfoAdapter_v5_s adapterInfo; // Adapter information 960 /** 961 * Bypass port information 962 */ 963 struct NtBypassPortInfo_s bypass; // Bypass port information 964}; 965 966 967/** 968 * NT_INFO_CMD_READ_PORT_V5 specific data. 969 * The portNo must be initialized for the relevant port. 970 */ 971struct NtInfoCmdPort_v5_s { 972 uint8_t portNo; //!< The port to query 973 uint8_t Reserved1[3]; 974 struct NtInfoPort_v5_s data; //!< The port data 975}; 976 977 978/***********************************************************************************************/ 979/* Port info version 6 */ 980/***********************************************************************************************/ 981#define NT_INFO_CMD_READ_PORT_V6 NT_INFO_CMD_READ_COMPAT_18 //!< Port info - the port state, speed and duplex 982 983/** 984 * This structure will return the port specific information version 6. 985 * Must be a mirror of NtInfoPort_v5_s with version 6 variables added 986 * to the bottom. 987 */ 988struct NtInfoPort_v6_s { 989 enum NtPortType_e type; //!< The interface type 990 enum NtLinkState_e state; //!< The port up or down 991 enum NtLinkSpeed_e speed; //!< The interface speed 992 enum NtLinkDuplex_e duplex; //!< The duplex mode 993 int32_t flow; //!< 0 = no flow control, 1 = flow control 994 enum NtLinkMDI_e mdi; //!< 1 = auto, 2 = MDI, 4 = MDIX 995 uint8_t macAddress[6]; //!< The MAC address of the interface 996 uint16_t maxFrameSize; //!< The current maximum frame size 997 /** 998 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example, 999 * if only 100 M full duplex is available, the capabilities would 1000 * show: 1001 * halfDuplexMask=0. 1002 * fullDuplexMask=NT_LINK_SPEED_100M. 1003 * Other capabilities are min/max transmit sizes. 1004 */ 1005 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 1006 uint8_t adapterNo; //!< The adapter that has the port 1007 uint8_t Reserved1[3]; 1008 uint8_t numSensors; //!< The number of sensors on this port 1009 uint8_t Reserved2[3]; 1010 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 1011 uint8_t Reserved3[3]; 1012 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 1013 uint8_t Reserved4[3]; 1014 1015 /** 1016 * NIM model information 1017 */ 1018 enum NtNimIdentifier_e nim_id; //!< NIM identifier 1019 uint8_t vendor_name[17]; //!< NIM Vendor name 1020 uint8_t product_no[17]; //!< NIM product number 1021 uint8_t serial_no[17]; //!< NIM serial number 1022 uint8_t date[9]; //!< NIM vendors manufacturing date 1023 uint8_t revision[5]; //!< NIM vendor revision 1024 uint8_t power_level_req; //!< NIM required power level 1025 uint8_t power_level_curr; //!< NIM current power level 1026 struct NtNIMLinkLength_s link_length; 1027 1028 /** 1029 * Adapter information 1030 */ 1031 struct NtInfoAdapter_v5_s adapterInfo; // Adapter information 1032 /** 1033 * Bypass port information 1034 */ 1035 struct NtBypassPortInfo_s bypass; // Bypass port information 1036 uint32_t statusMask; //!< Adapter status mask holds information on how the port is configured at startup 1037}; 1038 1039/** 1040 * NT_INFO_CMD_READ_PORT_V6 specific data. 1041 * The portNo must be initialized for the relevant port. 1042 */ 1043struct NtInfoCmdPort_v6_s { 1044 uint8_t portNo; //!< The port to query 1045 uint8_t Reserved1[3]; 1046 struct NtInfoPort_v6_s data; //!< The port data 1047}; 1048 1049/***********************************************************************************************/ 1050/* Port info version 7 */ 1051/***********************************************************************************************/ 1052#define NT_INFO_CMD_READ_PORT_V7 NT_INFO_CMD_READ_COMPAT_20 //!< Port info - the port state, speed and duplex 1053 1054/** 1055 * This structure will return the port specific information version 7. 1056 * Must be a mirror of NtInfoPort_v6_s with version 7 variables added 1057 * to the bottom. 1058 */ 1059struct NtInfoPort_v7_s { 1060 enum NtPortType_e type; //!< The interface type 1061 enum NtLinkState_e state; //!< The port up or down 1062 enum NtLinkSpeed_e speed; //!< The interface speed 1063 enum NtLinkDuplex_e duplex; //!< The duplex mode 1064 int32_t flow; //!< 0 = no flow control, 1 = flow control 1065 enum NtLinkMDI_e mdi; //!< 1 = auto, 2 = MDI, 4 = MDIX 1066 uint8_t macAddress[6]; //!< The MAC address of the interface 1067 uint16_t maxFrameSize; //!< The current maximum frame size 1068 /** 1069 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example, 1070 * if only 100 M full duplex is available, the capabilities would 1071 * show: 1072 * halfDuplexMask=0. 1073 * fullDuplexMask=NT_LINK_SPEED_100M. 1074 * Other capabilities are min/max transmit sizes. 1075 */ 1076 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 1077 uint8_t adapterNo; //!< The adapter that has the port 1078 uint8_t Reserved1[3]; 1079 uint8_t numSensors; //!< The number of sensors on this port 1080 uint8_t Reserved2[3]; 1081 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 1082 uint8_t Reserved3[3]; 1083 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 1084 uint8_t Reserved4[3]; 1085 1086 /** 1087 * NIM model information 1088 */ 1089 enum NtNimIdentifier_e nim_id; //!< NIM identifier 1090 uint8_t vendor_name[17]; //!< NIM Vendor name 1091 uint8_t product_no[17]; //!< NIM product number 1092 uint8_t serial_no[17]; //!< NIM serial number 1093 uint8_t date[9]; //!< NIM vendors manufacturing date 1094 uint8_t revision[5]; //!< NIM vendor revision 1095 uint8_t power_level_req; //!< NIM required power level 1096 uint8_t power_level_curr; //!< NIM current power level 1097 struct NtNIMLinkLength_s link_length; 1098 1099 /** 1100 * Adapter information 1101 */ 1102 struct NtInfoAdapter_v6_s adapterInfo; // Adapter information 1103 /** 1104 * Bypass port information 1105 */ 1106 struct NtBypassPortInfo_s bypass; // Bypass port information 1107 uint32_t statusMask; //!< Adapter status mask holds information on how the port is configured at startup 1108}; 1109 1110 1111/***********************************************************************************************/ 1112/* Port info version 8 */ 1113/***********************************************************************************************/ 1114#define NT_INFO_CMD_READ_PORT_V8 NT_INFO_CMD_READ_COMPAT_24 //!< Port info - the port state, speed and duplex 1115/** 1116 * This structure will return the port specific information version 8. 1117 * Must be a mirror of NtInfoPort_v7_s with version 8 variables added 1118 * to the bottom. 1119 */ 1120struct NtInfoPort_v8_s { 1121 enum NtPortType_e type; //!< The interface type 1122 enum NtLinkState_e state; //!< The port up or down 1123 enum NtLinkSpeed_e speed; //!< The interface speed 1124 enum NtLinkDuplex_e duplex; //!< The duplex mode 1125 int32_t flow; //!< 0 = no flow control, 1 = flow control 1126 enum NtLinkMDI_e mdi; //!< 1 = auto, 2 = MDI, 4 = MDIX 1127 uint8_t macAddress[6]; //!< The MAC address of the interface 1128 uint16_t maxFrameSize; //!< The current maximum frame size 1129 /** 1130 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example, 1131 * if only 100 M full duplex is available, the capabilities would 1132 * show: 1133 * halfDuplexMask=0. 1134 * fullDuplexMask=NT_LINK_SPEED_100M. 1135 * Other capabilities are min/max transmit sizes. 1136 */ 1137 struct NtLinkCapabilities_s capabilities; //!< The link capabilities 1138 uint8_t adapterNo; //!< The adapter that has the port 1139 uint8_t Reserved1[3]; 1140 uint8_t numSensors; //!< The number of sensors on this port 1141 uint8_t Reserved2[3]; 1142 uint8_t numLevel1Sensors; //!< Number of level 1 sensors on this port 1143 uint8_t Reserved3[3]; 1144 uint8_t numLevel2Sensors; //!< Number of level 2 sensors on this port 1145 uint8_t Reserved4[3]; 1146 1147 /** 1148 * NIM model information 1149 */ 1150 enum NtNimIdentifier_e nim_id; //!< NIM identifier 1151 uint8_t vendor_name[17]; //!< NIM Vendor name 1152 uint8_t product_no[17]; //!< NIM product number 1153 uint8_t serial_no[17]; //!< NIM serial number 1154 uint8_t date[9]; //!< NIM vendors manufacturing date 1155 uint8_t revision[5]; //!< NIM vendor revision 1156 uint8_t power_level_req; //!< NIM required power level 1157 uint8_t power_level_curr; //!< NIM current power level 1158 struct NtNIMLinkLength_s link_length; 1159 /** 1160 * Adapter information 1161 */ 1162 struct NtInfoAdapter_v6_s adapterInfo; // Adapter information 1163 /** 1164 * Bypass port information 1165 */ 1166 struct NtBypassPortInfo_s bypass; // Bypass port information 1167 uint32_t statusMask; //!< Adapter status mask holds information on how the port is configured at startup 1168 NtPortFec_t fecState; //!< The state of Forward Error Correction if applicable 1169}; 1170 1171 1172/** 1173 * NT_INFO_CMD_READ_PORT_V7 specific data. 1174 * The portNo must be initialized for the relevant port. 1175 */ 1176struct NtInfoCmdPort_v7_s { 1177 uint8_t portNo; //!< The port to query 1178 uint8_t Reserved1[3]; 1179 struct NtInfoPort_v7_s data; //!< The port data 1180}; 1181 1182/** 1183 * NT_INFO_CMD_READ_PORT_V8 specific data. 1184 * The portNo must be initialized for the relevant port. 1185 */ 1186struct NtInfoCmdPort_v8_s { 1187 uint8_t portNo; //!< The port to query 1188 uint8_t Reserved1[3]; 1189 struct NtInfoPort_v8_s data; //!< The port data 1190}; 1191 1192 1193/***********************************************************************************************/ 1194/* Time sync version 0 */ 1195/***********************************************************************************************/ 1196#define NT_INFO_CMD_READ_TIMESYNC NT_INFO_CMD_READ_COMPAT_2 //!< Time sync info - the time sync connector and time sync data 1197 1198struct NtInfoTimeSync_s { 1199 uint32_t timeSyncSupported; //!< Is the time sync supported by this adapter 1200 uint32_t timeSyncProtocol; //!< The time sync protocol 1201 uint32_t timeSyncPpsEnable; //!< The time sync PPS enable 1202 uint32_t timeSyncConnectorIn; //!< The time sync input connector 1203 uint32_t timeSyncConnectorOut; //!< The time sync output connectors 1204 uint32_t timeSyncConnectorRepeat; //!< The time sync repeater connectors 1205 uint32_t timeSyncTimeJumpThreshold; //!< The time sync time jump threshold in seconds 1206 uint32_t timeSyncTimeOffset; //!< The time sync offset in nanoseconds 1207 uint64_t timeSyncPpsSampled; //!< The sampled PPS time (0 if not applicable) 1208 int64_t timeSyncTimeSkew; //!< The time skew 1209 uint32_t timeSyncStatus; //!< The time sync status 1210}; 1211 1212/** 1213 * NT_INFO_CMD_READ_TIMESYNC specific data. 1214 * The adapterNo must be initialized for the relevant adapter. 1215 */ 1216struct NtInfoCmdTimeSync_s { 1217 uint8_t adapterNo; //!< The adapter to query 1218 uint8_t Reserved1[3]; 1219 struct NtInfoTimeSync_s data; //!< The time sync data 1220}; 1221 1222#define NT_INFO_CMD_READ_TIMESYNC_V1 NT_INFO_CMD_READ_COMPAT_4 //!< Time sync info - the time sync connector and time sync data 1223 1224/** 1225 * Time sync status 1226 */ 1227enum NtTimeSyncStatus_e { 1228 NT_TIMESYNC_STATUS_NONE = 0, //!< Time sync status unused 1229 NT_TIMESYNC_STATUS_SIGNAL_LOST, //!< Time sync signal lost (NT and PPS) 1230 NT_TIMESYNC_STATUS_SIGNAL_PRESENT, //!< Time sync signal present (NT and PPS) 1231 NT_TIMESYNC_STATUS_OS_SYNCING, //!< OS time sync synching (OS only) 1232 NT_TIMESYNC_STATUS_OS_IN_SYNC, //!< OS time sync in synchronization (OS only) 1233}; 1234 1235/** 1236 * Time sync OS Failover status 1237 */ 1238enum NtTimeSyncOSFailoverStatus_e { 1239 NT_TIMESYNC_OS_FAILOVER_STATUS_DISABLED = 0, 1240 NT_TIMESYNC_OS_FAILOVER_STATUS_INIT = 1, 1241 NT_TIMESYNC_OS_FAILOVER_STATUS_WAITING = 2, 1242 NT_TIMESYNC_OS_FAILOVER_STATUS_ACTIVE = 3, 1243}; 1244 1245/** 1246 * Time sync specific info V1 1247 */ 1248struct NtInfoTimeSync_v1_s { 1249 uint32_t timeSyncSupported; //!< Is the time sync supported by this adapter 1250 enum NtTimeSyncProtocol_e timeSyncProtocol; //!< The time sync protocol 1251 enum NtTimeSyncPpsStatus_e timeSyncPpsEnable; //!< The time sync PPS enable 1252 uint32_t timeSyncConnectorIn; //!< The time sync input connector 1253 uint32_t timeSyncConnectorOut; //!< The time sync output connectors 1254 uint32_t timeSyncConnectorRepeat; //!< The time sync repeater connectors 1255 uint32_t timeSyncTimeJumpThreshold; //!< The time sync time jump threshold in seconds 1256 uint32_t timeSyncTimeOffset; //!< The time sync offset in nanoseconds 1257 uint64_t timeSyncPpsSampled; //!< The sampled PPS time (0 if not applicable) 1258 int64_t timeSyncTimeSkew; //!< The time skew 1259 enum NtTimeSyncStatus_e timeSyncStatus; //!< The time sync status 1260 uint32_t osTimeSyncFailoverEnable; //!< The OS time sync failover enable 1261 uint32_t osTimeSyncFailoverStatus; //!< The OS time sync failover status 1262 uint32_t highFrequencySampling; //!< The high frequency sampling status 1263 uint64_t adapterTime; //!< The sampled adapter time 1264 uint64_t externalTime; //!< The sampled external time 1265 uint32_t timeSyncConnectorPpsOut; //!< The time sync PPS out connector 1266}; 1267/** 1268 * NT_INFO_CMD_READ_TIMESYNC_V1 specific data. 1269 * The adapterNo must be initialized for the relevant adapter. 1270 */ 1271struct NtInfoCmdTimeSync_v1_s { 1272 uint8_t adapterNo; //!< The adapter to query 1273 uint8_t Reserved1[3]; 1274 struct NtInfoTimeSync_v1_s data; //!< The time sync data 1275}; 1276 1277 1278#define NT_INFO_CMD_READ_TIMESYNC_V2 NT_INFO_CMD_READ_COMPAT_10 1279 1280/** 1281 * Time syncronization specific info 1282 */ 1283struct NtInfoTimeSync_v2_s { 1284 uint32_t timeSyncSupported; //!< Is time sync supported by this adapter 1285 uint32_t ptpSupported; //!< Is PTP time sync available on this adapter 1286 1287 enum NtTimeSyncConnectorSetting_e timeSyncConnectorExt1; //!< Timesync connector Ext1 setting 1288 enum NtTimeSyncConnectorSetting_e timeSyncConnectorInt1; //!< Timesync connector Int1 setting 1289 enum NtTimeSyncConnectorSetting_e timeSyncConnectorInt2; //!< Timesync connector Int2 setting 1290 enum NtTimeSyncReference_e tsRefPrio[4]; //!< Timesync source reference priority list 1291 enum NtTimeSyncReference_e timeRef; //!< The current time reference 1292 enum NtTimeSyncFreqReference_e tsFreqRefPrio[4]; //!< Timesync frequency reference priority list 1293 enum NtTimeSyncFreqReference_e freqRef; //!< The current frequency reference 1294 uint32_t timeSyncNTTSInSyncLimit; //!< The configured NT-TS in-sync limit 1295 uint32_t timeSyncOSInSyncLimit; //!< The configured OS in-sync limit 1296 uint32_t timeSyncPPSInSyncLimit; //!< The configured PPS in-sync limit 1297 uint32_t timeSyncPTPInSyncLimit; //!< The configured PTP in-sync limit 1298 enum NtTimeSyncInSyncStatus_e timeSyncInSyncStatus; //!< The timestamp clock time in-sync/out-of-sync status 1299 enum NtTimeSyncConStatus_e timeSyncCurrentConStatus; //!< The current time sync connector status 1300 enum NtTimeSyncPpsStatus_e timeSyncPpsEnable; //!< The time sync PPS enable. Activated by an application 1301 enum NtTimeSyncPpsSyncMode_e timeSyncPpsSyncMode; //!< When current timeref is PpsIn, this is the sync mode status 1302 uint32_t timeSyncClockAdjustmentMode; //!< The timesync timestamp clock adjustment mode 1303 /* timeSyncClockAdjustmentMode 2 only */ 1304 uint32_t timeSyncHardReset; //!< If hard reset of clock is allowed (time jumps) 1305 /* timeSyncClockAdjustmentMode 1 only */ 1306 uint32_t timeSyncTimeJumpThreshold; //!< The time sync time jump threshold in seconds 1307 1308 uint32_t timeSyncTimeOffset; //!< The time sync offset in nanoseconds. Used for NT-TS and PPS caple delay compensation 1309 uint64_t timeSyncPpsSampled; //!< The sampled PPS time. In ns since 1/1 1970 (unix epoch). if NATIVE timestamp format is configured, the epoch is user defined). Note that timeSyncPpsEnable must be true for this parameter to become valid. 1310 int64_t timeSyncTimeSkew; //!< The time skew in ns (0 if not syncing to a time reference). If OS time sync is configured 1us is the resolution, thus skew of 0 means a skew of <1000ns 1311 uint32_t highFrequencySampling; //!< The high frequency sampling status 1312 struct NtInfoTimeSyncSample_s sample[7]; //!< Timestamp sample sets. @ref NtTimeSyncSamplingSrc_e 1313}; 1314 1315/** 1316 * NT_INFO_CMD_READ_TIMESYNC_V2 specific data. 1317 * The adapterNo must be initialized for the relevant adapter. 1318 */ 1319struct NtInfoCmdTimeSync_v2_s { 1320 uint8_t adapterNo; //!< The adapter to query 1321 uint8_t Reserved1[2]; 1322 struct NtInfoTimeSync_v2_s data; //!< The time sync data 1323}; 1324 1325 1326#define NT_INFO_CMD_READ_TIMESYNC_V3 NT_INFO_CMD_READ_COMPAT_21 1327 1328 1329struct NtInfoTimeSync_v3_s { 1330 uint32_t timeSyncSupported; //!< Is time sync supported by this adapter 1331 uint32_t ptpSupported; //!< Is PTP time sync available on this adapter 1332 1333 enum NtTimeSyncConnectorSetting_e timeSyncConnectorExt1; //!< Timesync connector Ext1 setting 1334 enum NtTimeSyncConnectorSetting_e timeSyncConnectorInt1; //!< Timesync connector Int1 setting 1335 enum NtTimeSyncConnectorSetting_e timeSyncConnectorInt2; //!< Timesync connector Int2 setting 1336 enum NtTimeSyncReference_e tsRefPrio[4]; //!< Timesync source reference priority list 1337 enum NtTimeSyncReference_e timeRef; //!< The current time reference 1338 enum NtTimeSyncFreqReference_e tsFreqRefPrio[4]; //!< Timesync frequency reference priority list 1339 enum NtTimeSyncFreqReference_e freqRef; //!< The current frequency reference 1340 uint32_t timeSyncNTTSInSyncLimit; //!< The configured NT-TS in-sync limit 1341 uint32_t timeSyncOSInSyncLimit; //!< The configured OS in-sync limit 1342 uint32_t timeSyncPPSInSyncLimit; //!< The configured PPS in-sync limit 1343 uint32_t timeSyncPTPInSyncLimit; //!< The configured PTP in-sync limit 1344 enum NtTimeSyncInSyncStatus_e timeSyncInSyncStatus; //!< The timestamp clock time in-sync/out-of-sync status 1345 enum NtTimeSyncConStatus_e timeSyncCurrentConStatus; //!< The current time sync connector status 1346 enum NtTimeSyncPpsStatus_e timeSyncPpsEnable; //!< The time sync PPS enable. Activated by an application 1347 enum NtTimeSyncPpsSyncMode_e timeSyncPpsSyncMode; //!< When current timeref is PpsIn, this is the sync mode status 1348 uint32_t timeSyncClockAdjustmentMode; //!< The time sync timestamp clock adjustment mode 1349 /* timeSyncClockAdjustmentMode 2 only */ 1350 uint32_t timeSyncHardReset; //!< If hard reset of clock is allowed (time jumps) 1351 /* timeSyncClockAdjustmentMode 1 only */ 1352 uint32_t timeSyncTimeJumpThreshold; //!< The time sync time jump threshold in seconds 1353 1354 uint32_t timeSyncTimeOffset; //!< The time sync offset in nanoseconds. Used for NT-TS and PPS caple delay compensation 1355 uint64_t timeSyncPpsSampled; //!< The sampled PPS time. In ns since 1/1 1970 (unix epoch). if NATIVE timestamp format is configured, the epoch is user defined). Note that timeSyncPpsEnable must be true for this parameter to become valid 1356 int64_t timeSyncTimeSkew; //!< The time skew in ns (0 if not syncing to a time reference) 1357 uint32_t highFrequencySampling; //!< The high frequency sampling status 1358 struct NtInfoTimeSyncSample_s sample[7]; //!< Timestamp sample sets. @ref NtTimeSyncSamplingSrc_e 1359 1360 int64_t timeSyncClockRateAdjustment; //!< The current clock rate adjustment imposed on the TS clock to synchronize to the referenced clock in nanoseconds per second. This is only supported on newer Gen2 adapters (FPGA version must be 46 or above) 1361 1362 /* Server OS clock synchronization to TS clock */ 1363 uint32_t timeSyncAdapterToOSSyncEnabled; //!< Non-zero if this adapter is configured to synchronize the server OS clock 1364 int64_t timeSyncOSClockOffset; //!< The latest read OS clock offset to the adapter TS clock 1365 int64_t timeSyncOSClockRateAdjustment; //!< The current clock rate adjustment imposed on the server OS clock to synchronize to the adapter TS clock. 1366}; 1367 1368/** 1369 * NT_INFO_CMD_READ_TIMESYNC_V3 specific data. 1370 * The adapterNo must be initialized for the relevant adapter. 1371 */ 1372struct NtInfoCmdTimeSync_v3_s { 1373 uint8_t adapterNo; //!< The adapter to query 1374 uint8_t Reserved1[2]; 1375 struct NtInfoTimeSync_v3_s data; //!< The time sync data 1376}; 1377 1378 1379/***********************************************************************************************/ 1380/* Hostbuffer info version 0 */ 1381/***********************************************************************************************/ 1382#define NT_INFO_CMD_READ_HOSTBUFFER NT_INFO_CMD_READ_COMPAT_3 //!< Host buffer info - the NUMA node, size and feed 1383/** 1384 * NT_INFO_CMD_READ_PORT_V1 specific data. 1385 * The portNo must be initialized for the relevant port. 1386 */ 1387struct NtInfoHostBuffer_s { 1388 uint8_t numaNode; //!< The NUMA node on which the host buffer resides 1389 uint8_t Reserved1[3]; 1390 uint32_t size; //!< The size of the host buffer in bytes 1391 uint32_t feed; //!< The feed index per adapter and type 1392}; 1393 1394/** 1395 * NT_INFO_CMD_READ_HOSTBUFFER specific data. 1396 * The adapterNo, hostBufferNo and hostBufferType must be initialized for the relevant adapter, host buffer number and host buffer type. 1397 */ 1398struct NtInfoCmdHostBuffer_s { 1399 uint8_t adapterNo; //!< The adapter to query 1400 uint8_t Reserved1[3]; 1401 uint32_t hostBufferNo; //!< The host buffer to query 1402 enum NtNetHostBufferType_e hostBufferType; //!< The host buffer type, that is, CAPTURE or TX 1403 struct NtInfoHostBuffer_s data; //!< The host buffer data 1404}; 1405 1406/***********************************************************************************************/ 1407 1408/***********************************************************************************************/ 1409/* PTP info version 1 */ 1410/***********************************************************************************************/ 1411#define NT_INFO_CMD_READ_PTP_V1 NT_INFO_CMD_READ_COMPAT_15 1412 1413/** 1414 * IEEE 1588 PTP time synchronization statistics 1415 */ 1416struct NtPTPSyncStat_s { 1417 uint64_t samples; //!< The number of samples the statistics are calculated on 1418 int64_t jitter; //!< The peak to peak jitter measured 1419 int64_t skew; //!< Latest measured clock skew 1420 int64_t min; //!< The minimum clock skew measured 1421 int64_t max; //!< The maximum clock skew measured 1422 int64_t mean; //!< The calculated mean clock skew (skew-sum/samples) 1423 double stdDevSqr; //!< Calculated squared standard deviation of clock skew when slave, otherwise 0 1424}; 1425 1426/** 1427 * PTP information structure 1428 */ 1429struct NtInfoPTP_v1_s { 1430 bool enabled; //!< Is PTP stack configured to be used (slave, master or ptp pps sampling) 1431 struct NtPTPTimestamp_s ts; //!< Timestamp at this info retrieval 1432 struct NtPTPPort_s ptpPort; //!< PTP port information structure 1433 struct NtPTPDataSets_s ptpDataSets; //!< PTP data sets (according to IEEE1588-2008 spec.) 1434 struct NtPTPPortStat_s ptpPortStat; //!< PTP ethernet port statistics 1435 struct NtPTPSyncStat_s stat; //!< In slave mode, stat holds the timesync statistics 1436 struct NtPTPImplCfg_s ptpImplCfg; //!< PTP implementational configuration settings 1437}; 1438 1439/** 1440 * NT_INFO_CMD_READ_PTP specific data. 1441 */ 1442struct NtInfoCmdPTP_v1_s { 1443 uint8_t adapterNo; //!< The adapter to query 1444 uint8_t Reserved1[2]; 1445 struct NtInfoPTP_v1_s data; //!< Query PTP information structure 1446}; 1447 1448 1449/***********************************************************************************************/ 1450/* PTP info version 0 */ 1451/***********************************************************************************************/ 1452#define NT_INFO_CMD_READ_PTP NT_INFO_CMD_READ_COMPAT_9 1453 1454struct NtInfoPTP_s { 1455 bool enabled; //!< Is PTP stack configured to be used (slave, master or ptp pps sampling) 1456 struct NtPTPTimestamp_s ts; //!< Timestamp at this info retrieval 1457 struct NtPTPPort_s ptpPort; //!< PTP port information structure 1458 struct NtPTPDataSets_s ptpDataSets; //!< PTP data sets (according to IEEE1588-2008 spec.) 1459 struct NtPTPPortStat_s ptpPortStat; //!< PTP ethernet port statistics 1460 struct NtPTPSyncStat_s stat; //!< In slave mode, stat holds the timesync statistics 1461}; 1462/** 1463 * NT_INFO_CMD_READ_PTP specific data. 1464 */ 1465struct NtInfoCmdPTP_s { 1466 uint8_t adapterNo; //!< The adapter to query 1467 uint8_t Reserved1[2]; 1468 struct NtInfoPTP_s data; //!< Query PTP information structure 1469}; 1470 1471 1472/***********************************************************************************************/ 1473/* ProductInfo version 0 */ 1474/***********************************************************************************************/ 1475#define NT_INFO_CMD_READ_PRODUCT_INFO NT_INFO_CMD_READ_COMPAT_19 1476 1477typedef struct NtInfoProductInfo_s { 1478 enum NtProductInfoType_e infoType; //!< Information from Gen 1, Gen 2, NTBPE or Gen 3 adapter 1479 char ProductId[32]; //!< Product ID (P/N) 1480 char SerialNo[2][32]; //!< Serial number (only index 0 used on Gen 1 otherwise 0 = main, 1 = front) 1481 char PbaId[2][32]; //!< PBA ID (only index 0 used on Gen 1 otherwise 0 = main, 1 = front) 1482 char AvrId[2][32]; //!< AVR version (only on Gen 2) 1483 char CpldVersion[32]; //!< CPLD Version 1484 char fpgaId1[40]; //!< FPGA Image #0 ID 1485 char fpgaId2[40]; //!< FPGA Image #1 ID 1486} NtInfoProductInfo_t; 1487 1488struct NtInfoReadProductInfo_s { 1489 uint8_t adapterNo; //!< Adapter number to query for product information 1490 NtInfoProductInfo_t data; //!< Product Information returned 1491}; 1492 1493/***********************************************************************************************/ 1494/* ProductInfo version 1 */ 1495/***********************************************************************************************/ 1496#define NT_INFO_CMD_READ_PRODUCT_INFO_V1 NT_INFO_CMD_READ_COMPAT_22 1497 1498/** 1499 * Structure to read product information version 1 1500 */ 1501typedef struct NtInfoProductInfo_v1_s { 1502 enum NtProductInfoType_e infoType; //!< Information from Gen 1, Gen 2, NTBPE or Gen 3 adapter 1503 char ProductId[32]; //!< Product ID (P/N) 1504 char SerialNo[2][32]; //!< Serial number (only index 0 used on Gen 1 otherwise 0 = main, 1 = front) 1505 char PbaId[2][32]; //!< PBA ID (only index 0 used on Gen 1 otherwise 0 = main, 1 = front) 1506 char AvrId[2][32]; //!< AVR version (only on Gen 2) 1507 char CpldVersion[32]; //!< CPLD Version 1508 char fpgaId1[40]; //!< FPGA Image #0 ID 1509 char fpgaId2[40]; //!< FPGA Image #1 ID 1510 uint16_t customId; //!< Custom ID 1511} NtInfoProductInfo_v1_t; 1512 1513 1514/** 1515 * Product info 1516 */ 1517struct NtInfoReadProductInfo_v1_s { 1518 uint8_t adapterNo; //!< Adapter number to query for product information 1519 NtInfoProductInfo_v1_t data; //!< Product Information returned 1520}; 1521 1522/***********************************************************************************************/ 1523/* Filter usage version 0 */ 1524/***********************************************************************************************/ 1525#define NT_INFO_CMD_READ_FILTERUSAGE NT_INFO_CMD_READ_COMPAT_23 1526 1527/** 1528 * Structure to read NTPL filter usage 1529 */ 1530typedef struct NtInfoFilterUsage_s { 1531 int32_t sizeCount; //!< Number of frame length filters used 1532 int32_t protocolCount; //!< Number of protocol filters used 1533 int32_t errorCount; //!< Number of error filters used 1534 int32_t patternCount; //!< Number of data filters used 1535 int32_t dynOffsetCount; //!< Number of dynamic offsets used 1536 int32_t group4PlusCount; //!< Number of group filters used combining 4 patterns with 4 different dynamic offsets 1537 int32_t group8Count; //!< Number of group filters used combining 8 patterns with 2 different dynamic offsets 1538 int32_t ipmatchCount; //!< Number of IP match filters used 1539 int32_t ipmatchListOuter; //!< Number of IP match list outer resources used 1540 int32_t ipmatchListInner; //!< Number of IP match list inner resources used 1541} NtInfoFilterUsage_t; 1542 1543/** 1544 * Filter usage command 1545 */ 1546struct NtInfoCmdFilterUsage_s { 1547 uint8_t adapterNo; //!< Adapter number to query for filter usage 1548 uint8_t Reserved1[3]; 1549 uint32_t ntplId; //!< Ntpl ID to query. 0 will retrieve total usage 1550 NtInfoFilterUsage_t data; //!< Filter usage information returned 1551}; 1552 1553#endif /* _NT_NTAPI_NO_COMPAT */ 1554#endif /* __STREAM_INFO_COMPAT_H__ */