Вы находитесь на странице: 1из 906

SmartLibrary Command Reference

Volume 2
March 2006

P/N 71-000620 REV A

Spirent Communications, Inc.


26750 Agoura Road Calabasas, CA 91302 USA

Support Contacts
U.S. E-mail: support@spirentcom.com Web: http://support.spirentcom.com Toll Free: +1 800-SPIRENT (+1 800-774-7368) Phone: +1 818-676-2616 Fax: +1 818-880-9154 China E-mail: supportchina@spirentcom.com Web: http://support.spirentcom.com.cn Toll Free: +1 800-810-9529 (mainland China only) Phone: +86 10 8233 0033 (rest of the world) Fax: +86 10 8233 0022 Europe E-mail: support.europe@spirentcom.com Web: http://support.spirentcom.com Phone: +33 (0) 1 61 37 22 70 Fax: +33 (0) 1 61 37 22 51

Copyright
2006 Spirent Communications, Inc. All Rights Reserved. All of the company names and/or brand names and/or product names referred to in this document, in particular, the name Spirent and its logo device, are either registered trademarks or trademarks of Spirent plc and its subsidiaries, pending registration in accordance with relevant national laws. All other registered trademarks or trademarks are the property of their respective owners. The information contained in this document is subject to change without notice and does not represent a commitment on the part of Spirent Communications. The information in this document is believed to be accurate and reliable, however, Spirent Communications assumes no responsibility or liability for any errors or inaccuracies that may appear in the document.

Limited Warranty
Spirent Communications, Inc. (Spirent) warrants that its Products will conform to the description on the face of order, that it will convey good title thereto, and that the Product will be delivered free from any lawful security interest or other lien or encumbrance. Spirent further warrants to Customer that hardware which it supplies and the tangible media on which it supplies software will be free from significant defects in materials and workmanship for a period of twelve (12) months, except as otherwise noted, from the date of delivery (the Hardware Warranty Period), under normal use and conditions. To the extent the Product is or contains software (Software), Spirent also warrants that, if properly used by Customer in accordance with the Software License Agreement, the Software which it supplies will operate in material conformity with the specifications supplied by Spirent for such Software for a period of ninety (90) days from the date of delivery (the Software Warranty Period). The Product Warranty Period shall mean the Hardware Warranty Period or the Software Warranty Period, as applicable. Spirent does not warrant that the functions contained in the Software will meet a specific requirement or that the operation will be uninterrupted or error free. Spirent shall have no warranty obligations whatsoever with respect to any Software which has been modified in any manner by Customer or any third party. Defective Products and Software under warranty shall be, at Spirent's discretion, repaired or replaced or a credit issued to Customer's account for an amount equal to the price paid for such Product provided that: (a) such Product is returned to Spirent after first obtaining a return authorization number and shipping instructions, freight prepaid, to Spirent's location in the United States; (b) Customer provides a written explanation of the defect or Software failure claimed by Customer; and (c) the claimed defect actually exists and was not caused by neglect, accident, misuse, improper installation, improper repair, fire, flood, lightning, power surges, earthquake, or alteration. Spirent will ship repaired Products to Customer, freight prepaid, within ten (10) working days after the receipt of defective Products. Except as otherwise stated, any claim on account of defective materials or for any other cause whatsoever will conclusively be deemed waived by Customer unless written notice thereof is given to Spirent within the Warranty Period. Spirent reserves the right to change the warranty and service policy set forth above at any time, after reasonable notice and without liability to Customer. TO THE EXTENT PERMITTED BY APPLICABLE LAW, ALL IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE, ARE HEREBY EXCLUDED, AND THE LIABILITY OF SPIRENT, IF ANY, FOR DAMAGE RELATING TO ANY ALLEGEDLY DEFECTIVE PRODUCT SHALL BE LIMITED TO THE ACTUAL PRICE PAID BY THE CUSTOMER FOR SUCH PRODUCT. THE PROVISIONS SET FORTH ABOVE STATE SPIRENT'S ENTIRE RESPONSIBILITY AND CUSTOMER'S SOLE AND EXCLUSIVE REMEDY WITH RESPECT TO ANY BREACH OF ANY WARRANTY.

Contents
iType1 Commands: SmartBits 600x/6000x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Structures for iType1 Commands SmartBits 600x/6000x . . . . . . . . . . . . . . . . 13 About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Related Manuals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 How to Contact Us. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Chapter 1: Command Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
How to Use The Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000) . . . . . . . . . . . . . . . . . . . . . . . . 26 iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) . . . . . . . . . . . . . . . . . . . . . . . . . 42 iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Chapter 2: TeraMetrics ATM (AT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Supported Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 AT HTSetStructure Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 AT HTGetStructure Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 AT HTSetCommand Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 AT iType1 Commands and Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Chapter 3: 10/100 Mb Ethernet (ETH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Supported SmartCards and Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 ETH HTSetStructure Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 ETH HTGetStructure Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 ETH HTSetCommand Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 ETH iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

Chapter 4: Fibre Channel (FC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Supported Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 FC HTSetStructure Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 FC HTGetStructure Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 FC HTSetCommand Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Chapter 5: 100 Mb Fast Ethernet (FST) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Supported SmartCards and Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

SmartLibrary Command Reference: Volume 2 | 3

Contents

FST HTSetStructure Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 FST HTGetStructure Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 FST iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

Chapter 6: Gigabit Ethernet (GIG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Supported SmartCards and Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 GIG HTSetStructure Summary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 GIG HTGetStructure Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 GIG iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Chapter 7: Layer 2 (L2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Supported Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 L2 HTGetStructure Summary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 L2 iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

Chapter 8: SmartMetrics / TeraMetrics (L3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Supported SmartCards and Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 L3 HTSetStructure Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 L3 HTGetStructure Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 L3 HTSetCommand Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 L3 iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Chapter 9: MPLS (MPLS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 Supported Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 MPLS HTSetStructure Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 MPLS HTGetStructure Summary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 MPLS iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 Chapter 10: Universal (NS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 Supported SmartCards and Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 NS HTSetStructure Summary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 NS HTGetStructure Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 NS HTSetCommand Summary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511 NS iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 Chapter 11: Packet Over SONET (POS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
Supported Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 POS HTSetStructure Summary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 POS HTGetStructure Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 POS HTSetCommand Summary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 POS iType1 Commands and Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786

Chapter 12: PPP (PPP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793

Supported SmartCards and Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794

| SmartLibrary Command Reference: Volume 2

Contents

PPP HTSetStructure Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795 PPP HTGetStructure Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796 PPP HTSetCommand Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796 PPP iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797

Chapter 13: XAUI, XENPAK , and XFP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817

Supported Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818 XAUI / XENPAK HTSetStructure Summary Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818 XAUI / XENPAK /XFP HTGetStructure Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . 819 XAUI iType1 Commands and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820 XENPAK and XFP iType1 Commands and Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825

Appendix A: Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853 Appendix B: Message Function Card Compatibility Information . . . . . . . . 859
Incrementing Fields in L3_DEFINE_MULTI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 860 Card Support: ulField in Layer3ModifyStreamArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887 Card Support: NS_CAPTURE_SETUP Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890 Card Support for Latency Buckets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893 Card Support for the NSMultiCounterInfo Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895

Appendix C: Bit Definitions for MII Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 899 Summary of MII Registers and Bit Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905

SmartLibrary Command Reference: Volume 2 | 5

| SmartLibrary Command Reference: Volume 2

iType1 Commands: SmartBits 600x/6000x


AT_MOD_VC_ARRAY 87 AT_PORT_CLIP_COUNTER_INFO 90 AT_PORT_CONFIG 91 AT_PORT_CONFIG_INFO 94 AT_PORT_COUNTER_INFO 97 AT_SET_SPEED 98 AT_STREAM_TX_COUNTER_INFO 99 AT_VC_CLIP_COUNTER_INFO 100 AT_VC_COUNTER_INFO 104 AT_VC_CREATE 105 AT_VC_DELETE 108 AT_VC_DELETE_ALL 108 AT_VC_INFO 109 AT_VC_MODIFY 112 ETH_CARD_INFO 121 ETH_CLEAR_PORT 122 ETH_COLLISION 122 ETH_COUNTER_INFO 123 ETH_ENHANCED_COUNTER_INFO 124 ETH_ENHANCED_STATUS_INFO 125 ETH_EXTENDED_CARD_INFO 126 ETH_EXTENDED_COUNTER_INFO 128 ETH_FILL_PATTERN 131 ETH_FILL_PATTERN_INFO 131 ETH_FIND_MII_ADDR_INFO 132 ETH_LATENCY 133 ETH_LATENCY_INFO 134 ETH_PROTOCOL_PARAMETER_INFO 134 ETH_PROTOCOL_PARAMETERS 137 ETH_READ_MII_INFO 139 ETH_RESET_PORT 140 ETH_RSMII 140 ETH_SELECT_RECEIVE 141 ETH_SELECT_TRANSMIT 141 ETH_SET_SPEED 141 ETH_TRANSMIT 142 ETH_TRANSMIT_INFO 145 ETH_TRIGGER 148 ETH_VLAN 149 ETH_WRITE_MII 150 FC_COMMIT 155 FC_COUNTER_INFO 155 FC_DEFINE_HEADER_INFO 158 FC_DEFINE_MULTI_STREAM 159 FC_DEFINE_STREAM 161 FC_DEFINE_STREAM_128 163 FC_GET_TX_MODE 165 FC_HBA_CONFIG 167 FC_HBA_MODE_START 168 FC_HBA_MODE_STOP 168 FC_LINK_DOWN 169 FC_LINKUP 169 FC_MOD_STREAM 170 FC_PORT_CONFIG 172 FC_PORT_CONFIG_INFO 173 FC_PRIVATE_DISCOVERY 174 FC_PUBLIC_DISCOVERY 174 FC_RECV_CUSTOM 175 FC_SEND_CUSTOM 176 FC_SET_TX_MODE 177 FC_STATUS_INFO 179 FC_WWN 182 FC_WWN_COUNT_INFO 183 FC_WWN_INFO 184 FC_WWN_LOGIN 185 FST_ALTERNATE_TX 190 FST_CAPTURE_COUNT_INFO 190 FST_CAPTURE_DATA_INFO 191 FST_CAPTURE_INFO 191 FST_CAPTURE_PARAMS 193 FST_CONTROL_AUX 194 FST_PROTOCOL_COUNTER_INFO 195 FST_PROTOCOL_PARAMETER_INFO 196 FST_PROTOCOL_PARAMETERS 198 FST_VLAN 200 GIG_STRUC_ALT_TX 205 GIG_STRUC_AUTO_FIBER_NEGOTIATE 206 GIG_STRUC_AUTO_FIBER_NEGOTIATE_INFO 208 GIG_STRUC_BG1 210 GIG_STRUC_BG2 210 GIG_STRUC_CAP_COUNT_INFO 211 GIG_STRUC_CAP_DATA_INFO 211 GIG_STRUC_CAP_INFO 212 GIG_STRUC_CAPTURE_SETUP 213 GIG_STRUC_CARD_INFO 214 GIG_STRUC_COUNTER_INFO 216 GIG_STRUC_FILL_PATTERN 216 GIG_STRUC_IMAGE_VERSIONS 217 GIG_STRUC_MAC_CONFIG 218 GIG_STRUC_MAC_CONFIG_INFO 222

SmartLibrary Command Reference: Volume 2 | 7

iType1 Commands: SmartBits 600x/6000x

GIG_STRUC_RATE_INFO 225 GIG_STRUC_TRIGGER 226 GIG_STRUC_TX 227 GIG_STRUC_VFD3 232 L2_READ_COUNTERS 235 L2_READ_RATES 236 L3_ARP_ONE_STREAM 250 L3_ARP_TIMES_INFO 250 L3_ARP_UNRESOLVED 250 L3_CAPTURE_ALL_TYPE 251 L3_CAPTURE_BAD_TYPE 251 L3_CAPTURE_COUNT_INFO 251 L3_CAPTURE_DETAIL_INFO 252 L3_CAPTURE_OFF_TYPE 253 L3_CAPTURE_PACKET_DATA_INFO 253 L3_CAPTURE_SETUP 254 L3_CAPTURE_START 256 L3_CAPTURE_STOP 256 L3_CAPTURE_TRIGGERS_TYPE 256 L3_DEFINE_ICMP_IPV6_STREAM 257 L3_DEFINE_ICMP_IPV6_STREAM_VLAN 260 L3_DEFINE_ICMP_STREAM 263 L3_DEFINE_ICMP_STREAM_VLAN 265 L3_DEFINE_IP_STREAM 267 L3_DEFINE_IP_STREAM_VLAN 270 L3_DEFINE_IPV6_STREAM 272 L3_DEFINE_IPV6_STREAM_VLAN 275 L3_DEFINE_IPX_STREAM 277 L3_DEFINE_MPLS 279 L3_DEFINE_MULTI_ICMP_IPV6_STREAM 280 L3_DEFINE_MULTI_ICMP_IPV6_STREAM_VLAN 283 L3_DEFINE_MULTI_ICMP_STREAM 286 L3_DEFINE_MULTI_ICMP_STREAM_VLAN 288 L3_DEFINE_MULTI_IP_STREAM 290 L3_DEFINE_MULTI_IP_STREAM_VLAN 292 L3_DEFINE_MULTI_IPV6_STREAM 294 L3_DEFINE_MULTI_IPV6_STREAM_VLAN 297 L3_DEFINE_MULTI_IPX_STREAM 299 L3_DEFINE_MULTI_SMARTBITS_128_STREAM 303 L3_DEFINE_MULTI_SMARTBITS_STREAM 301 L3_DEFINE_MULTI_STREAM_BINDING 305 L3_DEFINE_MULTI_STREAM_EXTENSION 306 L3_DEFINE_MULTI_TCP_IPV6_STREAM 311 L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN 314 L3_DEFINE_MULTI_TCP_STREAM 317 L3_DEFINE_MULTI_TCP_STREAM_VLAN 319 L3_DEFINE_MULTI_UDP_IPV6_STREAM 321 L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN 324 L3_DEFINE_MULTI_UDP_STREAM 327 L3_DEFINE_MULTI_UDP_STREAM_VLAN 329 L3_DEFINE_SMARTBITS_128_STREAM 333 L3_DEFINE_SMARTBITS_STREAM 331 L3_DEFINE_STREAM_BINDING 335 L3_DEFINE_STREAM_EXTENSION 336 L3_DEFINE_TCP_IPV6_STREAM 342

L3_DEFINE_TCP_IPV6_STREAM_VLAN 345 L3_DEFINE_TCP_STREAM 348 L3_DEFINE_TCP_STREAM_VLAN 350 L3_DEFINE_UDP_IPV6_STREAM 352 L3_DEFINE_UDP_IPV6_STREAM_VLAN 355 L3_DEFINE_UDP_STREAM 358 L3_DEFINE_UDP_STREAM_VLAN 360 L3_DEFINE_VFD 362 L3_DEFINED_STREAM_COUNT_INFO 365 L3_DHCP_CONFIG 365 L3_DHCP_CONFIG_INFO 366 L3_DHCP_EXTENDED_HOST_INFO 367 L3_DHCP_GET_ADDRESS 368 L3_DHCP_GET_ADDRESS_ALL 368 L3_DHCP_HOST_INFO 369 L3_DHCP_PORT_COUNTER_INFO 370 L3_DHCP_PORT_SESSION_INFO 370 L3_DHCP_RELEASE_ADDRESS 372 L3_DHCP_RELEASE_ADDRESS_ALL 372 L3_DHCP_RENEW 373 L3_DHCP_RESTART 373 L3_DHCP_RESTART_ALL 374 L3_DHCP_STATS_INFO 374 L3_DHCP_STREAM_COUNT_INFO 375 L3_DHCP_V2_EXTENDED_HOST_INFO 375 L3_DHCP_V2_HOST_INFO 376 L3_ETHERNET_MODE_ON 377 L3_HIST_ACTIVE_TEST_INFO 378 L3_HIST_LATENCY_DISTRIBUTION 379 L3_HIST_LATENCY_DISTRIBUTION_INFO 380 L3_HIST_RAW_TAGS 381 L3_HIST_RAW_TAGS_INFO 381 L3_HIST_SEQUENCE 381 L3_HIST_SEQUENCE_INFO 382 L3_HIST_START 383 L3_HIST_V2_LATENCY 384 L3_HIST_V2_LATENCY_DISTRIBUTION 384 L3_HIST_V2_LATENCY_INFO 385 L3_HIST_V2_LATENCY_PER_STREAM 386 L3_HIST_V2_LATENCY_PER_STREAM_INFO 387 L3_MOD_ICMP_IPV6_STREAM 390 L3_MOD_ICMP_IPV6_STREAM_VLAN 393 L3_MOD_ICMP_STREAM 396 L3_MOD_ICMP_STREAM_VLAN 398 L3_MOD_IP_STREAM 400 L3_MOD_IP_STREAM_VLAN 402 L3_MOD_IPV6_STREAM 404 L3_MOD_IPV6_STREAM_VLAN 407 L3_MOD_IPX_STREAM 409 L3_MOD_MPLS 411 L3_MOD_SMARTBITS_128_STREAM 414 L3_MOD_SMARTBITS_STREAM 412 L3_MOD_STREAM_BINDING 416 L3_MOD_STREAM_EXTENSION 417 L3_MOD_STREAMS_ARRAY 423

| SmartLibrary Command Reference: Volume 2

iType1 Commands: SmartBits 600x/6000x

L3_MOD_TCP_IPV6_STREAM 428 L3_MOD_TCP_IPV6_STREAM_VLAN 431 L3_MOD_TCP_STREAM 434 L3_MOD_TCP_STREAM_VLAN 436 L3_MOD_UDP_IPV6_STREAM 438 L3_MOD_UDP_IPV6_STREAM_VLAN 440 L3_MOD_UDP_STREAM 443 L3_MOD_UDP_STREAM_VLAN 445 L3_MOD_VFD 447 L3_READ_STREAM_BG 450 L3_READ_STREAM_EXTENSION 451 L3_RNDIS_MODE_ON 456 L3_SET_ARP_GAP 456 L3_START_ARPS 457 L3_STOP_ARPS 457 L3_STREAM_128_INFO 460 L3_STREAM_BINDING_INFO 458 L3_STREAM_GROUP_DEFINE 459 L3_STREAM_GROUP_DELETE 459 L3_STREAM_INFO 462 L3_STREAM_TRANSMIT_MODE 464 L3_STREAM_TRANSMIT_MODE_INFO 465 L3_TX_ADDRESS 466 L3_TX_ADDRESS_INFO 468 L3_TX_IPV6_ADDRESS 470 L3_TX_IPV6_ADDRESS_INFO 471 L3_TX_IPV6_PROTOCOL 472 L3_USB_GET_USB_INFO 472 L3_USB_MODE_OFF 473 L3_USB_MODE_ON 473 L3_VFD_INFO 474 L3_WRITE_STREAM_BG 477 MPLS_ATTRIBUTE_OBJECT_CREATE 483 MPLS_EXPLICIT_ROUTE_OBJECT_CREATE 484 MPLS_LABEL_DATA_INFO 485 MPLS_LSP_BIND_STREAMS 485 MPLS_LSP_COPY_DELTA 486 MPLS_LSP_COUNT_INFO 486 MPLS_LSP_CREATE 487 MPLS_LSP_DELETE_ALL 488 MPLS_LSP_INFO 488 MPLS_LSP_NOT_COMPLETE 489 MPLS_OBJECT_DELETE 490 MPLS_ROUTING_DOMAIN_CREATE 491 MPLS_ROUTING_DOMAIN_DELETE_ALL 492 MPLS_RSVP_COUNT_INFO 493 MPLS_SERVICE_OBJECT_CREATE 494 MPLS_START 495 NS_ALTERNATE_KEY_CONFIG 514 NS_ALTERNATE_KEY_CONFIG_INFO 516 NS_ALTERNATE_KEY_HASH_CONFIG 518 NS_ALTERNATE_KEY_HASH_CONFIG_INFO 520 NS_ARP_CONFIG 521 NS_ARP_CONFIG_INFO 524 NS_ARP_STATUS_INFO 527

NS_CAPTURE_COUNT_INFO 529 NS_CAPTURE_DATA_INFO 530 NS_CAPTURE_SETUP 531 NS_CAPTURE_START 533 NS_CAPTURE_STATS_INFO 533 NS_CAPTURE_STOP 534 NS_CARD_HARDWARE_INFO 535 NS_COMMIT_CONFIG 536 NS_COUNTER_INFO 536 NS_CREATE_SUBPROCESS 539 NS_CT_CONFIG 540 NS_CT_CONFIG_INFO 540 NS_DEFINE_IPV6_EXT_AUTHENTICATION 541 NS_DEFINE_IPV6_EXT_DESTINATION 543 NS_DEFINE_IPV6_EXT_ESP 544 NS_DEFINE_IPV6_EXT_FRAGMENT 546 NS_DEFINE_IPV6_EXT_HOP_BY_HOP 547 NS_DEFINE_IPV6_EXT_ROUTING 548 NS_DEFINE_IPV6_OVER_IPV4_TUNNELING 550 NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING 552 NS_DESTROY_SUBPROCESS 554 NS_DIFF_SERV 554 NS_DIFF_SERV_CONFIG 555 NS_DIFF_SERV_CONFIG_INFO 556 NS_DIFF_SERV_COUNTER_INFO 557 NS_DIFF_SERV_INFO 558 NS_DIFF_SERV_RATE_INFO 559 NS_DIFF_SERV_V2_CONFIG 560 NS_DIFF_SERV_V2_CONFIG_INFO 562 NS_DIFF_SERV_V2_COUNTER_INFO 564 NS_DIFF_SERV_V2_RATE_INFO 565 NS_DOT1X_DOWNLOAD_CERTIFICATE_FILES 566 NS_DOT1X_SUPPLICANT_CONFIG 567 NS_DOT1X_SUPPLICANT_CONFIG_INFO 570 NS_DOT1X_SUPPLICANT_CONTROL 573 NS_DOT1X_SUPPLICANT_COPY 575 NS_DOT1X_SUPPLICANT_FILL 576 NS_DOT1X_SUPPLICANT_MODIFY 579 NS_DOT1X_SUPPLICANT_PORT_CONFIG 584 NS_DOT1X_SUPPLICANT_PORT_CONFIG_INFO 588 NS_DOT1X_SUPPLICANT_RESET 591 NS_DOT1X_SUPPLICANT_SESSION_STATS_INFO 592 NS_DOT1X_SUPPLICANT_STATS_INFO 594 NS_DOT1X_SUPPLICANT_STATUS_INFO 596 NS_DOT1X_SUPPLICANT_STATUS_SEARCH_INFO 601 NS_HIST_ACTIVE_TEST_INFO 604 NS_HIST_COMBO_PER_STREAM 604 NS_HIST_COMBO_PER_STREAM_INFO 605 NS_HIST_ENHANCED_LATENCY_OPTION 606 NS_HIST_ENHANCED_LATENCY_OPTION_INFO 608 NS_HIST_LATENCY_DIST_PER_STREAM 610 NS_HIST_LATENCY_DIST_PER_STREAM_INFO 612 NS_HIST_LATENCY_OPTION 613 NS_HIST_LATENCY_OPTION_INFO 614 NS_HIST_LATENCY_OVER_TIME 615

SmartLibrary Command Reference: Volume 2 | 9

iType1 Commands: SmartBits 600x/6000x

NS_HIST_LATENCY_OVER_TIME_INFO 616 NS_HIST_MULTICAST_LATENCY_PER_STREAM 617 NS_HIST_MULTICAST_LATENCY_PER_STREAM_INFO 617 NS_HIST_RAW_SIGNATURE 618 NS_HIST_RAW_SIGNATURE_INFO 619 NS_HIST_SEQUENCE_PER_STREAM 619 NS_HIST_SEQUENCE_PER_STREAM_INFO 620 NS_HIST_START 621 NS_HW_CONFIG 621 NS_HW_CONFIG_INFO 622 NS_IGMP_CLEAR_COUNTERS 622 NS_IGMP_CONFIG 623 NS_IGMP_COUNTER_INFO 624 NS_IGMP_GROUP_COUNT_INFO 626 NS_IGMP_JOIN 625 NS_IGMP_JOIN_VLAN 627 NS_IGMP_LEAVE 628 NS_IGMP_LEAVE_VLAN 629 NS_IGMP_RESET 629 NS_IGMP_TIMESTAMP_INFO 630 NS_IGMP_VLAN_TIMESTAMP_INFO 651 NS_IGMPV2_ALL_INFO 631 NS_IGMPV2_INFO 632 NS_IGMPV2_JOIN 633 NS_IGMPV2_LEAVE 635 NS_IGMPV3_ALL_GROUP_INFO 636 NS_IGMPV3_CONFIG 638 NS_IGMPV3_GROUP_CONFIG 642 NS_IGMPV3_GROUP_INFO 644 NS_IGMPV3_GROUP_MOD 646 NS_IGMPV3_LEAVE_ALL 648 NS_IGMPV3_STATS_INFO 649 NS_IP_OPTION_CONFIG 651 NS_IPV4_PROTOCOL_HEADER_INFO 653 NS_IPV6_CONFIG 654 NS_IPV6_CONFIG_INFO 659 NS_IPV6_CONTROL 665 NS_IPV6_COUNTER_INFO 667 NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO 668 NS_IPV6_NEXT_HOP_RESULTS_INFO 668 NS_IPV6_PROTOCOL_HEADER_INFO 669 NS_IPV6_RATE_INFO 670 NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO 671 NS_IPV6_ROUTER_DISCOVERY_INFO 671 NS_IPV6_ROUTER_PREFIX_COUNT_INFO 673 NS_IPV6_ROUTER_PREFIX_INFO 674 NS_IPV6_STATELESS_ADDRESS_COUNT_INFO 675 NS_IPV6_STATELESS_ADDRESS_INFO 676 NS_IPV6_STATUS_INFO 677 NS_IPV6_STREAM_INFO 681 NS_IPV6_STREAM_VLAN_INFO 683 NS_LINK_FAULT_CONFIG 685 NS_LINK_FAULT_INFO 686 NS_MLD_ALL_GROUP_INFO 687

NS_MLD_CLEAR_COUNTERS 689 NS_MLD_CONFIG 689 NS_MLD_COUNTER_INFO 692 NS_MLD_GROUP_COUNT_INFO 693 NS_MLD_GROUP_INFO 694 NS_MLD_RESET 696 NS_MLD_STOP_LISTEN 696 NS_MLD_TIMESTAMP_INFO 697 NS_MLDV1_LISTEN 698 NS_MLDV2_GROUP_CONFIG 700 NS_MLDV2_GROUP_MOD 702 NS_MLDV2_LISTENER_REPORT_CONFIG 704 NS_MLDV2_STATS_INFO 704 NS_MOD_IPV6_EXT_AUTHENTICATION 706 NS_MOD_IPV6_EXT_DESTINATION 708 NS_MOD_IPV6_EXT_ESP 709 NS_MOD_IPV6_EXT_FRAGMENT 711 NS_MOD_IPV6_EXT_HOP_BY_HOP 712 NS_MOD_IPV6_EXT_ROUTING 713 NS_MOD_IPV6_OVER_IPV4_TUNNELING 715 NS_MULTI_COUNTER_INFO 719 NS_MULTICAST_KEEP_ALIVE_CONFIG 717 NS_OAM_CONFIG 723 NS_OAM_COUNTER_INFO 724 NS_OAM_PATTERN 725 NS_OAM_RATE_INFO 725 NS_PER_STREAM_COUNTER_INFO 727 NS_PHY_CONFIG 728 NS_PHY_CONFIG_INFO 729 NS_PHY_DEFAULT_CONFIG 730 NS_PHY_DEFAULT_CONFIG_INFO 732 NS_PORT_CONFIG 735 NS_PORT_CONFIG_INFO 736 NS_PORT_TRANSMIT 737 NS_PORT_TRANSMIT_INFO 740 NS_PROTOCOL_COUNTER_INFO 742 NS_PROTOCOL_HEADER_INFO 743 NS_PROTOCOL_RATE_INFO 744 NS_RATE_INFO 745 NS_READ_MDIO_INFO 746 NS_REAL_TIME_TRACKING_RX_CONFIG 746 NS_REAL_TIME_TRACKING_RX_COUNTERS 747 NS_REAL_TIME_TRACKING_RX_STOP 748 NS_REAL_TIME_TRACKING_TX_CONFIG 748 NS_REAL_TIME_TRACKING_TX_COUNTERS 748 NS_REAL_TIME_TRACKING_TX_STOP 749 NS_RESOLVE_ARPS 750 NS_RUNTIME_HIST_STATS_CONFIG 750 NS_SIGNATURE_DETECT_MODE 752 NS_SIGNATURE_DETECT_MODE_INFO 753 NS_SONET_COUNTER_INFO 754 NS_STREAM_ID_TABLE_INFO 755 NS_STREAM_SCHEDULE 757 NS_STREAM_SCHEDULE_COUNT_INFO 757 NS_STREAM_SCHEDULE_INFO 759

10 |

SmartLibrary Command Reference: Volume 2

iType1 Commands: SmartBits 600x/6000x

NS_STREAM_TYPE_INFO 760 NS_TCP_IPV6_STREAM_INFO 761 NS_TCP_IPV6_STREAM_VLAN_INFO 764 NS_TRANSMIT_PADDING_MODE 766 NS_TRANSMIT_PADDING_MODE_INFO 767 NS_TRIGGER_CONFIG 768 NS_TRIGGER_CONFIG_INFO 770 NS_UDP_IPV6_STREAM_INFO 772 NS_UDP_IPV6_STREAM_VLAN_INFO 774 NS_WAIT_FOR_EVENT 776 NS_WIS_CONFIG 777 NS_WIS_CONFIG_INFO 779 NS_WIS_LINE_STATUS_INFO 781 NS_WIS_LINE_STATUS_RESET 783 NS_WRITE_MDIO 784 POS_CARD_LINE_CONFIG 790 POS_CARD_LINE_CONFIG_INFO 791 POS_CARD_PORT_ENCAP 792 POS_CARD_PORT_ENCAP_INFO 792 POS_CONFIG 788 POS_CONFIG_INFO 789 POS_READ_SPEED 793 POS_SET_SPEED 794 PPP_CONFIG 799 PPP_CONFIG_INFO 802 PPP_DELETE 805 PPP_DELETE_ALL 805 PPP_PARAMS_COPY 806 PPP_PARAMS_FILL 806 PPP_PARAMS_MODIFY 807 PPP_SESSION_STATS_INFO 809 PPP_SET_CTRL 811 PPP_STATS_INFO 812 PPP_STATS_RESET 813 PPP_STATUS_INFO 814 PPP_STATUS_SEARCH_INFO 817 XAUI_PRBS_CONFIG 822 XAUI_PRBS_CONFIG_INFO 824 XAUI_PRBS_STATUS_INFO 826 XENPAK_ALARM_CONFIG 827 XENPAK_ALARM_CONFIG_INFO 827 XENPAK_ALARM_STATUS_INFO 828 XENPAK_NVR_CONFIG 829 XENPAK_NVR_CONFIG_INFO 832 XENPAK_PHY_CONFIG 835 XENPAK_PHY_CONFIG_INFO 836 XENPAK_PROFILE_INFO 837 XFP_PROFILE_INFO 842

SmartLibrary Command Reference: Volume 2

| 11

12 |

SmartLibrary Command Reference: Volume 2

Structures for iType1 Commands SmartBits 600x/6000x


ATCardSetSpeed 96 ATModifyVCArray 85 ATPortCLIPCounterInfo 88 ATPortConfig 89 ATPortConfig 92 ATPortCounterInfo 95 ATStreamCounterInfo 97 ATVC 103 ATVC 107 ATVC 110 ATVC 99 ATVCCLIPCounterInfo 98 ATVCCounterInfo 102 ETHCardInfo 119 ETHCollision 121 ETHCounterInfo 121 ETHEnhancedCounterInfo 122 ETHEnhancedStatusInfo 123 ETHExtendedCardInfo 124 ETHExtendedCounterInfo 126 ETHLatency 130 ETHLatencyInfo 131 ETHMII 129 ETHMII 136 ETHMII 147 ETHProtocolParameters 131 ETHProtocolParameters 134 ETHRSMII 137 ETHTransmit 139 ETHTransmit 142 ETHTrigger 145 ETHVLAN 146 FCConfig 156 FCCounterInfo 153 FCCustomFrame 173 FCCustomFrame 174 FCHBAConfig 165 FCLinkDown 167 FCPortConfig 170 FCPortConfigInfo 171 FCStatus 177 FCTransmitMode 163 FCTransmitMode 175 FCWWN 180 FCWWN 182 FCWWNCount 181 FSTAlternateTx 188 FSTCaptureCountInfo 189 FSTCaptureDataInfo 189 FSTCaptureFrameInfo 190 FSTCaptureInfo 190 FSTCaptureParams 191 FSTControlAux 192 FSTProtocolCounterInfo 193 FSTProtocolParameters 194 FSTProtocolParameters 196 FSTVLAN 198 GIGAltTransmit 203 GIGAutoFiberNegotiate 204 GIGAutoFiberNegotiate 206 GIGCaptureCountInfo 209 GIGCaptureDataInfo 209 GIGCaptureFrameInfo 210 GIGCaptureInfo 210 GIGCaptureSetup 211 GIGCardInfo 212 GIGCounterInfo 214 GIGMacConfig 216 GIGMacConfig 219 GIGRateInfo 222 GIGTransmit 224 GIGTrigger 223 GIGVersions 215 IGMPGroupAddressBlock 642 IGMPGroupAddressBlock 646 L2RateInfo 234 L2StatsInfo 233 L3StreamBGConfig 448

SmartLibrary Command Reference: Volume 2

| 13

Structures for iType1 Commands SmartBits 600x/6000x

L3StreamBGConfig 475 L3StreamBinding 303 L3StreamBinding 333 L3StreamBinding 414 L3StreamBinding 456 L3StreamExtension 304 L3StreamExtension 334 L3StreamExtension 415 L3StreamExtension 449 Layer3Address 464 Layer3Address 466 Layer3CaptureCountInfo 249 Layer3CaptureData 251 Layer3CaptureDetailInfo 250 Layer3CaptureSetup 252 Layer3DHCPConfig 363 Layer3DHCPConfig 364 Layer3DHCPExtendedHostInfo 365 Layer3DHCPHostInfo 367 Layer3DHCPRenew 371 Layer3DHCPStatsInfo 372 Layer3DHCPV2ExtendedHostInfo 373 Layer3DHCPV2HostInfo 374 Layer3HistActiveTest 376 Layer3HistActiveTest 602 Layer3HistDistribution 377 Layer3HistLatency 382 Layer3HistTagInfo 379 Layer3IPv6Address 468 Layer3IPv6Address 469 Layer3IPv6Protocol 470 Layer3LongLatencyInfo 383 Layer3ModifyStreamArray 421 Layer3SequenceInfo 380 Layer3StreamDistributionInfo 378 Layer3StreamGroup 457 Layer3StreamLongLatencyInfo 385 Layer3StreamTransmitMode 462 Layer3StreamTransmitMode 463 Layer3V2HistDistribution 384 Layer3V2TrackingDistribution 382 MLDGroupAddressBlock 700 MLDGroupAddressBlock 701 MPLSAttributeObject 481 MPLSExplicitObject 482 MPLSLSP 485 MPLSLSPBindStreams 483 MPLSLSPCopyDelta 484

MPLSLSPCountInfo 484 MPLSLSPDeleteAll 486 MPLSLSPInfo 483 MPLSLSPInfo 486 MPLSLSPNotComplete 487 MPLSObjectDelete 488 MPLSObjectID 485 MPLSRoutingDomain 489 MPLSRoutingDomainDeleteAll 490 MPLSRSVPCountInfo 491 MPLSServiceObject 492 MPLSStart 493 N/A 780 none 589 None 620 None 687 NSAlternateKeyConfig 512 NSAlternateKeyConfig 514 NSAlternateKeyHashConfig 516 NSAlternateKeyHashConfig 518 NSARPConfig 519 NSARPConfig 522 NSARPStatusInfo 525 NSCaptureCountInfo 527 NSCaptureDataInfo 528 NSCaptureSetup 529 NSCaptureStatsInfo 531 NSCardHardwareInfo 533 NSCounterInfo 534 NSCreateSubprocess 537 NSCTConfig 538 NSCTConfig 538 NSDiffServ 552 NSDiffServ 556 NSDiffServConfig 553 NSDiffServConfig 554 NSDiffServCounterInfo 555 NSDiffServRateInfo 557 NSDiffServRateInfo 563 NSDiffServV2Config 558 NSDiffServV2Config 560 NSDiffServV2CounterInfo 562 NSDOT1XDownloadCertificateFiles 564 NSDOT1XSupplicantConfig 565 NSDOT1XSupplicantConfig 568 NSDOT1XSupplicantControl 571 NSDOT1XSupplicantCopy 573 NSDOT1XSupplicantFill 574

14 |

SmartLibrary Command Reference: Volume 2

Structures for iType1 Commands SmartBits 600x/6000x

NSDOT1XSupplicantModify 577 NSDOT1XSupplicantPortConfig 582 NSDOT1XSupplicantPortConfig 586 NSDOT1XSupplicantSessionStatsInfo 590 NSDOT1XSupplicantStatsInfo 592 NSDOT1XSupplicantStatusInfo 594 NSDOT1XSupplicantStatusSearchInfo 599 NSHistComboPerStreamInfo 603 NSHistEnhancedLatencyOption 604 NSHistEnhancedLatencyOption 606 NSHistLatencyDistPerStream 603 NSHistLatencyDistPerStream 608 NSHistLatencyDistPerStream 615 NSHistLatencyDistPerStreamInfo 610 NSHistLatencyOption 611 NSHistLatencyOption 612 NSHistLatencyOverTime 613 NSHistLatencyOverTimeInfo 614 NSHistMulticastLatencyPerStreamInfo 615 NSHistRawSignatureInfo 617 NSHistSequencePerStreamInfo 618 NSHWConfig 619 NSHWConfig 620 NSIGMPAddress 623 NSIGMPAddress 626 NSIGMPAddressVLAN 625 NSIGMPAddressVLAN 627 NSIGMPConfig 621 NSIGMPCounterInfo 622 NSIGMPTimestampInfo 628 NSIGMPv2GroupID 631 NSIGMPv2GroupID 633 NSIGMPv2Info 629 NSIGMPv2Info 630 NSIGMPv3Config 636 NSIGMPv3GroupConfig 640 NSIGMPv3GroupInfo 634 NSIGMPv3GroupInfo 643 NSIGMPv3GroupMod 644 NSIGMPv3StatsInfo 647 NSIGMPVLANTimestampInfo 649 NSIPOption 649 NSIPv4Header 651 NSIPv6Address 547 NSIPv6Address 712 NSIPv6Config 652 NSIPv6Config 657 NSIPv6Control 663

NSIPv6CounterInfo 665 NSIPv6ExtAuthentication 539 NSIPv6ExtAuthentication 704 NSIPv6ExtDestination 541 NSIPv6ExtDestination 706 NSIPv6ExtESP 542 NSIPv6ExtESP 707 NSIPv6ExtFragment 544 NSIPv6ExtFragment 709 NSIPv6ExtHopByHop 545 NSIPv6ExtHopByHop 710 NSIPv6ExtRouting 546 NSIPv6ExtRouting 711 NSIPv6Header 667 NSIPv6NextHopResultCountInfo 666 NSIPv6NextHopResultInfo 666 NSIPv6OverIPv4Tunneling 548 NSIPv6OverIPv4Tunneling 550 NSIPv6OverIPv4Tunneling 713 NSIPv6RateInfo 668 NSIPv6RouterDiscoveryCountInfo 669 NSIPv6RouterDiscoveryInfo 669 NSIPv6RouterPrefixCountInfo 671 NSIPv6RouterPrefixInfo 672 NSIPv6StatelessAddressCountInfo 673 NSIPv6StatelessAddressEntry 675 NSIPv6StatelessAddressInfo 674 NSIPv6StatusInfo 675 NSLinkFaultConfig 683 NSLinkFaultInfo 684 NSMDIORegister 744 NSMDIORegister 781 NSMLDConfig 687 NSMLDCounterInfo 690 NSMLDGroupInfo 685 NSMLDGroupInfo 692 NSMLDTimestampInfo 695 NSMLDv1Listen 696 NSMLDv2GroupConfig 698 NSMLDv2GroupMod 700 NSMLDv2ListenerReportConfig 702 NSMLDv2StatsInfo 702 NSMPLSLabel 277 NSMPLSLabel 409 NSMPLSList 277 NSMPLSList 409 NSMulticastKeepAliveConfig 715 NSMultiCounterInfo 717

SmartLibrary Command Reference: Volume 2

| 15

Structures for iType1 Commands SmartBits 600x/6000x

NSOAMConfig 721 NSOAMCounterInfo 722 NSOAMRateInfo 723 NSPerStreamCounterInfo 725 NSPortTransmit 735 NSPortTransmit 738 NSProtocolCounterInfo 740 NSProtocolCounterInfo 742 NSProtocolHeaderInfo 741 NSRateInfo 743 NSRealTimeTrackingConfig 744 NSRealTimeTrackingConfig 746 NSRealTimeTrackingCounters 745 NSRealTimeTrackingCounters 746 NSResolveArps 748 NSRunTimeHistStatsConfig 749 NSSignatureDetectMode 750 NSSignatureDetectMode 751 NSSonetCounterInfo 752 NSStreamIDTableInfo 753 NSStreamScheduleEntry 755 NSStreamScheduleEntry 756 NSTransmitPaddingMode 763 NSTransmitPaddingMode 764 NSTrigger 765 NSTrigger 767 NSVFD 360 NSVFD 445 NSVFD 472 NSWaitForEvent 773 NSWISConfig 774 NSWISConfig 776 NSWISLineStatusInfo 778 POSCardGetSpeedInfo 791 POSCardLineConfig 788 POSCardLineConfig 789 POSCardPortEncapsulation 790 POSCardPortEncapsulation 790 POSCardSetSpeed 792 POSConfig 786 POSConfig 787 PPPControlCfg 809 PPPDelete 803 PPPParamCfg 797 PPPParamCfg 800 PPPParamsCopy 804 PPPParamsFill 804 PPPParamsModify 805

PPPSessionStatsInfo 807 PPPStatsInfo 810 PPPStatusInfo 812 PPPStatusSearchInfo 815 RealTimeCounters 745 RealTimeCounters 747 StreamFC 157 StreamFC 159 StreamFC 168 StreamFC128 161 StreamICMP 261 StreamICMP 284 StreamICMP 394 StreamICMPIPv6 255 StreamICMPIPv6 278 StreamICMPIPv6 388 StreamICMPIPv6VLAN 258 StreamICMPIPv6VLAN 281 StreamICMPIPv6VLAN 391 StreamICMPVLAN 263 StreamICMPVLAN 286 StreamICMPVLAN 396 StreamIP 265 StreamIP 288 StreamIP 398 StreamIPv6 270 StreamIPv6 292 StreamIPv6 402 StreamIPv6 679 StreamIPv6VLAN 273 StreamIPv6VLAN 295 StreamIPv6VLAN 405 StreamIPv6VLAN 681 StreamIPVLAN 268 StreamIPVLAN 290 StreamIPVLAN 400 StreamIPX 275 StreamIPX 297 StreamIPX 407 StreamSmartBits 299 StreamSmartBits 329 StreamSmartBits 410 StreamSmartBits 460 StreamSmartBits128 301 StreamSmartBits128 331 StreamSmartBits128 412 StreamSmartBits128 458 StreamTCP 315

16 |

SmartLibrary Command Reference: Volume 2

Structures for iType1 Commands SmartBits 600x/6000x

StreamTCP 346 StreamTCP 432 StreamTCPIPv6 309 StreamTCPIPv6 340 StreamTCPIPv6 426 StreamTCPIPv6 758 StreamTCPIPv6VLAN 312 StreamTCPIPv6VLAN 343 StreamTCPIPv6VLAN 429 StreamTCPIPv6VLAN 761 StreamTCPVLAN 317 StreamTCPVLAN 348 StreamTCPVLAN 434 StreamUDP 325 StreamUDP 356 StreamUDP 441 StreamUDPIPv6 319 StreamUDPIPv6 350 StreamUDPIPv6 436 StreamUDPIPv6 769 StreamUDPIPv6VLAN 322 StreamUDPIPv6VLAN 353 StreamUDPIPv6VLAN 438 StreamUDPIPv6VLAN 771 StreamUDPVLAN 327 StreamUDPVLAN 358 StreamUDPVLAN 443 U64 102 U64 126 U64 155 U64 156 U64 158 U64 160 U64 162 U64 169 U64 179 U64 180 U64 182 U64 193 U64 234 U64 383 U64 387 U64 527 U64 532 U64 535 U64 591 U64 601 U64 604 U64 610

U64 614 U64 616 U64 618 U64 665 U64 678 U64 720 U64 725 U64 740 U64 742 U64 745 U64 747 U64 814 U64 816 U64 821 U64 823 U64 88 U64 96 U64 97 UChar 128 UChar 128 UChar 208 UChar 208 UChar 214 UChar 229 UChar 723 ULong 138 ULong 248 ULong 363 ULong 373 ULong 454 ULong 552 ULong 624 ULong 691 ULong 755 ULong 757 USBInfo 470 XAUIPRBSConfig 820 XAUIPRBSConfig 822 XAUIPRBSStatusInfo 824 XENPAKAlarmConfig 825 XENPAKAlarmConfig 825 XENPAKAlarmStatus 826 XENPAKNVRConfig 827 XENPAKNVRConfig 830 XENPAKPhyConfig 833 XENPAKPhyConfig 834 XENPAKProfile 835 XFPProfile 840

SmartLibrary Command Reference: Volume 2

| 17

18 |

SmartLibrary Command Reference: Volume 2

About This Guide


In About This Guide
This section provides introductory information, as follows:

Introduction . . . . 20 Related Manuals . . . . 20 How to Contact Us . . . . 22

SmartLibrary Command Reference: Volume 2

| 19

About This Guide Introduction

Introduction
This document describes the command set of the SmartLibrary Programming Library. It provides detailed information on both the Original Functions and Message Function iType1 commands, as well as all related structures. This document is a reference. You can find step-by-step instructions on how to use these commands in the SmartLibrary Overview and Procedures manual. SmartLibrary consists of two types of commands:

Original Functions Message Functions (iType1 Commands)

You will find in this Volume 2 detailed descriptions of the Message Functions for TeraMetrics ATM, Ethernet, Fibre Channel, and Packet Over SONET (POS). Refer to Volume 1 for detailed descriptions of all the Original Functions and the Message Functions for non-TeraMetrics ATM (SmartBits 200/2000) and WAN. This guide is intended for SmartBits customers who wish to control SmartBits systems by using their own custom applications. It is assumed that users of this guide are familiar with SmartBits equipment and have an intermediate knowledge level of programming and data communications theory.

Related Manuals
Additional manuals related to the SmartLibrary Programming Library are listed below. SmartLibrary Command Reference Volume 1 This companion volume provides detailed descriptions of all Original Functions and the Message Functions for non-TeraMetrics ATM (SmartBits 200/2000) and WAN. SmartLibrary Overview and Procedures Provides basic information about SmartLibrary, including library installation, programming notes, and step-by-step procedures for using SmartLibrary commands with different card families and test applications. It includes important overview chapters and tutorials that can speed your work with the library by helping you master key concepts and procedures quickly. SmartBits Automation Not included in the SmartLibrary Documentation Set. These manuals provide information on the SmartBits Automation family of programming interfaces, as well as individual API tests suites. Each API corresponds to the equivalent SmartBits/ Microsoft Windows application. These include the following:

SmartBits Automation. Documentation for these test APIs is included with the application. SmartFlow/SmartVoIPQoS

20 |

SmartLibrary Command Reference: Volume 2

About This Guide Related Manuals

TeraRouting Tester SmartFabric TeraVPN Tester

Individual test suites. Documentation for these APIs is bundled with the GUI and API software. SmartSignaling SmartApplications

Related Applications and Documentation


Much of the functionality provided by SmartLibrary is also available in SmartBits applications that provide a Graphical User Interface (GUI) applications, such as SmartWindow. For an overview of all SmartBits applications, refer to the SmartBits System Reference Manual.

SmartLibrary Command Reference: Volume 2

| 21

About This Guide How to Contact Us

How to Contact Us
To obtain technical support for any Spirent Communications product, please contact our Support Services department using any of the following methods:

U.S.
E-mail: support@spirentcom.com Web: http://support.spirentcom.com Toll Free: +1 800-SPIRENT (+1 800-774-7368) (US and Canada) Phone: +1 818-676-2616 Fax: +1 818-880-9154 Operating Hours: Monday through Friday, 06:00 to 18:00 Pacific Time

Europe
E-mail: support.europe@spirentcom.com Web: http://support.spirentcom.com Phone: +33 (0) 1 61 37 22 70 Fax: +33 (0) 1 61 37 22 51 Operating Hours: Monday through Thursday, 09:00 to 18:00, Friday 09:00 to 17:00, Paris Time

China
E-mail: supportchina@spirentcom.com Web: http://support.spirentcom.com.cn Toll Free: +1 800-810-9529 (mainland China only) Phone: +86 10 8233 0033 (rest of the world) Fax: +86 10 8233 0022 Operating Hours: Monday through Friday, 09:00 to 18:00 Beijing Time The latest versions of user manuals, application notes, and software and firmware updates are available on the Spirent Communications Customer Service Center websites at http://support.spirentcom.com and http://support.spirentcom.com.cn (China). Information about Spirent Communications and its products and services can be found on the main company websites at http://www.spirentcom.com and http://www.spirentcom.com.cn (China).

Company Address
Spirent Communications, Inc. 26750 Agoura Road Calabasas, CA 91302 USA

22 |

SmartLibrary Command Reference: Volume 2

Chapter 1

Command Compatibility
This chapter lists the compatibility of the Message Function iType1 commands with SmartCards and modules in the TeraMetrics ATM, Ethernet, Fibre Channel, and Packet Over SONET (POS) families. Refer to Volume 1 of the Command Reference for compatibility information for all Original Functions and for the Message Function iType1 commands for non-TeraMetrics ATM (SmartBits 200/2000) and WAN SmartCards.

In this chapter...
How to Use The Tables . . . . 24 iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000) . . . . 26 iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) . . . . 42 iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x) . . . . 65

SmartLibrary Command Reference: Volume 2

| 23

Chapter 1: Command Compatibility How to Use The Tables

How to Use The Tables


Where to Find Command Information in This Volume
The Message Function iType1 commands described in this volume include the following:

Chapter 2, TeraMetrics ATM (AT) Chapter 3, 10/100 Mb Ethernet (ETH) Chapter 4, Fibre Channel (FC) Chapter 5, 100 Mb Fast Ethernet (FST) Chapter 6, Gigabit Ethernet (GIG) Chapter 7, Layer 2 (L2) Chapter 8, SmartMetrics / TeraMetrics (L3) Chapter 9, MPLS (MPLS) Chapter 10, Universal (NS) Chapter 11, Packet Over SONET (POS) Chapter 12, PPP (PPP) Chapter 13, XAUI, XENPAK , and XFP

Modules Designations for TeraMetrics-based Modules


Newer, TeraMetrics-based SmartBits modules for the SmartBits 600x/6000x chassis generally have two designations:

For the SmartMetrics version: Example: LAN-3300A. For the TeraMetrics version: Example: LAN-3301A.

Command compatibility is identical for both versions in such a pair. The module pairs are similar but not identical in function, because the SmartMetrics version does not include TeraMetrics capabilities.

24 |

SmartLibrary Command Reference: Volume 2

Chapter 1: Command Compatibility How to Use The Tables

How to Locate Commands


You can find a comprehensive list of all commands and structures in the following sections of this guide:

iType1 Commands: SmartBits 600x/6000x on page 7 Structures for iType1 Commands SmartBits 600x/6000x on page 13

All entries in these lists are hotlinked. When you view this manual online, you can quickly jump to the command description by clicking on the command name. You can jump back to the command list as well: Right-click and select Go Back.

SmartLibrary Command Reference: Volume 2

| 25

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)


Table 1-1 shows the compatibility of Message Function iType1 commands for Ethernet SmartCards for the SmartBits 200/2000 chassis family. Refer to these related tables for other SmartCard and module support:

Table 1-2 on page 42 for iType1 support for Ethernet modules for the SmartBits 600x/ 6000x. Table 1-3 on page 65 for v support for non-Ethernet modules, including TeraMetrics ATM, Fibre Channel, and POS. Volume 1 of this Command Reference for iType1 support for non-TeraMetrics ATM SmartCards for the SmartBits 200/2000 chassis, as well as Original Function support for all SmartCards and modules.

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) SmartCard SX-7210 /7410B SX-7411
Y Y Y Y Y Y N N Y N Y

Message Function iType1 Parameter


ATM

For ATM SmartCards for the SmartBits 200/2000, refer to Volume 1. For ATM TeraMetrics-based modules for SmartBits 600x/6000x, see iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x) on page 65.
ETH
ETH_CARD_INFO ETH_CLEAR_PORT ETH_COLLISION ETH_COUNTER_INFO ETH_ENHANCED_COUNTER_INFO ETH_ENHANCED_STATUS_INFO ETH_EXTENDED_CARD_INFO ETH_EXTENDED_COUNTER_INFO ETH_FILL_PATTERN ETH_FILL_PATTERN_INFO ETH_FIND_MII_ADDR_INFO Y Y Y Y Y Y N N Y N Y N N N N N N N N N N N N N N N N N Y Y N N Y N N N N N N Y Y N N Y Y Y N Y Y Y N Y Y N Y Y Y N Y Y Y N Y Y N Y

26 |

SmartLibrary Command Reference: Volume 2

ML-7710/7711 ML-7711s

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
Y Y N N Y N Y Y Y Y Y N Y N Y N N N N N N N

Message Function iType1 Parameter


ETH_LATENCY ETH_LATENCY_INFO ETH_PROTOCOL_PARAMETER_INFO ETH_PROTOCOL_PARAMETERS ETH_READ_MII_INFO ETH_RSMII ETH_RESET_PORT ETH_SELECT_RECEIVE ETH_SELECT_TRANSMIT ETH_SET_SPEED ETH_TRANSMIT ETH_TRANSMIT_INFO ETH_TRIGGER ETH_VLAN ETH_WRITE_MII

Y Y N N Y N Y Y Y N Y Y Y N Y

N N N N N N N N N N N N N N N

N N Y Y Y N N N N Y N N N Y Y

N N Y Y Y N N N N Y N N N Y Y

Y Y N N Y N Y Y Y N Y Y Y N Y

FC (Fibre Channel)

Used only with Fibre Channel cards. See Table 1-3 on page 65.
FR (Frame Relay / WAN)

For FR commands, refer to Volume 1.


FST
FST_ALTERNATE_TX FST_CAPTURE_COUNT_INFO FST_CAPTURE_DATA_INFO FST_CAPTURE_INFO FST_CAPTURE_PARAMS FST_CONTROL_AUX FST_PROTOCOL_COUNTER_INFO N N N N N N N N N N N N N N N N N N N N N N N N N N N Y Y N N Y N N N Y N N Y N Y N

ML-7710/7711 ML-7711s
Y Y N N Y N Y Y Y Y Y Y Y N Y

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

SmartLibrary Command Reference: Volume 2

| 27

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


FST_PROTOCOL_PARAMETER_INFO FST_PROTOCOL_PARAMETERS FST_VLAN

N N N

N N N

Y Y N

Y Y N

N N Y

GIG
GIG_STRUC_ALT_TX GIG_STRUC_AUTO_FIBER_NEGOTIATE GIG_STRUC_AUTO_FIBER_NEGOTIATE_INFO GIG_ STRUC_BG1 GIG_ STRUC_BG2 GIG_STRUC_CAP_COUNT_INFO GIG_STRUC_CAP_DATA_INFO GIG_STRUC_CAP_INFO GIG_STRUC_CAPTURE_SETUP GIG_ STRUC_CARD_INFO GIG_STRUC_COUNTER_INFO GIG_STRUC_FILL_PATTERN GIG_STRUC_IMAGE_VERSIONS GIG_STRUC_MAC_CONFIG GIG_STRUC_MAC_CONFIG_INFO GIG_ STRUC_RATE_INFO GIG_ STRUC_TRIGGER GIG_ STRUC_TX GIG_ STRUC_VFD3 N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y N N Y Y Y Y Y N N Y Y Y Y Y Y N Y Y Y N N Y Y Y Y Y N N Y Y Y Y Y Y N Y Y Y N N Y Y Y Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

L2
L2_READ_COUNTERS L2_READ_RATES N N N N N N N N N N N N

28 |

SmartLibrary Command Reference: Volume 2

ML-7710/7711 ML-7711s
N N Y

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


L3
L3_ARP_ONE_STREAM L3_ARP_TIMES_INFO L3_ARP_UNRESOLVED L3_CAPTURE_ALL_TYPE L3_CAPTURE_BAD_TYPE L3_CAPTURE_COUNT_INFO L3_CAPTURE_DETAIL_INFO L3_CAPTURE_OFF_TYPE L3_CAPTURE_PACKET_DATA_INFO L3_CAPTURE_SETUP L3_CAPTURE_START L3_CAPTURE_STOP L3_CAPTURE_TRIGGERS_TYPE L3_DEFINE_ICMP_IPV6_STREAM L3_DEFINE_ICMP_IPV6_STREAM_VLAN L3_DEFINE_ICMP_STREAM L3_DEFINE_ICMP_STREAM_VLAN L3_DEFINE_IP_STREAM L3_DEFINE_IP_STREAM_VLAN L3_DEFINE_IPV6_STREAM L3_DEFINE_IPV6_STREAM_VLAN L3_DEFINE_IPX_STREAM L3_DEFINE_MPLS L3_DEFINE_MULTI_ICMP_IPV6_STREAM L3_DEFINE_MULTI_ICMP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_ICMP_STREAM

N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N Y Y Y N Y Y N N N Y Y Y Y Y Y Y N N Y N Y Y Y

ML-7710/7711 ML-7711s
Y Y Y Y Y Y Y Y Y N N N Y Y Y Y Y Y Y N N Y N Y Y Y

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

SmartLibrary Command Reference: Volume 2

| 29

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


L3_DEFINE_MULTI_ICMP_STREAM_VLAN L3_DEFINE_MULTI_IP_STREAM L3_DEFINE_MULTI_IP_STREAM_VLAN L3_DEFINE_MULTI_IPV6_STREAM L3_DEFINE_MULTI_IPV6_STREAM_VLAN L3_DEFINE_MULTI_IPX_STREAM L3_DEFINE_MULTI_SMARTBITS_128_STREAM L3_DEFINE_MULTI_SMARTBITS_STREAM L3_DEFINE_MULTI_STREAM_EXTENSION L3_DEFINE_MULTI_TCP_IPV6_STREAM L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_TCP_STREAM L3_DEFINE_MULTI_TCP_STREAM_VLAN L3_DEFINE_MULTI_UDP_IPV6_STREAM L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_UDP_STREAM L3_DEFINE_MULTI_UDP_STREAM_VLAN L3_DEFINE_SMARTBITS_STREAM L3_DEFINE_SMARTBITS_128_STREAM L3_DEFINE_STREAM_EXTENSION L3_DEFINE_TCP_IPV6_STREAM L3_DEFINE_TCP_IPV6_STREAM_VLAN L3_DEFINE_TCP_STREAM L3_DEFINE_TCP_STREAM_VLAN L3_DEFINE_UDP_IPV6_STREAM L3_DEFINE_UDP_IPV6_STREAM_VLAN L3_DEFINE_UDP_STREAM

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y Y N N Y N Y N N N N N N N Y Y Y N Y N N N N N N Y

30 |

SmartLibrary Command Reference: Volume 2

ML-7710/7711 ML-7711s
Y Y Y N N Y N Y N N N Y Y N N Y Y Y N Y N N Y Y N N Y

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


L3_DEFINE_UDP_STREAM_VLAN L3_DEFINE_VFD L3_DEFINED_STREAM_COUNT_INFO L3_DHCP_CONFIG L3_DHCP_CONFIG_INFO L3_DHCP_EXTENDED_HOST_INFO L3_DHCP_GET_ADDRESS L3_DHCP_GET_ADDRESS_ALL L3_DHCP_HOST_INFO L3_DHCP_PORT_COUNTER_INFO L3_DHCP_PORT_SESSION_INFO L3_DHCP_RELEASE_ADDRESS L3_DHCP_RELEASE_ADDRESS_ALL L3_DHCP_RENEW L3_DHCP_RESTART L3_DHCP_RESTART_ALL L3_DHCP_STATS_INFO L3_DHCP_STREAM_COUNT_INFO L3_DHCP_V2_EXTENDED_HOST_INFO L3_DHCP_V2_HOST_INFO L3_ETHERNET_MODE_ON L3_HIST_ACTIVE_TEST_INFO L3_HIST_LATENCY_DISTRIBUTION L3_HIST_LATENCY_DISTRIBUTION_INFO L3_HIST_RAW_TAGS L3_HIST_RAW_TAGS_INFO L3_HIST_SEQUENCE

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

Y N Y Y N Y Y Y Y N N Y Y N N N Y Y N N Y Y Y Y Y Y Y

ML-7710/7711 ML-7711s
Y N Y Y N Y Y Y Y N N Y Y N N N Y Y N N N Y Y Y Y Y Y

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

SmartLibrary Command Reference: Volume 2

| 31

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


L3_HIST_SEQUENCE_INFO L3_HIST_START L3_HIST_V2_LATENCY L3_HIST_V2_LATENCY_DISTRIBUTION L3_HIST_V2_LATENCY_INFO L3_HIST_V2_LATENCY_PER_STREAM L3_HIST_V2_LATENCY_PER_STREAM_ INFO L3_MOD_ICMP_IPV6_STREAM L3_MOD_ICMP_IPV6_STREAM_VLAN L3_MOD_ICMP_STREAM L3_MOD_ICMP_STREAM_VLAN L3_MOD_IP_STREAM L3_MOD_IP_STREAM_VLAN L3_MOD_IPV6_STREAM L3_MOD_IPV6_STREAM_VLAN L3_MOD_IPX_STREAM L3_MOD_MPLS L3_MOD_SMARTBITS_STREAM L3_MOD_SMARTBITS_128_STREAM L3_MOD_STREAM_EXTENSION L3_MOD_STREAMS_ARRAY L3_MOD_TCP_IPV6_STREAM L3_MOD_TCP_IPV6_STREAM_VLAN L3_MOD_TCP_STREAM L3_MOD_TCP_STREAM_VLAN L3_MOD_UDP_IPV6_STREAM L3_MOD_UDP_IPV6_STREAM_VLAN

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y N N Y Y Y Y Y Y N N Y N Y N Y Y N N N N N N

32 |

SmartLibrary Command Reference: Volume 2

ML-7710/7711 ML-7711s
Y Y Y Y Y Y Y Y Y Y Y Y Y N N Y N Y N Y Y N N Y Y N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


L3_MOD_UDP_STREAM L3_MOD_UDP_STREAM_VLAN L3_MOD_VFD L3_READ_STREAM_BG L3_READ_STREAM_EXTENSION L3_RNDIS_MODE_ON L3_SET_ARP_GAP L3_START_ARPS L3_STOP_ARPS L3_STREAM_128_INFO L3_STREAM_GROUP_DEFINE L3_STREAM_GROUP_DELETE L3_STREAM_INFO L3_STREAM_TRANSMIT_MODE L3_STREAM_TRANSMIT_MODE_INFO L3_TX_ADDRESS L3_TX_ADDRESS_INFO L3_TX_IPV6_ADDRESS L3_TX_IPV6_ADDRESS_INFO L3_TX_IPV6_PROTOCOL L3_USB_GET_USB_INFO L3_USB_MODE_OFF L3_USB_MODE_ON L3_VFD_INFO L3_WRITE_STREAM_BG

N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y N N N Y Y Y N N N N Y N N Y Y N N N Y Y Y N N

MPLS
MPLS_ATTRIBUTE_OBJECT_CREATE N N N N N N

ML-7710/7711 ML-7711s
Y Y N N N N Y Y N N N N Y N N Y Y N N N N N N N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

SmartLibrary Command Reference: Volume 2

| 33

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N Y Y Y Y

Message Function iType1 Parameter


MPLS_EXPLICIT_ROUTE_OBJECT_CREATE MPLS_LABEL_DATA_INFO MPLS_LSP_BIND_STREAMS MPLS_LSP_COPY_DELTA MPLS_LSP_COUNT_INFO MPLS_LSP_CREATE MPLS_LSP_DELETE_ALL MPLS_LSP_INFO MPLS_LSP_NOT_COMPLETE MPLS_OBJECT_DELETE MPLS_ROUTING_DOMAIN_CREATE MPLS_ROUTING_DOMAIN_DELETE_ALL MPLS_RSVP_COUNT_INFO MPLS_SERVICE_OBJECT_CREATE MPLS_START

N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N

NS
NS_ALTERNATE_KEY_CONFIG NS_ALTERNATE_KEY_CONFIG_INFO NS_ALTERNATE_KEY_HASH_CONFIG NS_ALTERNATE_KEY_HASH_CONFIG_INFO NS_ARP_CONFIG NS_ARP_CONFIG_INFO NS_ARP_STATUS_INFO NS_CAPTURE_COUNT_INFO NS_CAPTURE_DATA_INFO NS_CAPTURE_SETUP NS_CAPTURE_START N N N N N N N Y Y Y Y N N N N N N N Y Y Y Y N N N N N N N Y Y Y Y N N N N N N N Y Y Y Y N N N N N N N Y Y Y Y N N N N N N N Y Y Y Y

34 |

SmartLibrary Command Reference: Volume 2

ML-7710/7711 ML-7711s
N N N N N N N N N N N N N N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
Y Y N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


NS_CAPTURE_STATS_INFO NS_CAPTURE_STOP NS_CARD_HARDWARE_INFO NS_COUNTER_INFO NS_CT_CONFIG NS_CT_CONFIG_INFO NS_RATE_INFO NS_CREATE_SUBPROCESS NS_DEFINE_IPV6_EXT_AUTHENTICATION NS_DEFINE_IPV6_EXT_DESTINATION NS_DEFINE_IPV6_EXT_ESP NS_DEFINE_IPV6_EXT_FRAGMENT NS_DEFINE_IPV6_EXT_HOP_BY_HOP NS_DEFINE_IPV6_EXT_ROUTING NS_DEFINE_IPV6_OVER_IPV4_TUNNELING NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING NS_DESTROY_SUBPROCESS NS_DIFF_SERV NS_DIFF_SERV_CONFIG NS_DIFF_SERV_CONFIG_INFO NS_DIFF_SERV_COUNTER_INFO NS_DIFF_SERV_INFO NS_DIFF_SERV_RATE_INFO NS_DOT1X_SUPPLICANT_CONFIG NS_DOT1X_SUPPLICANT_CONFIG_INFO NS_DOT1X_SUPPLICANT_CONTROL NS_DOT1X_SUPPLICANT_COPY

Y Y N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y N N N N N N N N N N N N N N N N N N N N N N N N N

ML-7710/7711 ML-7711s
Y Y N N N N N N N N N N N N N N N N N N N N N N N N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

SmartLibrary Command Reference: Volume 2

| 35

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


NS_DOT1X_SUPPLICANT_FILL NS_DOT1X_SUPPLICANT_MODIFY NS_DOT1X_SUPPLICANT_PORT_CONFIG NS_DOT1X_SUPPLICANT_PORT_CONFIG_INFO NS_DOT1X_SUPPLICANT_RESET NS_DOT1X_SUPPLICANT_SESSION_STATS_INFO NS_DOT1X_SUPPLICANT_STATS_INFO NS_DOT1X_SUPPLICANT_STATUS_INFO NS_DOT1X_SUPPLICANT_STATUS_SEARCH_INFO NS_HIST_ACTIVE_TEST_INFO NS_HIST_COMBO_PER_STREAM NS_HIST_COMBO_PER_STREAM_INFO NS_HIST_ENHANCED_LATENCY_OPTION NS_HIST_ENHANCED_LATENCY_OPTION_INFO NS_HIST_LATENCY_DIST_PER_STREAM NS_HIST_LATENCY_DIST_PER_STREAM_INFO NS_HIST_LATENCY_OPTION NS_HIST_LATENCY_OPTION_INFO NS_HIST_LATENCY_OVER_TIME NS_HIST_LATENCY_OVER_TIME_INFO NS_HIST_MULTICAST_LATENCY_PER_STREAM NS_HIST_MULTICAST_LATENCY_PER_STREAM_INF O NS_HIST_RAW_SIGNATURE NS_HIST_RAW_SIGNATURE_INFO NS_HIST_SEQUENCE_PER_STREAM NS_HIST_SEQUENCE_PER_STREAM_INFO

N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N Y Y Y N N Y Y N N Y Y N N Y Y Y Y

36 |

SmartLibrary Command Reference: Volume 2

ML-7710/7711 ML-7711s
N N N N N N N N N Y Y Y N N Y Y N N Y Y N N Y Y Y Y

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


NS_HW_CONFIG NS_HW_CONFIG_INFO NS_IGMP_CONFIG NS_IGMP_COUNTER_INFO NS_IGMP_JOIN NS_IGMP_JOIN_VLAN NS_IGMP_GROUP_COUNT_INFO NS_IGMP_LEAVE NS_IGMP_LEAVE_VLAN NS_IGMP_RESET NS_IGMP_TIMESTAMP_INFO NS_IGMP_VLAN_TIMESTAMP_INFO NS_IGMPV2_ALL_INFO NS_IGMPV2_INFO NS_IGMPV2_JOIN NS_IGMPV2_LEAVE NS_IGMPV3_ALL_GROUP_INFO NS_IGMPV3_CONFIG NS_IGMPV3_GROUP_CONFIG NS_IGMPV3_GROUP_INFO NS_IGMPV3_GROUP_MOD NS_IGMPV3_GROUP_STATS_INFO NS_IGMPV3_LEAVE_ALL NS_IGMPV3_STATS_INFO NS_IGMPV3_GROUP_MOD NS_IP_OPTION_CONFIG NS_IPV6_CONFIG

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N Y Y Y N N Y N Y Y N N N N N N N N N N N N N N N N

ML-7710/7711 ML-7711s
N N Y Y Y N N Y N Y Y N N N N N N N N N N N N N N N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

SmartLibrary Command Reference: Volume 2

| 37

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


NS_IPV6_CONFIG_INFO NS_IPV6_CONTROL NS_IPV6_COUNTER_INFO NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO NS_IPV6_NEXT_HOP_RESULTS_INFO NS_IPV6_RATE_INFO NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO NS_IPV6_ROUTER_DISCOVERY_INFO NS_IPV6_ROUTER_PREFIX_COUNT_INFO NS_IPV6_ROUTER_PREFIX_INFO NS_IPV6_STATELESS_ADDRESS_COUNT_INFO NS_IPV6__STATELESS_ADDRESS_INFO NS_IPV6_STATUS_INFO NS_IPV6_STREAM_VLAN_INFO NS_LINK_FAULT_CONFIG NS_LINK_FAULT_INFO NS_MLD_ALL_GROUP_INFO NS_MLD_CONFIG NS_MLD_COUNTER_INFO NS_MLD_GROUP_INFO NS_MLD_GROUP_COUNT_INFO NS_MLD_RESET NS_MLD_STOP_LISTEN NS_MLD_TIMESTAMP_INFO NS_MLDV1_LISTEN NS_MLDV2_GROUP_CONFIG NS_MLDV2_GROUP_MOD

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N

38 |

SmartLibrary Command Reference: Volume 2

ML-7710/7711 ML-7711s
N N N N N N N N N N N N N N N N N N N N N N N N N N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


NS_MLDV2_LISTENER_REPORT_CONFIG NS_MLDV2_STATS_INFO NS_MOD_IPV6_EXT_AUTHENTICATION NS_MOD_IPV6_EXT_DESTINATION NS_MOD_IPV6_EXT_ESP NS_MOD_IPV6_EXT_FRAGMENT NS_MOD_IPV6_EXT_HOP_BY_HOP NS_MOD_IPV6_EXT_ROUTING NS_MOD_IPV6_OVER_IPV4_TUNNELING NS_MULTI_COUNTER_INFO NS_OAM_CONFIG NS_OAM_COUNTER_INFO NS_OAM_PATTERN NS_OAM_RATE_INFO NS_PER_STREAM_COUNTER_INFO NS_PHY_CONFIG NS_PHY_CONFIG_INFO NS_PHY_DEFAULT_CONFIG NS_PHY_DEFAULT_CONFIG_INFO NS_PORT_TRANSMIT NS_PORT_TRANSMIT_INFO NS_PROTOCOL_COUNTER_INFO NS_PROTOCOL_RATE_INFO NS_RATE_INFO NS_READ_MDIO_INFO NS_REAL_TIME_TRACKING_RX_CONFIG NS_REAL_TIME_TRACKING_RX_COUNTERS NS_REAL_TIME_TRACKING_TX_CONFIG NS_REAL_TIME_TRACKING_TX_COUNTERS

N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

ML-7710/7711 ML-7711s
N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

SmartLibrary Command Reference: Volume 2

| 39

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N Y N N N N N N N N N N

Message Function iType1 Parameter


NS_RESOLVE_ARPS NS_SIGNATURE_DETECT_MODE NS_SIGNATURE_DETECT_MODE_INFO NS_SONET_COUNTER_INFO NS_STREAM_ID_TABLE_INFO NS_STREAM_SCHEDULE NS_STREAM_SCHEDULE_COUNT_INFO NS_STREAM_SCHEDULE_INFO NS_STREAM_TYPE_INFO NS_TCP_IPV6_STREAM_INFO NS_TCP_IPV6_STREAM_VLAN_INFO NS_TRANSMIT_PADDING_MODE NS_TRANSMIT_PADDING_MODE_INFO NS_TRIGGER_CONFIG NS_TRIGGER_CONFIG_INFO NS_UPLOAD_FILE NS_UDP_IPV6_STREAM_INFO NS_UDP_IPV6_STREAM_VLAN_INFO NS_WAIT_FOR_EVENT NS_WRITE_MDIO

N N N N N N N N N N N N N Y N N N N N N

N N N N N N N N N N N N N Y N N N N N N

N N N N N N N N N N N N N Y N N N N N N

N N N N N N N N N N N N N Y N N N N N N

N N N N N N N N N N N N N Y N N N N N N

POS

Used only with POS modules. See Table 1-3 on page 65.
PPP
PPP_CONFIG PPP_CONFIG_INFO PPP_DEL_SESSION PPP_ENHANCED_CONFIG N N N N N N N N N N N N N N N N Y Y N N N N N N

40 |

SmartLibrary Command Reference: Volume 2

ML-7710/7711 ML-7711s
N N N N N N N N N N N N N Y N N N N N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet SmartCards (SmartBits 200/2000)

Table 1-1. iType1 Support: Ethernet SmartCards (SmartBits 200/2000) (continued) SmartCard SX-7210 /7410B SX-7411
N N N N N N N N N N N N N N N N N N N N

Message Function iType1 Parameter


PPP_ENHANCED_CONFIG_INFO PPP_PARAMS_COPY PPP_PARAMS_FILL PPP_PARAMS_MODIFY PPP_SESSIONS_STATS_INFO PPP_SET_CTRL PPP_STATS_INFO PPP_STATS_RESET PPP_STATUS_INFO

N N N N N N N N N

N N N N N N N N N

N N N N N N N N N

N N N N N N N N N

N N N N Y Y Y Y Y

WN

For WN commands, refer to Volume 1.


XAUI
XAUI_PRBS_CONFIG XAUI_PRBS_CONFIG_INFO XAUI_PRBS_STATUS_INFO N N N N N N N N N N N N N N N N N N

XENPAK
XENPAK_ALARM_CONFIG XENPAK_ALARM_CONFIG_INFO XENPAK_ALARM_STATUS_INFO XENPAK_NVR_CONFIG XENPAK_NVR_CONFIG_INFO XENPAK_PHY_CONFIG XENPAK_PHY_CONFIG_INFO XENPAK_PROFILE_INFO N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

ML-7710/7711 ML-7711s
N N N N N N N N N

GX-1405B/BS

ML-5710A

GX-1420B

GX-1421A

10Mb

SmartLibrary Command Reference: Volume 2

| 41

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)


Table 1-2 shows the compatibility of Message Function iType1 commands for Ethernet modules for the SmartBits 600x/6000x. Refer to these related tables for other SmartCard and module support:

Table 1-1 on page 26 for iType1 support for Ethernet SmartCards for the SmartBits 200/2000. Table 1-3 on page 65 for iType1 support for all non-Ethernet modules for the SmartBits 600x/6000x, including TeraMetrics ATM, Fibre Channel, and POS. Volume 1 of the Command Reference for iType1 support for non-TeraMetrics ATM SmartCards for the SmartBits 200/2000 chassis, as well as Original Function support for all SmartCards and modules.

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


ATM

For ATM SmartCards for the SmartBits 200/2000, refer to Volume 1. For ATM TeraMetrics modules for SmartBits 600x/6000x, see iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x) on page 65.
ETH
ETH_CARD_INFO ETH_CLEAR_PORT ETH_COLLISION ETH_COUNTER_INFO ETH_ENHANCED_COUNTER_INFO ETH_ENHANCED_STATUS_INFO Y Y Y Y Y Y Y Y N Y Y Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

42 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


ETH_EXTENDED_CARD_INFO ETH_EXTENDED_COUNTER_INFO ETH_FILL_PATTERN ETH_FILL_PATTERN_INFO ETH_FIND_MII_ADDR_INFO ETH_LATENCY ETH_LATENCY_INFO ETH_PROTOCOL_PARAMETER_INFO ETH_PROTOCOL_PARAMETERS ETH_READ_MII_INFO ETH_RSMII ETH_RESET_PORT ETH_SELECT_RECEIVE ETH_SELECT_TRANSMIT ETH_SET_SPEED ETH_TRANSMIT ETH_TRANSMIT_INFO ETH_TRIGGER ETH_VLAN ETH_WRITE_MII

N Y Y Y Y Y Y Y Y Y Y* Y Y Y Y Y Y Y N Y

N Y Y Y Y Y Y N N Y N Y Y Y Y Y Y Y N Y

N Y N N N N N N N N N N N N N N N N N N

N Y N N N N N N N N N N N N N N N N N N

N Y N N Y N N N N Y N N N N Y N N N N Y

N Y N N Y N N N N Y N N N N Y N N N N Y

N Y N N N N N N N N N N N N N N N N N N

N Y N N N N N N N N N N N N N N N N N N

N Y N N N N N N N N N N N N N N N N N N

SmartLibrary Command Reference: Volume 2

| 43

XLW-372xA/ XFP-373xA
N Y N N N N N N N Y N N N N N N N N N Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


FC (Fibre Channel)

Used only with Fibre Channel cards. See Table 1-3 on page 65.
FR (Frame Relay / WAN)

For FR commands, refer to Volume 1.


FST
FST_ALTERNATE_TX FST_CAPTURE_COUNT_INFO FST_CAPTURE_DATA_INFO FST_CAPTURE_INFO FST_CAPTURE_PARAMS FST_CONTROL_AUX FST_PROTOCOL_COUNTER_INFO FST_PROTOCOL_PARAMETER_INFO FST_PROTOCOL_PARAMETERS FST_VLAN Y Y Y Y Y Y Y Y Y Y Y N N Y N Y Y N N Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N

GIG
GIG_STRUC_ALT_TX GIG_STRUC_AUTO_FIBER_NEGOTIATE GIG_STRUC_AUTO_FIBER_NEGOTIATE_INFO GIG_ STRUC_BG1 N N N N N N N N Y Y Y Y Y Y Y Y Y N N Y Y N N Y Y Y Y Y Y Y Y Y N Y Y Y Y N N Y

44 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


GIG_ STRUC_BG2 GIG_STRUC_CAP_COUNT_INFO GIG_STRUC_CAP_DATA_INFO GIG_STRUC_CAP_INFO GIG_STRUC_CAPTURE_SETUP GIG_ STRUC_CARD_INFO GIG_STRUC_COUNTER_INFO GIG_STRUC_FILL_PATTERN GIG_STRUC_IMAGE_VERSIONS GIG_STRUC_MAC_CONFIG GIG_STRUC_MAC_CONFIG_INFO GIG_ STRUC_RATE_INFO GIG_ STRUC_TRIGGER GIG_ STRUC_TX GIG_ STRUC_VFD3

N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N

Y Y Y Y Y N Y Y N N N Y Y Y Y

Y Y Y Y Y N Y Y N N N Y Y Y Y

N N N N N N Y Y Y Y Y Y Y Y Y

N N N N N N Y Y Y Y Y Y Y Y Y

N N N N N Y Y Y Y Y Y Y Y Y Y

N N N N N Y Y Y Y Y Y Y Y Y Y

N N N N N N Y Y Y N N Y Y Y Y

L2
L2_READ_COUNTERS L2_READ_RATES N N N N N N Y Y N N N N N N N N N N N N

L3
L3_ARP_ONE_STREAM N Y N N Y Y Y Y Y Y

SmartLibrary Command Reference: Volume 2

| 45

XLW-372xA/ XFP-373xA
N N N N N N Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


L3_ARP_TIMES_INFO L3_ARP_UNRESOLVED L3_CAPTURE_ALL_TYPE L3_CAPTURE_BAD_TYPE L3_CAPTURE_COUNT_INFO L3_CAPTURE_DETAIL_INFO L3_CAPTURE_OFF_TYPE L3_CAPTURE_PACKET_DATA_INFO L3_CAPTURE_SETUP L3_CAPTURE_START L3_CAPTURE_STOP L3_CAPTURE_TRIGGERS_TYPE L3_DEFINE_ICMP_IPV6_STREAM L3_DEFINE_ICMP_IPV6_STREAM_VLAN L3_DEFINE_ICMP_STREAM L3_DEFINE_ICMP_STREAM_VLAN L3_DEFINE_IP_STREAM L3_DEFINE_IP_STREAM_VLAN L3_DEFINE_IPV6_STREAM L3_DEFINE_IPV6_STREAM_VLAN

N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y N Y Y Y Y Y Y N N Y N Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

N N Y Y Y N Y Y Y Y Y Y N N N N Y Y N N

Y Y N N Y N N Y Y Y Y N Y Y Y Y Y Y Y Y

Y Y N N Y N N Y Y Y Y N Y Y Y Y Y Y Y Y

Y Y N N Y N N Y Y Y Y N Y Y Y Y Y Y Y Y

Y Y N N Y N N Y Y Y Y N Y Y Y Y Y Y Y Y

Y Y N N Y N N Y Y Y Y N N N Y Y Y Y N N

46 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y Y N N Y N N Y Y Y Y N Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


L3_DEFINE_IPX_STREAM L3_DEFINE_MPLS L3_DEFINE_MULTI_ICMP_IPV6_STREAM L3_DEFINE_MULTI_ICMP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_ICMP_STREAM L3_DEFINE_MULTI_ICMP_STREAM_VLAN L3_DEFINE_MULTI_IP_STREAM L3_DEFINE_MULTI_IP_STREAM_VLAN L3_DEFINE_MULTI_IPV6_STREAM L3_DEFINE_MULTI_IPV6_STREAM_VLAN L3_DEFINE_MULTI_IPX_STREAM L3_DEFINE_MULTI_SMARTBITS_128_STREAM L3_DEFINE_MULTI_SMARTBITS_STREAM L3_DEFINE_MULTI_STREAM_EXTENSION L3_DEFINE_MULTI_TCP_IPV6_STREAM L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_TCP_STREAM L3_DEFINE_MULTI_TCP_STREAM_VLAN L3_DEFINE_MULTI_UDP_IPV6_STREAM
L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN

N N N N N N N N N N N N N N N N N N N N

Y N N N Y N Y Y Y Y Y Y Y N Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

N N N N N N Y Y N N N N Y Y N N Y Y N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

N N N N Y Y Y Y N N Y Y Y Y N N Y Y N N

SmartLibrary Command Reference: Volume 2

| 47

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


L3_DEFINE_MULTI_UDP_STREAM L3_DEFINE_MULTI_UDP_STREAM_VLAN L3_DEFINE_SMARTBITS_STREAM L3_DEFINE_SMARTBITS_128_STREAM L3_DEFINE_STREAM_EXTENSION L3_DEFINE_TCP_IPV6_STREAM L3_DEFINE_TCP_IPV6_STREAM_VLAN L3_DEFINE_TCP_STREAM L3_DEFINE_TCP_STREAM_VLAN L3_DEFINE_UDP_IPV6_STREAM L3_DEFINE_UDP_IPV6_STREAM_VLAN L3_DEFINE_UDP_STREAM L3_DEFINE_UDP_STREAM_VLAN L3_DEFINE_VFD L3_DEFINED_STREAM_COUNT_INFO L3_DHCP_CONFIG L3_DHCP_CONFIG_INFO L3_DHCP_EXTENDED_HOST_INFO L3_DHCP_GET_ADDRESS L3_DHCP_GET_ADDRESS_ALL

N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

Y Y Y N Y N N Y Y N N Y Y N Y N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y N N Y Y N N Y Y Y Y N N N N N

48 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


L3_DHCP_HOST_INFO L3_DHCP_PORT_COUNTER_INFO L3_DHCP_PORT_SESSION_INFO L3_DHCP_RELEASE_ADDRESS L3_DHCP_RELEASE_ADDRESS_ALL L3_DHCP_RENEW L3_DHCP_RESTART L3_DHCP_RESTART_ALL L3_DHCP_STATS_INFO L3_DHCP_STREAM_COUNT_INFO L3_DHCP_V2_EXTENDED_HOST_INFO L3_DHCP_V2_HOST_INFO L3_ETHERNET_MODE_ON L3_HIST_ACTIVE_TEST_INFO L3_HIST_LATENCY_DISTRIBUTION L3_HIST_LATENCY_DISTRIBUTION_INFO L3_HIST_RAW_TAGS L3_HIST_RAW_TAGS_INFO L3_HIST_SEQUENCE L3_HIST_SEQUENCE_INFO

N N N N N N N N N N N N N N N N N N N N

Y N N Y Y Y N N Y Y N N N Y Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N Y N N Y Y N N

N N N N N N N N N N N N N Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y Y Y

N N N N N N N N N N N N N Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y Y Y

N N N N N N N N N N N N N Y N N Y Y N N

SmartLibrary Command Reference: Volume 2

| 49

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


L3_HIST_START L3_HIST_V2_LATENCY L3_HIST_V2_LATENCY_DISTRIBUTION L3_HIST_V2_LATENCY_INFO L3_HIST_V2_LATENCY_PER_STREAM L3_HIST_V2_LATENCY_PER_STREAM_ INFO L3_MOD_ICMP_IPV6_STREAM L3_MOD_ICMP_IPV6_STREAM_VLAN L3_MOD_ICMP_STREAM L3_MOD_ICMP_STREAM_VLAN L3_MOD_IP_STREAM L3_MOD_IP_STREAM_VLAN L3_MOD_IPV6_STREAM L3_MOD_IPV6_STREAM_VLAN L3_MOD_IPX_STREAM L3_MOD_MPLS L3_MOD_SMARTBITS_STREAM L3_MOD_SMARTBITS_128_STREAM L3_MOD_STREAM_EXTENSION L3_MOD_STREAMS_ARRAY

N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y N N Y N Y Y Y Y Y N Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

Y Y N Y Y Y N N N N Y Y N N N N Y N Y Y

Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y N N N N N N N Y Y Y Y N N N N Y Y Y Y

50 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


L3_MOD_TCP_IPV6_STREAM L3_MOD_TCP_IPV6_STREAM_VLAN L3_MOD_TCP_STREAM L3_MOD_TCP_STREAM_VLAN L3_MOD_UDP_IPV6_STREAM L3_MOD_UDP_IPV6_STREAM_VLAN L3_MOD_UDP_STREAM L3_MOD_UDP_STREAM_VLAN L3_MOD_VFD L3_READ_STREAM_BG L3_READ_STREAM_EXTENSION L3_RNDIS_MODE_ON L3_SET_ARP_GAP L3_START_ARPS L3_STOP_ARPS L3_STREAM_128_INFO L3_STREAM_GROUP_DEFINE L3_STREAM_GROUP_DELETE L3_STREAM_INFO L3_STREAM_TRANSMIT_MODE

N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y N N Y N Y Y Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

N N Y Y N N Y Y N Y Y N Y Y N N N N Y N

Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y N N Y N

Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y N N Y N

Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y N N Y N

Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y N N Y N

N N Y Y N N Y Y Y Y Y N Y Y Y Y N N Y N

SmartLibrary Command Reference: Volume 2

| 51

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y N Y Y Y Y N N Y N

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


L3_STREAM_TRANSMIT_MODE_INFO L3_TX_ADDRESS L3_TX_ADDRESS_INFO L3_TX_IPV6_ADDRESS L3_TX_IPV6_ADDRESS_INFO L3_TX_IPV6_PROTOCOL L3_USB_GET_USB_INFO L3_USB_MODE_OFF L3_USB_MODE_ON L3_VFD_INFO L3_WRITE_STREAM_BG

N N N N N N N N N N N

Y Y Y Y Y Y N N N N N

N N N N N N N N N N N

N Y Y N N N N N N Y Y

N Y Y Y Y Y N N N Y Y

N Y Y Y Y Y N N N Y Y

N Y Y Y Y Y N N N Y Y

N Y Y Y Y Y N N N Y Y

N Y Y N N N N N N Y Y

MPLS
MPLS_ATTRIBUTE_OBJECT_CREATE MPLS_EXPLICIT_ROUTE_OBJECT_CREATE MPLS_LABEL_DATA_INFO MPLS_LSP_BIND_STREAMS MPLS_LSP_COPY_DELTA MPLS_LSP_COUNT_INFO MPLS_LSP_CREATE MPLS_LSP_DELETE_ALL N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N N N N N

52 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
N Y Y Y Y Y N N N Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


MPLS_LSP_INFO MPLS_LSP_NOT_COMPLETE MPLS_OBJECT_DELETE MPLS_ROUTING_DOMAIN_CREATE MPLS_ROUTING_DOMAIN_DELETE_ALL MPLS_RSVP_COUNT_INFO MPLS_SERVICE_OBJECT_CREATE MPLS_START

N N N N N N N N

N N N N N N N N

N N N N N N N N

N N N N N N N N

Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y

NS
NS_ALTERNATE_KEY_CONFIG NS_ALTERNATE_KEY_CONFIG_INFO NS_ALTERNATE_KEY_HASH_CONFIG NS_ALTERNATE_KEY_HASH_CONFIG_INFO NS_ARP_CONFIG NS_ARP_CONFIG_INFO NS_ARP_STATUS_INFO NS_CAPTURE_COUNT_INFO NS_CAPTURE_DATA_INFO NS_CAPTURE_SETUP NS_CAPTURE_START N N N N N N N Y Y Y Y N N N N Y Y Y Y Y Y Y N N N N N N N Y Y Y Y N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

SmartLibrary Command Reference: Volume 2

| 53

XLW-372xA/ XFP-373xA
N N N N N N N N

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_CAPTURE_STATS_INFO NS_CAPTURE_STOP NS_CARD_HARDWARE_INFO NS_COUNTER_INFO NS_CREATE_SUBPROCESS NS_CT_CONFIG NS_CT_CONFIG_INFO NS_DEFINE_IPV6_EXT_AUTHENTICATION NS_DEFINE_IPV6_EXT_DESTINATION NS_DEFINE_IPV6_EXT_ESP NS_DEFINE_IPV6_EXT_FRAGMENT NS_DEFINE_IPV6_EXT_HOP_BY_HOP NS_DEFINE_IPV6_EXT_ROUTING NS_DEFINE_IPV6_OVER_IPV4_TUNNELING NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING NS_DESTROY_SUBPROCESS NS_DIFF_SERV NS_DIFF_SERV_CONFIG NS_DIFF_SERV_CONFIG_INFO NS_DIFF_SERV_COUNTER_INFO

Y Y N N N N N N N N N N N N N N N N N N

Y Y N Y N N N N N N N N N Y Y N N N N N

Y Y N Y N N N N N N N N N N N N N N N N

Y Y N Y N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N Y Y N N N N N N N N N N Y Y Y Y Y

54 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_DIFF_SERV_INFO NS_DIFF_SERV_RATE_INFO NS_DIFF_SERV_V2_CONFIG NS_DIFF_SERV_V2_CONFIG_INFO NS_DIFF_SERV_V2_CONFIG_COUNTER_INFO NS_DIFF_SERV_V2_RATE_INFO NS_DOT1X_DOWNLOAD_CERTIFICATE_FILES NS_DOT1X_SUPPLICANT_CONFIG NS_DOT1X_SUPPLICANT_CONFIG_INFO NS_DOT1X_SUPPLICANT_CONTROL NS_DOT1X_SUPPLICANT_COPY NS_DOT1X_SUPPLICANT_FILL NS_DOT1X_SUPPLICANT_MODIFY NS_DOT1X_SUPPLICANT_PORT_CONFIG NS_DOT1X_SUPPLICANT_PORT_CONFIG_INFO NS_DOT1X_SUPPLICANT_RESET NS_DOT1X_SUPPLICANT_SESSION_STATS_INFO NS_DOT1X_SUPPLICANT_STATS_INFO NS_DOT1X_SUPPLICANT_STATUS_INFO NS_DOT1X_SUPPLICANT_STATUS_SEARCH_INFO

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

Y Y N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N N N N N N N N N N N N N N N N N N

SmartLibrary Command Reference: Volume 2

| 55

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_HIST_ACTIVE_TEST_INFO NS_HIST_COMBO_PER_STREAM NS_HIST_COMBO_PER_STREAM_INFO NS_HIST_LATENCY_DIST_PER_STREAM NS_HIST_ENHANCED_LATENCY_OPTION NS_HIST_ENHANCED_LATENCY_OPTION_INFO NS_HIST_LATENCY_DIST_PER_STREAM_INFO NS_HIST_LATENCY_OPTION NS_HIST_LATENCY_OPTION_INFO NS_HIST_LATENCY_OVER_TIME NS_HIST_LATENCY_OVER_TIME_INFO NS_HIST_MULTICAST_LATENCY_PER_STREAM NS_HIST_MULTICAST_LATENCY_PER_STREAM_ INFO NS_HIST_RAW_SIGNATURE NS_HIST_RAW_SIGNATURE_INFO NS_HIST_SEQUENCE_PER_STREAM NS_HIST_SEQUENCE_PER_STREAM_INFO NS_HW_CONFIG NS_HW_CONFIG_INFO NS_IGMP_CLEAR_COUNTERS

N N N N N N N N N N N N N

Y Y Y Y N N Y N N Y Y Y Y

N N N N N N N N N N N N N

Y Y Y Y N N Y N N N N N N

Y Y Y Y Y Y Y Y Y Y Y N N

Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y N N

Y Y Y Y Y Y Y Y Y Y Y Y Y

Y N N N N N N N N N N N N

N N N N N N N

Y Y Y Y N N N

N N N N N N N

N N Y Y N N N

Y Y Y Y N N Y

Y Y Y Y N N Y

Y Y Y Y Y Y Y

Y Y Y Y Y Y Y

N N N N N N N

56 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_IGMP_CONFIG NS_IGMP_COUNTER_INFO NS_IGMP_JOIN NS_IGMP_JOIN_VLAN NS_IGMP_GROUP_COUNT_INFO NS_IGMP_LEAVE NS_IGMP_LEAVE_VLAN NS_IGMP_RESET NS_IGMP_TIMESTAMP_INFO NS_IGMP_VLAN_TIMESTAMP_INFO NS_IGMPV2_ALL_INFO NS_IGMPV2_INFO NS_IGMPV2_JOIN NS_IGMPV2_LEAVE NS_IGMPV3_ALL_GROUP_INFO NS_IGMPV3_CONFIG NS_IGMPV3_GROUP_CONFIG NS_IGMPV3_GROUP_INFO NS_IGMPV3_GROUP_MOD NS_IGMPV3_GROUP_STATS_INFO

N N N N N N N N N N N N N N N N N N N N

Y Y Y N N Y N Y Y N Y Y Y Y Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

SmartLibrary Command Reference: Volume 2

| 57

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_IGMPV3_LEAVE_ALL NS_IGMPV3_STATS_INFO NS_IGMPV3_GROUP_MOD NS_IP_OPTION_CONFIG NS_IPV4_PROTOCOL_HEADER NS_IPV4_PROTOCOL_HEADER_INFO NS_IPV6_CONFIG NS_IPV6_CONFIG_INFO NS_IPV6_CONTROL NS_IPV6_COUNTER_INFO NS_IPV6_RATE_INFO NS_IPV6_STATUS_INFO NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO NS_IPV6_NEXT_HOP_RESULTS_INFO NS_IPV6_PROTOCOL_HEADER_INFO NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO NS_IPV6_ROUTER_DISCOVERY_INFO NS_IPV6_ROUTER_PREFIX_COUNT_INFO NS_IPV6_ROUTER_PREFIX_INFO NS_IPV6_STATELESS_ADDRESS_COUNT_INFO

N N N N N N N N N N N N N N N N N N N N

Y Y Y N N N Y Y Y Y Y Y Y Y N Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

58 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_IPV6_STATELESS_ADDRESS_INFO NS_IPV6_STREAM_VLAN_INFO NS_LINK_FAULT_CONFIG NS_LINK_FAULT_INFO NS_MLD_ALL_GROUP_INFO NS_MLD_CLEAR_COUNTERS NS_MLD_CONFIG NS_MLD_COUNTER_INFO NS_MLD_GROUP_INFO NS_MLD_GROUP_COUNT_INFO NS_MLD_RESET NS_MLD_STOP_LISTEN NS_MLD_TIMESTAMP_INFO NS_MLDV1_LISTEN NS_MLDV2_GROUP_CONFIG NS_MLDV2_GROUP_MOD NS_MLDV2_LISTENER_REPORT_CONFIG NS_MLDV2_STATS_INFO NS_MOD_IPV6_EXT_AUTHENTICATION NS_MOD_IPV6_EXT_DESTINATION

N N N N N N N N N N N N N N N N N N N N

Y Y N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

Y Y N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

SmartLibrary Command Reference: Volume 2

| 59

XLW-372xA/ XFP-373xA
Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_MOD_IPV6_EXT_ESP NS_MOD_IPV6_EXT_FRAGMENT NS_MOD_IPV6_EXT_HOP_BY_HOP NS_MOD_IPV6_EXT_ROUTING NS_MOD_IPV6_OVER_IPV4_TUNNELING NS_MULTICAST_KEEP_ALIVE_CONFIG NS_MULTI_COUNTER_INFO NS_OAM_CONFIG NS_OAM_COUNTER_INFO NS_OAM_PATTERN NS_OAM_RATE_INFO NS_PER_STREAM_COUNTER_INFO NS_PHY_CONFIG NS_PHY_CONFIG_INFO NS_PHY_DEFAULT_CONFIG NS_PHY_DEFAULT_CONFIG_INFO NS_PORT_TRANSMIT NS_PORT_TRANSMIT_INFO NS_PROTOCOL_COUNTER_INFO NS_PROTOCOL_HEADER_INFO

N N N N N N N N N N N N N N N N N N N N

N N N N Y N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y N N N N Y N N N N Y Y Y Y

Y Y Y Y Y Y Y N N N N Y N N Y Y Y Y Y Y

Y Y Y Y Y Y Y N N N N Y N N N N Y Y Y Y

Y Y Y Y Y Y Y N N N N Y Y Y Y Y Y Y Y Y

N N N N N N N Y Y Y Y N N N N N Y Y N N

60 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y Y Y Y Y Y Y N N N N N N N N N Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_PROTOCOL_RATE_INFO NS_RATE_INFO NS_REAL_TIME_TRACKING_RX_CONFIG NS_REAL_TIME_TRACKING_RX_COUNTERS NS_REAL_TIME_TRACKING_TX_CONFIG NS_REAL_TIME_TRACKING_TX_COUNTERS NS_RESOLVE_ARPS NS_RUNTIME_HIST_STATS_CONFIG NS_SIGNATURE_DETECT_MODE NS_SIGNATURE_DETECT_MODE_INFO NS_SONET_COUNTER_INFO NS_STREAM_ID_TABLE_INFO NS_STREAM_SCHEDULE NS_STREAM_SCHEDULE_COUNT_INFO NS_STREAM_SCHEDULE_INFO NS_STREAM_TYPE_INFO NS_TCP_IPV6_STREAM_INFO NS_TCP_IPV6_STREAM_VLAN_INFO NS_TRANSMIT_PADDING_MODE NS_TRANSMIT_PADDING_MODE_FO

N N N N N N N N N N N N N N N N N N N N

N N Y Y Y Y N N N N N N N N N N Y Y N N

N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N

Y Y N N N N Y N Y Y N Y N N N Y Y Y Y Y

Y Y N N N N Y Y Y Y N Y N N N Y Y Y Y Y

Y Y N N N N Y N Y Y N Y N N N Y Y Y Y Y

Y Y N N N N Y Y Y Y N Y N N N Y Y Y Y Y

N N N N N N Y N N N N N Y Y Y N N N N N

SmartLibrary Command Reference: Volume 2

| 61

XLW-372xA/ XFP-373xA
Y Y N N N N Y Y Y Y N Y N N N Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


NS_TRIGGER_CONFIG NS_TRIGGER_CONFIG_INFO NS_UPLOAD_FILE NS_UDP_IPV6_STREAM_INFO NS_UDP_IPV6_STREAM_VLAN_INFO NS_WAIT_FOR_EVENT NS_WIS_CONFIG NS_WIS_CONFIG_INFO NS_WIS_LINE_STATUS_INFO NS_WIS_LINE_STATUS_RESET NS_WRITE_MDIO

Y N N N N N N N N N N

Y N N Y Y N N N N N N

Y N N N N N N N N N N

Y N N N N N N N N N N

Y Y Y Y Y Y N N N N N

Y Y Y Y Y Y N N N N N

Y Y Y Y Y Y N N N N N

Y Y Y Y Y Y N N N N N

Y N N N N Y N N N N N

POS

Used only with POS modules. See Table 1-3 on page 65.
PPP
PPP_CONFIG PPP_CONFIG_INFO PPP_DEL_SESSION PPP_ENHANCED_CONFIG PPP_ENHANCED_CONFIG_INFO PPP_PARAMS_COPY N N N N N N Y Y Y Y Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N Y Y Y N

62 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y N N Y Y Y Y Y Y Y Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


PPP_PARAMS_FILL PPP_PARAMS_MODIFY PPP_SESSIONS_STATS_INFO PPP_SET_CTRL PPP_STATS_INFO PPP_STATS_RESET PPP_STATUS_INFO

N N N N N N N

N N N Y Y Y Y

N N N N N N N

N N N N N N N

N N N N N N N

N N N N N N N

N N N N N N N

N N N N N N N

N N N N N N N

WN

For WN commands, refer to Volume 1.


XAUI
XAUI_PRBS_CONFIG XAUI_PRBS_CONFIG_INFO XAUI_PRBS_STATUS_INFO N N N N N N N N N N N N N N N N N N N N N N N N N N N Y Y Y

XENPAK
XENPAK_ALARM_CONFIG XENPAK_ALARM_CONFIG_INFO XENPAK_ALARM_STATUS_INFO XENPAK_NVR_CONFIG XENPAK_NVR_CONFIG_INFO XENPAK_PHY_CONFIG N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N Y Y Y Y Y Y

SmartLibrary Command Reference: Volume 2

| 63

XLW-372xA/ XFP-373xA
N N N N N N N

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x)

Table 1-2. iTYpe1 Support: Ethernet Modules (SmartBits 600x/6000x) (continued) Module LAN-3300A/ 3301A/ 3302A

LAN-3100A/ LAN-3150A

Message Function iType1 Parameter


XENPAK_PHY_CONFIG_INFO XENPAK_PROFILE_INFO

N N

N N

N N

N N

N N

N N

N N

N N

N N

XFP
XFP_PROFILE_INFO N N N N N N N N N Y

* LAN-3150A Not supported on XFP-373xA Not supported on XLW-372xA

64 |

SmartLibrary Command Reference: Volume 2

XLW-372xA/ XFP-373xA
Y

LAN-3101A/B/ 3102A LAN-3111A/3111AS

LAN-3710AL/AE/AS

LAN-3310A/ 3311A

LAN-3200A/AS

LAN-3201B/C

LAN-3306A

LAN-332xA

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)
Table 1-3 shows the compatibility of all Message Function iType1 commands with ATM, Fibre Channel, and POS modules for the SmartBits 600x/6000x chassis. Refer to these related tables for other SmartCard and module support:

Table 1-1 on page 26 for iType1 support for Ethernet SmartCards for the SmartBits 200/2000. Table 1-2 on page 42 for iType1 support for Ethernet modules for the SmartBits 600x/ 6000x. Volume 1 of the Command Reference for iType1 support for non-TeraMetrics ATM SmartCards for the SmartBits 200/2000 chassis, as well as Original Function support for all SmartCards and modules.

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
N N N N N N N N N N N N N N

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


AT
AT_MOD_VC_ARRAY AT_PORT_CLIP_COUNTER_INFO AT_PORT_CONFIG AT_PORT_CONFIG_INFO AT_PORT_COUNTER_INFO AT_SET_SPEED AT_STREAM_TX_COUNTER_INFO AT_VC_CLIP_COUNTER_INFO AT_VC_COPY AT_VC_COUNTER_INFO AT_VC_CREATE AT_VC_DELETE AT_VC_DELETE_ALL AT_VC_INFO

Y Y Y Y Y Y Y Y Y Y Y Y Y Y

N N N N N N N N N N N N N N

N N N N N N N N N N N N N N

N N N N N N N N N N N N N N

POS-3510A/As POS-3511A/As
N N N N N N N N N N N N N N

ATM-345xA/As

SmartLibrary Command Reference: Volume 2

| 65

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
N N N N N N N N Y N N N N N N N N N N N N N N Y N N

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


AT_VC_MODIFY

ETH
ETH_CARD_INFO ETH_CLEAR_PORT ETH_COLLISION ETH_COUNTER_INFO ETH_ENHANCED_COUNTER_INFO ETH_ENHANCED_STATUS_INFO ETH_EXTENDED_CARD_INFO ETH_EXTENDED_COUNTER_INFO ETH_FILL_PATTERN ETH_FILL_PATTERN_INFO ETH_FIND_MII_ADDR_INFO ETH_LATENCY ETH_LATENCY_INFO ETH_PROTOCOL_PARAMETER_INFO ETH_PROTOCOL_PARAMETERS ETH_READ_MII_INFO ETH_RESET_PORT ETH_SELECT_RECEIVE ETH_SELECT_TRANSMIT ETH_SET_SPEED ETH_TRANSMIT ETH_TRANSMIT_INFO ETH_TRIGGER ETH_VLAN ETH_WRITE_MII N N N N N N N Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N Y N N N N N N N N N N N N N N N N N N N N N N N N Y N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N N N N N N N N N N N Y N N

66 |

SmartLibrary Command Reference: Volume 2

POS-3510A/As POS-3511A/As
N

ATM-345xA/As

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
N N N N N N N N N N N N N N N N N N N N N N N N

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


FBC (Fibre Channel)
FC_COMMIT FC_COUNTER_INFO FC_DEFINE_HEADER_INFO FC_DEFINE_MULTI_STREAM FC_DEFINE_STREAM FC_DEFINE_STREAM_128 FC_DEFINE_STREAM FC_GET_TX_MODE FC_HBA_TIMER_CONFIG FC_HBA_MODE_START FC_LINK_DOWN FC_MOD_STREAM FC_PORT_CONFIG FC_PORT_CONFIG_INFO FC_PRIVATE_DISCOVERY FC_PUBLIC_DISCOVERY FC_RECV_CUSTOM FC_SEND_CUSTOM FC_SET_TX_MODE FC_STATUS_INFO FC_WNN FC_WNN_COUNT_INFO FC_WNN_INFO FC_WNN_LOGIN

N N N N N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N

FST

Used only with Ethernet cards. See Table 1-1 on page 26 and Table 1-2 on page 42.

POS-3510A/As POS-3511A/As
N N N N N N N N N N N N N N N N N N N N N N N N

ATM-345xA/As

SmartLibrary Command Reference: Volume 2

| 67

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
Y Y N N N N N Y N N Y Y Y Y N Y N Y N Y N Y N Y

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


GIG

Used only with Ethernet cards. See Table 1-1 on page 26 and Table 1-2 on page 42.
L2
L2_READ_COUNTERS L2_READ_RATES Y Y Y Y Y Y Y Y Y Y

L3
L3_ARP_ONE_STREAM L3_ARP_TIMES_INFO L3_ARP_UNRESOLVED L3_CAPTURE_ALL_TYPE L3_CAPTURE_BAD_TYPE L3_CAPTURE_COUNT_INFO L3_CAPTURE_DETAIL_INFO L3_CAPTURE_OFF_TYPE L3_CAPTURE_PACKET_DATA_INFO L3_CAPTURE_SETUP L3_CAPTURE_START L3_CAPTURE_STOP L3_CAPTURE_TRIGGERS_TYPE L3_DEFINE_ICMP_IPV6_STREAM L3_DEFINE_ICMP_IPV6_STREAM_VLAN L3_DEFINE_ICMP_STREAM L3_DEFINE_ICMP_STREAM_VLAN L3_DEFINE_IP_STREAM L3_DEFINE_IP_STREAM_VLAN L3_DEFINE_IPV6_STREAM L3_DEFINE_IPV6_STREAM_VLAN L3_DEFINE_IPX_STREAM N N N N N Y N N Y Y Y Y N Y N Y N Y N Y N N N N N N N Y N N Y Y Y Y N N N N N N N N N N N N N Y Y Y N Y Y Y Y Y N N N N N Y N N N N N N N N N Y N N Y Y Y Y N Y N Y N Y N Y N Y N N N N N Y N N Y Y Y Y N Y N Y N Y N Y N Y

68 |

SmartLibrary Command Reference: Volume 2

POS-3510A/As POS-3511A/As

ATM-345xA/As

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
Y Y Y Y N Y N Y Y Y Y Y Y N Y N Y N Y N Y Y Y Y Y N Y N

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


L3_DEFINE_MPLS L3_DEFINE_MULTI_ICMP_STREAM L3_DEFINE_MULTI_ICMP_IPV6_STREAM L3_DEFINE_MULTI_IP_STREAM L3_DEFINE_MULTI_IP_STREAM_VLAN L3_DEFINE_MULTI_IPV6_STREAM L3_DEFINE_MULTI_IPV6_STREAM_VLAN L3_DEFINE_MULTI_IPX_STREAM L3_DEFINE_MULTI_SMARTBITS_STREAM L3_DEFINE_MULTI_SMARTBITS_128_STREAM L3_DEFINE_MULTI_STREAM_BINDING L3_DEFINE_MULTI_STREAM_EXTENSION L3_DEFINE_MULTI_TCP_IPV6_STREAM L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_TCP_STREAM L3_DEFINE_MULTI_TCP_STREAM_VLAN L3_DEFINE_MULTI_UDP_IPV6_STREAM L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_UDP_STREAM L3_DEFINE_MULTI_UDP_STREAM_VLAN L3_DEFINE_SMARTBITS_STREAM L3_DEFINE_SMARTBITS_128_STREAM L3_DEFINE_STREAM_BINDING L3_DEFINE_STREAM_EXTENSION L3_DEFINE_TCP_IPV6_STREAM L3_DEFINE_TCP_IPV6_STREAM_VLAN L3_DEFINE_TCP_STREAM L3_DEFINE_TCP_STREAM_VLAN

Y Y Y Y N Y N N Y Y Y Y Y N Y N Y N Y N Y Y Y Y Y N Y N

N N N N N N N N N N N N N N N N N N N N Y N N Y N N N N

N N N Y N N N N N N N N N N Y N N N Y N N N N Y N N Y N

Y Y Y N N Y N Y Y Y Y Y Y N Y N Y N Y N Y Y Y Y Y N Y N

POS-3510A/As POS-3511A/As
Y Y Y Y N Y N Y Y Y Y Y Y N Y N Y N Y N Y Y Y Y Y N Y N

ATM-345xA/As

SmartLibrary Command Reference: Volume 2

| 69

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
Y N Y N Y Y N N N N N N N N N N N N N N N N N N Y Y Y Y

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


L3_DEFINE_UDP_IPV6_STREAM L3_DEFINE_UDP_IPV6_STREAM_VLAN L3_DEFINE_UDP_STREAM L3_DEFINE_UDP_STREAM_VLAN L3_DEFINE_VFD L3_DEFINED_STREAM_COUNT_INFO L3_DHCP_CONFIG L3_DHCP_CONFIG_INFO L3_DHCP_EXTENDED_HOST_INFO L3_DHCP_GET_ADDRESS L3_DHCP_GET_ADDRESS_ALL L3_DHCP_HOST_INFO L3_DHCP_PORT_COUNTER_INFO L3_DHCP_PORT_SESSION_INFO L3_DHCP_RELEASE_ADDRESS L3_DHCP_RELEASE_ADDRESS_ALL L3_DHCP_RENEW L3_RESTART L3_RESTART_ALL L3_DHCP_STATS_INFO L3_DHCP_STREAM_COUNT_INFO L3_DHCP_V2_EXTENDED_HOST_INFO L3_ DHCP_V2_HOST_INFO L3_ETHERNET_MODE_ON L3_HIST_ACTIVE_TEST_INFO L3_HIST_LATENCY_DISTRIBUTION L3_HIST_LATENCY_DISTRIBUTION_INFO L3_HIST_RAW_TAGS

Y N Y N Y Y N N N N N N N N N N N N N N N N N N Y Y Y Y

N N N N Y Y N N N N N N N N N N N N N N N N N N Y Y Y Y

N N Y N N Y N N N N N N N N N N N N N N N N N N Y Y Y Y

Y N Y N Y Y N N N N N N N N N N N N N N N N N N Y Y Y Y

70 |

SmartLibrary Command Reference: Volume 2

POS-3510A/As POS-3511A/As
Y N Y N Y Y N N N N N N N N N N N N N N N N N N Y Y Y Y

ATM-345xA/As

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
Y Y Y Y Y N Y Y Y Y Y Y N Y N Y Y Y Y Y Y Y N Y N Y N Y

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


L3_HIST_RAW_TAGS_INFO L3_HIST_SEQUENCE L3_HIST_SEQUENCE_INFO L3_HIST_START L3_HIST_V2_LATENCY L3_HIST_V2_LATENCY_DISTRIBUTION L3_HIST_V2_LATENCY_INFO L3_HIST_V2_LATENCY_PER_STREAM L3_HIST_V2_LATENCY_PER_STREAM _INFO L3_MOD_ICMP_STREAM L3_MOD_ICMP_IPV6_STREAM L3_MOD_IP_STREAM L3_MOD_IP_STREAM_VLAN L3_MOD_IPV6_STREAM L3_MOD_IPV6_STREAM_VLAN L3_MOD_IPX_STREAM L3_MOD_MPLS L3_MOD_SMARTBITS_STREAM L3_MOD_SMARTBITS_128_STREAM L3_MOD_STREAM_EXTENSION L3_MOD_STREAMS_ARRAY L3_MOD_TCP_IPV6_STREAM L3_MOD_TCP_IPV6_STREAM_VLAN L3_MOD_TCP_STREAM L3_MOD_TCP_STREAM_VLAN L3_MOD_UDP_IPV6_STREAM L3_MOD_UDP_IPV6_STREAM_VLAN L3_MOD_UDP_STREAM

Y Y Y Y Y N Y Y Y Y Y Y N Y N N Y Y Y Y Y Y N Y N Y N Y

Y Y Y Y Y N Y Y Y N N N N N N N N N N Y N N N N N N N N

Y Y Y Y Y N Y Y Y N N Y N N N N N N N Y Y N N Y N N N Y

Y Y Y Y Y N Y Y Y Y Y Y N Y N Y Y Y Y Y Y Y N Y N Y N Y

POS-3510A/As POS-3511A/As
Y Y Y Y Y N Y Y Y Y Y Y N Y N Y Y Y Y Y Y Y N Y N Y N Y

ATM-345xA/As

SmartLibrary Command Reference: Volume 2

| 71

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
N Y Y Y N Y Y N Y Y N N Y N N Y Y Y Y Y N N N Y Y Y Y

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


L3_MOD_UDP_STREAM_VLAN L3_MOD_VFD L3_READ_STREAM_BG L3_READ_STREAM_EXTENSION L3_RNDIS_MODE_ON L3_SET_ARP_GAP L3_START_ARPS L3_STOP_ARPS L3_STREAM_128_INFO L3_STREAM_BINDING_INFO L3_STREAM_GROUP_DEFINE L3_STREAM_GROUP_DELETE L3_STREAM_INFO L3_STREAM_TRANSMIT_MODE L3_STREAM_TRANSMIT_MODE_INFO L3_TX_ADDRESS L3_TX_ADDRESS_INFO L3_TX_IPV6_ADDRESS L3_TX_IPV6_ADDRESS_INFO L3_TX_IPV6_PROTOCOL L3_USB_GET_USB_INFO L3_USB_MODE_OFF L3_USB_MODE_ON L3_VFD_INFO L3_WRITE_STREAM_BG MPLS MPLS_ATTRIBUTE_OBJECT_CREATE MPLS_EXPLICIT_ROUTE_OBJECT_CREATE

N Y Y Y N N N N Y Y N N Y N N N N N N N N N N Y Y

N N Y Y N N N N N N N N Y N N N N N N N N N N Y Y

N N Y Y N N N N N N N N Y N N Y Y N N N N N N N Y

N Y Y Y N Y Y N Y Y N N Y N N Y Y Y Y Y N N N Y Y

N N

N N

N N

Y Y

72 |

SmartLibrary Command Reference: Volume 2

POS-3510A/As POS-3511A/As
N Y Y Y N Y Y N Y Y N N Y N N Y Y Y Y Y N N N Y Y Y Y

ATM-345xA/As

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


MPLS_LABEL_DATA_INFO MPLS_LSP_BIND_STREAMS MPLS_LSP_COPY_DELTA MPLS_LSP_COUNT_INFO MPLS_LSP_CREATE MPLS_LSP_DELETE_ALL MPLS_LSP_INFO MPLS_LSP_NOT_COMPLETE MPLS_LSP_START MPLS_OBJECT_DELETE MPLS_ROUTING_DOMAIN_CREATE MPLS_ROUTING_DOMAIN_DELETE_ALL MPLS_RSVP_COUNT_INFO MPLS_SERVICE_OBJECT_CREATE NS NS_ALTERNATE_KEY_CONFIG NS_ALTERNATE_KEY_CONFIG_INFO NS_ALTERNATE_KEY_HASH_CONFIG NS_ALTERNATE_KEY_HASH_CONFIG_INFO NS_ARP_CONFIG NS_ARP_CONFIG_INFO NS_ARP_STATUS_INFO NS_CAPTURE_COUNT_INFO NS_CAPTURE_DATA_INFO NS_CAPTURE_SETUP NS_CAPTURE_START NS_CAPTURE_STATS_INFO NS_CAPTURE_STOP

N N N N N N N N N N N N N N

N N N N N N N N N N N N N N

N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y N N N Y Y Y Y Y Y

N N N N Y Y Y Y Y Y Y Y Y

N N N N N N N Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y

POS-3510A/As POS-3511A/As
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

ATM-345xA/As

SmartLibrary Command Reference: Volume 2

| 73

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
Y Y Y N N Y Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


NS_CARD_HARDWARE_INFO NS_COUNTER_INFO NS_CREATE_SUBPROCESS NS_CT_CONFIG NS_CT_CONFIG_INFO NS_DEFINE_IPV6_EXT_AUTHENTICATION NS_DEFINE_IPV6_EXT_DESTINATION NS_DEFINE_IPV6_EXT_ESP NS_DEFINE_IPV6_EXT_FRAGMENT NS_DEFINE_IPV6_EXT_HOP_BY_HOP NS_DEFINE_IPV6_EXT_ROUTING NS_DEFINE_IPV6_OVER_IPV4_TUNNELING NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING NS_DESTROY_SUBPROCESS NS_DIFF_SERV NS_DIFF_SERV_COUNTER_INFO NS_DIFF_SERV_INFO NS_DOT1X_SUPPLICANT_CONFIG NS_DOT1X_SUPPLICANT_CONFIG_INFO NS_DOT1X_SUPPLICANT_CONTROL NS_DOT1X_SUPPLICANT_COPY NS_DOT1X_SUPPLICANT_FILL NS_DOT1X_SUPPLICANT_MODIFY NS_DOT1X_SUPPLICANT_PORT_CONFIG NS_DOT1X_SUPPLICANT_PORT_CONFIG_INFO NS_DOT1X_SUPPLICANT_RESET NS_DOT1X_SUPPLICANT_SESSION_STATS_INFO NS_DOT1X_SUPPLICANT_STATS_INFO

Y Y Y N N N N N N N N N N Y N N N N N N N N N N N N N N

Y Y N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y Y N N Y Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N

74 |

SmartLibrary Command Reference: Volume 2

POS-3510A/As POS-3511A/As
Y Y Y N N Y Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N

ATM-345xA/As

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
N N Y Y Y Y Y Y Y Y Y Y Y N N Y Y Y Y Y Y Y Y Y N Y Y N

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


NS_DOT1X_SUPPLICANT_STATUS_INFO NS_DOT1X_SUPPLICANT_STATUS_SEARCH_INFO NS_HIST_ACTIVE_TEST_INFO NS_HIST_COMBO_PER_STREAM NS_HIST_COMBO_PER_STREAM_INFO NS_HIST_LATENCY_DIST_PER_STREAM NS_HIST_ENHANCED_LATENCY_OPTION NS_HIST_ENHANCED_LATENCY_OPTION_INFO NS_HIST_LATENCY_DIST_PER_STREAM_INFO NS_HIST_LATENCY_OPTION NS_HIST_LATENCY_OPTION_INFO NS_HIST_LATENCY_OVER_TIME NS_HIST_LATENCY_OVER_TIME_INFO NS_HIST_MULTICAST_LATENCY_PER_STREAM NS_HIST_MULTICAST_LATENCY_PER_STREAM_INFO NS_HIST_RAW_SIGNATURE NS_HIST_RAW_SIGNATURE_INFO NS_HIST_SEQUENCE_PER_STREAM NS_HIST_SEQUENCE_PER_STREAM_INFO NS_HW_CONFIG NS_HW_CONFIG_INFO NS_IGMP_CONFIG NS_IGMP_COUNTER_INFO NS_IGMP_JOIN NS_IGMP_JOIN_VLAN NS_IGMP_GROUP_COUNT_INFO NS_IGMP_LEAVE NS_IGMP_LEAVE_VLAN

N N Y Y Y Y N N Y Y Y Y Y N N Y Y Y Y N N N N N N N N N

N N N N N N N N N Y Y N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N Y Y Y Y Y Y Y Y Y Y Y N N Y Y Y Y N N Y Y Y N Y Y N

POS-3510A/As POS-3511A/As
N N Y Y Y Y Y Y Y Y Y Y Y N N Y Y Y Y N N Y Y Y N Y Y N

ATM-345xA/As

SmartLibrary Command Reference: Volume 2

| 75

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


NS_IGMP_RESET NS_IGMP_TIMESTAMP_INFO NS_IGMP_VLAN_TIMESTAMP_INFO NS_IGMPV2_ALL_INFO NS_IGMPV2_INFO NS_IGMPV2_JOIN NS_IGMPV2_LEAVE NS_IGMPV3_ALL_GROUP_INFO NS_IGMPV3_CONFIG NS_IGMPV3_GROUP_CONFIG NS_IGMPV3_GROUP_INFO NS_IGMPV3_GROUP_MOD NS_IGMPV3_LEAVE_ALL NS_IGMPV3_STATS_INFO NS_IP_OPTION_CONFIG NS_IPV4_PROTOCOL_HEADER NS_IPV6_CONFIG NS_IPV6_COUNTER_INFO NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO NS_IPV6_NEXT_HOP_RESULTS_INFO NS_IPV6_PROTOCOL_HEADER_INFO NS_IPV6_RATE_INFO NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO NS_IPV6_ROUTER_DISCOVERY_INFO NS_IPV6_ROUTER_PREFIX_COUNT_INFO NS_IPV6_ROUTER_PREFIX_INFO NS_IPV6_STATELESS_ADDRESS_COUNT_INFO NS_IPV6_STATELESS_ADDRESS_INFO

N N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

76 |

SmartLibrary Command Reference: Volume 2

POS-3510A/As POS-3511A/As
Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

ATM-345xA/As

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


NS_IPV6_STATUS_INFO NS_IPV6_STREAM_INFO NS_IPV6_STREAM_VLAN_INFO NS_MLD_ALL_GROUP_INFO NS_MLD_CONFIG NS_MLD_COUNTER_INFO NS_MLD_GROUP_INFO NS_MLD_GROUP_COUNT_INFO NS_MLD_RESET NS_MLD_STOP_LISTEN NS_MLD_TIMESTAMP_INFO NS_MLDV1_LISTEN NS_MLDV2_GROUP_CONFIG NS_MLDV2_GROUP_MOD NS_MLDV2_LISTENER_REPORT_CONFIG NS_MLDV2_STATS_INFO NS_MOD_IPV6_EXT_AUTHENTICATION NS_MOD_IPV6_EXT_DESTINATION NS_MOD_IPV6_EXT_ESP NS_MOD_IPV6_EXT_FRAGMENT NS_MOD_IPV6_EXT_HOP_BY_HOP NS_MOD_IPV6_EXT_ROUTING NS_MOD_IPV6_OVER_IPV4_TUNNELING NS-MULTICAST_KEEP_ALIVE_CONFIG NS_MULTI_COUNTER_INFO NS_OAM_CONFIG NS_OAM_COUNTER_INFO NS_OAM_PATTERN

N Y N N N N N N N N N N N N N N N N N N N N N N Y N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N

N N N N N N N N N N N N N N N N N N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N

POS-3510A/As POS-3511A/As
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N

ATM-345xA/As

SmartLibrary Command Reference: Volume 2

| 77

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
N Y Y Y Y Y Y Y N N N N N N Y Y Y N N N N Y Y Y N N N Y

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


NS_OAM_RATE_INFO NS_PER_STREAM_COUNTER_INFO NS_PORT_TRANSMIT NS_PORT_TRANSMIT_INFO NS_PROTOCOL_COUNTER_INFO NS_PROTOCOL_HEADER_INFO NS_PROTOCOL_RATE_INFO NS_RATE_INFO NS_READ_MDIO_INFO NS_REAL_TIME_TRACKING_RX_CONFIG NS_REAL_TIME_TRACKING_RX_COUNTERS NS_REAL_TIME_TRACKING_TX_CONFIG NS_REAL_TIME_TRACKING_TX_COUNTERS NS_RESOLVE_ARPS NS_SIGNATURE_DETECT_MODE NS_SIGNATURE_DETECT_MODE_INFO NS_SONET_COUNTER_INFO NS_STREAM_ID_TABLE_INFO NS_STREAM_SCHEDULE NS_STREAM_SCHEDULE_COUNT_INFO NS_STREAM_SCHEDULE_INFO NS_STREAM_TYPE_INFO NS_TCP_IPV6_STREAM_INFO NS_TCP_IPV6_STREAM_VLAN_INFO NS_STREAM_SCHEDULE_INFO NS_TRANSMIT_PADDING_MODE NS_TRANSMIT_PADDING_MODE_INFO NS_TRIGGER_CONFIG

N Y N N Y N Y N N N N N N N N N Y N N N N Y Y N N N N Y

N N Y Y N N N N N N N N N N N N N N N N N Y N N N N N Y

N N N N N N N N N N N N N N N N N N N N N N N N N N N Y

N Y Y Y Y Y Y Y N N N N N N N N Y N N N N Y Y Y N N N Y

78 |

SmartLibrary Command Reference: Volume 2

POS-3510A/As POS-3511A/As
N Y Y Y Y Y Y Y N N N N N N Y Y Y N N N N Y Y Y N N N Y

ATM-345xA/As

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR
N Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y N N N Y Y Y N Y

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


NS_TRIGGER_CONFIG_INFO NS_UDP_IPV6_STREAM_INFO NS_UDP_IPV6_STREAM_VLAN_INFO NS_UPLOAD_FILE NS_WAIT_FOR_EVENT NS_WRITE_MDIO POS POS_CARD_LINE_CONFIG POS_CARD_LINE_CONFIG_INFO POS_CARD_PORT_ENCAP POS_CARD_PORT_ENCAP_INFO POS_CONFIG POS_CONFIG_INFO POS_SET_SPEED PPP PPP_CONFIG PPP_CONFIG_INFO PPP_DEL_SESSION PPP_ENHANCED_CONFIG PPP_ENHANCED_CONFIG_INFO PPP_PARAMS_COPY PPP_PARAMS_FILL PPP_PARAMS_MODIFY PPP_SESSIONS_STATS_INFO PPP_SET_CTRL PPP_STATS_INFO PPP_STATS_RESET PPP_STATUS_INFO

N Y N Y N N

N N N N N N

N N N N N N

N Y Y Y Y N

N N N N N N N

N N N N N N N

Y Y Y Y Y Y Y

Y Y Y Y Y Y Y

N N N N N N N N N N N N N

N N N N N N N N N N N N N

Y Y Y Y Y N N N N Y Y N Y

Y Y Y Y Y N N N Y Y Y N Y

POS-3510A/As POS-3511A/As
N Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y N N N Y Y Y N Y

ATM-345xA/As

SmartLibrary Command Reference: Volume 2

| 79

Chapter 1: Command Compatibility iType1 Support: Fibre Channel, POS, TeraMetrics ATM Modules (SmartBits 600x/6000x)

Table 1-3. iType1 Support: FC, POS, TeraMetrics ATM (SmartBits 600x/6000x) (continued) Module FBC-3601A/3602A POS-3505As/AR POS-3504As/AR POS-3519As/AR POS-3518As/AR

POS-3500B/BS POS-3502A/AS

Message Function iType1 Parameter


XAUI

Used only with the XLW-3720A/3721A modules. See Table 1-2 on page 42.
XENPAK

Used only with the XLW-3720A/3721A modules. See Table 1-2 on page 42.

80 |

SmartLibrary Command Reference: Volume 2

POS-3510A/As POS-3511A/As

ATM-345xA/As

Chapter 2

TeraMetrics ATM (AT)


This chapter describes the Message Function iType1 commands for TeraMetrics ATM modules used in the SmartBits 600x/6000x chassis (ATM-345x). These commands have the prefix AT. Note: Non-TeraMetrics ATM SmartCards for the SmartBits 200/2000 chassis use a different set of commands that have the prefix ATM. Refer to Volume 1 of this Command Reference for information on the SmartBits 200/2000 command set for ATM testing.

In this chapter...
Supported Modules . . . . 82 AT HTSetStructure Summary . . . . 83 AT HTGetStructure Summary . . . . 83 AT HTSetCommand Summary . . . . 84 AT iType1 Commands and Structures . . . . 85

SmartLibrary Command Reference: Volume 2

| 81

Chapter 2: TeraMetrics ATM (AT) Supported Modules

Supported Modules
Note: Refer to Chapter 1, Command Compatibility for complete information on the compatibility of commands with different cards and modules. The AT Message Function commands (iType1s) and their related structures may be used with TeraMetrics ATM modules in the ATM-345xA(s) family, as listed in Table 2-1.
Table 2-1. Module Support: AT Message Function iType1 Commands
Chassis SmartBits 600x/6000x

Module
ATM-3451A(s) ATM-3453A(s)

Description
ATM OC3c (STM-1c), 2-port, multi-mode/single mode, 1300/ 1310nm, TeraMetrics ATM OC3cOC12c (STM-1c/STM-4c), 2-port, multi-mode/ single mode, 1300/1310nm, TeraMetrics

82 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT HTSetStructure Summary

AT HTSetStructure Summary
iType 1
AT_MOD_VC_ARRAY See Page 85 AT_PORT_CONFIG See Page 89 AT_SET_SPEED See Page 96 AT_VC_COPY See Page 99 AT_VC_CREATE See Page 103 AT_VC_MODIFY See Page 110

2
0 0 0 <x> <x> <x>

3
0 0 0 <c> <c> 0

4
0 0 0 0 0 0

pData
ATModifyVCArray ATPortConfig ATCardSetSpeed ATVC ATVC ATVC

Description
Modify certain fields of a group of VCs on an ATM-345xA/As module. Configure port parameters on an ATM-345xA(s) module. Set the port speed on an ATM-345xA(s) module to OC3 or OC12. Copy the configuration of an existing VC of to create a group of VCs. Configure a VC or multiple VCs. Modify one VC.

AT HTGetStructure Summary
iType 1
AT_PORT_CLIP_COUNTER_INFO See Page 88 AT_PORT_CONFIG_INFO See Page 92 AT_PORT_COUNTER_INFO See Page 95 AT_STREAM_TX_COUNTER_INFO See Page 97 AT_VC_CLIP_COUNTER_INFO See Page 98 AT_VC_COUNTER_INFO See Page 102

2
0 0 0

3
0 0 0

4
0 0 0

pData
ATPortCLIPCounterInfo ATPortConfig ATPortCounterInfo

Description
Retrieve CLIP-related port statistics for a specified VC. Retrieve port parameters. Retrieve transmit and receive statistics (cell/frame counts and cell/frame rates). Retrieve the stream transmit statistics (transmit frame count) on a per-stream basis. Retrieve CLIP related statistics on VCs. Retrieve the transmit and receive statistics (cell/frame counts and cell/frame rates) of a specified VC. Retrieve the information for a specified VC.

<x>

ATStreamTxCounterInfo

<x> <x>

0 0

0 0

ATVCCLIPCounterInfo ATVCCounterInfo

AT_VC_INFO See Page 107

<x>

ATVC

SmartLibrary Command Reference: Volume 2

| 83

Chapter 2: TeraMetrics ATM (AT) AT HTSetCommand Summary

AT HTSetCommand Summary
iType 1
AT_VC_DELETE See Page 106 AT_VC_DELETE_ALL See Page 106

2
<x> 0

3
<c> 0

4
0 0

pData
N/A N/A

Description
Delete one or more VCs, as specified by <index> and <count>, starting at the index. Delete all VCs.

84 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

AT iType1 Commands and Structures


iType1 Description C Usage

AT_MOD_VC_ARRAY
Modify certain fields of the ATVC structure for VCs on an ATM TeraMetrics module. HTSetStructure(AT_MOD_VC_ARRAY, 0, 0, 0, (void*) pATModifyVCArray, sizeof(ATModifyVCArray), iHub, iSlot, iPort); HTSetStructure $AT_MOD_VC_ARRAY 0 0 0 \ myATModifyVCArray \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATModifyVCArray

This command is used to modify VC settings on ATM TeraMetrics modules. The structure is used to OVERWRITE four bytes of a specified field in the ATVC structure in a group of VCs already defined on the card. If the field is smaller than four bytes, fewer than four bytes will be overwritten (right justified).

Identify the index of the first VC to be modified (ulIndex). ulCount specifies the total number of patterns to use, which equals the total number of VCs to modify. For example, if there are 3 patterns specified in ulData and ulCount is 2, then 2 VCs are modified. Only the first two patterns in ulData are used. Also see the note after the following example. The byte patterns are defined in the elements of the ulData[] array. Each pattern is four bytes long. One full pattern per VC is written into the specified field from the least significant bit. The field to be modified is specified by ulField. The accepted field values are listed below. If the field is smaller than four bytes, fewer than four bytes will be overwritten. 1 byte, for ucTxEnable 1 byte, for ucRxEnable 1 byte, for ucRateClass 4 bytes, for ulPCR 4 bytes, for ulATCDVT 4 bytes, for ulTxMode 4 bytes, for ulBurstCount 4 bytes, for ulMBurstCount 4 bytes, for ulBurstGap 4 bits (1/2 byte), for ucGFC 1 byte, for ucPTI

Values for ulField include the following: ATMV_FIELD_TX_ENABLE ATMV_FIELD_RX_ENABLE ATMV_FIELD_RATE_CLASS ATMV_FIELD_PCR ATMV_FIELD_CDVT ATMV_FIELD_TX_MODE ATMV_FIELD_BURST_COUNT ATMV_FIELD_MBURST_COUNT ATMV_FIELD_BURST_GAP ATMV_FIELD_GFC ATMV_FIELD_PTI

Continues >

SmartLibrary Command Reference: Volume 2

| 85

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

Example: ulIndex = 3 (start here) ulCount = 5 (total number of patterns to use, and total number of VCs to modify) ulField = ATMV_FIELD_BURST_COUNT (ulBurstCount field) ulData [5] [7] [99] [100] [25] [49] (pattern definitions) Before After Index ulBurstCount-Value Index ulBurstCount-Value 0 10 0 10 1 10 1 10 2 10 2 10 3 10 3 5 4 10 4 7 5 10 5 99 6 10 6 100 7 10 7 25 8 10 8 10 9 10 9 10 10 10 10 10 Note: If the value of ulCount is larger than the number of patterns specified in the ulData array, the default of the unspecified corresponding elements of ulData will be used for the extras in ulCount. For example, if ulCount = 7 in the example above, 7 VCs are modified. The first 6 use the patterns specified in ulData, because 6 patterns are specified. The last VC will use the value of unspecified ulData[6]. The default value of ulData[] in the Tcl interface is zero, but it is undetermined in the C/C++ interface, unless it was set to certain value with memset. typedef struct tagATModifyVCArray { unsigned long ulIndex; /* Index of the first VC to modify */ unsigned long ulCount; /* The total number of patterns to use, which equals the total number of VCs to modify */ unsigned long ulField; /* Field in the ATVC structure to modify ATMV_FIELD_TX_ENABLE ATMV_FIELD_RX_ENABLE ATMV_FIELD_RATE_CLASS ATMV_FIELD_PCR ATMV_FIELD_CDVT ATMV_FIELD_TX_MODE ATMV_FIELD_BURST_COUNT ATMV_FIELD_MBURST_COUNT ATMV_FIELD_BURST_GAP ATMV_FIELD_GFC ATMV_FIELD_PTI */

Continues >

86 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

unsigned long ulData[AT_MODIFY_VC_ARRAY_SIZE]; /* Array of 1,2, or 4 byte patterns/elements that will be overlaid (right justified) in the Field */ unsigned char ucReserved[24]; } ATModifyVCArray;

SmartLibrary Command Reference: Volume 2

| 87

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_PORT_CLIP_COUNTER_INFO
Retrieve CLIP related statistics on a port. HTGetStructure(AT_PORT_CLIP_COUNTER_INFO, 0, 0, 0, (void*) pATPortCLIPCounterInfo, sizeof(ATPortCLIPCounterInfo), iHub, iSlot, iPort); HTGetStructure $AT_PORT_CLIP_COUNTER_INFO 0 0 0 \ myATPortCLIPCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATPortCLIPCounterInfo

This structure is used to retrieve CLIP-related statistics of the port on an ATM-345xA(s) port. typedef struct tagATPortCLIPCounterInfo { U64 u64RxInARPRequest; /* Received Inverse ATM ARP Requests */ U64 u64TxInARPRequest; /* Transmitted Inverse ATM ARP Requests */ U64 u64RxInARPReply; /* Received Inverse ATM ARP Replies */ U64 u64TxInARPReply; /* Transmitted Inverse ATM ARP Replies */ U64 u64RxARPRequest; /* Received ATM ARP Requests */ U64 u64RxARPReply; /* Received ATM ARP Replies */ U64 u64RxARPNAKs; /* Received ATM ARP NAKs */ U64 u64RxInvalidMessage; /* Received Invalid Messages Invalid Message includes: - Any of the message fields length exceed limits as specified in the RFC (i.e. ATM addresses > 20, protocol address > 4. - If the total length of the message exceeds the length calculated from each of the fields. - If the message is not an ATM ARP or Inverse ATM ARP message. - If the message protocol type is not IPv4 */ unsigned char ucReserved[64]; /* Reserved */ } ATPortCLIPCounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

88 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_PORT_CONFIG
Configure ATM-345xA(s) port parameters. HTSetStructure(AT_PORT_CONFIG, 0, 0, 0, (void*) pATPortConfig, sizeof(ATPortConfig), iHub, iSlot, iPort); HTSetStructure $AT_PORT_CONFIG 0 0 0 \ myATPortConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATPortConfig

This structure is used to set up and retrieve the ATM-345xA(s) port configuration. For some frame sizes, latency measurements in the ATM-345xA(s) modules will result in inaccurate values. Refer to the Overview and Procedures manual, Chapter 14: ATM Testing - SmartBits 600x/6000x for details. To help compensate for this limitation, a dual-state variable is implemented in the module, on a per-port basis. You can select one of these modes in the port configuration (ulFlags with AT_PORT_CONFIG). The two options are: 1 Reject bad frame sizes (AT_PORT_DEFAULT_FLAGS). If you select this option (the default), stream configurations that contain frame sizes that will cause a bad measurement will be rejected. Encapsulation sizes will be taken into account in this algorithm. The reject will occur during the NS_COMMIT_CONFIG command. Ignore the issue (AT_PORT_ALLOW_ALL_FRAME_SIZES). If you select this option, the streams will be committed with the configured value of frame size. This assumes that you are primarily interested in measuring throughput for this frame size and not in measuring the latency.

typedef struct tagATPortConfig { unsigned char ucInterfaceSpeed;/* AT_SPEED_OC3 (OC3 - 155) - Default, AT_SPEED_OC12 (OC12 - 622)*/ unsigned char ucFramingMode; /* Physical layer framing AT_SONET_FRAMING - SONET (Default), AT_SDH_FRAMING - SDH */ unsigned char ucTxClockSource;/* AT_INTERNAL_CLOCK - Internal Clock (Default), AT_LOOP_TIMED_CLOCK - Loop Timed */ unsigned char ucCellScramblingMode;/* AT_CELL_SCRAMBLING_OFF - Off, AT_CELL_SCRAMBLING_PAYLOAD - Scramble Payload (Default), */ unsigned char ucHecCosetEnable;/* 0 - disable HEC Coset usage, 1 - enable HEC Coset usage (Default) If enabled, the coset polynomial x^6+x^4+x^2+1 is added to the received Header Checksum octet prior to comparison with the calculated result. If disabled, the coset polynomial wont be added. */ unsigned char ucLoopbackMode;/* AT_LOOPBACK_DISABLED - Off (Default), AT_LOOPBACK_LOCAL - Local Loop */

Continues >

SmartLibrary Command Reference: Volume 2

| 89

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* Idle cell definition */ unsigned char ucIdleCellHeaderGFC;/* Generic Flow Control in IdleCell/ UnassignedCell header Range: 0-15, Default:0 */ unsigned char ucIdleCellHeaderPTI;/* Payload Type Indicator in IdleCell/ UnassignedCell header AT_USRDATA_NOT_CONGESTED (Default) AT_USRDATA_CONGESTED */ unsigned char ucIdleCellHeaderCLP;/* Cell Loss Priority in IdleCell/ UnassignedCell header Range: 0-1, 1 - indicates a discardable cell Default: 0 */ unsigned char ucIdleCellPayloadByte;/* Payload bytes in IdleCell/ UnassignedCell header Range: 0x00-0xFF Default: 0x6A */ unsigned char unsigned char ucPathSignalLabel;/* AT_PATH_SIGNAL_LABEL_ATM (Default) */

ucHecErrorHandlingMode; /* AT_HEC_ERROR_HANDLING_PASS - Pass. SUNI will pass the cell as is to the upper layer process. The upper layer might correct and use the cell or drop it. AT_HEC_ERROR_HANDLING_DISCARD - Discard. SUNI will discard the cell if it detects a HEC error. AT_HEC_ERROR_HANDLING_CORRECT - Correct. (Default), SUNI will correct and pass any single-bit HEC error cell and drop any multiple-bit HEC errored cells. */ unsigned char ucSONETCountMode; /* AT_ERROR_COUNT_INDIVIDUAL - Individual (Default) AT_ERROR_COUNT_BLOCK - Block */ unsigned short uiMaxCLIPInARPRate; /* Maximum rate of Inverse ATM ARP request and unsolicited Inverse ATM ARP reply messages, in the unit of number of Inverse ATP ARPs per second. Range: 0 - 200 Default: 10 If 0 is entered, default value 10 will be assigned. */

Continues >

90 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

unsigned long

unsigned long

unsigned long

unsigned long

ulVCInterleaveDepth; /* Maximum number of interleaved VCs. It is the maximum number of VCs that the scheduler is allowed to interleave frames on. Range: 0-8191 Default: AT_VC_INTERLEAVE_ALL If 0 is entered, the default value is assigned */ ulMaxRxCutThroughBufferSize;/* Maximum receive Cut Through buffer size allocated for the port (bytes) Default: AT_PORT_RX_CT_BUFFER_SIZE If 0 is entered, default value AT_PORT_RX_CT_BUFFER_SIZE will be assigned.*/ ulErrorInjection; /* 0 (for no error) (Default) AT_SONET_CELL_HEC_ALARM, AT_SONET_PATH_RDI_ALARM, AT_SONET_PATH_AIS_ALARM, AT_SONET_PATH_BIP_ALARM, AT_SONET_LINE_RDI_ALARM, AT_SONET_LINE_AIS_ALARM, AT_SONET_LINE_BIP_ALARM, AT_SONET_SECTION_LOS_ALARM, AT_SONET_SECTION_LOF_ALARM, AT_SONET_SECTION_BIP_ALARM */ ulFlags; /* To set the restriction for bad frame lengths in latency measurement now AT_PORT_DEFAULT_FLAGS (Default) AT_PORT_ALLOW_ALL_FRAME_SIZES */

/* Output */ unsigned long unsigned long unsigned char }ATPortConfig;

ulConfiguredCellRate; /* Configured cell rate on the port */ ulVCCount; /* number of VC's configured on the port */ ucReserved[64];/* Reserved */

SmartLibrary Command Reference: Volume 2

| 91

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_PORT_CONFIG_INFO
Retrieve ATM-345xA(s) port parameters. HTGetStructure(AT_PORT_CONFIG_INFO, 0, 0, 0, (void*) pATPortConfig, sizeof(ATPortConfig), iHub, iSlot, iPort); HTGetStructure $AT_PORT_CONFIG_INFO 0 0 0 \ myATPortConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATPortConfig

This structure is used to set up and retrieve the ATM-345xA(s) port configuration. For some frame sizes, latency measurements in the ATM-345xA(s) modules will result in inaccurate values. Refer to the Overview and Procedures manual, Chapter 14: ATM Testing - SmartBits 600x/6000x for details. To help compensate for this limitation, a dual-state variable is implemented in the module, on a per-port basis. You can select one of these modes in the port configuration (ulFlags with AT_PORT_CONFIG). The two options are: 1 Reject bad frame sizes (AT_PORT_DEFAULT_FLAGS). If you select this option (the default), stream configurations that contain frame sizes that will cause a bad measurement will be rejected. Encapsulation sizes will be taken into account in this algorithm. The reject will occur during the NS_COMMIT_CONFIG command. Ignore the issue (AT_PORT_ALLOW_ALL_FRAME_SIZES). If you select this option, the streams will be committed with the configured value of frame size. This assumes that you are primarily interested in measuring throughput for this frame size and not in measuring the latency.

typedef struct tagATPortConfigInfo { unsigned char ucInterfaceSpeed;/* AT_SPEED_OC3 (OC3 - 155) - Default, AT_SPEED_OC12 (OC12 - 622)*/ unsigned char ucFramingMode; /* Physical layer framing AT_SONET_FRAMING - SONET (Default), AT_SDH_FRAMING - SDH */ unsigned char ucTxClockSource;/* AT_INTERNAL_CLOCK - Internal Clock (Default), AT_LOOP_TIMED_CLOCK - Loop Timed */ unsigned char ucCellScramblingMode;/* AT_CELL_SCRAMBLING_OFF - Off, AT_CELL_SCRAMBLING_PAYLOAD - Scramble Payload (Default), */ unsigned char ucHecCosetEnable;/* 0 - disable HEC Coset usage, 1 - enable HEC Coset usage (Default) If enabled, the coset polynomial x^6+x^4+x^2+1 is added to the received Header Checksum octet prior to comparison with the calculated result. If disabled, the coset polynomial wont be added. */ unsigned char ucLoopbackMode;/* AT_LOOPBACK_DISABLED - Off (Default), AT_LOOPBACK_LOCAL - Local Loop */

Continues >

92 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* Idle cell definition */ unsigned char ucIdleCellHeaderGFC;/* Generic Flow Control in IdleCell/ UnassignedCell header Range: 0-15, Default:0 */ unsigned char ucIdleCellHeaderPTI;/* Payload Type Indicator in IdleCell/ UnassignedCell header AT_USRDATA_NOT_CONGESTED (Default) AT_USRDATA_CONGESTED unsigned char ucIdleCellHeaderCLP;/* Cell Loss Priority in IdleCell/ UnassignedCell header Range: 0-1, 1 - indicates a discardable cell Default: 0 */ unsigned char ucIdleCellPayloadByte;/* Payload bytes in IdleCell/ UnassignedCell header Range: 0x00-0xFF Default: 0x6A */ unsigned char unsigned char ucPathSignalLabel;/* AT_PATH_SIGNAL_LABEL_ATM (Default) */

ucHecErrorHandlingMode; /* AT_HEC_ERROR_HANDLING_PASS - Pass, Neither is single bit HEC error corrected, nor are multiple HEC errors detected. The cells are just passed up AT_HEC_ERROR_HANDLING_DISCARD - Discard, If any HEC error is detected, the cells are discarded. AT_HEC_ERROR_HANDLING_CORRECT - Correct (Default), Single bit HEC error is corrected, multiple HEC errors are detected, and the cells are passed up. */ unsigned char ucSONETCountMode; /* AT_ERROR_COUNT_INDIVIDUAL - Individual (Default) AT_ERROR_COUNT_BLOCK - Block */ unsigned short uiMaxCLIPInARPRate; /* Maximum rate of Inverse ATM ARP request and unsolicited Inverse ATM ARP reply messages, in the unit of number of Inverse ATP ARPs per second. Range: 0 - 200 Default: 10 If 0 is entered, default value 10 will be assigned. */

Continues >

SmartLibrary Command Reference: Volume 2

| 93

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

unsigned long

unsigned long

unsigned long

unsigned long

ulVCInterleaveDepth; /* Maximum number of interleaved VCs. It is the maximum number of VCs that the scheduler is allowed to interleave frames on. Range: 0-8191 Default: AT_VC_INTERLEAVE_ALL If 0 is entered, the default value is assigned */ ulMaxRxCutThroughBufferSize;/* Maximum receive Cut Through buffer size allocated for the port (bytes) Default: AT_PORT_RX_CT_BUFFER_SIZE If 0 is entered, default value AT_PORT_RX_CT_BUFFER_SIZE will be assigned.*/ ulErrorInjection; /* 0 (for no error) (Default) AT_SONET_CELL_HEC_ALARM, AT_SONET_PATH_RDI_ALARM, AT_SONET_PATH_AIS_ALARM, AT_SONET_PATH_BIP_ALARM, AT_SONET_LINE_RDI_ALARM, AT_SONET_LINE_AIS_ALARM, AT_SONET_LINE_BIP_ALARM, AT_SONET_SECTION_LOS_ALARM, AT_SONET_SECTION_LOF_ALARM, AT_SONET_SECTION_BIP_ALARM */ ulFlags; /* To set the restriction for bad frame lengths in latency measurement now AT_PORT_DEFAULT_FLAGS (Default) AT_PORT_ALLOW_ALL_FRAME_SIZES */

/* Output */ unsigned long unsigned long unsigned char }ATPortConfig;

ulConfiguredCellRate;/* Configured cell rate on the port */ ulVCCount; /* number of VC's configured on the port */ ucReserved[64];/* Reserved */

94 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_PORT_COUNTER_INFO
Retrieve transmit and receive statistics: cell/frame counts and cell/frame rates on an ATM345xA(s) port. HTGetStructure(AT_PORT_COUNTER_INFO, 0, 0, 0, (void*) pATPortCounterInfo, sizeof(ATPortCounterInfo), iHub, iSlot, iPort); HTGetStructure $AT_PORT_COUNTER_INFO 0 0 0 \ myATPortCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATPortCounterInfo

This structure is used to get the cell/frame counts and cell/frame rates per ATM-345xA(s) port. typedef struct tagATPortCounterInfo { /* Transmitter - Counts */ U64 u64TxAssignedCells; U64 u64TxAAL0Cells; U64 u64TxAAL5Frames; U64 u64TxAAL5FrameBytes; /* Receiver - Counts */ U64 u64RxCells; U64 u64RxTaggedCells; U64 u64RxCongestedCells; U64 U64 U64 U64 U64 U64 u64RxHecCorrErrorCells; u64RxHecUncorrErrorCells; u64RxAAL0Cells; u64RxAAL5Frames; u64RxAAL5FrameBytes; u64RxCRCErredAAL5Frames;

/* /* /* /*

Transmitted Transmitted Transmitted Transmitted

cells */ AAL0 cells */ AAL5 frames */ bytes of AAL5 frames */

/* Received /* Received /* Received field */ /* Received /* Received /* Received /* Received /* Received /* Received

cells */ cells with CLP bit on (CLP=1) */ cells with congestion bit on in PTI HEC error corrected cell */ HEC error non-corrected cell */ AAL0 cells */ AAL5 frames */ bytes of AAL5 frames */ AAL5 frames with CRC error */

/* Transmitter - Rates */ unsigned long ulTxCellRate;

/* Transmit cell rate */

Continues >

SmartLibrary Command Reference: Volume 2

| 95

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* Receiver - Rates */ unsigned long ulRxCellRate; /* Receive cell rate */ unsigned long ulRxTaggedCellRate; /* Receive rate of cells with CLP bit on (CLP=1) */ unsigned long ulRxCongestedCellRate; /* Receive rate of cells with congestion bit on in PTI field */ unsigned long ulRxHecCorrErrorRate; /* Receive rate of cells with HEC error corrected */ unsigned long ulRxHecUncorrErrorRate; /* Receive rate of cells with HEC error noncorrected */ unsigned char ucReserved[64]; } ATPortCounterInfo; /* Reserved */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

iType1 Description C Usage

AT_SET_SPEED
Set the port speed on an ATM-345xA(s) module to OC3 or OC12. HTSetStructure(AT_SET_SPEED, 0, 0, 0, pATCardSetSpeed, iHub, iSlot, iPort); HTSetStructure $AT_SET_SPEED 0 0 0 \ myATCardSetSpeed \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATCardSetSpeed

Set the port speed on an ATM-345xA(s) module to OC3 or OC12. typedef struct tagATCardSetSpeed { unsigned short uiSpeed; /* AT_SPEED_OC3 (Default) AT_SPEED_OC12 */ } ATCardSetSpeed;

96 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_STREAM_TX_COUNTER_INFO
Retrieve the stream transmit statistics -the transmit frame count - on a per-stream basis, on an ATM-345xA(s) module. HTGetStructure(AT_STREAM_TX_COUNTER_INFO, <index>, 0, 0, (void*) pATStreamCounterInfo, sizeof(ATStreamCounterInfo), iHub, iSlot, iPort); HTGetStructure $AT_STREAM_TX_COUNTER_INFO <index> 0 0 \ myATStreamCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATStreamCounterInfo

This structure is used to retrieve the stream transmit statistics - the transmit frame count - on a per-stream basis, on an ATM345xA(s) module. typedef struct tagATStreamCounterInfo { U64 u64TxFrameCount; /* Transmitted frames */ unsigned char ucReserved[64]; /* Reserved */ }ATStreamCounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

SmartLibrary Command Reference: Volume 2

| 97

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_VC_CLIP_COUNTER_INFO
Retrieve CLIP related statistics on a VC. HTGetStructure(AT_VC_CLIP_COUNTER_INFO, <index>, 0, 0, (void*) pATVCCLIPCounterInfo, sizeof(ATVCCLIPCounterInfo), iHub, iSlot, iPort); HTGetStructure $AT_VC_CLIP_COUNTER_INFO <index> 0 0 \ myATVCCLIPCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATVCCLIPCounterInfo

This structure is used to retrieve CLIP related statistics of a VC on an ATM-345xA(s) port. typedef struct tagATVCCLIPCounterInfo { unsigned long ulRxInARPRequest; /* unsigned long ulTxInARPRequest; /* unsigned long ulRxInARPReply; /* unsigned long ulTxInARPReply; /* unsigned long ulRxARPRequest; /* unsigned long ulRxARPReply; /* unsigned long ulRxARPNAKs; /* unsigned long ulRxInvalidMessage; /*

unsigned char ucReserved[64]; } ATVCCLIPCounterInfo;

Received Inverse ATM ARP Requests */ Transmitted Inverse ATM ARP Requests */ Received Inverse ATM ARP Replies */ Transmitted Inverse ATM ARP Replies */ Received ATM ARP Requests */ Received ATM ARP Replies */ Received ATM ARP NAKs */ Received Invalid Messages Invalid Message includes: - Any of the message fields length exceed limits as specified in the RFC (i.e. ATM addresses > 20, protocol address > 4. - If the total length of the message exceeds the length calculated from each of the fields. - If the message is not an ATM ARP or Inverse ATM ARP message. - If the message protocol type is not IPv4 */ /* Reserved */

98 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description

AT_VC_COPY
Copy the configuration of an existing VC of vc_index to a group of VCs starting at vc_index+1 for a number of count VCs. As the copy is made, the configuration is modified by adding the specified uiVPI and uiVCI values to the previous configuration. HTSetStructure(AT_VC_COPY, <index>, <count>, 0, (void*) pATVC, sizeof(ATVC), iHub, iSlot, iPort); HTSetStructure $AT_VC_COPY <index> <count> 0 \ myATVC \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

ATVC

This structure is used to create / delete / modify a single VC or multiple VCs, or copy a previously configured VC of vc_index to a group of VC starting at vc_index+1 for a number of vc_count, or retrieve the information of a particular VC specified by vc_index, on an ATM-345xA(s) port.
typedef struct tagATVC { unsigned char ucTxEnable; unsigned char ucRxEnable;

/* 0 - disable, 1 - enable VC on transmitter, */ /* 0 - disable , 1 - enable VC on receiver*/

/* Connection parameters */ unsigned char ucConnType; /* Connection type AT_STR_CONN_TYPE_PVC */ unsigned short uiVPI; /* Virtual Path Identifier in cell header Range: 0-255 NOTE: only up to 63 unique ucVPI in the value range of 0-255 can be configured on a receiving port. */ unsigned short uiVCI; /* Virtual Channel Identifier in cell header Range: 0-65535 */ unsigned char ucGFC; /* Generic Flow Control Payload Range: 0-15 */ unsigned char ucPTI; /* Payload Type Indicator in cell header AT_USRDATA_NOT_CONGESTED AT_USRDATA_CONGESTED */ unsigned char ucAALType; /* AAL types AT_AAL5 */

unsigned char ucEncapType; /* Encapsulation type AT_ENCAP_TYPE_NULL AT_ENCAP_TYPE_VCMUX_ROUTED AT_ENCAP_TYPE_VCMUX_BRIDGED AT_ENCAP_TYPE_VCMUX_MPLS AT_ENCAP_TYPE_LLC_ROUTED AT_ENCAP_TYPE_LLC_BRIDGED The encapsulation should be the same on the transmit and receive sides in order for the card to update the counters properly */

Continues >

SmartLibrary Command Reference: Volume 2

| 99

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* Custom header setup */ unsigned char ucCustomHeaderEnable; /* Custom Header flag 0 - disable 1 - enable customized VC encapsulation */ /* Custom Header Length of VC encapsulation, parameter range 1-12 */ /* Custom Header of VC encapsulation The ucCustomHeaderLength field determines the length of ucCustomHeader[] used. */

unsigned char ucCustomHeaderLength;

unsigned char ucCustomHeader[12];

unsigned char ucReserved1; /* Reserved for AAL0 data integrity check enable */ unsigned char ucCaptureEnable; /* 0 -disable, 1 -enable receive capture on VC */ unsigned char ucRateClass; /* Rate class of service AT_RATE_CLASS_CBR, AT_RATE_CLASS_UBR */ /* Peak Cell Rate (cells/sec), cannot oversubscribe, Range: 0 - 353207 (for speed OC3) 0 - 1412830 (for speed 0C12) */ /* Cell Delay Variation Tolerance in millisecond unit, Default: 1 */ /* Receive Cut Through buffer size allocated for the VC (bytes) Range: 1-65535 Suggest to use 1500 (AT_VC_RX_CT_BUFFER_SIZE). Sum of all VCs must not exceed total for port. */ /* Reserved, MUST be zero */ /* Specify expected receive cut through protocol if encapsulation ucEncapType == AT_ENCAP_TYPE_NULL. Use 0x00 - No cut through null protocol */

unsigned long ulPCR;

unsigned long ulATCDVT;

unsigned long

ulRxCutThroughBufferSize;

unsigned char ucRxCutThroughFilter; unsigned short uiRxCutThroughNullProtocol;

unsigned long

ulTxMode;

unsigned long unsigned long unsigned long

/* Packet transmit mode CONTINUOUS_PACKET_MODE SINGLE_BURST_MODE CONTINUOUS_BURST_MODE MULTI_BURST_MODE */ ulBurstCount; /* The burst number */ ulMburstCount; /* The multi burst number */ ulBurstGap; /* The gap between bursts in milliseconds */

Continues >

100 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* CLIP set up */ unsigned char ucCLIPInARPEnable; /* Applicable only when ucEncapType = AT_ENCAP_TYPE_LLC_ROUTED, and ucAALType = AT_AAL5 0 - disable, 1 - enable sending Inverse ATM ARP Requests and Replies. */ unsigned char ucCLIPUnSolicitedInARPReplyEnable; /* Applicable only when ucEncapType = AT_ENCAP_TYPE_LLC_ROUTED, and ucAALType = AT_AAL5 0 - disable, 1 - enable sending unsolicited Inverse ATM ARP Reply packets at the time of VC configuration */ unsigned short uiCLIPInARPTimeInterval; /* Specifies how frequently (in seconds) Inverse ATM ARP Requests will be sent out. Applicable only when ucCLIPInARPEnable = 1 (enabled) Range: 0-65534 0 -send Inverse ATM ARP request once only Default: 600 */ unsigned char ucCLIPIPAddress[4]; /* Used as the source protocol address in the Inverse ATM ARP Request. */ /* Output */ unsigned long ulConfiguredCellRate; unsigned char ucReserved[50]; }ATVC;

/* Accumulated sum of stream cell rates */ /* Reserved */

SmartLibrary Command Reference: Volume 2 | 101

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_VC_COUNTER_INFO
Retrieve the transmit and receive statistics - the cell/frame counts and cell/frame rates - of a particular VC specified by vc_index, on ATM-345xA(s) modules. HTGetStructure(AT_VC_COUNTER_INFO, <index>, 0, 0, (void*) pATVCCounterInfo, sizeof(ATVCCounterInfo), iHub, iSlot, iPort); HTGetStructure $AT_VC_COUNTER_INFO <index> 0 0 \ myATVCCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATVCCounterInfo

This structure is used to retrieve the transmit and receive statisticsthe cell/frame counts and cell/frame ratesof a particular VC specified by vc_index, on ATM-345xA(s) modules. typedef struct tagATVCCounterInfo { /* Transmitter - Counts */ U64 u64TxCells; /* Transmitted cells */ U64 u64TxAAL5Frames; /* Transmitted AAL5 frames */ /* Receiver - Counts */ U64 u64RxCells; /* Received cells */ U64 u64RxAAL5Frames; /* Received AAL5 frames */ U64 u64RxCRCErredAAL5Frames; /* Received CRC error AAL5 frames */ unsigned char ucReserved[64]; /* Reserved */ }ATVCCounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

102 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description

AT_VC_CREATE
Configure a VC of <index>, or a <count> of VCs starting at the <index>. If a <count> of VCs are created, the uiVCI and VC index are incremented based on the specified uiVCI and <index>. The maximum number of VCs that can be configured is 8191. The valid range of VC index is 0-8190. HTSetStructure(AT_VC_CREATE, <index>, <count>, 0, (void*) pATVC, sizeof(ATVC), iHub, iSlot, iPort); HTSetStructure $AT_VC_CREATE <index> <count> 0 \ myATVC \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

ATVC

This structure is used to create one or a group of VCs, modify one VC, copy an existing VC to create a group of VCs, or retrieve the information of one VC on ATM-345xA(s) modules.
typedef struct tagATVC { unsigned char ucTxEnable; unsigned char ucRxEnable;

/* 0 - disable, 1 - enable VC on transmitter, */ /* 0 - disable , 1 - enable VC on receiver*/

/* Connection parameters */ unsigned char ucConnType; /* Connection type AT_STR_CONN_TYPE_PVC */ unsigned short uiVPI; /* Virtual Path Identifier in cell header Range: 0-255 NOTE: only up to 63 unique ucVPI in the value range of 0-255 can be configured on a receiving port. */ unsigned short uiVCI; /* Virtual Channel Identifier in cell header Range: 0-65535 */ unsigned char ucGFC; /* Generic Flow Control Payload Range: 0-15 */ unsigned char ucPTI; /* Payload Type Indicator in cell header AT_USRDATA_NOT_CONGESTED AT_USRDATA_CONGESTED */ unsigned char ucAALType; /* AAL types AT_AAL5 */

unsigned char ucEncapType; /* Encapsulation type AT_ENCAP_TYPE_NULL AT_ENCAP_TYPE_VCMUX_ROUTED AT_ENCAP_TYPE_VCMUX_BRIDGED AT_ENCAP_TYPE_VCMUX_MPLS AT_ENCAP_TYPE_LLC_ROUTED AT_ENCAP_TYPE_LLC_BRIDGED The encapsulation should be the same on the transmit and receive sides in order for the card to update the counters properly */

Continues >

SmartLibrary Command Reference: Volume 2 | 103

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* Custom header setup */ unsigned char ucCustomHeaderEnable;

unsigned char ucCustomHeaderLength;

unsigned char ucCustomHeader[12];

/* Custom Header flag 0 - disable 1 - enable customized VC encapsulation */ /* Custom Header Length of VC encapsulation, parameter range 1-12 */ /* Custom Header of VC encapsulation The ucCustomHeaderLength field determines the length of ucCustomHeader[] used. */

unsigned char ucReserved1; /* Reserved for AAL0 data integrity check enable */ unsigned char ucCaptureEnable; /* 0 -disable, 1 -enable receive capture on VC */ unsigned char ucRateClass; /* Rate class of service AT_RATE_CLASS_CBR, AT_RATE_CLASS_UBR */ /* Peak Cell Rate (cells/sec), cannot oversubscribe, Range: 0 - 353207 (for speed OC3) 0 - 1412830 (for speed 0C12) */ /* Cell Delay Variation Tolerance in millisecond unit, Default: 1 */ /* Receive Cut Through buffer size allocated for the VC (bytes) Range: 1-65535 Suggest to use 1500 (AT_VC_RX_CT_BUFFER_SIZE). Sum of all VCs must not exceed total for port. */ /* Reserved, MUST be zero */ /* Specify expected receive cut through protocol if encapsulation ucEncapType == AT_ENCAP_TYPE_NULL. Use 0x00 - No cut through null protocol */

unsigned long ulPCR;

unsigned long ulATCDVT;

unsigned long

ulRxCutThroughBufferSize;

unsigned char ucRxCutThroughFilter; unsigned short uiRxCutThroughNullProtocol;

unsigned long

ulTxMode;

unsigned long unsigned long unsigned long

/* Packet transmit mode CONTINUOUS_PACKET_MODE SINGLE_BURST_MODE CONTINUOUS_BURST_MODE MULTI_BURST_MODE */ ulBurstCount; /* The burst number */ ulMburstCount; /* The multi burst number */ ulBurstGap; /* The gap between bursts in milliseconds */

Continues >

104 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* CLIP set up */ unsigned char ucCLIPInARPEnable; /* Applicable only when ucEncapType = AT_ENCAP_TYPE_LLC_ROUTED, and ucAALType = AT_AAL5 0 - disable, 1 - enable sending Inverse ATM ARP Requests and Replies. */ unsigned char ucCLIPUnSolicitedInARPReplyEnable; /* Applicable only when ucEncapType = AT_ENCAP_TYPE_LLC_ROUTED, and ucAALType = AT_AAL5 0 - disable, 1 - enable sending unsolicited Inverse ATM ARP Reply packets at the time of VC configuration */ unsigned short uiCLIPInARPTimeInterval; /* Specifies how frequently (in seconds) Inverse ATM ARP Requests will be sent out. Applicable only when ucCLIPInARPEnable = 1 (enabled) Range: 0-65534 0 -send Inverse ATM ARP request once only Default: 600 */ unsigned char ucCLIPIPAddress[4]; /* Used as the source protocol address in the Inverse ATM ARP Request. */ /* Output */ unsigned long ulConfiguredCellRate; unsigned char ucReserved[50]; }ATVC;

/* Accumulated sum of stream cell rates */ /* Reserved */

SmartLibrary Command Reference: Volume 2 | 105

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_VC_DELETE
Delete one or more VCs, as specified by <index> and <count> starting at the index. HTSetCommand(AT_VC_DELETE, <index>, <count>, 0, NULL, iHub, iSlot, iPort); HTSetCommand $AT_VC_DELETE <index> <count> 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

iType1 Description C Usage

AT_VC_DELETE_ALL
Delete all VCs on the port. HTSetCommand(AT_VC_DELETE_ALL, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $AT_VC_DELETE_ALL 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

106 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_VC_INFO
Retrieve the infomation of one VC of <index>. HTGetStructure(AT_VC_INFO, <index>, 0, 0, (void*) pATVC, sizeof(ATVC), iHub, iSlot, iPort); HTGetStructure $AT_VC_INFO <index> 0 0 \ myATVC \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATVC

This structure is used to create one or a group of VCs, modify one VC, copy an existing VC to create a group of VCs, or retrieve the information of one VC on ATM-345xA(s) modules.
typedef struct tagATVC { unsigned char ucTxEnable; unsigned char ucRxEnable;

/* 0 - disable, 1 - enable VC on transmitter, */ /* 0 - disable , 1 - enable VC on receiver*/

/* Connection parameters */ unsigned char ucConnType; /* Connection type AT_STR_CONN_TYPE_PVC */ unsigned short uiVPI; /* Virtual Path Identifier in cell header Range: 0-255 NOTE: only up to 63 unique ucVPI in the value range of 0-255 can be configured on a receiving port. */ unsigned short uiVCI; /* Virtual Channel Identifier in cell header Range: 0-65535 */ unsigned char ucGFC; /* Generic Flow Control Payload Range: 0-15 */ unsigned char ucPTI; /* Payload Type Indicator in cell header AT_USRDATA_NOT_CONGESTED AT_USRDATA_CONGESTED */ unsigned char ucAALType; /* AAL types AT_AAL5 */

unsigned char ucEncapType; /* Encapsulation type AT_ENCAP_TYPE_NULL AT_ENCAP_TYPE_VCMUX_ROUTED AT_ENCAP_TYPE_VCMUX_BRIDGED AT_ENCAP_TYPE_VCMUX_MPLS AT_ENCAP_TYPE_LLC_ROUTED AT_ENCAP_TYPE_LLC_BRIDGED The encapsulation should be the same on the transmit and receive sides in order for the card to update the counters properly */

Continues >

SmartLibrary Command Reference: Volume 2 | 107

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* Custom header setup */ unsigned char ucCustomHeaderEnable;

unsigned char ucCustomHeaderLength;

unsigned char ucCustomHeader[12];

/* Custom Header flag 0 - disable 1 - enable customized VC encapsulation */ /* Custom Header Length of VC encapsulation, parameter range 1-12 */ /* Custom Header of VC encapsulation The ucCustomHeaderLength field determines the length of ucCustomHeader[] used. */

unsigned char ucReserved1; /* Reserved for AAL0 data integrity check enable */ unsigned char ucCaptureEnable; /* 0 -disable, 1 -enable receive capture on VC */ unsigned char ucRateClass; /* Rate class of service AT_RATE_CLASS_CBR, AT_RATE_CLASS_UBR */ /* Peak Cell Rate (cells/sec), cannot oversubscribe, Range: 0 - 353207 (for speed OC3) 0 - 1412830 (for speed 0C12) */ /* Cell Delay Variation Tolerance in millisecond unit, Default: 1 */ /* Receive Cut Through buffer size allocated for the VC (bytes) Range: 1-65535 Suggest to use 1500 (AT_VC_RX_CT_BUFFER_SIZE). Sum of all VCs must not exceed total for port. */ /* Reserved, MUST be zero */ /* Specify expected receive cut through protocol if encapsulation ucEncapType == AT_ENCAP_TYPE_NULL. Use 0x00 - No cut through null protocol */

unsigned long ulPCR;

unsigned long ulATCDVT;

unsigned long

ulRxCutThroughBufferSize;

unsigned char ucRxCutThroughFilter; unsigned short uiRxCutThroughNullProtocol;

unsigned long

ulTxMode;

unsigned long unsigned long unsigned long

/* Packet transmit mode CONTINUOUS_PACKET_MODE SINGLE_BURST_MODE CONTINUOUS_BURST_MODE MULTI_BURST_MODE */ ulBurstCount; /* The burst number */ ulMburstCount; /* The multi burst number */ ulBurstGap; /* The gap between bursts in milliseconds */

Continues >

108 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* CLIP set up */ unsigned char ucCLIPInARPEnable; /* Applicable only when ucEncapType = AT_ENCAP_TYPE_LLC_ROUTED, and ucAALType = AT_AAL5 0 - disable, 1 - enable sending Inverse ATM ARP Requests and Replies. */ unsigned char ucCLIPUnSolicitedInARPReplyEnable; /* Applicable only when ucEncapType = AT_ENCAP_TYPE_LLC_ROUTED, and ucAALType = AT_AAL5 0 - disable, 1 - enable sending unsolicited Inverse ATM ARP Reply packets at the time of VC configuration */ unsigned short uiCLIPInARPTimeInterval; /* Specifies how frequently (in seconds) Inverse ATM ARP Requests will be sent out. Applicable only when ucCLIPInARPEnable = 1 (enabled) Range: 0-65534 0 -send Inverse ATM ARP request once only Default: 600 */ unsigned char ucCLIPIPAddress[4]; /* Used as the source protocol address in the Inverse ATM ARP Request. */ /* Output */ unsigned long ulConfiguredCellRate; unsigned char ucReserved[50]; }ATVC;

/* Accumulated sum of stream cell rates */ /* Reserved */

SmartLibrary Command Reference: Volume 2 | 109

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

iType1 Description C Usage

AT_VC_MODIFY
Modify one VC as specified by the <index>. Note: To perform the modification, the same VPI and VCI must be used, but with changes to the specified fields. HTSetStructure(AT_VC_MODIFY, <index>, 0, 0, (void*) pATVC, sizeof(ATVC), iHub, iSlot, iPort); HTSetStructure $AT_VC_MODIFY <index> 0 0 \ myATVC \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ATVC

This structure is used to create one or a group of VCs, modify one VC, copy an existing VC to create a group of VCs, or retrieve the information of one VC on ATM-345xA(s) modules.
typedef struct tagATVC { unsigned char ucTxEnable; unsigned char ucRxEnable;

/* 0 - disable, 1 - enable VC on transmitter, */ /* 0 - disable , 1 - enable VC on receiver*/

/* Connection parameters */ unsigned char ucConnType; /* Connection type AT_STR_CONN_TYPE_PVC */ unsigned short uiVPI; /* Virtual Path Identifier in cell header Range: 0-255 NOTE: only up to 63 unique ucVPI in the value range of 0-255 can be configured on a receiving port. */ unsigned short uiVCI; /* Virtual Channel Identifier in cell header Range: 0-65535 */ unsigned char ucGFC; /* Generic Flow Control Payload Range: 0-15 */ unsigned char ucPTI; /* Payload Type Indicator in cell header AT_USRDATA_NOT_CONGESTED AT_USRDATA_CONGESTED */ unsigned char ucAALType; /* AAL types AT_AAL5 */

unsigned char ucEncapType; /* Encapsulation type AT_ENCAP_TYPE_NULL AT_ENCAP_TYPE_VCMUX_ROUTED AT_ENCAP_TYPE_VCMUX_BRIDGED AT_ENCAP_TYPE_VCMUX_MPLS AT_ENCAP_TYPE_LLC_ROUTED AT_ENCAP_TYPE_LLC_BRIDGED The encapsulation should be the same on the transmit and receive sides in order for the card to update the counters properly */

Continues >

110 |

SmartLibrary Command Reference: Volume 2

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* Custom header setup */ unsigned char ucCustomHeaderEnable;

unsigned char ucCustomHeaderLength;

unsigned char ucCustomHeader[12];

/* Custom Header flag 0 - disable 1 - enable customized VC encapsulation */ /* Custom Header Length of VC encapsulation, parameter range 1-12 */ /* Custom Header of VC encapsulation The ucCustomHeaderLength field determines the length of ucCustomHeader[] used. */

unsigned char ucReserved1; /* Reserved for AAL0 data integrity check enable */ unsigned char ucCaptureEnable; /* 0 -disable, 1 -enable receive capture on VC */ unsigned char ucRateClass; /* Rate class of service AT_RATE_CLASS_CBR, AT_RATE_CLASS_UBR */ /* Peak Cell Rate (cells/sec), cannot oversubscribe, Range: 0 - 353207 (for speed OC3) 0 - 1412830 (for speed 0C12) */ /* Cell Delay Variation Tolerance in millisecond unit, Default: 1 */ /* Receive Cut Through buffer size allocated for the VC (bytes) Range: 1-65535 Suggest to use 1500 (AT_VC_RX_CT_BUFFER_SIZE). Sum of all VCs must not exceed total for port. */ /* Reserved, MUST be zero */ /* Specify expected receive cut through protocol if encapsulation ucEncapType == AT_ENCAP_TYPE_NULL. Use 0x00 - No cut through null protocol */

unsigned long ulPCR;

unsigned long ulATCDVT;

unsigned long

ulRxCutThroughBufferSize;

unsigned char ucRxCutThroughFilter; unsigned short uiRxCutThroughNullProtocol;

unsigned long

ulTxMode;

unsigned long unsigned long unsigned long

/* Packet transmit mode CONTINUOUS_PACKET_MODE SINGLE_BURST_MODE CONTINUOUS_BURST_MODE MULTI_BURST_MODE */ ulBurstCount; /* The burst number */ ulMburstCount; /* The multi burst number */ ulBurstGap; /* The gap between bursts in milliseconds */

Continues >

SmartLibrary Command Reference: Volume 2 | 111

Chapter 2: TeraMetrics ATM (AT) AT iType1 Commands and Structures

/* CLIP set up */ unsigned char ucCLIPInARPEnable; /* Applicable only when ucEncapType = AT_ENCAP_TYPE_LLC_ROUTED, and ucAALType = AT_AAL5 0 - disable, 1 - enable sending Inverse ATM ARP Requests and Replies. */ unsigned char ucCLIPUnSolicitedInARPReplyEnable; /* Applicable only when ucEncapType = AT_ENCAP_TYPE_LLC_ROUTED, and ucAALType = AT_AAL5 0 - disable, 1 - enable sending unsolicited Inverse ATM ARP Reply packets at the time of VC configuration */ unsigned short uiCLIPInARPTimeInterval; /* Specifies how frequently (in seconds) Inverse ATM ARP Requests will be sent out. Applicable only when ucCLIPInARPEnable = 1 (enabled) Range: 0-65534 0 -send Inverse ATM ARP request once only Default: 600 */ unsigned char ucCLIPIPAddress[4]; /* Used as the source protocol address in the Inverse ATM ARP Request. */ /* Output */ unsigned long ulConfiguredCellRate; unsigned char ucReserved[50]; }ATVC;

/* Accumulated sum of stream cell rates */ /* Reserved */

112 |

SmartLibrary Command Reference: Volume 2

Chapter 3

10/100 Mb Ethernet (ETH)


This chapter describes the Message Function iType1 commands for 10/100 Mb Ethernet. These have the prefix ETH.

In this chapter...
Supported SmartCards and Modules . . . . 114 ETH HTSetStructure Summary . . . . 116 ETH HTGetStructure Summary . . . . 117 ETH HTSetCommand Summary . . . . 118 ETH iType1 Commands and Structures . . . . 119

SmartLibrary Command Reference: Volume 2 | 113

Chapter 3: 10/100 Mb Ethernet (ETH) Supported SmartCards and Modules

Supported SmartCards and Modules


The ETH Message Function commands (iType1s) and their related structures support the following SmartCards and modules. See Notes and Exceptions on page 115 for important information. You can use Original Functions (see Volume 1) to achieve some of the same actions performed by the Message Functions described in this chapter. Note: Refer to Chapter 1, Command Compatibility for complete information on the compatibility of commands with different cards and modules. The ETH Message Function commands (iType1s) support the following cards.
Table 3-1. Card and Module Support: ETH Message Function iType1 Commands
Chassis SmartCard or Module
ST-6410 SX-7210 ML-7710 ML-7711 ML-7711S ATM-3451A/As ATM-3453A/As

Description
10Base-T Ethernet, Full Duplex, 1-port 10/100Base-TX Ethernet, MII, 1-port 10/100Base-FX Ethernet, 1-port, SmartMetrics 10/100Base-FX Ethernet, 1-port, multi-mode, 1300nm, SmartMetrics 10/100Base-FX Ethernet, 1-port, single mode, 1310nm, SmartMetrics ATM OC3c (STM-1c), 2-port, multi-mode/single mode, 1300/1310nm, TeraMetrics ATM OC3cOC12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/1310nm, TeraMetrics 10/100Base-T Ethernet, 8-port 10/100Base-T Ethernet, 6-port, SmartMetrics 10/100Base-T Ethernet, 2-port, SmartMetrics 100Base-FX Ethernet, 6-port, multi-mode, 1300nm, SmartMetrics 100Base-FX Ethernet, 6-port, single mode, 1310nm, SmartMetrics 1000Base-SX Ethernet, 2-port, multi-mode, 850nm 1000Base-LX Ethernet, 2-port, single mode, 1310nm 1000Base-X Ethernet, GBIC, 1-port, SmartMetrics 10/100/1000Base-T Ethernet, Copper, 2-port, SmartMetric 10/100/1000Base-T, Copper, 2-port, TeraMetrics 10/100Base-TX Ethernet, Copper, 2-port, TeraMetrics

SmartBits 200/2000

SmartBits 600x/6000x
N/A N/A N/A

N/A

LAN-3100A LAN-3101A/B LAN-3102A LAN-3111A LAN-3111As LAN-3200A LAN-3200AS LAN-3201B/C LAN-3300A LAN-3301A LAN-3302A

N/A N/A N/A N/A N/A N/A N/A

114 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) Supported SmartCards and Modules

Table 3-1. Card and Module Support: ETH Message Function iType1 Commands (continued)
Chassis SmartCard or Module
LAN-3306A LAN-3320A LAN-3321A LAN-3324A LAN-3325A LAN-3327A LAN-3310A/ LAN-3311A POS-3500B POS-3500BS POS-3504As/AR POS-3505As/AR XLW-3720A XLW-3721A XFP-3730A XFP-3731A

Description
10/100Base-TX Ethernet, Copper, 4-port, TeraMetrics 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 1-port, TeraMetrics XD 1000Base-X Ethernet, GBIC, 2-port, SmartMetrics 1000Base-X Ethernet, GBIC, 2-port, TeraMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, multi-mode, 1300nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, single mode, 1310nm, SmartMetrics OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, SmartMetrics OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, TeraMetrics 10GBase-R Ethernet XENPAK MSA SmartMetrics 10GBase-R Ethernet XENPAK MSA TeraMetrics 10GBase-Ethernet XFP MSA, 1-port, 1-slot, SmartMetrics 10GBase-Ethernet XFP MSA, 1-port, 1-slot, TeraMetrics

SmartBits 200/2000
N/A N/A

SmartBits 600x/6000x

N/A N/A

N/A N/A N/A

Notes and Exceptions


The ETH commands (iType1s) and their related structures work with all Ethernet SmartCards and modules, with the following exceptions:

Parameters affecting MII registers cannot be used with the ST-6410 SmartCard. These iType1 commands include: ETH_WRITE_MII ETH_FIND_MII_INFO ETH_READ_MII_INFO The following work only with the SmartBits 1000, and SmartBits 2000 chassis: ETH_SELECT_RECEIVE ETH_SELECT_TRANSMIT

SmartLibrary Command Reference: Volume 2 | 115

Chapter 3: 10/100 Mb Ethernet (ETH) ETH HTSetStructure Summary

ETH HTSetStructure Summary


iType 1
ETH_COLLISION See Page 120 ETH_FILL_PATTERN See Page 128 ETH_LATENCY See Page 130 ETH_PROTOCOL_PARAMETERS See Page 134 ETH_RSMII See Page 137 ETH_TRANSMIT See Page 139 ETH_TRIGGER See Page 145 ETH_VLAN See Page 146 ETH_WRITE_MII See Page 147 0 0 0 ETHMII Write to a MII Address/Register. 0 0 0 ETHVLAN Send VLAN tag information. 0 0 0 ETHTrigger Set up triggers. 0 0 0 ETHTransmit Set up transmit parameters. 0 0 0 ETHRSMII 0 0 0 ETHProtocolParameters Set up ARP and/or PING packets for the cards local stack (as opposed to on a perstream basis). Set RMII/SMII parameters. 0 0 0 ETHLatency 0 0 0 UChar

2
0

3
0

4
0

pData
ETHCollision

Description
Set up collision mode. Note: May not be used with the ML7710/7711/7711s SmartCard. Set background pattern, using an array of unsigned chars. Set up latency test parameters.

116 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH HTGetStructure Summary

ETH HTGetStructure Summary


iType 1
ETH_CARD_INFO See Page 119 ETH_COUNTER_INFO See Page 121 ETH_ENHANCED_COUNTER_INFO See Page 122 ETH_ENHANCED_STATUS_INFO See Page 123 ETH_EXTENDED_CARD_INFO See Page 124 ETH_EXTENDED_COUNTER_INFO See Page 126 ETH_FILL_PATTERN_INFO See Page 128 ETH_FIND_MII_ADDR_INFO See Page 129 ETH_LATENCY_INFO See Page 131 ETH_PROTOCOL_PARAMETER_INFO See Page 131 ETH_READ_MII_INFO See Page 136 0 0 0 ETHMII 0 0 0 ETHLatencyInfo 0 0 0 ETHLatencyInfo 0 0 0 ETHMIII 0 0 0 UChar Retrieve the background pattern. Find first MII PHY address with a legal device. Get latency measurement report. Get latency measurement report. Read a specific MII address/ register. iType2 = PHY Address iType3 = Register. Get transmit parameters. 0 0 0 ETHExtendedCounterInfo 0 0 0 ETHExtendedCardInfo Get additional information about the current card state. Applies only to GX-1420B. Get additional counters. 0 0 0 ETHEnhancedStatusInfo Get status information. 0 0 0 ETHEnhancedCounterInfo Get additional counters. 0 0 0 ETHCounterInfo Get counters.

2
0

3
0

4
0

pData
ETHCardInfo

Description
Get information about a card.

ETH_TRANSMIT_INFO See Page 142

ETHTransmit

SmartLibrary Command Reference: Volume 2 | 117

Chapter 3: 10/100 Mb Ethernet (ETH) ETH HTSetCommand Summary

ETH HTSetCommand Summary


iType 1
ETH_CLEAR_PORT See Page 120 ETH_RESET_PORT See Page 137 ETH_SELECT_RECEIVE See Page 138 ETH_SELECT_TRANSMIT See Page 138 ETH_SET_SPEED See Page 138 0 0 0 pULong 0 0 0 0 Select port for transmit data; iType2 = transmission mode. Set the cards Tx speed. 0 0 0 0 0 0 0 0 Reset the card to a default condition. iType2 = reset type. Select port for receive data.

2
0

3
0

4
0

pData
0

Description
Clear counters.

118 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

ETH iType1 Commands and Structures


iType1 Description C Usage

ETH_CARD_INFO
Get information about a card. HTGetStructure(ETH_CARD_INFO, 0, 0, 0, (void*) pETHCardInfo, sizeof(ETHCardInfo), iHub, iSlot, iPort); HTGetStructure $ETH_CARD_INFO 0 0 0 \ myETHCardInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHCardInfo

This structure returns information about an Ethernet card. typedef struct tagETHCardInfo { unsigned short uiCardModel; /* card model: CM_UNKOWN, CM_NOT_PRESENT, CM_SE_6205, CM_SC_6305, CM_ST_6405, CM_ST_6410, CM_SX_7205, CM_SX_7405, CM_SX_7410, CM_TR_8405, CM_VG_7605, CM_L3_6705, CM_AT_9025, CM_AT_9155, CM_AS_9155, CM_AT_9155C, CM_GX_1405,CM_WN_3405, CM_AT_9015, CM_AT_9020, CM_AT_9034, CM_AT_9045, CM_AT_9622, CM_L3_6710, CM_SX_7210, CM_ML_7710, CM_ML_5710A */ char szCardModel[32]; /* card model identifier string */ char cPortID; /* card type character: A -- 10Mb Ethernet F -- 10/100Mb Fast Ethernet T -- 4/16Mb TokenRing V -- VG/AnyLan 3 -- Layer 3 10Mb Ethernet G -- Gigabit Ethernet S -- ATM Signaling N -- Not present */ unsigned short uiPortType; /* card type: CT_ACTIVE, CT_PASSIVE, CT_FASTX, CT_TOKENRING, CT_VG, CT_L3, CT_ATM, CT_GIGABIT, CT_ATM_SIGNALING, CT_NOT_PRESENT */ unsigned long ulPortProperties; /* card attributes bit values: CA_SIGNALRATE_100MB -- 100 MB capable CA_DUPLEX_FULL -- Full Duplex capable CA_DUPLEX_HALF -- Half Duplex capable

Continues >

SmartLibrary Command Reference: Volume 2 | 119

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

unsigned long } ETHCardInfo;

CA_CONNECT_MII -- MMI connector CA_CONNECT_TP -- Twisted Pair connector CA_CONNECT_BNC -- BNC connector CA_CONNECT_AUI -- AUI connector CA_CAN_ROUTE -- Routing capable CA_VFDRESETCOUNT -- Resets VFD1 &2 counter CA_SIGNALRATE_4MB -- 4 MB capable CA_SIGNALRATE_16MB -- 16 MB capable CA_CAN_COLLIDE -- Generates collisions CA_SIGNALRATE_25MB -- 25 MB capable CA_SIGNALRATE_155MB -- 155 MB capable CA_BUILT_IN_ADDRESS -- Has a built in address CA_HAS_DEBUG_MONITOR -- Allows Debug monitoring CA_SIGNALRATE_1000MB -- 1 GB capable CA_CONNECT_FIBER -- Fiber optic connector CA_CAN_CAPTURE -- Has capture capability CA_ATM_SIGNALING -- Performs ATM Signaling */ ulHWVersions[32]; /* card version information */

iType1 Description C Usage

ETH_CLEAR_PORT
Clear counters. ETH_CLEAR_PORT, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $ETH_CLEAR_PORT 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

iType1 Description C Usage

ETH_COLLISION
Set up the collision mode. Note: May not be used with the ML-7710/7711/7711S, LAN-3100A, 3101A/B, 3102A, LAN-33xxA. HTSetStructure(ETH_COLLISION, 0, 0, 0, (void*) pETHCollision, sizeof(ETHCollision), iHub, iSlot, iPort); HTSetStructure $ETH_COLLISION 0 0 0 \ myETHCollision \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Continues >

120 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

Related Structure

ETHCollision

This structure sets up the collision mode for an Ethernet card. The following constants have been defined: uiMode: COLLISION_OFFCollision off COLLISION_LONGLong collision COLLISION_ADJAdjustable collision CORP_ACollision on receive packet, Port A CORP_BCollision on receive packet, Port B Notes: This command is not supported for the ML-7710/7711/7711S, LAN-3100A, 3101A/B, 3102A, LAN-3301A. To generate collisions for these cards: 1. Set the port speed that supports HALF_DUPLEX mode. 2. Set both transmit and receive ports to HALF_DUPLEX mode. 3. Begin to transmit, and retrieve collision counter from HTCountStructure typedef struct tagETHCollision { unsigned int uiOffset; /* offset in bits where collision will take place */ unsigned int uiDuration; /* duration in bits of the collision */ unsigned int uiCount; /* specifies the number of consecutive collisions, up to 1024; 0 = continuous collisions */ unsigned int uiMode; /* collision mode, see values above */ } ETHCollision;

iType1 Description

ETH_COUNTER_INFO
Get counters. To generate collision errors on the ML-7710/7711/7711S, and ML-5710A cards when testing back-to-back, set the transmitting and receiving ports to half-duplex mode before transmitting. HTGetStructure(ETH_COUNTER_INFO, 0, 0, 0, (void*) pETHCounterInfo, sizeof(ETHCounterInfo), iHub, iSlot, iPort); HTGetStructure $ETH_COUNTER_INFO 0 0 0 \ myETHCounterInfo \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

ETHCounterInfo
Continues >

This structure returns counter information about an Ethernet card.

SmartLibrary Command Reference: Volume 2 | 121

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

typedef struct { unsigned long unsigned long unsigned long unsigned long unsigned long unsigned long unsigned long unsigned long

tagETHCounterInfo ulRxFrames; ulTxFrames; ulCollisions; ulRxTriggers; ulRxBytes; ulCRCErrors; ulAlignErrors; ulOversize; /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* number number number number number number number number number number number number number number number number number number of of of of of of of of of of of of of of of of of of frames received */ frames transmitted */ collisions */ triggers received */ bytes received */ CRC errors received */ alignment errors detected */ oversize errors detected */ undersize errors detected */ frames transmitted per second */ frames received per second */ CRC errors received per second */ oversize errors per second */ undersize errors per second */ collisions per second */ alignment errors per second */ triggers received per second */ bytes receive per second */

unsigned long ulUndersize; unsigned long ulTxFrameRate; unsigned long ulRxFrameRate; unsigned long ulCRCErrorRate; unsigned long ulOversizeRate; unsigned long ulUndersizeRate; unsigned long ulCollisionErrorRate; unsigned long ulAlignErrorRate; unsigned long ulRxTriggerRate; unsigned long ulRxByteRate; } ETHCounterInfo;

iType1 Description C Usage

ETH_ENHANCED_COUNTER_INFO
Get additional counters. HTGetStructure(ETH_ENHANCED_COUNTER_INFO, 0, 0, 0, (void*) pETHEnhancedCounterInfo, sizeof(ETHEnhancedCounterInfo), iHub, iSlot, iPort); HTGetStructure $ETH_ENHANCED_COUNTER_INFO 0 0 0 \ myETHEnhancedCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHEnhancedCounterInfo

This structure returns additional counter information about an Ethernet card. Use the same constants defined for HTGetEnhancedCounters in et1000.h. typedef struct tagETHEnhancedCounterInfo { unsigned int uiMode; /* 0 = count, 1 = rate */ unsigned int uiPortType; /* card type returned, CT_XXX */ unsigned long ulMask1; /* bit mask for standard counters */ unsigned long ulMask2; /* bit mask for card-specific counters */ unsigned long ulData[64]; /* array of counters returned */ } ETHEnhancedCounterInfo;

122 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_ENHANCED_STATUS_INFO
Get status information. HTGetStructure(ETH_ENHANCED_STATUS_INFO, 0, 0, 0, (void*) pETHEnhancedStatusInfo, sizeof(ETHEnhancedStatusInfo), iHub, iSlot, iPort); HTGetStructure $ETH_ENHANCED_STATUS_INFO 0 0 0 \ myETHEnhancedStatusInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHEnhancedStatusInfo

This structure returns status information about an Ethernet card. typedef struct tagETHEnhancedStatusInfo { unsigned long ulStatus; /* status bit values: TR_STATUS_ACCESSED TR_STATUS_BADSTREAM TR_STATUS_BURST_MODE TR_STATUS_BEACONING TR_STATUS_DEVICE TR_STATUS_EARLY_TOKEN_RELEASE TR_STATUS_FULL_DUPLEX TR_STATUS_16MB TR_STATUS_RING_ALIVE TR_STATUS_LATENCY_STABLE TR_STATUS_TRANSMITTING GIG_STATUS_LINK GIG_STATUS_TX_PAUSE GIG_STATUS_CAPTURED_FRAMES GIG_STATUS_CAPTURE_STOPPED FAST7410_STATUS_TX_PAUSE L3_STATUS_6710 VG_STATUS_MODE FR_STATUS_LINK_OK FR_STATUS_GROUP_MEMBER FR_STATUS_UNI_UP FR_STATUS_EIA_DSR FR_STATUS_EIA_CTS FR_STATUS_EIA_DCD FR_STATUS_EIA_TM FR_STATUS_EIA_DTR FR_STATUS_EIA_RTS FR_STATUS_EIA_RDL FR_STATUS_EIA_LLB */ } ETHEnhancedStatusInfo;

SmartLibrary Command Reference: Volume 2 | 123

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_EXTENDED_CARD_INFO
Get additional information about the current state of the Ethernet SmartCard. Currently this function only applies to GX-1420B SmartCards. HTGetStructure(ETH_EXTENDED_CARD_INFO, 0, 0, 0, (void*) pETHExtendedCardInfo, sizeof(ETHExtendedCardInfo), iHub, iSlot, iPort); HTGetStructure $ETH_EXTENDED_CARD_INFO 0 0 0 \ myETHExtendedCardInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHExtendedCardInfo

The bit meanings for the ulExtendedPHYStatus field are given by the ETH_PHY_XXX defines. The 3 bits from 26-24, given by ETH_PHY_AUTONEGOTIATE_MODE_XXX, describe the current auto negotiation operating mode: "111" = 1000MHz full duplex, "101" = 100MHz full duplex, "011" = 100MHz half duplex (unused). All other bit combinations for these 3 bits are unused. The full list of ETH_PHY_AUTONEGOTIATE_MODE_XXX defines is as follows: ETH_PHY_AUTONEGOTIATE_COMPLETE 0x80000000 ETH_PHY_AUTONEGOTIATE_LINK_GOOD_CHECK 0x40000000 ETH_PHY_AUTONEGOTIATE_ACK_DETECT 0x20000000 ETH_PHY_AUTONEGOTIATE_ABILITY_DETECT 0x10000000 ETH_PHY_AUTONEGOTIATE_NEED_PAGE_WAIT 0x08000000 ETH_PHY_AUTONEGOTIATE_MODE_26 0x04000000 ETH_PHY_AUTONEGOTIATE_MODE_25 0x02000000 ETH_PHY_AUTONEGOTIATE_MODE_24 0x01000000 ETH_PHY_PARALLEL_LINK_FAULT 0x00800000 ETH_PHY_LINK_PARTNER_REMOTE_FAULT 0x00400000 ETH_PHY_LINK_PARTNER_RX_NEW_PAGE 0x00200000 ETH_PHY_LINK_PARTNER_AUTONEG_CAPABLE 0x00100000 ETH_PHY_LINK_PARTNER_NEXT_PAGE_CAPABLE 0x00080000 ETH_PHY_LINK_UP 0x00040000 ETH_PHY_PAUSE_RX_ENABLED 0x00020000 ETH_PHY_PAUSE_TX_ENABLED 0x00010000 ETH_PHY_UNUSED_15 0x00008000 ETH_PHY_UNUSED_14 0x00004000 ETH_PHY_MDI_CROSSOVER 0x00002000 ETH_PHY_UNUSED_12 0x00001000 ETH_PHY_REMOTE_RECEIVER_OK 0x00000800 ETH_PHY_LOCAL_RECEIVER_OK 0x00000400 ETH_PHY_DESCRAMBLER_LOCKED 0x00000200 ETH_PHY_LINK_GOOD 0x00000100 ETH_PHY_REMOTE_FAULT 0x00000080 ETH_PHY_CARRIER_EXTENSION_ERROR 0x00000040 ETH_PHY_BAD_SSD_ERROR 0x00000020 ETH_PHY_BAD_ESD_ERROR 0x00000010

Continues >

124 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

ETH_PHY_RX_ERROR ETH_PHY_TX_ERROR ETH_PHY_LOCK_ERROR ETH_PHY_MLT3_CODE_ERROR typedef struct tagETHExtendedCardInfo { unsigned long ulLinkStateChanges; unsigned long ulTxMgmtFrames; unsigned long ulRxMgmtFrames; unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned long long long long long long long long long long long ulRxARPRequests; ulTxARPRequests; ulTxARPReplies; ulRxARPReplies; ulTxPingReplies; ulTxPingRequests; ulRxPingRequests; ulRxPingReplies; ulRxVLANFrames; ulRxIPFrames; ulIPChecksumErrors;

0x00000008 0x00000004 0x00000002 0x00000001

/* number of times link has been re-established */ /* number of management frames transmitted from the local stack */ /* number of management frames received by the local stack */ /* number of ARP requests received */ /* number of ARP requests transmitted */ /* number of ARP replies sent */ /* number of ARP replies received */

/* number of Ping replies sent */ /* number of Ping requests sent */ /* number of Ping requests received */ /* number of Ping replies received */ /* number of VLAN frames received */ /* number of IP frames received */ /* number of IP framesreceived containing bad header checksums */ unsigned long ulMgmtFrameCRCErrors; /* number of management frames received containing CRC errors */ unsigned long ulMgmtFrameIPChecksumErrors; /* number of management frames received containing bad IP header checksums */ unsigned long ulMgmtFrameUnknown; /* number of managementframes received that couldnt be processed because the frame was an unrecognized type */ unsigned long ulTimecount; /* tick counter, can be used to help calculate rates based on card clock */ unsigned long ulReceiveErrors; /* number of non-collision packets with receive errors */ unsigned long ulFalseCarrierSense; /* number of false carrier sense events */ unsigned long ulRxNOKs; /* number of receiver NOKs */ unsigned long ulExtendedPHYStatus; /* additional PHY status bits, see ETH_PHY_XXX defines above */ unsigned long ulReserved[2]; /* Reserved -- not currently in use */ } ETHExtendedCardInfo;

SmartLibrary Command Reference: Volume 2 | 125

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_EXTENDED_COUNTER_INFO
Get additional counters. HTGetStructure(ETH_EXTENDED_COUNTER_INFO, 0, 0, 0, (void*) pETHExtendedCounterInfo, sizeof(ETHExtendedCounterInfo), iHub, iSlot, iPort); HTGetStructure $ETH_EXTENDED_COUNTER_INFO 0 0 0 \ myETHExtendedCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHExtendedCounterInfo

Retrieve additional counters. See Table 3-2, Card Support for EthExtendedCounterInfo, on page 127. It specifies which structure elements work with different card types. typedef struct tagETHExtendedCounterInfo { U64 u64RxVLANFrames; /* number of VLAN frames received */ U64 u64RxIPFrames; /* number of IP frames received */ U64 u64RxIPChecksumErrors;/* number of frames with bad IP checksums received */ unsigned long ulTxARPReplies; /* number of ARP replies sent */ unsigned long ulRxARPReplies; /* number of ARP replies received */ unsigned long ulTxARPRequests; /* number of ARP requests sent */ unsigned long ulRxARPRequests; /* number of ARP requests received */ unsigned long ulTxPingReplies; /* number of Ping replies sent */ unsigned long ulRxPingReplies; /* number of Ping replies received */ unsigned long ulTxPingRequests; /* number of Ping requests sent */ unsigned long ulRxPingRequests; /* number of Ping requests received */ U64 u64RxDataIntegrityErrors;/* number of frames with data integrity errors received */ U64 u64TxSignatureFrames; /* number of frames with signature tags sent */ U64 u64RxSignatureFrames; /* number of frames with signature tags received */ U64 u64RxJumboFrames; /* number of jumbo frames received */ U64 u64TxJumboFrames; /* number of jumbo frames received */ U64 u64RxIPv6Frames; /* number of IPv6 frames received */ U64 u64RxMPLSFrames; /* number of MPLS frames received */ U64 u64RxPauseFrames; /* number of Pause frames received */ unsigned long ulTxJumboRate; /* rate of jumbo frames transmitted */ unsigned long ulRxJumboRate; /* rate of jumbo frames received only */ } ETHExtendedCounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

126 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

Card Support for EthExtendedCounterInfo


Table 3-2 lists the counters in the EthExtendedCounterInfo structure and shows their support by the applicable card types.
Table 3-2. Card Support for EthExtendedCounterInfo
LAN-3101A, LAN-3101B LAN-3102A, LAN-3111A LAN-3111AS ML-7710/7711/7711S

LAN-3710AL/AE/AS
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Counter
u64RxVLANFrames u64RxIPFrames u64RxIPChecksumErrors ulTxARPReplies ulRxARPReplies ulTxARPRequests ulRxARPRequests ulTxPingReplies ulRxPingReplies ulTxPingRequests ulRxPingRequests u64RxDataIntegrityErrors u64TxSignatureFrames u64RxSignatureFrames u64RxJumboFrames u64TxJumboFrames u64RxIPv6Frames u64RxMPLSFrames u64RxPauseFrames u64RxJumboRate u64TxJumboRate

N N Y N N N N N N N N Y Y Y N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y N N N N N N N N N N

N N N Y Y Y N Y N Y N N N N N N N N N N N

N N N Y Y Y N Y N Y N N N N N N N N N N N

Y Y Y Y Y Y Y Y Y Y Y N N N N N N N N N N

Y N N Y Y Y Y Y Y Y Y Y Y Y N N N N N Y Y

N N N Y Y Y Y Y Y Y Y N N N N N N N N N N

SmartLibrary Command Reference: Volume 2 | 127

POS-3500B/BS
N N N N N N N Y Y Y Y N N N N N N N N N N

ATM-345xA(s)

LAN-3201B/C

LAN-3100A

ML-5710A

GX-1420B

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_FILL_PATTERN
Set background pattern, using an array of unsigned chars. HTSetStructure(ETH_FILL_PATTERN, 0, 0, 0, (void*) pUChar, sizeof(UChar), iHub, iSlot, iPort); HTSetStructure $ETH_FILL_PATTERN 0 0 0 \ myUChar \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

UChar

iType1 Description C Usage

ETH_FILL_PATTERN_INFO
Retrieve the background pattern. HTGetStructure(ETH_FILL_PATTERN_INFO, 0, 0, 0, (void*) pUChar, sizeof(UChar), iHub, iSlot, iPort); HTGetStructure $ETH_FILL_PATTERN_INFO 0 0 0 \ myUChar \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure Comments

UChar
The values returned in this array are the background pattern defined on the card. The recommended array size is 2046.

128 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_FIND_MII_ADDR_INFO
Find first MII PHY address with a legal device. HTGetStructure(ETH_FIND_MII_ADDR_INFO, 0, 0, 0, (void*) pETHMII, sizeof(ETHMII), iHub, iSlot, iPort); HTGetStructure $ETH_FIND_MII_ADDR_INFO 0 0 0 \ myETHMII \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHMII

This structure writes or reads an MII register. When used with ETH_WRITE_MII, all three fields are inputs. When used with ETH_READ_MII_INFO, input uiAddress and uiRegister; uiValue will be returned. When used with ETH_FIND_MII_ADDR_INFO, the uiAddress field will be returned and the uiValue field will return the contents of the control register. Note: For ETH_READ_MII_INFO, if either iType2 or iType3 is non-zero, then both the iType2 or iType3 values are used to specify the PHY address and register number, and uiAddress and uiRegister are ignored as inputs. See Appendix C, Bit Definitions for MII Registers for information on MII register use and contents. typedef struct tagETHMII { unsigned short uiAddress; /* specific address */ unsigned short uiRegister; /* specific register */ unsigned short uiValue; /* bit values to write to address/register */ } ETHMII

SmartLibrary Command Reference: Volume 2 | 129

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_LATENCY
Set up latency test parameters. HTSetStructure(ETH_LATENCY, 0, 0, 0, (void*) pETHLatency, sizeof(ETHLatency), iHub, iSlot, iPort); HTSetStructure $ETH_LATENCY 0 0 0 \ myETHLatency \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHLatency

This structure sets up an Ethernet card for latency measurements. typedef struct tagETHLatency { unsigned short uiMode; /* latency mode: HT_LATENCY_OFF -- remove the card from latency measurements HT_LATENCY_RX -- set the card as a latency receiver HT_LATENCY_RXTX -- set the card as a latency receiver and a latency transmitter HT_LATENCY_TX -- set the card as a latency transmitter */ unsigned short uiRange; /* size of the pattern, in bytes */ unsigned short uiOffset; /* offset of the pattern, in bits */ unsigned char ucPattern[12]; /* data pattern that will stop the latency counter */ } ETHLatency;

130 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_LATENCY_INFO
Get latency measurement report. HTGetStructure(ETH_LATENCY_INFO, 0, 0, 0, (void*) pETHLatencyInfo, sizeof(ETHLatencyInfo), iHub, iSlot, iPort); HTGetStructure $ETH_LATENCY_INFO 0 0 0 \ myETHLatencyInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHLatencyInfo

This structure returns the latency measurement for an Ethernet card. typedef struct tagETHLatencyInfo { unsigned long ulLatency; /* latency value for the preceding latency test */ } ETHLatencyInfo;

iType1 Description C Usage

ETH_PROTOCOL_PARAMETER_INFO
Retrieve current address, ARP, PINGs, setup information. HTGetStructure(ETH_PROTOCOL_PARAMETER_INFO, 0, 0, 0, (void*) pETHProtocolParameters, sizeof(ETHProtocolParameters), iHub, iSlot, iPort); HTGetStructure $ETH_PROTOCOL_PARAMETER_INFO 0 0 0 \ myETHProtocolParameters \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHProtocolParameters

This structure sets address, ARP, and PING information to the card. (It is identical to the FSTProtocolParameters structure.) This structure controls the card's interaction with the network with regards to the PING and ARP protocols, as well as IP checksums. Possible values for ulProtocolGenerate are: ETH_PROTOCOL_DISABLED ETH_PROTOCOL_GENERATE_ARP ETH_PROTOCOL_GENERATE_PING Possible values for ulProtocolRespond are: ETH_PROTOCOL_DISABLED ETH_PROTOCOL_RESPOND_ARP ETH_PROTOCOL_RESPOND_PING

SmartLibrary Command Reference: Volume 2 | 131

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

Continues >
ETH_PROTOCOL_GENERATE_PING causes the card to generate ping frames at the interval specified in ulPINGPeriod sent to the address given in ucDstIP. The card does not use the destination MAC when transmitting the PING frame. Instead, it determines the MAC address by issuing ARP requests at the interval given by ulARPPeriod. Periodic ARPs continue until a response is received, at which time peroodic PING frames are transmitted at the interval specified in ulPINGPeriod. When the ARP response is received, the returned MAC address is stored in the ucDstMAC field. This can be later retrieved using the ETH_PROTOCOL_PARAMTER_INFO message function. ETH_PROTOCOL_GENERATE_ARP causes the card to generate ARP frames at the interval specified in ulARPPeriod. The ARP requests are sent to ucDstIP. The returned results are stored and retrievable as described above. If the ucDstIP address is not on the local subnet as given by ucNetmask, the ARP request is sent to the ucDefaultGateway address instead. If the ETH_PROTOCOL_PARAMETERS message function is invoked more than once, invocations after the first may start, stop, or restart ARP or PING generation, as follows: +-------------------------------+ | Current State | +-------------------------------+ | Stopped | In Progress | +-----------------+--+-------------+-----------------+ | Requested State |0 | No Action | Stops | | +--+-------------+-----------------+ | |1 | Start | Restart | +-----------------+--+-------------+-----------------+ ulProtocolResponse should be filled with a bitwise OR of the desired flags: ETH_PROTOCOL_RESPOND_ARP and ETH_PROTOCOL_RESPOND_PING. The ETH_PROTOCOL_RESPOND_ARP flag instructs the card whether to respond to incoming ARP requests. If 1, it responds to ARP requests destined for an IP address that matches the cards ucSrcIP for the bits where ucResponseMask is one. (Thus it responds to all ARPs, equivalent to general ARP response on the ML-7710/7711/ 7711S, when ucResponseMask is all zero.) The provided MAC address for the ARP response is always ucSrcMAC. Turning on the ETH_PROTOCOL_RESPOND_PING flag causes the card to respond to PING requests received in the case that the requested IP address matches the cards ucSrcIP for the bits where ucResponseMask is zero.

Continues >

132 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

typedef struct tagETHProtocolParameters { /* Notice: HTResetPort uses the following default values to initialize ports. It doesnt mean initialize the structure with the default values. */ unsigned char ucDstMAC[6]; /* Destination MAC Address */ /* (default=0.0.0.0.0.0) */ unsigned char ucSrcMAC[6]; /* Source MAC Address */ /* (default=0.0.0.0.0.0) */ unsigned char ucDstIP[4]; /* Destination IP Address */ /* (default=192.168.98.21) */ unsigned char ucSrcIP[4]; /* Source IP Address */ /* (default=192.168.98.22) */ unsigned char ucNetMask[4]; /* Source IP Mask (default:0.0.0.0) */ unsigned char ucResponseMask[4]; /* Response IP Mask (default:0.0.0.0) */ unsigned char ucDefaultGateway[4]; /* Default Gateway (default:0.0.0.0) */ unsigned long ulProtocolResponse; /* ETH_PROTOCOL_RESPOND_xxx */ /* (default=ETH_PROTOCOL_DISABLED) */ unsigned long ulProtocolGenerate; /* ETH_PROTOCOL_GENERATE_xxx */ /* (default=ETH_PROTOCOL_DISABLED) */ unsigned long ulARPPeriod; /* time to wait before re-sending ARP */ /* (default = 100 unit= 1/10 second) */ unsigned long ulPINGPeriod; /* time to wait before re-sending PING */ /* (default = 20 unit= 1/10 second) */ unsigned char ucIPChecksumEnable; /* Enable=1, disable=0 (default) */ unsigned char ucIPChecksumErrorEnable;/* Enable=1, disalbe=0 (default) */ } ETHProtocolParameters;

SmartLibrary Command Reference: Volume 2 | 133

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_PROTOCOL_PARAMETERS
Set up addresses, ARP, and PING packets for the cards local stack (as opposed to on a per-stream basis). HTSetStructure(ETH_PROTOCOL_PARAMETERS, 0, 0, 0, (void*) pETHProtocolParameters, sizeof(ETHProtocolParameters), iHub, iSlot, iPort); HTSetStructure $ETH_PROTOCOL_PARAMETERS 0 0 0 \ myETHProtocolParameters \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHProtocolParameters

This structure controls the card's interaction with the network with regards to the PING and ARP protocols, as well as IP checksums. Possible values for ulProtocolGenerate are: ETH_PROTOCOL_DISABLED ETH_PROTOCOL_GENERATE_ARP ETH_PROTOCOL_GENERATE_PING Possible values for ulProtocolRespond are: ETH_PROTOCOL_DISABLED ETH_PROTOCOL_RESPOND_ARP ETH_PROTOCOL_RESPOND_PING ETH_PROTOCOL_GENERATE_PING causes the card to generate ping frames at the interval specified in ulPINGPeriod sent to the address given in ucDstIP. The card does not use the destination MAC when transmitting the PING frame. Instead, it determines the MAC address by issuing ARP requests at the interval given by ulARPPeriod. Periodic ARPs continue until a response is received, at which time peroodic PING frames are transmitted at the interval specified in ulPINGPeriod. When the ARP response is received, the returned MAC address is stored in the ucDstMAC field. This can be later retrieved using the ETH_PROTOCOL_PARAMTER_INFO message function. ETH_PROTOCOL_GENERATE_ARP causes the card to generate ARP frames at the interval specified in ulARPPeriod. The ARP requests are sent to ucDstIP. The returned results are stored and retrievable as described above. If the ucDstIP address is not on the local subnet as given by ucNetmask, the ARP request is sent to the ucDefaultGateway address instead. If the ETH_PROTOCOL_PARAMETERS message function is invoked more than once, invocations after the first may start, stop, or restart ARP or PING generation, as follows: V+-------------------------------+ | Current State | +-------------------------------+ | Stopped | In Progress | +-----------------+--+-------------+-----------------+ | Requested State |0 | No Action | Stops | | +--+-------------+-----------------+ | |1 | Start | Restart | +-----------------+--+-------------+-----------------+

Continues >

134 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

ulProtocolResponse should be filled with a bitwise OR of the desired flags: ETH_PROTOCOL_RESPOND_ARP and ETH_PROTOCOL_RESPOND_PING. The ETH_PROTOCOL_RESPOND_ARP flag instructs the card whether to respond to incoming ARP requests. If 1, it responds to ARP requests destined for an IP address that matches the cards ucSrcIP for the bits where ucResponseMask is one. (Thus it responds to all ARPs, equivalent to general ARP response on the ML-7710/7711/ 7711S, when ucResponseMask is all zero.) The provided MAC address for the ARP response is always ucSrcMAC. Turning on the ETH_PROTOCOL_RESPOND_PING flag causes the card to respond to PING requests received in the case that the requested IP address matches the cards ucSrcIP for the bits where ucResponseMask is zero. typedef struct tagETHProtocolParameters { /* Note: HTResetPort uses the following default values to initialize ports. It doesnt mean initialize the structure with the default values. */ unsigned char ucDstMAC[6]; /* Destination MAC Address */ /* (default=0.0.0.0.0.0) */ unsigned char ucSrcMAC[6]; /* Source MAC Address */ /* (default=0.0.0.0.0.0) */ unsigned char ucDstIP[4]; /* Destination IP Address */ /* (default=192.168.98.21) */ unsigned char ucSrcIP[4]; /* Source IP Address */ /* (default=192.168.98.22) */ unsigned char ucNetMask[4]; /* Source IP Mask (default:0.0.0.0) */ unsigned char ucResponseMask[4]; /* Response IP Mask (default:0.0.0.0) */ unsigned char ucDefaultGateway[4]; /* Default Gateway (default:0.0.0.0) */ unsigned long ulProtocolResponse; /* ETH_PROTOCOL_RESPOND_xxx */ /* (default=ETH_PROTOCOL_DISABLED) */ unsigned long ulProtocolGenerate; /* ETH_PROTOCOL_GENERATE_xxx */ /* (default=ETH_PROTOCOL_DISABLED) */ unsigned long ulARPPeriod; /* time to wait before re-sending ARP */ /* (default = 100 unit= 1/10 second) */ unsigned long ulPINGPeriod; /* time to wait before re-sending PING */ /* (default = 20 unit= 1/10 second) */ unsigned char ucIPChecksumEnable; /* Enable=1, disable=0 (default) */ unsigned char ucIPChecksumErrorEnable; /* Enable=1, disalbe=0 (default) */ } ETHProtocolParameters;

SmartLibrary Command Reference: Volume 2 | 135

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description

ETH_READ_MII_INFO
Read a specific MII address/register: iType2 = PHY Address iType3 = Register HTGetStructure(ETH_READ_MII_INFO, 0, 0, 0, (void*) pETHMII, sizeof(ETHMII), iHub, iSlot, iPort); HTGetStructure $ETH_READ_MII_INFO 0 0 0 \ myETHMII \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

ETHMII

This structure writes or reads an MII register. When used with ETH_WRITE_MII, all three fields are inputs. When used with ETH_READ_MII_INFO, input uiAddress and uiRegister; uiValue will be returned. When used with ETH_FIND_MII_ADDR_INFO, the uiAddress field will be returned and the uiValue field will return the contents of the control register. Note: For ETH_READ_MII_INFO, if either iType2 or iType3 is non-zero, then both the iType2 or iType3 values are used to specify the PHY address and register number, and uiAddress and uiRegister are ignored as inputs. See Appendix C, Bit Definitions for MII Registers for information on MII register use and contents. typedef struct tagETHMII { unsigned short uiAddress; /* specific address */ unsigned short uiRegister; /* specific register */ unsigned short uiValue; /* bit values to write to address/register */ } ETHMII;

136 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_RSMII
Set RMII/SMII registers. HTSetStructure(ETH_RSMII, 0, 0, 0, (void*) pETHRSMII, sizeof(ETHRSMII), iHub, iSlot, iPort); HTSetStructure $ETH_RSMII 0 0 0 \ myETHRSMII \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHRSMII

The parameters in this structure apply to all ports on the card. The port number will be ignored. typedef struct tagETHRSMII { unsigned char ucRSMIISelect; unsigned char ucMDIOAccessSelect;

unsigned char ucReserved[4]; } ETHRSMII;

/* MII_SELECT_RMII or MII_SELECT_SMII */ /* MDIO_ACCESS_8_VIA_0_3 = 8-port device accessed via port 0-3; MDIO_ACCESS_8_VIA_4_7 = 8-port device accessed via port 4-7; MDIO_ACCESS_4_PLUS_4 = 4+4 port device accessed separately via ports 0-3 and ports 4-7. */ /* reserved */

iType1 Description

ETH_RESET_PORT
Reset the card to a default condition: iType2 = reset type. Options are: RESET_FULL RESET_PARTIAL Reset all card parameters including hardware interface parameters. Reset all card parameters except hardware interface parameters.

C Usage

HTSetCommand(ETH_RESET_PORT, RESET_FULL, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $ETH_RESET_PORT $RESET_FULL 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

SmartLibrary Command Reference: Volume 2 | 137

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_SELECT_RECEIVE
Select port for receive data. HTSetCommand(ETH_SELECT_RECEIVE, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $ETH_SELECT_RECEIVE 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

iType1 Description C Usage

ETH_SELECT_TRANSMIT
Select port for transmit data: iType2 = transmission mode HTSetCommand(ETH_SELECT_TRANSMIT, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $ETH_SELECT_TRANSMIT 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

iType1 Description C Usage

ETH_SET_SPEED
Set card Tx speed, using unsigned long data and SPEED_XXX constants. HTSetStructure(ETH_SET_SPEED, 0, 0, 0, (void*) pULong, sizeof(unsigned long), iHub, iSlot, iPort); HTSetStructure $ETH_SET_SPEED 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
SPEED_10MHZ SPEED_100MHZ SPEED_1GHZ

ULong

The applicable SPEED_XXX constants (defined in the et1000.h file) are:

138 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_TRANSMIT
Set up transmit parameters. HTSetStructure(ETH_TRANSMIT, 0, 0, 0, (void*) pETHTransmit, sizeof(ETHTransmit), iHub, iSlot, iPort); HTSetStructure $ETH_TRANSMIT 0 0 0 \ myETHTransmit \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHTransmit

This structure sets all the basic transmit parameters. Some of the fields have constants defined for possible values. You must set the speed explicitly; the default speed is 0. Note: If Auto Negotiation is turned on, it can be left untouched when calling ETH_TRANSMIT by setting the ucDuplexMode and/or ucSpeed to SPEED_DUPLEX_UNTOUCHED. typedef struct tagETHTransmit { unsigned char ucTransmitMode;

unsigned short unsigned char

unsigned char

unsigned short

unsigned long unsigned long

/* transmit mode: CONTINUOUS_PACKET_MODE SINGLE_BURST_MODE MULTI_BURST_MODE CONTINUOUS_BURST_MODE ECHO_MODE */ uiDataLength; /* number of bytes per frame, not including 4 byte CRC */ ucDuplexMode; /* duplex mode: FULLDUPLEX_MODE HALFDUPLEX_MODE SPEED_DUPLEX_UNTOUCHED */ ucSpeed; /* set card speed: SPEED_10MHZ SPEED_100MHZ SPEED_4MHZ SPEED_16MHZ SPEED_DUPLEX_UNTOUCHED*/ uiCollisionBackoffAggressiveness; /* wait factor for backing off from multiple collisions; uses powers of 2 with this factor */ ulBurstCount; /* number of frames per burst */ ulMultiBurstCount; /* number of bursts in multi-burst */

Continues >

SmartLibrary Command Reference: Volume 2 | 139

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

unsigned long

ulInterFrameGap;

unsigned short

/* length of gap between frames based on scale set in uiInterFrameGapScale; 1 to 1,600,000,000 in nanosecond scale 1 to 1,600,000 in microsecond scale 1 to 1600 in millisecond scale 0 = random gap */ uiInterFrameGapScale;/* units for ulInterFrameGap: NANO_SCALE MICRO_SCALE MILLI_SCALE 0 = bit times */ /* length of gap between bursts based on scale set in uiInterBurstGapScale; 1 to 1,600,000,000 in nanosecond scale 1 to 1,600,000 in microsecond scale 1 to 1600 in millisecond scale */ uiInterBurstGapScale; /* units for ulInterBurstGap: NANO_SCALE MICRO_SCALE MILLI_SCALE 0 = bit times */ ucRandomBackground; /* 1 = enable, 0 = disable */ ucRandomLength; /* 1 = enable, 0 = disable */ ucCRCErrors; /* 1 = enable, 0 = disable */ ucAlignErrors; /* number of alignment bits, */ /* 0 = disable alignment errors */ ucSymbolErrors; /* 1 = enable, 0 = disable */ uiDribbleBits; /* number of dribble bits to transmit, valid from 0 - 7 */ ucVFD1Mode; /* VFD1 mode: HVFD_NONE HVFD_RANDOM HVFD_INCR HVFD_DECR HVFD_STATIC */ uiVFD1Offset; /* offset in bits */ iVFD1Range; /* size of VFD1 pattern, in bytes, 6 bytes maximum; negative value signifies bit size field */ ucVFD1Pattern[6]; /* VFD1 pattern */ uiVFD1CycleCount; /* if mode is increment or decrement, specifies the number of patterns to generate before repeating */ uiVFD1BlockCount; /* no. of VFD1 pattern repeats before next pattern: 1=default; only supported by ML-7710, ML-5710, LAN-3100, and LAN-31xxA/B cards */ ulInterBurstGap;

unsigned long

unsigned short

unsigned unsigned unsigned unsigned

char char char char

unsigned char unsigned short unsigned char

unsigned short short

unsigned char unsigned short

unsigned short

Continues >

140 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

/* VFD2 mode, see values above */ /* offset in bits */ /* size of VFD2 pattern, in bytes, 6 bytes maximum; negative value signifies bit size field */ unsigned char ucVFD2Pattern[6]; /* VFD2 pattern */ unsigned short uiVFD2CycleCount; /* if mode is increment or decrement, specifies the number of patterns to generate before repeating */ unsigned short uiVFD2BlockCount; /* no. of VFD2 pattern repeats before next pattern: 1=default; only supported by ML-7710, ML-5710, LAN-3100A, and LAN-31xxA/B cards */ unsigned char ucVFD3Mode; /* VFD3 mode: HVFD_NONE HVFD_ENABLED */ unsigned short uiVFD3Offset; /* offset in bits */ unsigned short uiVFD3Range; /* size of one VFD3 pattern, in bytes, up to 2044 bytes maximum */ unsigned short uiVFD3DataCount; /* size of total VFD3 buffer */ unsigned short uiVFD3BlockCount; /* no. of VFD3 pattern repeats before next pattern: 1=default; only supported by ML-7710, ML-5710, LAN-3100A, and LAN-31xxA/B cards */ unsigned char ucVFD3Buffer[2044]; /* VFD3 data */ unsigned char ucAntiPartitioningEnable; /* enable anti-partitioning mode, LAN-3100A only */ unsigned char ucJumboFrameEnable; /* To enable Jumbo Frame Mode, enable = 1, disable = 0(default), for LAN-31xxA/B cards. Should be enabled on TX and RX*/ unsigned char ucARPOptimizationEnable;/* Enable=1, disable=0 (default), When enabled, ARP exchange is performed with optimization, not per stream, but per destination MAC. A single ARP request will be sent for multiple streams with the same destination. For LAN-31xxA/B */ unsigned char ucExtendedPPPoEEnable; /* Reserved - This field is not supported */ unsigned char ucReserved[60]; } ETHTransmit;

unsigned char unsigned short short

ucVFD2Mode; uiVFD2Offset; iVFD2Range;

SmartLibrary Command Reference: Volume 2 | 141

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_TRANSMIT_INFO
Get transmit parameters. HTGetStructure(ETH_TRANSMIT_INFO, 0, 0, 0, (void*) pETHTransmit, sizeof(ETHTransmit), iHub, iSlot, iPort); HTGetStructure $ETH_TRANSMIT_INFO 0 0 0 \ myETHTransmit \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHTransmit

This structure gets all the basic transmit parameters. Some fields have constants defined for possible values. typedef struct tagETHTransmit { unsigned char ucTransmitMode;

unsigned short unsigned char

unsigned char

unsigned short

unsigned long unsigned long

/* transmit mode: CONTINUOUS_PACKET_MODE SINGLE_BURST_MODE MULTI_BURST_MODE CONTINUOUS_BURST_MODE ECHO_MODE */ uiDataLength; /* number of bytes per frame, not including 4 byte CRC */ ucDuplexMode; /* duplex mode: FULLDUPLEX_MODE HALFDUPLEX_MODE SPEED_DUPLEX_UNTOUCHED */ ucSpeed; /* set card speed: SPEED_10MHZ SPEED_100MHZ SPEED_4MHZ SPEED_16MHZ SPEED_DUPLEX_UNTOUCHED*/ uiCollisionBackoffAggressiveness; /* wait factor for backing off from multiple collisions; uses powers of 2 with this factor */ ulBurstCount; /* number of frames per burst */ ulMultiBurstCount; /* number of bursts in multi-burst */

Continues >

142 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

unsigned long

unsigned short

unsigned long

unsigned short

unsigned unsigned unsigned unsigned

char char char char

unsigned char unsigned short unsigned char

unsigned short short

unsigned char unsigned short

unsigned short

/* length of gap between frames based on scale set in uiInterFrameGapScale; 1 to 1,600,000,000 in nanosecond scale 1 to 1,600,000 in microsecond scale 1 to 1600 in millisecond scale 0 = random gap */ uiInterFrameGapScale;/* units for ulInterFrameGap: NANO_SCALE MICRO_SCALE MILLI_SCALE 0 = bit times */ ulInterBurstGap; /* length of gap between bursts based on scale set in uiInterBurstGapScale; 1 to 1,600,000,000 in nanosecond scale 1 to 1,600,000 in microsecond scale 1 to 1600 in millisecond scale */ uiInterBurstGapScale; /* units for ulInterBurstGap: NANO_SCALE MICRO_SCALE MILLI_SCALE 0 = bit times */ ucRandomBackground; /* 1 = enable, 0 = disable */ ucRandomLength; /* 1 = enable, 0 = disable */ ucCRCErrors; /* 1 = enable, 0 = disable */ ucAlignErrors; /* number of alignment bits, */ /* 0 = disable alignment errors */ ucSymbolErrors; /* 1 = enable, 0 = disable */ uiDribbleBits; /* number of dribble bits to transmit, valid from 0 - 7 */ ucVFD1Mode; /* VFD1 mode: HVFD_NONE HVFD_RANDOM HVFD_INCR HVFD_DECR HVFD_STATIC */ uiVFD1Offset; /* offset in bits */ iVFD1Range; /* size of VFD1 pattern, in bytes, 6 bytes maximum; negative value signifies bit size field */ ucVFD1Pattern[6]; /* VFD1 pattern */ uiVFD1CycleCount; /* if mode is increment or decrement, specifies the number of patterns to generate before repeating */ uiVFD1BlockCount; /* no. of VFD1 pattern repeats before next pattern: 1=default; only supported by ML-7710, ML-5710, LAN-3100A, and LAN-31xxA/B cards */

ulInterFrameGap;

Continues >

SmartLibrary Command Reference: Volume 2 | 143

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

/* VFD2 mode, see values above */ /* offset in bits */ /* size of VFD2 pattern, in bytes, 6 bytes maximum; negative value signifies bit size field */ unsigned char ucVFD2Pattern[6]; /* VFD2 pattern */ unsigned short uiVFD2CycleCount; /* if mode is increment or decrement, specifies the number of patterns to generate before repeating */ unsigned short uiVFD2BlockCount; /* no. of VFD2 pattern repeats before next pattern: 1=default; only supported by ML-7710, ML-5710, LAN-3100A, and LAN-31xxA/B cards */ unsigned char ucVFD3Mode; /* VFD3 mode: HVFD_NONE HVFD_ENABLED */ unsigned short uiVFD3Offset; /* offset in bits */ unsigned short uiVFD3Range; /* size of one VFD3 pattern, in bytes, up to 2044 bytes maximum */ unsigned short uiVFD3DataCount; /* size of total VFD3 buffer */ unsigned short uiVFD3BlockCount; /* no. of VFD3 pattern repeats before next pattern: 1=default; only supported by ML-7710, ML-5710, LAN-3100A, and LAN-31xxA/B cards */ unsigned char ucVFD3Buffer[2044]; /* VFD3 data */ unsigned char ucAntiPartitioningEnable; /* enable anti-partitioning mode, LAN-3100A only */ unsigned char ucJumboFrameEnable; /* To enable Jumbo Frame Mode, enable = 1, disable = 0(default), for LAN-31xxA/B cards. Should be enabled on TX and RX*/ unsigned char ucARPOptimizationEnable;/* Enable=1, disable=0 (default), When enabled, ARP exchange is performed with optimization, not per stream, but per destination MAC. A single ARP request will be sent for multiple streams with the same destination. For LAN-31xxA/B */ unsigned char ucExtendedPPPoEEnable; /* Reserved - This field is not supported */ unsigned char ucReserved[60]; } ETHTransmit;

unsigned char unsigned short short

ucVFD2Mode; uiVFD2Offset; iVFD2Range;

144 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_TRIGGER
Set up triggers. HTSetStructure(ETH_TRIGGER, 0, 0, 0, (void*) pETHTrigger, sizeof(ETHTrigger), iHub, iSlot, iPort); HTSetStructure $ETH_TRIGGER 0 0 0 \ myETHTrigger \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHTrigger

This structure sets up the triggers for an Ethernet card. typedef struct tagETHTrigger { unsigned char ucTriggerMode;

unsigned short unsigned short unsigned char unsigned short unsigned short unsigned char } ETHTrigger;

/* use ETH_TRIGGERXXX defines: ETH_TRIGGERS_OFF ETH_TRIGGER1_ONLY ETH_TRIGGER2_ONLY ETH_TRIGGER1_OR_TRIGGER2 ETH_TRIGGER1_AND_TRIGGER2 */ uiTrigger1Offset; /* offset of the trigger pattern, in bits */ uiTrigger1Range; /* size of the trigger pattern, in bytes */ ucTrigger1Pattern[6];/* pattern for trigger 1 */ uiTrigger2Offset; /* offset of the trigger pattern, in bits */ uiTrigger2Range; /* size of the trigger pattern, in bytes */ ucTrigger2Pattern[6]; /* pattern for trigger 2 */

SmartLibrary Command Reference: Volume 2 | 145

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_VLAN
Send VLAN tag information. HTSetStructure(ETH_VLAN, 0, 0, 0, (void*) pETHVLAN, sizeof(ETHVLAN), iHub, iSlot, iPort); HTSetStructure $ETH_VLAN 0 0 0 \ myETHVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHVLAN

Enables and configures all Virtual LAN header values. Values for ETH_VLAN_PRI_XXX (defined in ethitems.h) are: ETH_VLAN_PRI_0 ETH_VLAN_PRI_1 ETH_VLAN_PRI_2 ETH_VLAN_PRI_3 ETH_VLAN_PRI_4 ETH_VLAN_PRI_5 ETH_VLAN_PRI_6 ETH_VLAN_PRI_7 ETH_VLAN_PRI_LOWESTVLAN_PRI_0 ETH_VLAN_PRI_HIGHESTVLAN_PRI_7 Values for ETH_VLAN_CFI_XXX (defined in ethitems.h) are: ETH_VLAN_CFI_RIF_ABSENT ETH_VLAN_CFI_RIF_PRESENT typedef struct tagETHVLAN { unsigned shortuiTPID; unsigned char ucPRI; unsigned char ucCFI; unsigned shortuiVID; } ETHVLAN;

/* VLAN type (2 bytes), for now always assumes 0x8100 */ /* User priority 0-7 (3 bits), use ETH_VLAN_PRI_XXX definitions */ /* 1 = RIF present, 0 = RIF absent (1 bit), use ETH_VLAN_CFI_XXX definitions */ /* VLAN ID (12 bits) */

Comments

When used with a GX-1420B SmartCard, the VLAN tag cannot be used concurrently with a VFD3 buffer.

146 |

SmartLibrary Command Reference: Volume 2

Chapter 3: 10/100 Mb Ethernet (ETH) ETH iType1 Commands and Structures

iType1 Description C Usage

ETH_WRITE_MII
Write to a MII Address/Register. HTSetStructure(ETH_WRITE_MII, 0, 0, 0, (void*) pETHMII, sizeof(ETHMII), iHub, iSlot, iPort); HTSetStructure $ETH_WRITE_MII 0 0 0 \ myETHMII \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ETHMII

This structure writes or reads an MII register. When used with ETH_WRITE_MII, all three fields are inputs. When used with ETH_READ_MII_INFO, input uiAddress and uiRegister; uiValue will be returned. When used with ETH_FIND_MII_ADDR_INFO, the uiAddress field will be returned and the uiValue field will return the contents of the control register. Note: For ETH_READ_MII_INFO, if either iType2 or iType3 is non-zero, then both the iType2 or iType3 values are used to specify the PHY address and register number, and uiAddress and uiRegister are ignored as inputs. See Appendix C, Bit Definitions for MII Registers for information on MII register use and contents. typedef struct tagETHMII { unsigned short uiAddress; /* specific address */ unsigned short uiRegister; /* specific register */ unsigned short uiValue; /* bit values to write to address/register */ } ETHMII;

SmartLibrary Command Reference: Volume 2 | 147

148 |

SmartLibrary Command Reference: Volume 2

Chapter 4

Fibre Channel (FC)


This chapter describes the Message Function iType1 commands for the Fibre Channel (FBC) modules. These iType1 parameters have the prefix FC.

In this chapter...

Supported Modules.....150 FC HTSetStructure Summary.....150 FC HTGetStructure Summary.....151 FC HTSetCommand Summary.....152 iType1 Commands and Structures.....153

SmartLibrary Command Reference: Volume 2 | 149

Chapter 4: Fibre Channel (FC) Supported Modules

Supported Modules
The FC commands (iType1s) and their related structures support the following modules.
Chassis Module
FBC-3601A FBC-3602A

Description
SAN 1G Fibre Channel, 2-port, SmartMetrics SAN 1G and 2G Fibre Channel, 2-port, SmartMetrics

SmartBits 600x/6000x

FC HTSetStructure Summary
iType 1
FC_DEFINE_MULTI_STREAM
See Page 157

2
<x>

3
<c>

4
0

pData
StreamFC

Description
Append similar copies of a Fibre Channel Stream. Note that index is the stream to copy and count is the number of streams to create. Create the Fibre Channel stream and set up header information. Create the Fibre Channel stream with 128-byte length and set up header information. Configure the timer parameters of the HBA simulation. Bring down the link on an FC port. Overwrite one Fibre Channel stream in the list at a given index. Set up the Fibre Channel port configuration. Send a frame on the cut-through channel. Set the transmit mode on the card. Configure Fibre Channel emulated nodes and devices.

FC_DEFINE_STREAM
See Page 159

0 0 0 0 <x> 0 0 0 0

0 0 0 0 <c> 0 0 0 0

0 0 0 0 0 0 0 0 0

StreamFC StreamFC128 FCHBAConfig FCLinkDown StreamFC FCPortConfig FCCustomFrame FCTransmitMode FCWWN

FC_DEFINE_STREAM_128
See Page 161

FC_HBA_CONFIG
See Page 165

FC_LINK_DOWN
See Page 167

FC_MOD_STREAM
See Page 168

FC_PORT_CONFIG
See Page 170

FC_SEND_CUSTOM
See Page 174

FC_SET_TX_MODE
See Page 175

FC_WWN
See Page 180

150 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) FC HTGetStructure Summary

FC HTGetStructure Summary
iType 1
FC_COUNTER_INFO
See Page 153

2
0 0 0 0 0 0 0 0

3
0 0 0 0 0 0 0 0

4
0 0 0 0 0 0 0 0

pData
FCCounterInfo FCConfig FCTransmitMode FCPortConfigInfo FCCustomFrame FCStatus FCWNNCount FCWNN

Description
Get generic and Fibre Channel counters. Get Fibre Channel header definitions. Read the transmit mode of the card. Get Fibre Channel port configuration information. Receive a frame on the cut-through channel. Get Fibre Channel port/link status. Get the number of WNNs configured on a port. Get information on Fibre Channel emulated nodes/devices.

FC_DEFINE_HEADER_INFO
See Page 156

FC_GET_TX_MODE
See Page 163

FC_PORT_CONFIG_INFO
See Page 171

FC_RECV_CUSTOM
See Page 173

FC_STATUS_INFO
See Page 177

FC_WWN_COUNT_INFO
See Page 181

FC_WWN_INFO
See Page 182

SmartLibrary Command Reference: Volume 2 | 151

Chapter 4: Fibre Channel (FC) FC HTSetCommand Summary

FC HTSetCommand Summary
iType 1
FC_COMMIT
See Page 153

2
0 0 0 0 0 0
0

3
0 0 0 0 0 0
0

4
0 0 0 0 0 0
0

pData

Description
Complete the initialization and configuration procedure. Put the FBC card into the HBA simulation mode. Take out the FBC card out of the HBA simulation mode. Initiate the Link Initialization procedure. Initiate Private Discovery. Initiate Public Discovery. Perform Fabric login.

FC_HBA_MODE_START
See Page 166

FC_HBA_MODE_STOP
See Page 166

FC_LINKUP
See Page 167

FC_PRIVATE_DISCOVERY
See Page 172

FC_PUBLIC_DISCOVERY
See Page 172

FC_WWN_LOGIN
See Page 183

152 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Commands and Structures


iType1

FC_COMMIT
Complete the initialization and configuration stage. HTSetCommand(FC_COMMIT, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $FC_COMMIT 0 0 0 \ "" \ $iHub $iSlot $iPort

Description C Usage

Tcl Usage

iType1

FC_COUNTER_INFO
Get generic and Fibre Channel counters. HTGetStructure(FC_COUNTER_INFO, 0, 0, 0, (void*) pFCCounterInfo, sizeof(FCCounterInfo), iHub, iSlot, iPort); HTGetStructure $FC_COUNTER_INFO 0 0 0 \ myFCCounterInfo \ 0 \ $iHub $iSlot $iPort

Description C Usage

Tcl Usage

Related Structure

FCCounterInfo

typedef struct tagFCCounterInfo { /* common counters */ unsigned long ulRcvPkt; unsigned long ulTmtPkt; unsigned long ulCollision; unsigned long ulRcvTrig; unsigned long ulRcvByte; unsigned long ulCRC; unsigned long ulAlign; unsigned long ulOversize; unsigned long ulUndersize; unsigned long ulRcvPktRate; unsigned long ulTmtPktRate; unsigned long ulCRCRate; unsigned long ulOversizeRate; unsigned long ulUndersizeRate; unsigned long ulCollisionRate;

/* /* /* /* /* /* /* /* /* /* /* /* /* /* /*

Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number

of of of of of of of of of of of of of of of

packets received */ packets transmitted */ collisions */ Triggers received */ Bytes received */ CRC errors received */ Alignment errors detected */ Oversize errors detected */ Undersize errors detected */ received packets per second */ transmitted packets per second */ CRC errors received per second */ Oversize errors received per second Undersize errors received per second Collisions detected per second */

*/ */

Continues >

SmartLibrary Command Reference: Volume 2 | 153

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

unsigned long unsigned long unsigned long U64 U64

ulAlignRate; ulRcvTrigRate; ulRcvByteRate; u64TxSigPkt; u64RxSigPkt;

/* /* /* /* /*

Number of Alignment errors received per second Number of Triggers received per second */ Number of bytes received per second */ Count of signature field frames tx */ Count of signature field frames rx */

*/

/* FC Error Counters */ U64 u64LinkTxWordErr; unsigned long ulLinkInit; unsigned long ulLinkFailure; unsigned long ulLinkLossOfSync; unsigned long ulLinkLossOfSig; unsigned long ulLinkReset; unsigned long ulLinkPrimSeqErr;

/* /* /* /* /* /* /*

Tx word error count */ Link init count */ Link fail count */ Loss of sync count */ Loss of signal count */ LRR error count */ Primitive sequence error count */

/*FC General Counters */ U64 u64TxBytes; /* Transmitted Bytes count */ U64 u64TxClass2Frames; /* Count of Class 2 frames Tx'd */ U64 u64TxClass3Frames; /* Count of Class 3 frames Tx'd */ U64 u64TxClassFFrames; /* Count of Class F frames Tx'd */ U64 u64TxOtherFrames; /* Count of other frames Tx'd */ U64 u64TxClass2Bytes; /* Count of Class 2 frames Tx'd */ U64 u64TxClass3Bytes; /* Count of Class 3 Bytes Tx'd */ U64 u64TxClassFBytes; /* Count of Class F Bytes Tx'd */ U64 u64TxOtherBytes; /* Count of other Bytes Tx'd */ U64 u64RxClass2Frames; /* Count of Class 2 frames Rx'd */ U64 u64RxClass3Frames; /* Count of Class 3 frames Rx'd */ U64 u64RxClassFFrames; /* Count of Class F frames Rx'd */ U64 u64RxOtherFrames; /* Count of other frames Rx'd */ U64 u64RxClass2Bytes; /* Count of Class 2 frames Rx'd */ U64 u64RxClass3Bytes; /* Count of Class 3 Bytes Rx'd */ U64 u64RxClassFBytes; /* Count of Class F Bytes Rx'd */ U64 u64RxOtherBytes; /* Count of other Bytes Rx'd */ unsigned long ulTxByteRate; /* Rate/sec of all bytes Tx'd */ unsigned long ulTxClass2FrameRate; /* Rate/sec of Class 2 frames Tx'd unsigned long ulTxClass3FrameRate; /* Rate/sec of Class 3 frames Tx'd unsigned long ulTxClassFFrameRate; /* Rate/sec of Class F frames Tx'd unsigned long ulTxOtherFrameRate; /* Rate/sec of other frames Tx'd unsigned long ulTxClass2ByteRate; /* Rate/sec of Class 2 frames Tx'd unsigned long ulTxClass3ByteRate; /* Rate/sec of Class 3 Bytes Tx'd unsigned long ulTxClassFByteRate; /* Rate/sec of Class F Bytes Tx'd unsigned long ulTxOtherByteRate; /* Rate/sec of other Bytes Tx'd unsigned long ulRxClass2FrameRate; /* Rate/sec of Class 2 frames Rx'd unsigned long ulRxClass3FrameRate; /* Rate/sec of Class 3 frames Rx'd unsigned long ulRxClassFFrameRate; /* Rate/sec of Class F frames Rx'd unsigned long ulRxOtherFrameRate; /* Rate/sec of other frames Rx'd unsigned long ulRxClass2ByteRate; /* Rate/sec of Class 2 frames Rx'd unsigned long ulRxClass3ByteRate; /* Rate/sec of Class 3 Bytes Rx'd unsigned long ulRxClassFByteRate; /* Rate/sec of Class F Bytes Rx'd unsigned long ulRxOtherByteRate; /* Rate/sec of other Bytes Rx'd

*/ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

Continues >

154 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

unsigned long ulPLOGIsSent; unsigned long ulPLOGIsRx; unsigned long ulPLOGIAcceptsSent; unsigned long ulPLOGIAccepts; unsigned long ulPLOGIsReturned; unsigned long ulFLOGIsSent; unsigned long ulFLOGIAccepts; unsigned long ulFLOGIRejects; unsigned long ulFLOGITimeouts; unsigned long ulFrameDiscarded; unsigned long ulTxCutThroughFrames; unsigned long ulRxCutThroughFrames; unsigned long ulTxCutThroughBytes; unsigned long ulRxCutThroughBytes; // Begin extended counters section // U64 u64TxCreditUnavailable; U64 u64RxCreditUnavailable; U64 u64ThrottledCount;

/* /* /* /* /* /* /* /* /* /* /* /* /* /*

Count of PLOGIs sent */ Count of PLOGIs rx */ Count of PLOGI-Accept sent */ Count of PLOGI-Accept received */ Count of PLOGIs returned */ Count of FLOGIs sent */ Count of FLOGIs Accepted */ Count of FLOGIs Rejected */ Count of FLOGIs Timedout */ Frames discarded by the driver */ Count of Cut Through Frames Transmitted Count of Cut Through Frames Received Count of Cut Through Bytes Transmitted Count of Cut Through Bytes Received

*/ */ */ */

/* Count of the number of times that Tx bb_credit went to 0 */ /* Count of the number of times that Rx bb_credit went to 0 */ /* Number of times that a frame transmission was delayed because no Tx bb_credit was available */

unsigned long ulCurrentTxBBCredit;/* Current number of Tx buffers available in this FC port */ unsigned long ulCurrentRxBBCredit;/* Current number of Rx buffers available in the attached FC port*/ unsigned char ucReserved[96]; } FCCounterInfo; /* to support several future counters */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

SmartLibrary Command Reference: Volume 2 | 155

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_DEFINE_HEADER_INFO
Retrieve the Fibre Channel header information for one or more streams. Passing an array of FCConfig structures will allow for retrieval of header information for multiple streams. HTGetStructure(FC_DEFINE_HEADER_INFO, 0, 0, 0, (void*) pFCConfig, sizeof(FCConfig), iHub, iSlot, iPort); HTGetStructure $FC_DEFINE_HEADER_INFO 0 0 0 \ myFCConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCConfig

This structure is used to get or set up the Fibre Channel stream data.
typedef struct tagFCConfig { unsigned char ucEnableSeqCnt;

unsigned char ucCOS; unsigned char ucHalfDuplex; unsigned char ucVerifyAL_PD; unsigned char ucVerifyAL_PS; /* end of TxDESC */ unsigned long ulSOF; unsigned char ucR_CTL; U64 u64SourceWWN; U64 u64DestWWN; unsigned short uiCS_CTL; unsigned char ucFCType; unsigned long ulF_CTL; unsigned char ucSeqID; unsigned char ucDF_CTL; unsigned short uiSeqCnt; unsigned short uiOX_ID; unsigned short uiRX_ID; unsigned long ulParameter; unsigned long ulEOF; unsigned char ucReserved[19]; } FCConfig;

/* 0=disabled; 1=enabled If this has been enabled then the ulSOF & ulEOF fileds are automatically set */ /* Class Of Service: FC_STREAM_COS_NONE, FC_STREAM_COS_2, FC_STREAM_COS_3 */ /* 0=Full duplex mode; 1=Half duplex mode */ /* Verify the ALPA destination 0=don't verify; 1=verify */ /* Verify the ALPA source 0=don't verify; 1=verify */ /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* FC Start Of Frame FC header R_CTL field Source WWN address Destination WWN address FC header CS_CTL field FC header Type field FC header FCTL field FC header SeqID field FC header DF_CTL field FC header SEQ_CNT field FC header OX_ID field FC header RX_ID field FC header Parameter field FC end of frame Reserved */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

156 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_DEFINE_MULTI_STREAM
Append similar copies of a Fibre Channel Stream. Note that index is the stream to copy and count is the number of streams to create. HTSetStructure(FC_DEFINE_MULTI_STREAM, <index>, <count>, 0, (void*) pStreamFC, sizeof(StreamFC), iHub, iSlot, iPort); HTSetStructure $FC_DEFINE_MULTI_STREAM <index> <count> 0 \ myStreamFC \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamFC

This structure is used to configure a stream with the Fibre Channel header in the first 24 bytes of the header. The 40 bytes remaining are filled in with the background pattern.
typedef struct tagStreamFC { /* General Stream Configuration options */ unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream unsigned char ucProtocolType; /* use STREAM_PROTOCOL_FC unsigned char ucRandomLength;

*/ */

/* Enable Random Frame Length NOTE: The Fibre Channel frame length includes the SOF & SOF; however once captured in the receive engine, the length nor the packet will include the SOF & EOF. So the expected length would be 4 bytes less than the one set. */

unsigned char unsigned short

ucRandomData; uiFrameLength; /* frame length counting CRC /* 64 - 2144 for Fibre Channel /* 0 = off, 1 = insert Signature /* field into each frame */ */ */ */

unsigned char

ucTagField;

/* Fibre Channel specific stream config */ unsigned char ucEnableSeqCnt; /* 0=disabled; 1=enabled. Fields are automatically set by the card */ unsigned char ucCOS; /* class of service possible values: FC_STREAM_COS_NONE, FC_STREAM_COS_2, and FC_STREAM_COS_3 */

Continues >

SmartLibrary Command Reference: Volume 2 | 157

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

unsigned char

/* desired duplex mode of link: FULLDUPLEX_MODE, HALFDUPLEX_MODE */ /* NOTE: It is recommended that the verify bits are enabled so that the verification is done by the card, unless the user specifically wants to disable it.*/ unsigned char ucVerifyAL_PD; /* Verify the ALPA destination 0=don't verify; 1=verify(recommended) unsigned char ucVerifyAL_PS; /* Verify the ALPA source 0=don't verify; 1=verify(recommended) unsigned long ulSOF; /* FC Start Of Frame */ unsigned char ucR_CTL; /* FC header R_CTL field */ U64 U64 unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned u64SourceWWN; u64DestWWN; uiCS_CTL; ucFCType; ulF_CTL; ucSeqID; ucDF_CTL; uiSeqCnt; uiOX_ID; uiRX_ID; ulParameter; ulEOF; uiPayLoadLength; ProtocolHeader[40]; ucReserved[64];

ucDuplexMode;

*/ */

short char long char char short short short long long short

unsigned char unsigned char } StreamFC;

/* Source WWN address */ /* Destination WWN address */ /* FC header CS_CTL field */ /* FC header Type field */ /* FC header FCTL field */ /* FC header SeqID field */ /* FC header DF_CTL field */ /* FC header SEQ_CNT field */ /* FC header OX_ID field */ /* FC header RX_ID field */ /* FC header Parameter field */ /* FC End Of Frame */ /* If 0 then use the Background, otherwise, will use this length to set the payload Max = 28 */ /* Not currently used, reserved Defines up to 40 bytes used as VFD3*/ /* Reserved */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

158 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_DEFINE_STREAM
Configure a stream with the Fibre Channel header in the first 24 bytes of the header. HTSetStructure(FC_DEFINE_STREAM, 0, 0, 0, (void*) pStreamFC, sizeof(StreamFC), iHub, iSlot, iPort); HTSetStructure $FC_DEFINE_STREAM 0 0 0 \ myStreamFC \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamFC

This structure is used to configure a stream with the Fibre Channel header in the first 24 bytes of the header. The 40 bytes remaining are filled in with the background pattern.
typedef struct tagStreamFC { /* General Stream Configuration options */ unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream unsigned char ucProtocolType; /* use STREAM_PROTOCOL_FC unsigned char ucRandomLength;

*/ */

/* Enable Random Frame Length. NOTE: The Fibre Channel frame length includes the SOF & SOF; however once captured in the receive engine, the length nor the packet will include the SOF & EOF. So the expected length would be 4 bytes less than the one set. */

unsigned char unsigned short

ucRandomData; uiFrameLength; /* frame length counting CRC /* 64 - 2144 for Fibre Channel /* 0 = off, 1 = insert Signature /* field into each frame */ */ */ */

unsigned char

ucTagField;

/* Fibre Channel specific stream config */ unsigned char ucEnableSeqCnt; /* 0=disabled; 1=enabled If this has been enabled then the ulSOF & ulEOF fields are automatically set by the card */ unsigned char ucCOS; /* class of service possible values: FC_STREAM_COS_NONE, FC_STREAM_COS_2, and FC_STREAM_COS_3 */ unsigned char ucDuplexMode; /* desired duplex mode of link: FULLDUPLEX_MODE, HALFDUPLEX_MODE */ /* NOTE: It is recommended that the verify bits are enabled so that the verification is done by the card, unless the user specifically wants to disable it.*/

Continues >

SmartLibrary Command Reference: Volume 2 | 159

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

unsigned char ucVerifyAL_PD; unsigned char ucVerifyAL_PS; unsigned long unsigned char U64 U64 unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned short char long char char short short short long long short ulSOF; ucR_CTL; u64SourceWWN; u64DestWWN; uiCS_CTL; ucFCType; ulF_CTL; ucSeqID; ucDF_CTL; uiSeqCnt; uiOX_ID; uiRX_ID; ulParameter; ulEOF; uiPayLoadLength; ProtocolHeader[40]; ucReserved[64];

/* Verify the ALPA destination 0=don't verify; 1=verify(recommended) /* Verify the ALPA source 0=don't verify; 1=verify(recommended) /* FC Start Of Frame /* FC header R_CTL field /* Source WWN address /* Destination WWN address

*/ */ */ */ */ */

unsigned char unsigned char } StreamFC;

/* FC header CS_CTL field */ /* FC header Type field */ /* FC header FCTL field */ /* FC header SeqID field */ /* FC header DF_CTL field */ /* FC header SEQ_CNT field */ /* FC header OX_ID field */ /* FC header RX_ID field */ /* FC header Parameter field */ /* FC End Of Frame */ /* If 0 then use the Background, otherwise, will use this length to set the payload Max = 28 */ /* Not currently used, reserved Defines up to 40 bytes used as VFD3*/ /* Reserved */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

160 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_DEFINE_STREAM_128
Configure a stream with 128-byte frame length and the Fibre Channel header in the first 24 bytes of the frame. HTSetStructure(FC_DEFINE_STREAM_128, 0, 0, 0, (void*) pStreamFC128, sizeof(StreamFC128), iHub, iSlot, iPort); HTSetStructure $FC_DEFINE_STREAM_128 0 0 0 \ myStreamFC128 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamFC128

This structure is used to configure a stream with the Fibre Channel header in the first 24 bytes of the header. The 92 bytes remaining are filled in with the background pattern.
typedef struct tagStreamFC128 { /* General Stream Configuration options */ unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream*/ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_FC*/ unsigned char unsigned char unsigned short ucRandomLength; ucRandomData; uiFrameLength; /* Enable Random Frame Length*/

/* frame length counting CRC /* 64 - 2144 for Fibre Channel /* 0 = off, 1 = insert Signature*/ /* field into each frame*/

*/ */

unsigned char

ucTagField;

/* Fibre Channel specific stream config */ unsigned char ucEnableSeqCnt; /* 0=disabled; 1=enabled If this has been enabled then the ulSOF & ulEOF fileds are automatically set by the card*/ unsigned char ucCOS; /* class of service possible values: FC_STREAM_COS_NONE, FC_STREAM_COS_2, and FC_STREAM_COS_3*/ unsigned char ucDuplexMode; /* desired duplex mode of link: FULLDUPLEX_MODE, HALFDUPLEX_MODE*/ /* NOTE: It is recommended that the verify bits are enabled so that the verification is done by the card, unless the user specifically wants to disable it.*/

Continues >

SmartLibrary Command Reference: Volume 2 | 161

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

unsigned char ucVerifyAL_PD;

unsigned char ucVerifyAL_PS;

/* Verify the ALPA destination 0=don't verify; 1=verify(recommended)*/ /* Verify the ALPA source 0=don't verify; 1=verify(recommended)*/ /* FC Start Of Frame*/ /* FC header R_CTL field*/ u64SourceWWN;/* Source WWN address*/ u64DestWWN;/* Destination WWN address*/

unsigned long ulSOF; unsigned char ucR_CTL; U64 U64 unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned short uiCS_CTL; char ucFCType; long ulF_CTL; char ucSeqID; char ucDF_CTL; short uiSeqCnt; short uiOX_ID; short uiRX_ID; long ulParameter; long ulEOF; short uiPayLoadLength;

/* FC header CS_CTL field*/ /* FC header Type field*/ /* FC header FCTL field */ /* FC header SeqID field */ /* FC header DF_CTL field */ /* FC header SEQ_CNT field*/ /* FC header OX_ID field */ /* FC header RX_ID field */ /* FC header Parameter field */ /* FC End Of Frame */ /* If 0 then use the Background, otherwise, will use this length to set the payload Max = 92*/ /* Defines up to 92 bytes used as VFD3*/ /* Reserved */

unsigned char ProtocolHeader[92]; unsigned char ucReserved[74]; } StreamFC128;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

162 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_GET_TX_MODE
Read the transmit mode of the card. HTGetStructure(FC_GET_TX_MODE, 0, 0, 0, (void*) pFCTransmitMode, sizeof(FCTransmitMode), iHub, iSlot, iPort); HTGetStructure $FC_GET_TX_MODE 0 0 0 \ myFCTransmitMode \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCTransmitMode

This structure enables you to change the transmit mode to either use the regular transmit engine or the cut through channel. Values for ucState field of FCTransmitMode include: FC_FABRIC_DOWN_STATE FC_FABRIC_INIT_STATE FC_DEVICE_LOGIN_STATE FC_DEVICE_LOGIN_COMPLETE_STATE FC_PUBLIC_DISCOVERY_STATE FC_PUBLIC_DISCOVERY_COMPLETE_STATE FC_PRIVATE_DISCOVERY_STATE FC_PRIVATE_DISCOVERY_COMPLETE_STATE FC_READY_TO_TEST_STATE

Continues >

SmartLibrary Command Reference: Volume 2 | 163

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

typedef struct tagFCTransmitMode { unsigned char ucTxMode; /* TRANSMIT_ENGINE_MODE is used when send data out on the regular transmit plane. CUT_THROUGH_MODE allows the user to transmit a frame from the cut through channel of the card. This way allows the user to send any pre-defined frame by calling FC_SEND_CUSTOM. */ ucState; /* This is optional if the user */ /* wants to change the state of */ /* the card, they have the ability*/ /* to do so. Use the following */ /* defined state constants */ ucEnablePublicDiscMode; /* Public Discovery Mode Enable A value of 1 means enabled; 0 means disabled */ ucReserved[5];

unsigned char

unsigned char

unsigned char } FCTransmitMode;

164 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_HBA_CONFIG
Configure the timer parameters of the HBA simulation. HTSetStructure(FC_HBA_CONFIG, 0, 0, 0, (void*) pFCHBAConfig, sizeof(FCHBAConfig), iHub, iSlot, iPort); HTSetStructure $FC_HBA_CONFIG 0 0 0 \ myFCHBAConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCHBAConfig

This structure allows the user to configure all the necessary timers involved in the Fibre Channel module acting like a Host Bus Adapter. Note: All timers are measured in units of milliseconds. Possible values to be used in setting the state. These values are bitmaps and can be ANDed or ORed to make any combination. HBA_LINK_UP HBA_DEVICE_LOGIN HBA_DISCOVERY HBA_READY_TO_TEST 0x01 0x02 0x04 0x08

typedef struct tagFCHBAConfig { unsigned longulState; unsigned longulInterStateTimer; unsigned longulErrorRetryCount; unsigned longulErrorRetryTimer; unsigned longulPollRetryCount; unsigned longulPollRetryTimer; /* State of port, refer to bitmaps defined */ /* Amount of time to wait between each state: Linkup -> Login -> Disc -> Ready To Test */ /* On error status for each state, how many times to retry until successful */ /* On error status for each state, how long to wait before trying again */ /* On no change in status for each state how many times to poll the module */ /* On no change in status for each state how long to wait before polling again */

unsigned charucReserved[32]; } FCHBAConfig;

SmartLibrary Command Reference: Volume 2 | 165

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_HBA_MODE_START
Put the FBC card into the HBA simulation mode. HTSetCommand(FC_HBA_MODE_START, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $FC_HBA_MODE_START 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

iType1 Description C Usage

FC_HBA_MODE_STOP
Take out the FBC card out of the HBA simulation mode. HTSetCommand(FC_HBA_MODE_STOP, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $FC_HBA_MODE_STOP 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

166 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description

FC_LINK_DOWN
Will bring down the link on a Fibre Channel port. The link is kept down for the specified duration. This command works as an exact opposite to FC_LINK_UP and can be executed at any state of the card to bring its ports down. HTSetStructure(FC_LINK_DOWN, 0, 0, 0, (void*) pFCLinkDown, sizeof(FCLinkDown), iHub, iSlot, iPort); HTSetStructure $FC_LINK_DOWN 0 0 0 \ myFCLinkDown \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

FCLinkDown

typedef struct tagFCLinkDown { unsigned long unsigned char } FCLinkDown; ulDuration; ucReserved[40]; /* This value in milliseconds determines how long the port (link) stays down.*/

iType1 Description C Usage

FC_LINKUP
Initiate the Link Initialization procedure. HTSetCommand(FC_LINKUP, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $FC_LINKUP 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

SmartLibrary Command Reference: Volume 2 | 167

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_MOD_STREAM
Overwrite one Fibre Channel stream in the list at a given index. HTSetStructure(FC_MOD_STREAM, <index>, <count>, 0, (void*) pStreamFC, sizeof(StreamFC), iHub, iSlot, iPort); HTSetStructure $FC_MOD_STREAM <index> <count> 0 \ myStreamFC \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamFC

This structure is used to configure a stream with the Fibre Channel header in the first 24 bytes of the header. The 40 bytes remaining are filled in with the background pattern.
typedef struct tagStreamFC { /* General Stream Configuration options */ unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream unsigned char ucProtocolType; /* use STREAM_PROTOCOL_FC unsigned char ucRandomLength;

*/ */

/* Enable Random Frame Length NOTE: The Fibre Channel frame length includes the SOF & SOF; however once captured in the receive engine, the length nor the packet will include the SOF & EOF. So the expected length would be 4 bytes less than the one set. */

unsigned char unsigned short

ucRandomData; uiFrameLength; /* frame length counting CRC /* 64 - 2144 for Fibre Channel /* 0 = off, 1 = insert Signature /* field into each frame */ */ */ */

unsigned char

ucTagField;

/* Fibre Channel specific stream config */ unsigned char ucEnableSeqCnt; /* 0=disabled; 1=enabled If this has been enabled then the ulSOF & ulEOF fields are automatically set by the card */ unsigned char ucCOS; /* class of service possible values: FC_STREAM_COS_NONE, FC_STREAM_COS_2, and FC_STREAM_COS_3 */

Continues >

168 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

unsigned char

ucDuplexMode;

unsigned char ucVerifyAL_PD; unsigned char ucVerifyAL_PS; unsigned long ulSOF; unsigned char ucR_CTL; U64 U64 unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned short char long char char short short short long long short u64SourceWWN; u64DestWWN; uiCS_CTL; ucFCType; ulF_CTL; ucSeqID; ucDF_CTL; uiSeqCnt; uiOX_ID; uiRX_ID; ulParameter; ulEOF; uiPayLoadLength; ProtocolHeader[40]; ucReserved[64];

/* desired duplex mode of link: FULLDUPLEX_MODE, HALFDUPLEX_MODE */ /* NOTE: It is recommended that the verify bits are enabled so that the verification is done by the card, unless the user specifically wants to disable it.*/ /* Verify the ALPA destination 0=don't verify; 1=verify(recommended) */ /* Verify the ALPA source 0=don't verify; 1=verify(recommended) */ /* FC Start Of Frame */ /* FC header R_CTL field */ /* Source WWN address /* Destination WWN address */ */

unsigned char unsigned char } StreamFC;

/* FC header CS_CTL field */ /* FC header Type field */ /* FC header FCTL field */ /* FC header SeqID field */ /* FC header DF_CTL field */ /* FC header SEQ_CNT field */ /* FC header OX_ID field */ /* FC header RX_ID field */ /* FC header Parameter field */ /* FC End Of Frame */ /* If 0 then use the Background, otherwise, will use this length to set the payload Max = 28 */ /* Not currently used, reserved Defines up to 40 bytes used as VFD3*/ /* Reserved */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

SmartLibrary Command Reference: Volume 2 | 169

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_PORT_CONFIG
Set up the Fibre Channel port configuration. HTSetStructure(FC_PORT_CONFIG, 0, 0, 0, (void*) pFCPortConfig, sizeof(FCPortConfig), iHub, iSlot, iPort); HTSetStructure $FC_PORT_CONFIG 0 0 0 \ myFCPortConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCPortConfig

typedef struct tagFCPortConfig { unsigned char ucTopology; unsigned char unsigned char unsigned long unsigned long unsigned long unsigned long unsigned long unsigned char ucSpeed; ucDisableTimer; ulRRDYGap; ulRRDYGapRandomEnable; ulRRDYGapSeed; ulRRDYGapMin; ulRRDYGapMax; ucAutoNegotiate;

unsigned short uiBBCreditConfigRx; unsigned char ucStatsMode;

/* For Point-To-Point use TOPOLOGY_PT_2_PT and for LOOP Topology use TOPOLOGY_LOOP /* SPEED_1GHZ, SPEED_2GHZ /* (Not Currently Used) enable or disable timeout timer /* (Not Currently Used) up to a 27-bit val /* (Not Currently Used)enable/disable /* (Not Currently Used) If random set; a 27-bit val /* (Not Currently Used) If random set; a 27-bit val /* (Not Currently Used) If random set; a 27-bit val /* (Not Currently Used) enable or disable auto negotiation /* BB_credit this port will advertise the extended stats counters, use STATS_MODE_NORMAL & STATS_MODE_EXTENDED */

*/ */ */ */ */ */ */ */ */ */

/* Determines weather or not to retrieve

unsigned char } FCPortConfig;

ucReserved[15];

/* Reserved */

170 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_PORT_CONFIG_INFO
Get information on Fibre Channel port configuration. HTGetStructure(FC_PORT_CONFIG_INFO, 0, 0, 0, (void*) pFCPortConfigInfo, sizeof(FCPortConfigInfo), iHub, iSlot, iPort); HTGetStructure $FC_PORT_CONFIG_INFO 0 0 0 \ myFCPortConfigInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCPortConfigInfo

This structure is used to get the Fibre Channel card port configuration information.
typedef struct tagFCPortConfigInfo { unsigned char ucTopology; unsigned char ucSpeed; unsigned char ucDisableTimer; unsigned long unsigned long unsigned long unsigned long unsigned long unsigned char unsigned unsigned unsigned unsigned unsigned unsigned unsigned short short short short long long char

/* topology that is set to, pt-2-pt or loop*/ /* speed the card is set to */ /* (Not Currently Used) enable or disable timeout timer */ ulRRDYGap; /* (Not Currently Used) up to a 27-bit val */ ulRRDYGapRandomEnable;/* (Not Currently Used)enable/disable */ ulRRDYGapSeed; /* (Not Currently Used) If random set; a 27-bit val */ ulRRDYGapMin; /* (Not Currently Used) If random set; a 27-bit val */ ulRRDYGapMax; /* (Not Currently Used) If random set; a 27-bit val */ ucAutoNegotiate; /* (Not Currently Used) enable or disable auto negotiation */ uiBBCreditConfigRx; /* BB_credit this port will advertise */ uiBBCreditConfigTx; /* advertised BB_credit of attached device */ uiBBCreditCurrentRx; /* current BB_credit of this port */ uiBBCreditCurrentTx; /* current BB_credit of attached device */ ulRA_TOV; /* local val or val returned from fabric */ ulED_TOV; /* local val or val returned from fabric */ ucGBICType; /* type of GBIC of port */ ucStatsMode; /* Determines weather or not to retrieve the extended stats counters, use STATS_MODE_NORMAL & STATS_MODE_EXTENDED */

unsigned char

unsigned char ucReserved[15]; } FCPortConfigInfo;

/* Reserved */

SmartLibrary Command Reference: Volume 2 | 171

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_PRIVATE_DISCOVERY
Perform Private Discovery. HTSetCommand(FC_PRIVATE_DISCOVERY, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $FC_PRIVATE_DISCOVERY 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

iType1 Description C Usage

FC_PUBLIC_DISCOVERY
Perform Public Discovery. HTSetCommand(FC_PUBLIC_DISCOVERY, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $FC_PUBLIC_DISCOVERY 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

172 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_RECV_CUSTOM
Receive a frame on cut-through channel. HTGetStructure(FC_RECV_CUSTOM, 0, 0, 0, (void*) pFCCustomFrame, sizeof(FCCustomFrame), iHub, iSlot, iPort); HTGetStructure $FC_RECV_CUSTOM 0 0 0 \ myFCCustomFrame \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCCustomFrame

This structure enables you to set up a custom frame to be sent or received on the cut-through channel. typedef struct tagFCCustomFrame { unsigned long ulLength; unsigned long ulTimeToWait;

unsigned long unsigned char unsigned char unsigned char unsigned char } FCCustomFrame;

ulResponseTime; ucMessageType; ucErrorCodeReturned; ucPayLoad[256]; ucReserved[28];

/* /* /* /* /* /* /* /* /* /*

The total length of the packet */ Min = 0, Max = 256 (0-256) */ Time out value for the response */ packet to the one we are sending. */ in milliseconds */ The time it took for the response */ to get back to the port from the fab*/ Response from the fabric */ If an error occurred, returned code */ User defined packet (in Network byte order) */

SmartLibrary Command Reference: Volume 2 | 173

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_SEND_CUSTOM
Send a frame on cut-through channel. HTSetStructure(FC_SEND_CUSTOM, 0, 0, 0, (void*) pFCCustomFrame, sizeof(FCCustomFrame), iHub, iSlot, iPort); HTSetStructure $FC_SEND_CUSTOM 0 0 0 \ myFCCustomFrame \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCCustomFrame

This structure enables you to set up a custom frame to be sent or received on the cut-through channel. typedef struct tagFCCustomFrame { unsigned long ulLength; unsigned long ulTimeToWait;

unsigned long unsigned char unsigned char unsigned char unsigned char } FCCustomFrame;

ulResponseTime; ucMessageType; ucErrorCodeReturned; ucPayLoad[256]; ucReserved[28];

/* /* /* /* /* /* /* /* /* /*

The total length of the packet */ Min = 0, Max = 256 (0-256) */ Time out value for the response */ packet to the one we are sending. */ in milliseconds */ The time it took for the response */ to get back to the port from the fab*/ Response from the fabric */ If an error occurred, returned code */ User defined packet (in Network byte order) */

174 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_SET_TX_MODE
Set the transmit mode on the card. HTSetStructure(FC_SET_TX_MODE, 0, 0, 0, (void*) pFCTransmitMode, sizeof(FCTransmitMode), iHub, iSlot, iPort); HTSetStructure $FC_SET_TX_MODE 0 0 0 \ myFCTransmitMode \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCTransmitMode

This structure enables you to change the transmit mode to use the regular transmit engine, the cut through channel, or the HBA emulation mode. Use the following for the ucState field of FCTransmitMode: FC_FABRIC_DOWN_STATE FC_FABRIC_INIT_STATE FC_DEVICE_LOGIN_STATE FC_DEVICE_LOGIN_COMPLETE_STATE FC_PUBLIC_DISCOVERY_STATE FC_PUBLIC_DISCOVERY_COMPLETE_STATE FC_PRIVATE_DISCOVERY_STATE FC_PRIVATE_DISCOVERY_COMPLETE_STATE FC_READY_TO_TEST_STATE

Continues >

SmartLibrary Command Reference: Volume 2 | 175

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

typedef struct tagFCTransmitMode { unsigned char ucTxMode; /* TRANSMIT_ENGINE_MODE is used when send data out on the regular transmit plane. CUT_THROUGH_MODE allows the user to transmit a frame from the cut through channel of the card. This way allows the user to send any pre-defined frame by calling FC_SEND_CUSTOM. HBA_EMULATION_MODE is used to set the FBC module in the HBA mode. */ ucState; /* This is optional if the user */ /* wants to change the state of */ /* the card, they have the ability*/ /* to do so. Use the following */ /* defined state constants */ ucEnablePublicDiscMode; /* Public Discovery Mode Enable A value of 1 means its enabled 0 means disabled */ ucReserved[5];

unsigned char

unsigned char

unsigned char } FCTransmitMode;

176 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_STATUS_INFO
Get information on Fibre Channel card device status. HTGetStructure(FC_STATUS_INFO, 0, 0, 0, (void*) pFCStatus, sizeof(FCStatus), iHub, iSlot, iPort); HTGetStructure $FC_STATUS_INFO 0 0 0 \ myFCStatus \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCStatus

This Structure is used to get FC card Device status. /* ulState use: the following bitmaps */ /* Port states */ PORT_LINK_DOWN PORT_LINK_INITIALIZING PORT_LINK_UP /* Fabric specific states */ PORT_DEVICE_LOGIN PORT_DEVICE_LOGIN_COMPLETE PORT_PUBLIC_DISCOVERY PORT_PUBLIC_DISCOVERY_COMPLETE PORT_PRIVATE_DISCOVERY PORT_PRIVATE_DISCOVERY_COMPLETE PORT_READY_TO_TEST /* ulError: use the following bitmaps */ /* Link specific errors */ PORT_LOSS_OF_SYNC PORT_LOSS_OF_SIGNAL PORT_LINK_RESET PORT_TX_FAULT /* Fabric specific errors */ PORT_FABRIC_LOGIN_ERROR PORT_PORT_LOGIN_ERROR PORT_NAME_SERVER_ERROR PORT_INVALID_STATE_ERROR

0x001 0x002 0x004 0x008 0x010 0x020 0x040 0x080 0x100 0x200

0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80

Continues >

SmartLibrary Command Reference: Volume 2 | 177

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

/* ulErrorExtendedInfo: use the following single values (not bitmaps) */ /* Error reason codes */ NO_REASON_CODE 0 INVALID_LS_CMD 1 LOGICAL_ERROR 2 LOGICAL_INVALID_IU_SIZE 3 LOGICAL_BUSY 4 PROTOCOL_ERROR 5 UNABLE_TO_PERFORM_CMD 6 CMD_NOT_SUPPORTED 7 TIMEOUT 8 COS2_UNSUPPORTED 9 COS3_UNSUPPORTED 10 /* ulErrorDetailedInfo use the following single values (not bitmaps) */ /* Error explanation code */ NO_ADDITIONAL_EXPLANATION 0 SERVICE_PARM_OPTIONS 1 SERVICE_PARM_INIT_CTRL 2 SERVICE_PARM_RECP_CTRL 3 SERVICE_PARM_RCV_SIZE 4 SERVICE_PARM_CONCURRENT_SEQS 5 SERVICE_PARM_CREDIT 6 INVALID_PORT_NAME 7 INVALID_NODE_OR_FABRIC_NAME 8 INVALID_COMMON_SERVICE_PARMS 9 CMD_ALREADY_IN_PROGRESS 10 OUT_OF_RESOURCES 11 PORT_IDENTIFIER_NOT_REGISTERED 12 PORT_NAME_NOT_REGISTERED 13 NODE_NAME_NOT_REGISTERED 14 COS_NOT_REGISTERED 15 IP_ADDRESS_NOT_REGISTERED 16 INITIAL_PROCESS_ASSOCIATOR_NOT_REGISTERED 17 FC_4_TYPES_NOT_REGISTERED 18 SYMBOLIC_PORT_NAME_NOT_REGISTERED 19 SYBOLIC_NODE_NAME_NOT_REGISTERED 20 PORT_TYPE_NOT_REGISTERED 21 PORT_IP_ADDRESS_NOT_REGISTERED 22 FABRIC_PORT_NAME_NOT_REGISTERED 23 HARD_ADDRESS_NOT_REGISTERED 24 ACCESS_DENIED 25 UNACCEPTABLE_PORT_IDENTIFIER 26 DATA_BASE_EMPTY 27 NO_OBJECT_REGISTERED_IN_SCOPE 28

Continues >

178 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

typedef struct tagFCStatus { unsigned long ulState; unsigned long ulError; unsigned long unsigned long U64 unsigned long unsigned char } FCStatus;

/* State of port, refer to bitmaps defined*/ /* if port is in error state, the type (bitmap) is reflected here */ ulErrorExtendedInfo;/* may contain reason codes for error*/ ulErrorDetailedInfo;/* may contain explanation codes for error*/ u64ErrorWWN; /* WWN that was being processed when error occurred (if applicable)*/ ulLinkErrorSeen; /* a latched status of link errors*/ ucReserved[16]; /* Reserved */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

SmartLibrary Command Reference: Volume 2 | 179

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_WWN
Configure Fibre Channel emulated nodes and devices. HTSetStructure(FC_WWN, 0, 0, 0, (void*) pFCWWN, sizeof(FCWWN), iHub, iSlot, iPort); HTSetStructure $FC_WWN 0 0 0 \ myFCWWN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCWWN

typedef struct tagFCWWN { U64 u64WWN; /* WWN of emulated device */ unsigned char ucSupportedCOS; /* Supported Classes of Service for this WWN */ unsigned char ucResponseCOS; /* Supported Classes of Service for Fabric or private device. This is a read-only value (FC_WWW_INFO) which is received from the connected fabric switch */ unsigned char ucPublic; /* 1=Public, 0=Private */ unsigned char ucRemote; /* 1=Remote from port, 0=Local to port */ unsigned long ulAddressID; /* 24-bit Address ID of this WWN. This can only be obtained after Public and Private discovery are completed. If this is a loop port the ALPA for this WWN will be in the least significant 8-bits */ unsigned char ucReserved[4]; /* for future use */ } FCWWN;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

180 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_WWN_COUNT_INFO
Get the Fibre Channel card device status. HTGetStructure(FC_WWN_COUNT_INFO, 0, 0, 0, (void*) pFCWWNCount, sizeof(FCWWNCount), iHub, iSlot, iPort); HTGetStructure $FC_WWN_COUNT_INFO 0 0 0 \ myFCWWNCount \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCWWNCount

typedef struct tagFCWWNCount { unsigned long ulWWNCount; } FCWWNCount;

SmartLibrary Command Reference: Volume 2 | 181

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_WWN_INFO
Configure and read Fibre Channel card device WWNs. HTGetStructure(FC_WWN_INFO, 0, 0, 0, (void*) pFCWWN, sizeof(FCWWN), iHub, iSlot, iPort); HTGetStructure $FC_WWN_INFO 0 0 0 \ myFCWWN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FCWWN

typedef struct tagFCWWN { U64 u64WWN; /* WWN of emulated device */ unsigned char ucSupportedCOS; /* Supported Classes of Service for this WWN use: CLASS_OF_SERVICE_3, CLASS_OF_SERVICE_2 */ unsigned char ucResponseCOS; /* Supported Classes of Service for Fabric or private device. This is a read-only value (FC_WWW_INFO) which is received from the connected fabric switch */ unsigned char ucPublic; /* Use PUBLIC_MODE for Public, and PRIVATE_MODE for Private */ unsigned char ucRemote; /* Use REMOTE_MODE for "Remote from port", and LOCAL_MODE for "Local to port" */ unsigned long ulAddressID; /* 24-bit Address ID of this WWN. This can only be obtained after Public and Private discovery are completed. If this is a loop port, the ALPA for this WWN will be in the least significant 8-bits*/ unsigned char ucReserved[4]; /* Reserved */ } FCWWN;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

182 |

SmartLibrary Command Reference: Volume 2

Chapter 4: Fibre Channel (FC) iType1 Commands and Structures

iType1 Description C Usage

FC_WWN_LOGIN
Perform Fabric login. HTSetCommand(FC_WWN_LOGIN, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $FC_WWN_LOGIN 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

SmartLibrary Command Reference: Volume 2 | 183

184 |

SmartLibrary Command Reference: Volume 2

Chapter 5

100 Mb Fast Ethernet (FST)


This chapter describes the Message Function iType1 commands for 100 Mb Fast Ethernet. These have the prefix FST.

In this chapter...

Supported SmartCards and Modules.....186 FST HTSetStructure Summary Table.....187 FST HTGetStructure Summary.....187 FST iType1 Commands and Structures.....188

SmartLibrary Command Reference: Volume 2 | 185

Chapter 5: 100 Mb Fast Ethernet (FST) Supported SmartCards and Modules

Supported SmartCards and Modules


The FST Message Function commands (iType1s) support the following cards.
Chassis SmartCard or Module
SX-7210 ML-7710 ML-7711 ML-7711s

Description
10/100Base-TX Ethernet, MII, 1-port 10/100Base-TX Ethernet, 1-port, SmartMetrics 10/100Base-FX Ethernet, 1-port, multi-mode, 1300nm, SmartMetrics 10/100Base-FX Ethernet, 1-port, single mode, 1310nm, SmartMetrics 10/100Base-T Ethernet, 8-port 10/100Base-T Ethernet, 6-port, SmartMetrics 10/100Base-T Ethernet, 2-port, SmartMetrics 100Base-FX Ethernet, 6-port, multi-mode, 1300nm, SmartMetrics 100Base-FX Ethernet, 6-port, single mode, 1310nm, SmartMetrics

SmartBits 200/2000

SmartBits 600x/6000x
N/A N/A

LAN-3100A LAN-3101A/B LAN-3102A LAN-3111A LAN-3111AS

N/A N/A N/A

Notes and Exceptions


Do not use the FST_CAPTURE_<n> command with the ML-7710 card. Use L3_CAPTURE_<n> instead. All other FST commands (iType1s) and their related structures work with the above SmartCards. The ML-7710 card can also work with L3 commands and with some ETH commands and structures.

186 |

SmartLibrary Command Reference: Volume 2

Chapter 5: 100 Mb Fast Ethernet (FST) FST HTSetStructure Summary Table

FST HTSetStructure Summary Table


iType 1
FST_ALTERNATE_TX
See Page 188

2
0 0 0 0 0

3
0 0 0 0 0

4
0 0 0 0 0

pData
FSTAlternateTx FSTCaptureParams FSTControlAux FSTProtocolParameters FSTVLAN

Description
Set up the alternate Tx stream. Set capture filters and controls. Set flow control and preamble length. Set up ARP and/or PING. Send VLAN tag information.

FST_CAPTURE_PARAMS
See Page 191

FST_CONTROL_AUX
See Page 192

FST_PROTOCOL_PARAMETERS
See Page 196

FST_VLAN
See Page 198

FST HTGetStructure Summary


iType 1
FST_CAPTURE_COUNT_INFO
See Page 188

2
0 0 <x> 0 0

3
0 0 <c> 0 0

4
0 0 0 0 0

pData
FSTCaptureCountInfo FSTCaptureDataInfo FSTCaptureInfo FSTProtocolCounterInfo FSTProtocolParameters

Description
Get number of captured frames. Get captured frame data. Get information about captured frames. Get protocol counters. Get protocol parameters.

FST_CAPTURE_DATA_INFO
See Page 189

FST_CAPTURE_INFO
See Page 189

FST_PROTOCOL_COUNTER_INFO
See Page 193

FST_PROTOCOL_PARAMETER_INFO
See Page 194

SmartLibrary Command Reference: Volume 2 | 187

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

FST iType1 Commands and Structures


iType1 Description C Usage

FST_ALTERNATE_TX
Setup the alternate transmit stream. HTSetStructure(FST_ALTERNATE_TX, 0, 0, 0, (void*) pFSTAlternateTx, sizeof(FSTAlternateTx), iHub, iSlot, iPort); HTSetStructure $FST_ALTERNATE_TX 0 0 0 \ myFSTAlternateTx \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FSTAlternateTx

Used to control the Alternate Transmit stream. This stream will be sent out after a number of normal Layer 2 frames have been sent. typedef struct tagFSTAlternateTx { unsigned char ucEnabled; unsigned char ucCRCErrors; unsigned char ucErrorSymbol; unsigned char ucDribble; unsigned long ulAlternateCount; unsigned short uiDataLength; unsigned char ucData[2048]; } FSTAlternateTx;

/* /* /* /* /* /* /* /*

1 = enable, 0 = disable 1 = enable, 0 = disable 1 = enable, 0 = disable 1 = enable, 0 = disable no. normal frames between each alternate frame length of data in bytes the background data buffer

*/ */ */ */ */ */ */ */

iType1 Description C Usage

FST_CAPTURE_COUNT_INFO
Get the number of captured frames HTGetStructure(FST_CAPTURE_COUNT_INFO, 0, 0, 0, (void*) pFSTCaptureCountInfo, sizeof(FSTCaptureCountInfo), iHub, iSlot, iPort); HTGetStructure $FST_CAPTURE_COUNT_INFO 0 0 0 \ myFSTCaptureCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Continues >

188 |

SmartLibrary Command Reference: Volume 2

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

Related Structure

FSTCaptureCountInfo

Provides a structure in which to get how many frames have been captured on this SmartCard. typedef struct tagFSTCaptureCountInfo { unsigned long ulCaptureCount; /* number of captured packets */ } FSTCaptureCountInfo;

iType1 Description C Usage

FST_CAPTURE_DATA_INFO
Get captured frame data. HTGetStructure(FST_CAPTURE_DATA_INFO, 0, 0, 0, (void*) pFSTCaptureDataInfo, sizeof(FSTCaptureDataInfo), iHub, iSlot, iPort); HTGetStructure $FST_CAPTURE_DATA_INFO 0 0 0 \ myFSTCaptureDataInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FSTCaptureDataInfo

Used to retrieve the data of the frame which has been captured. typedef struct tagFSTCaptureDataInfo { unsigned long ulFrameNum; /* frame number (input) */ unsigned char ucData[2048]; } FSTCaptureDataInfo;

iType1 Description C Usage

FST_CAPTURE_INFO
Get information about captured frames. HTGetStructure(FST_CAPTURE_INFO, <index>, <count>, 0, (void*) pFSTCaptureInfo, sizeof(FSTCaptureInfo), iHub, iSlot, iPort); HTGetStructure $FST_CAPTURE_INFO <index><count>0 \ myFSTCaptureInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Continues >

SmartLibrary Command Reference: Volume 2 | 189

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

Related Structure

FSTCaptureInfo

The structure FSTCaptureInfo contains information about the captured frames as specified by index and count. The embedded structure FSTCaptureFrameInfo contains information about a captured frame. typedef struct tagFSTCaptureInfo { FSTCaptureFrameInfo FrameInfo[FST_MAX_CAPTURE_FRAMES]; } FSTCaptureInfo;

Embedded Structure

FSTCaptureFrameInfo

This structure stores information about frames which have been captured on the SmartCard. It is not for use as an individual structure. An array of these are used in the FSTCaptureInfo structure to retrieve information about many captured frames at a time. Bit values for ucStatus are: FST_CAPTURE_STATUS_CRC FST_CAPTURE_STATUS_ALIGNMENT FST_CAPTURE_STATUS_UNDERSIZE FST_CAPTURE_STATUS_OVERSIZE FST_CAPTURE_STATUS_TRIGGER L3_CAPTURE_STATUS_VLAN L3_CAPTURE_STATUS_SIGNATURE_TAG L3_CAPTURE_STATUS_ALIGNMENT L3_CAPTURE_STATUS_TRIGGER L3_CAPTURE_STATUS_CRC typedef struct tagFSTCaptureFrameInfo { unsigned long ulIndex; /* index of this frame */ unsigned char ucStatus; /* undersize, oversize, trigger, CRC error, or run-disparity (symbol error) use FST_CAPTURE_STATUS_XXX definitions; for ML-7710/ML-5710A use L3_CAPTURE_STATUS_XXX definitions */ unsigned char ucPreambleCount; /* preamble length in nibbles, not available on the ML-7710/ML-5710A */ unsigned short uiLength; /* data length in bytes */ unsigned long ulTimestamp; /* timestamp in units of 100ns */ } FSTCaptureFrameInfo;

190 |

SmartLibrary Command Reference: Volume 2

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

iType1 Description C Usage

FST_CAPTURE_PARAMS
Set capture filters and controls. HTSetStructure(FST_CAPTURE_PARAMS, 0, 0, 0, (void*) pFSTCaptureParams, sizeof(FSTCaptureParams), iHub, iSlot, iPort); HTSetStructure $FST_CAPTURE_PARAMS 0 0 0 \ myFSTCaptureParams \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FSTCaptureParams

Configure the capture engine to capture the correct frames. typedef struct tagFSTCaptureParams { unsigned char ucCRCErrors; /* 1 = enable, 0 = disable */ unsigned char ucOnTrigger; /* 1 = enable, 0 = disable */ unsigned char ucFilterMode; /* 1 = capture filtered frames 0 = capture all frames */ unsigned char ucStartStopOnConditionXMode; /* 1 = stop on cond. 0 = start on condition */ unsigned char uc64BytesOnly; /* 1 = enable, 0 = disable */ unsigned char ucLast64Bytes; /* 1 = last 64 bytes, 0 = first 64 bytes */ unsigned char ucCollisions; /* 1 = enable, 0 = disable */ unsigned char ucStartStop; /* 1 = start capture, 0 = stop capture */ } FSTCaptureParams;

Comments

Enabling ucFilterMode will cause the card to only capture 64 bytes, even if uc64BytesOnly is disabled. Also, ucCRCErrors, ucOnTrigger, ucCollisions, and ucStartStopOnConditionXMode all require ucFilterMode to be enabled.

SmartLibrary Command Reference: Volume 2 | 191

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

iType1 Description C Usage

FST_CONTROL_AUX
Set flow control and preamble length. HTSetStructure(FST_CONTROL_AUX, 0, 0, 0, (void*) pFSTControlAux, sizeof(FSTControlAux), iHub, iSlot, iPort); HTSetStructure $FST_CONTROL_AUX 0 0 0 \ myFSTControlAux \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FSTControlAux

Auxiliary control parameters to enable flow control pause frames and to set the preamble length. typedef struct tagFSTControlAux { unsigned char ucFlowControlPause; unsigned char ucPreambleLen;

/* /* /* /* /* /*

1 = enable, 0 = disable */ preamble length in bits */ (valid: 16, 32, 48, 64) */ ML-7710 and LAN-31xxA/B have */ a fixed preamble, so for */ these cards, set to 64 */

} FSTControlAux;

192 |

SmartLibrary Command Reference: Volume 2

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

iType1 Description C Usage

FST_PROTOCOL_COUNTER_INFO
Get protocol counters. HTGetStructure(FST_PROTOCOL_COUNTER_INFO, 0, 0, 0, (void*) pFSTProtocolCounterInfo, sizeof(FSTProtocolCounterInfo), iHub, iSlot, iPort); HTGetStructure $FST_PROTOCOL_COUNTER_INFO 0 0 0 \ myFSTProtocolCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FSTProtocolCounterInfo

typedef struct tagFSTProtocolCounterInfo { U64 u64RxVLANFrames; /* number U64 u64RxIPFrames; /* number U64 u64IPChecksumErrors; /* number unsigned long ulRxARPReply; /* number unsigned long ulTxARPReply; /* number unsigned long ulTxARPRequest; /* number unsigned long ulRxARPRequest; /* number unsigned long ulRxPingReply; /* number unsigned long ulTxPingReply; /* number unsigned long ulTxPingRequest; /* number unsigned long ulRxPingRequest; /* number } FSTProtocolCounterInfo;

of of of of of of of of of of of

VLAN tag frames received */ IP frames received */ bad IP Checksum frames received*/ ARP Reply frames received */ ARP Reply frames sent */ ARP Request frames sent */ ARP Request frames received */ PING Reply frames received */ PING Reply frames sent */ PING Request frames sent */ PING Request frames received */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

SmartLibrary Command Reference: Volume 2 | 193

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

iType1 Description C Usage

FST_PROTOCOL_PARAMETER_INFO
Get protocol parameter information. HTGetStructure(FST_PROTOCOL_PARAMETER_INFO, 0, 0, 0, (void*) pFSTProtocolParameters, sizeof(FSTProtocolParameters), iHub, iSlot, iPort); HTGetStructure $FST_PROTOCOL_PARAMETER_INFO 0 0 0 \ myFSTProtocolParameters \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FSTProtocolParameters

This structure controls the card's interaction with the network with regards to the PING and ARP protocols, as well as IP checksums. ulProtocolGenerate can be filled with one of two values: FST_PROTOCOL_GENERATE_PING (2), or FST_PROTOCOL_GENERATE_ARP (1). FST_PROTOCOL_GENERATE_PING causes the card to generate ping frames at the interval specified in ulPINGPeriod sent to the address given in ucDstIP. The card does not use the destination MAC when transmitting the PING frame. Instead, it determines the MAC address by issuing ARP requests at the interval given by ulARPPeriod. Periodic ARPs continue until a response is received, at which time peroodic PING frames are transmitted at the interval specified in ulPINGPeriod. When the ARP response is received, the returned MAC address is stored in the ucDstMAC field. This can be later retrieved using the FST_PROTOCOL_PARAMS_INFO message function. FST_PROTOCOL_GENERATE_ARP causes the card to generate ARP frames at the interval specified in ulARPPeriod. The ARP requests are sent to ucDstIP. The returned results are stored and retrievable as described above. If the ucDstIP address is not on the local subnet as given by ucNetmask, the ARP request is sent to the ucDefaultGateway address instead. If the FST_PROTOCOL_PARAMETERS message function is invoked more than once, invocations after the first may start, stop, or restart ARP or PING generation, as follows: +-------------------------------+ | Current State | +-------------------------------+ | Stopped | In Progress | +-----------------+--+-------------+-----------------+ | Requested State |0 | No Action | Stops | | +--+-------------+-----------------+ | |1 | Start | Restart | +-----------------+--+-------------+-----------------+ ulProtocolResponse should be filled with a bitwise OR of the desired flags: FST_PROTOCOL_RESPOND_ARP and FST_PROTOCOL_RESPOND_PING. The FST_PROTOCOL_RESPOND_ARP flag instructs the card whether to respond to incoming ARP requests. If 1, it responds to ARP requests destined for an IP address that matches the cards ucSrcIP for the bits where ucResponseMask is one. (Thus it responds to all ARPs, equivalent to general ARP response on the ML-7710/7711/ 7711s, when ucResponseMask is all zero.) The provided MAC address for the ARP response is always ucSrcMAC. Turning on the FST_PROTOCOL_RESPOND_PING flag causes the card to respond to PING requests received in the case that the requested IP address matches the cards ucSrcIP for the bits where ucResponseMask is zero.

Continues >

194 |

SmartLibrary Command Reference: Volume 2

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

typedef struct tagFSTProtocolParameters { /* Notice: HTResetPort uses the following default values to initialize ports. It doesn't mean to initialize this structure with the default values. */ unsigned char ucDstMAC[6]; /* Destination MAC Address */ /* (default=0.0.0.0.0.0) */ unsigned char ucSrcMAC[6]; /* source MAC Address */ /* (default=0.0.0.0.0.0) */ unsigned char ucDstIP[4]; /* Destination IP Address */ /* (default=192.168.98.21) */ unsigned char ucSrcIP[4]; /* Source IP Address */ /* (default=192.168.98.22) */ unsigned char ucNetMask[4]; /* Source IP Mask (default:0.0.0.0) */ unsigned char ucResponseMask[4]; /* Response IP Mask (default:0.0.0.0) */ unsigned char ucDefaultGateway[4]; /* Default Gateway (default:0.0.0.0) */ unsigned long ulProtocolResponse; /* FST_PROTOCOL_RESPOND_xxx */ /* (default=FST_PROTOCOL_DISABLED) */ unsigned long ulProtocolGenerate; /* FST_PROTOCOL_GENERATE_xxx */ /* (default=FST_PROTOCOL_DISABLED) */ unsigned long ulARPPeriod; /* time to wait before re-sending ARP */ /* (default = 100 unit= 1/10 second) */ unsigned long ulPINGPeriod; /* time to wait before re-sending PING */ /* (default = 20 unit= 1/10 second) */ unsigned char ucIPChecksumEnable; /* Enable=1, disable=0 (default) */ unsigned char ucIPChecksumErrorEnable;/* Enable=1, disalbe=0 (default) */ } FSTProtocolParameters;

SmartLibrary Command Reference: Volume 2 | 195

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

iType1 Description C Usage

FST_PROTOCOL_PARAMETERS
Set up ARP and/or PING. HTSetStructure(FST_PROTOCOL_PARAMETERS, 0, 0, 0, (void*) pFSTProtocolParameters, sizeof(FSTProtocolParameters), iHub, iSlot, iPort); HTSetStructure $FST_PROTOCOL_PARAMETERS 0 0 0 \ myFSTProtocolParameters \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FSTProtocolParameters

This structure controls the card's interaction with the network with regards to the PING and ARP protocols, as well as IP checksums. ulProtocolGenerate can be filled with one of two values: FST_PROTOCOL_GENERATE_PING (2), or FST_PROTOCOL_GENERATE_ARP (1). FST_PROTOCOL_GENERATE_PING causes the card to generate ping frames at the interval specified in ulPINGPeriod sent to the address given in ucDstIP. The card does not use the destination MAC when transmitting the PING frame. Instead, it determines the MAC address by issuing ARP requests at the interval given by ulARPPeriod. Periodic ARPs continue until a response is received, at which time peroodic PING frames are transmitted at the interval specified in ulPINGPeriod. When the ARP response is received, the returned MAC address is stored in the ucDstMAC field. This can be later retrieved using the FST_PROTOCOL_PARAMS_INFO message function. FST_PROTOCOL_GENERATE_ARP causes the card to generate ARP frames at the interval specified in ulARPPeriod. The ARP requests are sent to ucDstIP. The returned results are stored and retrievable as described above. If the ucDstIP address is not on the local subnet as given by ucNetmask, the ARP request is sent to the ucDefaultGateway address instead. If the FST_PROTOCOL_PARAMETERS message function is invoked more than once, invocations after the first may start, stop, or restart ARP or PING generation, as follows: +-------------------------------+ | Current State | +-------------------------------+ | Stopped | In Progress | +-----------------+--+-------------+-----------------+ | Requested State |0 | No Action | Stops | | +--+-------------+-----------------+ | |1 | Start | Restart | +-----------------+--+-------------+-----------------+ ulProtocolResponse should be filled with a bitwise OR of the desired flags: FST_PROTOCOL_RESPOND_ARP and FST_PROTOCOL_RESPOND_PING. The FST_PROTOCOL_RESPOND_ARP flag instructs the card whether to respond to incoming ARP requests. If 1, it responds to ARP requests destined for an IP address that matches the cards ucSrcIP for the bits where ucResponseMask is one. (Thus it responds to all ARPs, equivalent to general ARP response on the ML-7710/7711/ 7711S, when ucResponseMask is all zero.) The provided MAC address for the ARP response is always ucSrcMAC. Turning on the FST_PROTOCOL_RESPOND_PING flag causes the card to respond to PING requests received in the case that the requested IP address matches the cards ucSrcIP for the bits where ucResponseMask is zero.

Continues >

196 |

SmartLibrary Command Reference: Volume 2

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

typedef struct tagFSTProtocolParameters { /* Notice: HTResetPort uses the following default values to initialize ports. It doesn't mean to initialize this structure with the default values. */ unsigned char ucDstMAC[6]; /* Destination MAC Address */ /* (default=0.0.0.0.0.0) */ unsigned char ucSrcMAC[6]; /* source MAC Address */ /* (default=0.0.0.0.0.0) */ unsigned char ucDstIP[4]; /* Destination IP Address */ /* (default=192.168.98.21) */ unsigned char ucSrcIP[4]; /* Source IP Address */ /* (default=192.168.98.22) */ unsigned char ucNetMask[4]; /* Source IP Mask (default:0.0.0.0) */ unsigned char ucResponseMask[4]; /* Response IP Mask (default:0.0.0.0) */ unsigned char ucDefaultGateway[4]; /* Default Gateway (default:0.0.0.0) */ unsigned long ulProtocolResponse; /* FST_PROTOCOL_RESPOND_xxx */ /* (default=FST_PROTOCOL_DISABLED) */ unsigned long ulProtocolGenerate; /* FST_PROTOCOL_GENERATE_xxx */ /* (default=FST_PROTOCOL_DISABLED) */ unsigned long ulARPPeriod; /* time to wait before re-sending ARP */ /* (default = 100 unit= 1/10 second) */ unsigned long ulPINGPeriod; /* time to wait before re-sending PING */ /* (default = 20 unit= 1/10 second) */ unsigned char ucIPChecksumEnable; /* Enable=1, disable=0 (default) */ unsigned char ucIPChecksumErrorEnable;/* Enable=1, disalbe=0 (default) */ } FSTProtocolParameters;

SmartLibrary Command Reference: Volume 2 | 197

Chapter 5: 100 Mb Fast Ethernet (FST) FST iType1 Commands and Structures

iType1 Description C Usage

FST_VLAN
Send VLAN tag information HTSetStructure(FST_VLAN, 0, 0, 0, (void*) pFSTVLAN, sizeof(FSTVLAN), iHub, iSlot, iPort); HTSetStructure $FST_VLAN 0 0 0 \ myFSTVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

FSTVLAN

Enables and configures all Virtual LAN header values. typedef struct tagFSTVLAN { unsigned char ucVLANEnable; unsigned short uiTPID; unsigned char ucPRI; unsigned char ucCFI;

unsigned short uiVID; } FSTVLAN;

/* /* /* /* /* /* /*

1 = enable, 0 = disable */ VLAN type (2 bytes), always 0x8100 */ user priority 0-7 (3 bits) */ use VLAN_PRI_XXX definitions */ 1=RIF present, 0=RIF absent (1 bit)*/ use VLAN_CFI_XXX definitions */ VLAN ID (12 bits) */

198 |

SmartLibrary Command Reference: Volume 2

Chapter 6

Gigabit Ethernet (GIG)


This chapter describes the Message Function iType1 commands for Gigabit Ethernet. These have the prefix GIG. Note: SmartMetrics and TeraMetrics Gigabit Ethernet cards and modules also use additional command types, including the L3 commands (see Chapter 8, SmartMetrics / TeraMetrics (L3)) and NS commands (see Chapter 10, Universal (NS)).

In this chapter...

Supported SmartCards and Modules.....200 GIG HTSetStructure Summary Table.....201 GIG HTGetStructure Summary Table.....202 GIG iType1 Commands and Structures.....203

SmartLibrary Command Reference: Volume 2 | 199

Chapter 6: Gigabit Ethernet (GIG) Supported SmartCards and Modules

Supported SmartCards and Modules


The GIG Message Function commands (iType1s) and their related structures support the following SmartCards and modules.
Chassis SmartCard or Module
GX-1405B GX-1405BS GX-1420B GX-1421A LAN-3200A LAN-3200AS LAN-3201B/C LAN-3300A LAN-3301A LAN-3306A LAN-3310A LAN-3311A LAN-3320A LAN-3321A LAN-3324A LAN-3325A LAN-3327A LAN-3710AL LAN-3710AE LAN-3710AS XLW-3720A XLW-3721A XFP-3730A XFP-3731A

Description
1000Base-SX Ethernet, 1-port, multi-mode, 850nm 1000Base-SX Ethernet, 1-port, single mode, 850nm 10/1000Base Ethernet Copper, 1-port 10/1000Base-T Ethernet, GMI/MII, 1-port 1000Base-SX Ethernet, 2-port, multi-mode, 850nm 1000Base-LX Ethernet, 2-port, single mode, 1310nm 1000Base-X Ethernet, GBIC, 1-port, SmartMetrics See Note below. 10/100/1000Base-T Ethernet, Copper, 2-port, SmartMetric 10/100/1000Base-T Ethernet, Copper, 2-port, TeraMetrics 10/100Base-TX Ethernet, Copper, 4-port, TeraMetrics 1000Base-X Ethernet, GBIC, 2-port, SmartMetrics 1000Base-X Ethernet, GBIC, 2-port, TeraMetrics 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 1-port, TeraMetrics XD 10GBase-ER Ethernet, 1-port, 2-slot, single mode, 1550nm 10GBase-LR Ethernet, 1-port, 2-slot, single mode, 1310nm 10GBase-SR Ethernet, 1-port, 2-slot, single mode, 850nm 10GBase-Ethernet XENPAK MSA, 1-port, 2-slot, SmartMetrics 10GBase-Ethernet XENPAK MSA, 1-port, 2-slot, TeraMetrics 10GBase-Ethernet XFP MSA, 1-port, 1-slot, SmartMetrics 10GBaseEthernet XFP MSA, 1-port, 1-slot, TeraMetrics

SmartBits 200/2000
v v v v

SmartBits 600x/6000x

v v v v v v

v v

Note: The LAN-3201A/B modules can be used to test either Layer 3 or Layer 2 functionality. The GIG commands are used when setting up Traditional tests (generally Layer 2 functionality). The L3 commands are used when setting up SmartMetrics tests (generally Layer 3 functionality). For programming steps for each mode, refer to the SmartLibrary Overview and Procedures manual.
200 | SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG HTSetStructure Summary Table

GIG HTSetStructure Summary Table


iType 1
GIG_STRUC_ALT_TX See Page 203 GIG_STRUC_AUTO_FIBER_NEGOTIATE See Page 204 GIG_STRUC_BG1 See Page 208 GIG_STRUC_BG2 See Page 208 GIG_STRUC_CAPTURE_SETUP See Page 211 GIG_STRUC_FILL_PATTERN See Page 214 GIG_STRUC_MAC_CONFIG See Page 216 GIG_STRUC_TRIGGER See Page 223 GIG_STRUC_TX See Page 224 GIG_STRUC_VFD3 See Page 229

2
0

3
0

4
0

pData
GIGAltTransmit

Description
Set up alternate transmit streams.

GIGAutoFiberNegotiate

Set up AutoFiber Negotiation.

UChar

Set background pattern for alternate frame using an array of unsigned chars. Background pattern for periodic frame, using an array of unsigned chars. Set up capture.

UChar

GIGCaptureSetup

UChar

Set main background pattern, using an array of unsigned chars. Set up the MAC configuration.

GIGMacConfig

GIGTrigger

Set up triggers.

GIGTransmit

Set up transmit.

UChar

Set up VFD3 data, using an array of unsigned chars. To specify VFD3 offset and range, use GIG_STRUC_TX.

SmartLibrary Command Reference: Volume 2 | 201

Chapter 6: Gigabit Ethernet (GIG) GIG HTGetStructure Summary Table

GIG HTGetStructure Summary Table


iType 1
GIG_STRUC_AUTO_FIBER_NEGOTIATE_INFO See Page 206 GIG_STRUC_CAP_COUNT_INFO See Page 209 GIG_STRUC_CAP_DATA_INFO See Page 209 GIG_STRUC_CAP_INFO See Page 210

2
0

3
0

4
0

pData
GIGAutoFiberNegotiate

Description
Get the AutoFiber Negotiation setup.

GIGCaptureCountInfo

Get number of frames captured.

GIGCaptureDataInfo

Get a frames captured data.

<x>

<c>

GIGCaptureInfo

Get info about captured frames; iType2 = index of first frame, iType3 = index of frame following last frame. Get card information.

GIG_STRUC_CARD_INFO See Page 212 GIG_STRUC_COUNTER_INFO See Page 214 GIG_STRUC_IMAGE_VERSIONS See Page 215 GIG_STRUC_MAC_CONFIG_INFO See Page 219 GIG_STRUC_RATE_INFO See Page 222

GIGCardInfo

GIGCounterInfo

Get counter information.

GIGVersions

Returns version information about the equipment in use. Read the MAC configuration parameters. Get rate information.

GIGMacConfig

GIGRateInfo

202 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

GIG iType1 Commands and Structures


iType1 Description C Usage

GIG_STRUC_ALT_TX
Set up alternate Tx stream. HTSetStructure(GIG_STRUC_ALT_TX, 0, 0, 0, (void*) pGIGAltTransmit, sizeof(GIGAltTransmit), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_ALT_TX 0 0 0 \ myGIGAltTransmit \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGAltTransmit

This structure sets some additional transmit parameters, specifically to enable the alternate and periodic frames and to enable PAUSE frame recognition. Note that the periodic frame will begin transmitting as soon as this structure is sent with ucEnableBG2 set to 1. It will continue transmitting with the periodic rate set by the GIGTransmit structure (ulBG2Frequency field) until the GIGAltTransmit structure is sent again with ucEnableBG2 set to 0. Note: Since this command is only valid in traditional mode, please use the ucEnableHoldoff field in the GIGAutoFiberNegotiate(GIG_STRUC_AUTO_FIBER_NEGOTIATE) structure to configure PAUSE frame recognition when SmartMetrics streams are defined. To setup PAUSE Frame Recognition using the ucEnableHoldoff element:

For Traditional mode cards, use GIG_STRUC_ALT_TX command. For SmartMetrics, use GIG_STRUC_AUTO_ FIBER_NEGOTIATE command.

Other cards may have additional requirements. typedef struct tagGIGAltTransmit { unsigned char ucEnableSS1; /* reserved: 0 = default */ unsigned char ucEnableSS2; /* reserved: 0 = default */ unsigned char ucEnableBG1; /* enable alternate frame (0 = default) */ unsigned char ucEnableBG2; /* enable periodic frame (0 = default) */ unsigned char ucEnableHoldoff;/* enable PAUSE frame recognition. See Note above for comments regarding the use of this field. unsigned char ucReserved[3];/* reserved: 0 = default */ } GIGAltTransmit;

SmartLibrary Command Reference: Volume 2 | 203

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_AUTO_FIBER_NEGOTIATE
Set up AutoFiber Negotiation. HTSetStructure(GIG_STRUC_AUTO_FIBER_NEGOTIATE, 0, 0, 0, (void*) pGIGAutoFiberNegotiate, sizeof(GIGAutoFiberNegotiate), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_AUTO_FIBER_NEGOTIATE 0 0 0 \ myGIGAutoFiberNegotiate \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
Notes: ucInfiniteRetryMode: GIG_RETRY_16 GIG_RETRY_16_RX - ucPreambleLen - ucEnableJumboFrame 0 2

GIGAutoFiberNegotiate

This structure sets and retrieves the parameters for AutoFiber Negotiation.

Retry 16 Retry infinite Retry 16 and wait for receive packet to retry again

GIG_RETRY_INFINITE 1

These fields currently only apply for the LAN-33xxA modules:

- ucCollisionBackoffAggressiveness - ucInfiniteRetryMode uiLinkConfiguration: This field is only applicable to TeraMetrics LAN cards/modules. For TeraMetrics LAN XD cards/ modules use only this field to set link configuration during Autonegotiation. For all TeraMetrics non XD cards use this field and the uiLinkConfiguration field in GIGTransmit to set link configuration for Autonegotiation. The ucEnableHoldoff field does not apply for the LAN-3200A/AS cards. To enable PAUSE frame recognition on these cards, please use the ucEnableHoldoff field for the GIG_STRUC_ALT_TX command instead. LAN-332xA modules do not support the Next Page bit (0x8000) or Acknowledge bit (0x4000).

Continues >

204 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

typedef struct tagGIGAutoFiberNegotiate { unsigned char ucMode;/* 1 = enable auto-negotiation, 0 = disable (0 = default) */ unsigned char ucRestart;/* 1 = restart auto-negotiation, 0 = do not restart (0 = default) */ unsigned short uiLinkConfiguration; /* uiLinkConfiguration to advertise for Autonegotiation*/ unsigned char ucEnableCCode;/* 1 = Use C Code (uiLinkConfiguration) for negotiation, 0 = or not (0 = default) */ unsigned char ucEnableHoldoff;/* enable PAUSE frame recognition (0 = default) */ unsigned char ucIgnoreLink;/* 1 = enable transmitting to continue even though Autonegotiation is not complete. For LAN-3200 cards only. 0 = Normal behaviour */ unsigned char ucPreambleLen;/* Preamble length: Valid lengths are 4,8,12 and 16. */ unsigned char ucEnableJumboFrame;/* Enable/disable jumbo frames */ unsigned char ucCollisionBackoffAggressiveness; /* Valid values are from 1 to 10 */ unsigned char ucInfiniteRetryMode;/* Retry mode after a collision occurs. Use GIG_RETRY_INFINITE, GIG_RETRY_16 or GIG_RETRY_16_RX */ unsigned char ucReserved[2];/* reserved -- not currently in use (0 = default) */ } GIGAutoFiberNegotiate;

SmartLibrary Command Reference: Volume 2 | 205

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_AUTO_FIBER_NEGOTIATE_INFO
Retrieve AutoFiber Negotiation information on TeraMetrics-based modules. HTGetStructure(GIG_STRUC_AUTO_FIBER_NEGOTIATE_INFO, 0, 0, 0, (void*) pGIGAutoFiberNegotiate, sizeof(GIGAutoFiberNegotiate), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_AUTO_FIBER_NEGOTIATE_INFO 0 0 0 \ myGIGAutoFiberNegotiate \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
Notes: ucInfiniteRetryMode: GIG_RETRY_16 GIG_RETRY_16_RX 0 2

GIGAutoFiberNegotiate

This structure sets and retrieves the parameters for AutoFiber Negotiation.

Retry 16 Retry infinite Retry 16 and wait for receive packet to retry again

GIG_RETRY_INFINITE 1

These fields currently only apply for the LAN-3320A, LAN-3321A, LAN-3324A, LAN-3325A and LAN-3327A cards: - Fiber mode only: ucMode, ucRestart, uiLinkConfiguration - Copper mode only: ucPreambleLen, ucEnableJumboFrame, ucCollisionBackoffAggressiveness, ucInfiniteRetryMode These fields currently only apply for the LAN-3301A/3300A cards: - ucPreambleLen - ucEnableJumboFrame - ucCollisionBackoffAggressiveness - ucInfiniteRetryMode uiLinkConfiguration: This field is only applicable to TeraMetrics LAN cards/modules. For TeraMetrics LAN XD cards/ modules use only this field to set link configuration during Autonegotiation. For all TeraMetrics non XD cards use this field and the uiLinkConfiguration field in GIGTransmit to set link configuration for Autonegotiation. The ucEnableHoldoff field does not apply for the LAN-3200A/AS cards. To enable PAUSE frame recognition on these cards, please use the ucEnableHoldoff field for the GIG_STRUC_ALT_TX command instead. LAN-332xA modules do not support the Next Page bit (0x8000) or Acknowledge bit (0x4000).

Continues >

206 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

typedef struct tagGIGAutoFiberNegotiate { unsigned char ucMode;/* 1 = enable auto-negotiation, 0 = disable (0 = default) */ unsigned char ucRestart;/* 1 = restart auto-negotiation, 0 = do not restart (0 = default) */ unsigned short uiLinkConfiguration; /* uiLinkConfiguration to advertise for Autonegotiation */ unsigned char ucEnableCCode;/* 1 = Use C Code (uiLinkConfiguration) for negotiation, 0 = or not (0 = default) */ unsigned char ucEnableHoldoff;/* enable PAUSE frame recognition (0 = default) */ unsigned char ucIgnoreLink;/* 1 = enable transmitting to continue even though Autonegotiation is not complete. For LAN-3200 cards only. 0 = Normal behaviour */ unsigned char ucPreambleLen;/* Preamble length: Valid lengths are 4,8,12 and 16. */ unsigned char ucEnableJumboFrame;/* Enable/disable jumbo frames */ unsigned char ucCollisionBackoffAggressiveness; /* Valid values are from 1 to 10 */ unsigned char ucInfiniteRetryMode;/* Retry mode after a collision occurs. Use GIG_RETRY_INFINITE, GIG_RETRY_16 or GIG_RETRY_16_RX */ unsigned char ucReserved[2];/* reserved -- not currently in use (0 = default) */ } GIGAutoFiberNegotiate;

SmartLibrary Command Reference: Volume 2 | 207

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_BG1
Set background pattern for alternate frame, using an array of unsigned chars. HTSetStructure(GIG_STRUC_BG1, 0, 0, 0, (void*) pUChar, sizeof(UChar), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_BG1 0 0 0 \ myUChar \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

UChar

iType1 Description C Usage

GIG_STRUC_BG2
Set background pattern for periodic frame, using an array of unsigned chars. HTSetStructure(GIG_STRUC_BG2, 0, 0, 0, (void*) pUChar, sizeof(UChar), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_BG2 0 0 0 \ myUChar \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

UChar

208 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_CAP_COUNT_INFO
Get number of frames captured. HTGetStructure(GIG_STRUC_CAP_COUNT_INFO, 0, 0, 0, (void*) pGIGCaptureCountInfo, sizeof(GIGCaptureCountInfo), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_CAP_COUNT_INFO 0 0 0 \ myGIGCaptureCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGCaptureCountInfo

This structure returns the total number of frames captured. Capture must be stopped before retrieving the number of captured packets. typedef struct tagGIGCaptureCountInfo { unsigned long ulCount; /* no. of captured packets (0 to 2048) */ } GIGCaptureCountInfo;

iType1 Description C Usage

GIG_STRUC_CAP_DATA_INFO
Get a frames captured data. HTGetStructure(GIG_STRUC_CAP_DATA_INFO, 0, 0, 0, (void*) pGIGCaptureDataInfo, sizeof(GIGCaptureDataInfo), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_CAP_DATA_INFO 0 0 0 \ myGIGCaptureDataInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGCaptureDataInfo

This structure returns the data of a captured frame. Only one frame's data is retrieved by each call. Set the frame index relative to all captured frames in the ulFrame field BEFORE calling HTGetStructure. Then the data for that frame will be returned in ucData. typedef struct tagGIGCaptureDataInfo { unsigned long ulFrame; /* frame number (input) */ unsigned char ucData[2048]; /* captured frame data */ } GIGCaptureDataInfo;

SmartLibrary Command Reference: Volume 2 | 209

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_CAP_INFO
Get information about captured frames. Note that index is the index of first frame and count is the index of the frame following the last frame. HTGetStructure(GIG_STRUC_CAP_INFO, <index>, <count>, 0, (void*) pGIGCaptureInfo, sizeof(GIGCaptureInfo), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_CAP_INFO <index> <count> 0 \ myGIGCaptureInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGCaptureInfo

This structure receives information about captured frames. The GIGCaptureInfo structure consists of an array of GIGCaptureFrameInfo structures. This allows you to receive information about GIG_MAX_CAPTURE_FRAMES (currently 96) frames. To use this structure, use HTGetStructure with an iType1 of GIG_STRUC_CAP_INFO and a pData of a pointer to a GIGCaptureInfo structure. Also, iType2 must contain the index of the first captured frame to get information about, and iType3 must contain the index of the frame after the last captured frame to get information about. The structure will then return with the FrameInfo array filled with structures describing all the captured frames within the boundaries specified by iType2 and iType3. The FrameInfo structures will give the frame index (relative to all captured frames), a timestamp, a status indicator, and the length of the captured frame. The status field (uiStatus) indicates the status of the frame based on certain bits being set, as specified by the GIG_CAP_XXX definitions. If you perform a bit-wise "AND" (&) on uiStatus with the status characteristic bit to check, you can determine whether or not that characteristic applies to that frame. For the GX-1420B and GX-1405B/BS cards, the actual capture record count is <count> <index>. For example, if you want to retrieve three capture records starting from the 4th captured frame, <index> should be set to 3 and <count> should be set to 6. typedef struct tagGIGCaptureInfo { /* GIGCaptureFrameInfo is defined below */ GIGCaptureFrameInfo FrameInfo[GIG_MAX_CAPTURE_FRAMES]; } GIGCaptureInfo;

Embedded Structure

GIGCaptureFrameInfo

typedef struct tagGIGCaptureFrameInfo { unsigned long ulFrame;/* index of this frame unsigned long reserved1;/* reserved - not currently in use U64 ullTimestamp;/* time stamp in units of 32ns unsigned short uiStatus;/* Possible values (bit mask): GIG_CAP_UNDERSIZE GIG_CAP_OVERSIZE GIG_CAP_TRIGGER GIG_CAP_CRC GIG_CAP_RUN_DISPARITY */ unsigned short uiLength;/* data length in bytes } GIGCaptureFrameInfo;

210 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_CAPTURE_SETUP
Set up capture. HTSetStructure(GIG_STRUC_CAPTURE_SETUP, 0, 0, 0, (void*) pGIGCaptureSetup, sizeof(GIGCaptureSetup), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_CAPTURE_SETUP 0 0 0 \ myGIGCaptureSetup \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGCaptureSetup

This structure sets the capture parameters. If ucFilterMode is enabled, the card will only capture frames with CRC errors, Rx triggers, Tx triggers, or Running Disparity errors, as determined by the ucCRCErrors, ucRxTriggers, ucTxTriggers, and ucRCErrors fields, respectively. If ucStartStopOnConditionMode is set to 0, the card will START capturing upon receiving a frame meeting the conditions determined by the first four parameters (ucCRCErrors, etc). If it is set to 1, the card will STOP capturing upon receiving a frame meeting those conditions. If ucFilterMode is disabled, the card will capture all frames (up to a maximum of 2048). If ucStartStopOnConditionMode is set to 1, the card will capture up to a maximum of 2046 frames. Use the ucStartStop field to start or stop capturing frames. Capture must be stopped before examining any captured data. See Comments below for additional guidelines on capture setup. typedef struct { unsigned char unsigned char unsigned char unsigned char unsigned char tagGIGCaptureSetup ucCRCErrors; ucRxTrigger; ucTxTrigger; ucRCErrors; ucFilterMode;

/* 1 = enable, 0 = disable: 0=default*/ /* 1 = enable, 0 = disable: 0=default*/ /* 1 = enable, 0 = disable: 0=default*/ /* 1 = enable, 0 = disable: 0=default*/ /* 1 = capture filtered frames, 0 = capture all frames: 0=default */ unsigned char ucStartStopOnConditionMode;/* 1 = stop on condition 0 = start on condition (0 = default) */ unsigned char uc64BytesOnly; /* 1 = enable, 0 = disable: 0=default*/ unsigned char ucLast64Bytes; /* 1=last 64 bytes, 0 = first 64 bytes (0=default) */ unsigned char ucStartStop; /* 1=start capture, 0 = stop capture (0=default) */ } GIGCaptureSetup;

Comments

The Gigabit card hardware imposes a limitation on capturing trigger frames. When capturing trigger frames only (ucFilterMode = 1, and ucRxTrigger = 1 or ucTxTrigger = 1) the interframe gap must be at least 128ns. If the gap is set to the Gigabit card minimum of 96ns, the card will capture the frame following the trigger frame instead. If ucStartStopOnConditionMode is set to 0 (start on condition) and ucFilterMode is set to 0, start capture on condition ucRCErrors will not be available. GX-1405B/BS, GX-1420B, GX-1421A, LAN-3200A/AS: Enabling ucFilterMode or ucStartStopOnConditionMode will cause the Gigabit card to capture only 64 bytes, even if uc64BytesOnly is disabled. (Does not apply to LAN-3201B/C.)

SmartLibrary Command Reference: Volume 2 | 211

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_CARD_INFO
Get card information. HTGetStructure(GIG_STRUC_CARD_INFO, 0, 0, 0, (void*) pGIGCardInfo, sizeof(GIGCardInfo), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_CARD_INFO 0 0 0 \ myGIGCardInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGCardInfo

This structure returns information about the current state of the gigabit card. LAN-332xA modules do not support the Next Page bit (0x8000) or Acknowledge bit (0x4000). The GIG_STRUC_CARD_INFO function returns the state of the Configuration Register, as defined in the IEEE 802.3x recommendation (section 37.2.1). Status information is returned in the order of Most Significant Bit (MSB) to Least Significant Bit (LSB), as follows: Bits: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Value: NP Ack RF2 RF1 R R R PS2 PS1 HD FD R R R R R R = Reserved NP = Next Page Ack = Acknowledge FD = Full Duplex HD = Half Duplex Bits RF1/RF2 and PS1/PS2 are used as follows: RF1 RF2 0 0 No error; link OK 0 1 Off-line 1 0 Link failure 1 1 Autonegotiation error PS1 0 0 1 1 PS2 0 1 0 1 No Pause Asymmetric link partner Symmetric Pause Symmetric and Asymmetric toward local

Continues >

212 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

The uiLinkConfiguration field will be set with the GIG_AFN_XXX definitions: GIG_AFN_RESERVED0 GIG_AFN_RESERVED1 GIG_AFN_RESERVED2 GIG_AFN_RESERVED3 GIG_AFN_RESERVED4 GIG_AFN_FULL_DUPLEX GIG_AFN_HALF_DUPLEX GIG_AFN_PAUSE1 GIG_AFN_PAUSE2 GIG_AFN_RESERVED9 GIG_AFN_RESERVED10 GIG_AFN_RESERVED11 GIG_AFN_REMOTE_FAULT1 GIG_AFN_REMOTE_FAULT2 GIG_AFN_ACKNOWLEDGE GIG_AFN_NEXT_PAGE 0x0001 0x0002 0x0004 0x0008 0x0010 0x0020 0x0040 0x0080 0x0100 0x0200 0x0400 0x0800 0x1000 0x2000 0x4000 0x8000

typedef struct tagGIGCardInfo { unsigned short uiLinkConfiguration;/* current link configuration, use the GIG_AFN_XXX values (see above) */ unsigned long ulLinkStateChanges;/* number of times link has been re-established */ } GIGCardInfo;

SmartLibrary Command Reference: Volume 2 | 213

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_COUNTER_INFO
Get counter information. HTGetStructure(GIG_STRUC_COUNTER_INFO, 0, 0, 0, (void*) pGIGCounterInfo, sizeof(GIGCounterInfo), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_COUNTER_INFO 0 0 0 \ myGIGCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGCounterInfo

This structure returns counter information about the Gigabit card. typedef struct tagGIGCounterInfo { U64 ullTxFrames;/* Number of transmitted frames*/ U64 ullTxBytes;/* Reserved; currently not used*/ U64 ullTxTriggers;/* Reserved; currently not used*/ unsigned long ulTxLatency;/* Tx latency counter (50 ns units) U64 ullRxFrames;/* Number of received frames*/ U64 ullRxBytes;/* Number of received bytes*/ U64 ullRxTriggers;/* Number of received triggers*/ unsigned long ulRxLatency;/* Rx latency counter (50 ns units) U64 ullCRCErrors;/* Number of frames with CRC errors*/ U64 ullOverSize;/* Number of oversized frames*/ U64 ullUnderSize;/* Number of undersized frames*/ } GIGCounterInfo;

iType1 Description C Usage

GIG_STRUC_FILL_PATTERN
Set main background pattern, using an array of unsigned chars. Maximum pattern size is 2044 bytes. HTSetStructure(GIG_STRUC_FILL_PATTERN, 0, 0, 0, (void*) pUChar, sizeof(UChar), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_FILL_PATTERN 0 0 0 \ myUChar \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

UChar

214 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_IMAGE_VERSIONS
Gets version information about the hardware and firmware. HTGetStructure(GIG_STRUC_IMAGE_VERSIONS, 0, 0, 0, (void*) pGIGVersions, sizeof(GIGVersions), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_IMAGE_VERSIONS 0 0 0 \ myGIGVersions \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGVersions

This structure returns version information about the equipment being used. Note: The only field supported by LAN TeraMetrics modules is uiFirmwareVersion. typedef struct tagGIGVersions { unsigned short uiFirmwareVersion; unsigned short uiTransmitDataVersion; unsigned short uiTransmitControlVersion; unsigned short uiTransmitLowlevelVersion; unsigned short uiReceiveDataVersion; unsigned short uiReceiveControlVersion; unsigned short uiReceiveLowlevelVersion; unsigned short uiBackplaneControlVersion; unsigned short uiLinkControlVersion; unsigned char ucFirmwareCheck; unsigned char ucTransmitDataCheck; unsigned char ucTransmitControlCheck; unsigned char ucTransmitLowlevelCheck; unsigned char ucReceiveDataCheck; unsigned char ucReceiveControlCheck; unsigned char ucReceiveLowlevelCheck; unsigned char ucBackplaneControlCheck; unsigned char ucLinkControlCheck; unsigned char ucBootVersion; unsigned char ucReserved[16]; } GIGVersions;

SmartLibrary Command Reference: Volume 2 | 215

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_MAC_CONFIG
Set up the MAC configuration. The GIGMacConfig structure sets the parameters for MAC configuration. HTSetStructure(GIG_STRUC_MAC_CONFIG, 0, 0, 0, (void*) pGIGMacConfig, sizeof(GIGMacConfig), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_MAC_CONFIG 0 0 0 \ myGIGMacConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGMacConfig

This structure sets and read back the parameters for MAC configure. NOTE:The following table contains information about field/card compatibility. LAN-3310 LAN-330x LAN-332x XLW-372xA LAN-3311 XFP-373xA ucPreambleLen Y Y Y Y ucEnableJumboFrame Y Y Y Y ucCollisionBackoffAggressiveness N Y Y (Copper ONLY) N ucInfiniteRetryMode Y Y Y (Copper ONLY) N ucEnableObeyPause Y Y Y Y ucLoopBackMode Y Y Y Y uiJumboFrameSize Y Y Y Y uiVLANTPID Y Y Y Y ucMode Y N Y (Fiber ONLY) Y ucRestart Y N Y (Fiber ONLY) Y ucEnableDeficitIdleCount; N N N Y Jumbo frames:

ucEnableJumboFrame works for all TeraMetrics Ethernet modules (jumbo frames apply only to Ethernet). uiJumboFrameSize is used to set the jumbo frame limit on LAN-33xx and XENPAK cards. The maximum limit for jumbo frames is 10K. If it is set to a value lower than 1518, the legal frame size will be set to 1518 (non-VLAN), 1522 (1 VLAN), 1526 (2 VLANs)... and the jumbo frame limit will be 9018 (non-VLAN), 9022 (1 VLAN), 9026 (2 VLANs)... These values are also the default. For example, if you use this field to set the jumbo frame limit to 10000, then frame sizes between 1518 and 10000 are considered jumbo frames, and frames over 10000 are considered oversize. Local XGMII (GIG_PHY_LOOP_LOCAL_XGMII) is a loopback that closes the loop at a SmartBits internal FPGA before the data reaches the XGMII interface. Local DTE XS (GIG_PHY_LOOP_LOCAL_DTE_XS) is a loopback in the XGXS DTE which is an XGMII-to-XAUI interface chip located in the XLW-372xA/XFP-373xA modules. Remote PHY XS (GIG_PHY_LOOP_REMOTE_PHY_XS) is a loopback in the XGXS PHY which is a XAUI-to-XGMII device located in the local XLW-372xA/XFP-373xA modules. Local PCS (GIG_PHY_LOOP_LOCAL_PCS) is a loopback in the PCS (Physical Coding Sublayer) located in the local XLW-372xA/XFP-373xA modules.

Information about ucLoopBackMode:

Continues >

216 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

For ucPreambleLen, use direct numbers such as 4,8,12,16,20,24,28,32.The LAN-33xx modules supports the following loopback modes: GIG_PHY_LOOP_DOWN GIG_PHY_LOOP_PBUS GIG_PHY_LOOP_LOCAL_PHY GIG_PHY_LOOP_REMOTE_PHY GIG_PHY_LOOP_LOCAL_XCVR GIG_PHY_LOOP_REMOTE_XCVR GIG_PHY_LOOP_MONITOR_PHY The XLW-372x modules supports the following loopback modes: GIG_PHY_LOOP_LOCAL_XGMII GIG_PHY_LOOP_LOCAL_DTE_XS GIG_PHY_LOOP_REMOTE_PHY_XS GIG_PHY_LOOP_LOCAL_PCS uiJumboFrameSize - Used to set jumbo frame size limit on the LAN-33xx and XLW-372xcards. The maximum limit for jumbo frame is 10K. If its set to a value lower than 1518 the legal frame size will be set to 1518 (non-vlan),1522(1 vlan), 1526(2 vlans)... and the jumbo frame limit will be 9018 (non-vlan), 9022 (1 vlan) 9026 (2 vlan) ... These values are also the default. ******************************************************************************/ tydef struct tagGIGMacConfig { unsigned char ucPreambleLen; /* Preamble length */ unsigned char ucEnableJumboFrame; /* Enable/disable jumbo frames 1 = enable, 0 = disable (default)*/ unsigned char ucCollisionBackoffAggressiveness; /* Valid values are from 1 to 10 */ unsigned char ucInfiniteRetryMode; /* Retry mode after a collision occurs. Use GIG_RETRY_INFINITE or GIG_RETRY_16 */ unsigned char ucEnableObeyPause; /* Obey PAUSE */

Continues >

SmartLibrary Command Reference: Volume 2 | 217

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

For the LAN-33xx modules: GIG_PHY_LOOP_DOWN GIG_PHY_LOOP_PBUS GIG_PHY_LOOP_LOCAL_PHY GIG_PHY_LOOP_REMOTE_PHY GIG_PHY_LOOP_LOCAL_XCVR GIG_PHY_LOOP_REMOTE_XCVR GIG_PHY_LOOP_MONITOR_PHY For the XLW-372x modules: GIG_PHY_LOOP_LOCAL_XGMII GIG_PHY_LOOP_LOCAL_DTE_XS GIG_PHY_LOOP_REMOTE_PHY_XS GIG_PHY_LOOP_LOCAL_PCS */ unsigned short uiJumboFrameSize; /* Selectable jumbo frame size limit */ unsigned short uiVLANTPID; /* Specifies the VLAN TPID to use in the detection of VLAN frames on the receive side. Zero indicates to use the default value of 0x8100. NOTE: When receiving frames with multiple VLAN tags, the last VLAN tag's TPID must be set to 0x8100 for the port to detect these frames as VLAN frames. For example, 9100 8100 (VLAN frame will be detected) 9100 9100 (VLAN frame will not be detected) */ unsigned char ucMode; /* 1 = enable auto-negotiation, 0 = disable */ unsigned char ucRestart; /* 1 = restart auto-negotiation, 0 = do not restart*/ unsigned char ucEnableDeficitIdleCount; /* For only XLW_3720/21 and XFP3730/31 cards 0 disable (default) 1 enable */ unsigned short uiLinkConfiguration; /* For only TeraMetrics LAN XD cards. If uiLinkConfiguration field is used either in GIG_STRUC_TX or GIG_STRUC_AUTO_FIBER_NEGOTIATE use the same value in this field. */ unsigned char ucReserved[27]; /* reserved */ } GIGMacConfig;

218 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_MAC_CONFIG_INFO
Get information on the MAC configuration. The GIGMacConfig structure reads back the parameters for MAC configuration. HTGetStructure(GIG_STRUC_MAC_CONFIG_INFO, 0, 0, 0, (void*) pGIGMacConfig, sizeof(GIGMacConfig), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_MAC_CONFIG_INFO 0 0 0 \ myGIGMacConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGMacConfig

This structure sets and read back the parameters for MAC configure. NOTE:The following table contains information about field/card compatibility. LAN-3310/3311 LAN-330x LAN-332x XLW-3720/3721 ucPreambleLen Y Y Y Y ucEnableJumboFrame Y Y Y Y ucCollisionBackoffAggressiveness N Y Y (Copper ONLY) N ucInfiniteRetryMode Y Y Y (Copper ONLY) N ucEnableObeyPause Y Y Y Y ucLoopBackMode Y Y Y Y uiJumboFrameSize Y Y Y Y uiVLANTPID Y Y Y Y ucMode Y N Y (Fiber ONLY) Y ucRestart Y N Y (Fiber ONLY) Y ucEnableDeficitIdleCount; N N N Y Jumbo frames:

ucEnableJumboFrame works for all TeraMetrics Ethernet modules (jumbo frames apply only to Ethernet). uiJumboFrameSize is used to set the jumbo frame limit on LAN-33xx and XENPAK cards. The maximum limit for jumbo frames is 10K. If it is set to a value lower than 1518, the legal frame size will be set to 1518 (non-VLAN), 1522 (1 VLAN), 1526 (2 VLANs)... and the jumbo frame limit will be 9018 (non-VLAN), 9022 (1 VLAN), 9026 (2 VLANs)... These values are also the default. For example, if you use this field to set the jumbo frame limit to 10000, then frame sizes between 1518 and 10000 are considered jumbo frames, and frames over 10000 are considered oversize. Local XGMII (GIG_PHY_LOOP_LOCAL_XGMII) is a loopback that closes the loop at a SmartBits internal FPGA before the data reaches the XGMII interface. Local DTE XS (GIG_PHY_LOOP_LOCAL_DTE_XS) is a loopback in the XGXS DTE which is an XGMII-to-XAUI interface chip located in the XLW-3720A/3721A module. Remote PHY XS (GIG_PHY_LOOP_REMOTE_PHY_XS) is a loopback in the XGXS PHY which is a XAUI-to-XGMII device located in the local XLW-3720A/3721A module. Local PCS (GIG_PHY_LOOP_LOCAL_PCS) is a loopback in the PCS (Physical Coding Sublayer) located in the local XLW-3720A/3721A module

Information about ucLoopBackMode:

Continues >

SmartLibrary Command Reference: Volume 2 | 219

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

For ucPreambleLen, use direct numbers such as 4,8,12,16,20,24,28,32.The LAN-33xx modules supports the following loopback modes: GIG_PHY_LOOP_DOWN GIG_PHY_LOOP_PBUS GIG_PHY_LOOP_LOCAL_PHY GIG_PHY_LOOP_REMOTE_PHY GIG_PHY_LOOP_LOCAL_XCVR GIG_PHY_LOOP_REMOTE_XCVR GIG_PHY_LOOP_MONITOR_PHY The XLW-372x modules supports the following loopback modes: GIG_PHY_LOOP_LOCAL_XGMII GIG_PHY_LOOP_LOCAL_DTE_XS GIG_PHY_LOOP_REMOTE_PHY_XS GIG_PHY_LOOP_LOCAL_PCS uiJumboFrameSize - Used to set jumbo frame size limit on the LAN-33xx and XLW-372xcards. The maximum limit for jumbo frame is 10K. If its set to a value lower than 1518 the legal frame size will be set to 1518 (non-vlan),1522(1 vlan), 1526(2 vlans)... and the jumbo frame limit will be 9018 (non-vlan), 9022 (1 vlan) 9026 (2 vlan) ... These values are also the default. ******************************************************************************/ tydef struct tagGIGMacConfig { unsigned char ucPreambleLen; /* Preamble length */ unsigned char ucEnableJumboFrame; /* Enable/disable jumbo frames 1 = enable, 0 = disable (default)*/ unsigned char ucCollisionBackoffAggressiveness; /* Valid values are from 1 to 10 */ unsigned char ucInfiniteRetryMode; /* Retry mode after a collision occurs. Use GIG_RETRY_INFINITE or GIG_RETRY_16 */ unsigned char ucEnableObeyPause; /* Obey PAUSE */

Continues >

220 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

For the LAN-33xx modules: GIG_PHY_LOOP_DOWN GIG_PHY_LOOP_PBUS GIG_PHY_LOOP_LOCAL_PHY GIG_PHY_LOOP_REMOTE_PHY GIG_PHY_LOOP_LOCAL_XCVR GIG_PHY_LOOP_REMOTE_XCVR GIG_PHY_LOOP_MONITOR_PHY For the XLW-372x modules: GIG_PHY_LOOP_LOCAL_XGMII GIG_PHY_LOOP_LOCAL_DTE_XS GIG_PHY_LOOP_REMOTE_PHY_XS GIG_PHY_LOOP_LOCAL_PCS */ unsigned short uiJumboFrameSize; /* Selectable jumbo frame size limit */ unsigned short uiVLANTPID; /* Specifies the VLAN TPID to use in the detection of VLAN frames on the receive side. Zero indicates to use the default value of 0x8100. NOTE: When receiving frames with multiple VLAN tags, the last VLAN tag's TPID must be set to 0x8100 for the port to detect these frames as VLAN frames. For example, 9100 8100 (VLAN frame will be detected) 9100 9100 (VLAN frame will not be detected) */ unsigned char ucMode; /* 1 = enable auto-negotiation, 0 = disable */ unsigned char ucRestart; /* 1 = restart auto-negotiation, 0 = do not restart*/ unsigned char ucEnableDeficitIdleCount; /* For only XLW_3720/21 and XFP3730/31 cards 0 disable (default) 1 enable */ unsigned short uiLinkConfiguration; /* reserved */ unsigned char ucReserved[27]; /* reserved */ } GIGMacConfig;

SmartLibrary Command Reference: Volume 2 | 221

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_RATE_INFO
Get rate information. HTGetStructure(GIG_STRUC_RATE_INFO, 0, 0, 0, (void*) pGIGRateInfo, sizeof(GIGRateInfo), iHub, iSlot, iPort); HTGetStructure $GIG_STRUC_RATE_INFO 0 0 0 \ myGIGRateInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
typedef struct { unsigned long unsigned long unsigned long unsigned long unsigned long unsigned long unsigned long unsigned long unsigned long } GIGRateInfo;

GIGRateInfo
tagGIGRateInfo ulTxFrames; ulTxBytes; ulTxTriggers; ulRxFrames; ulRxBytes; ulRxTriggers; ulCRCErrors; ulOverSize; ulUnderSize; /* /* /* /* /* /* /* /* /* transmitted frames per second reserved -- not currently in use reserved -- not currently in use received frames per second received bytes per second receive triggers per second frames with CRC errors per second oversized frames per second undersized frames per second */ */ */ */ */ */ */ */ */

This structure returns rate counter information about the gigabit card.

222 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_TRIGGER
Set up triggers. Note: The LAN-3201A and LAN-3201B modules do not support triggers in Layer 3 mode (that is, when streams are defined for a port). HTSetStructure(GIG_STRUC_TRIGGER, 0, 0, 0, (void*) pGIGTrigger, sizeof(GIGTrigger), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_TRIGGER 0 0 0 \ myGIGTrigger \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGTrigger

This structure sets up the triggers for a gigabit card. This structure is similar to the HTTrigger function. The ucTriggerMode field can be set to specify what combination of triggers must occur to create a trigger event. typedef struct tagGIGTrigger { unsigned char ucTrigger1Mode;/* reserved - not currently in use (0 = default) */ unsigned char ucTrigger1Range; /* range of trigger 1 (in bytes) (0 = default) */ unsigned short uiTrigger1Offset;/* offset of trigger 1 (in bits) (0 = default) */ unsigned char ucTrigger1Data[8];/* trigger 1 data (0 = default). Only the first */ /* 6 bytes are used. */ unsigned char ucTrigger1Mask[8];/* trigger 1 mask. For all cards except the LAN3710A, be sure to set this value to 0xFF (this enables the trigger to work properly). For the LAN3710A, be sure to set to a non-zero value. */ unsigned char ucTrigger2Mode; /* reserved - not currently in use (0 = default) */ unsigned char ucTrigger2Range; /* range of trigger 2 (in bytes) (0 = default) */ unsigned short uiTrigger2Offset;/* offset of trigger 2 (in bits) (0 = default) */ unsigned char ucTrigger2Data[8];/* trigger 2 data (0 = default). Only the first */ /* 6 bytes are used. */ unsigned char ucTrigger2Mask[8];/* trigger 2 mask. For all cards except the LAN3710A, be sure to set this value to 0xFF (this enables the trigger to work properly). For the LAN3710A, be sure to set to a non-zero value. */ unsigned char ucTriggerMode; /* use trigger combination defines: (GIG_TRIGGER1_ONLY = default) GIG_TRIGGER2_ONLY GIG_TRIGGER1_OR_TRIGGER2 GIG_TRIGGER1_AND_TRIGGER2 GIG_TRIGGER_OFF GIG_QOS_TRIGGER */ unsigned char ucReserved; /* reserved - not currently in use (0 = default) */ } GIGTrigger;

SmartLibrary Command Reference: Volume 2 | 223

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_TX
Set up transmit. HTSetStructure(GIG_STRUC_TX, 0, 0, 0, (void*) pGIGTransmit, sizeof(GIGTransmit), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_TX 0 0 0 \ myGIGTransmit \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

GIGTransmit

This structure sets all the basic transmit parameters for the gigabit card, including the VFDs. References to the Main frame refer to the standard frame (as determined by the transmit parameters); references to the BG1 frame refer to the alternate frame; and references to the BG2 frame refer to the periodic frame. Background data must be set using GIG_STRUC_FILL_PATTERN, GIG_STRUC_BG1, and GIG_STRUC_BG2, all with arrays of unsigned chars, for the main frame, alternate frame, and periodic frame, respectively. Also, while the VFD3 parameters are set in the GIGTransmit structure, the VFD3 data itself is set using GIG_STRUC_VFD3 with an array of unsigned chars. The ucControlBits element is supported only for the GX-1420B SmartCard. Possible logical OR values are: GIG_CONTROL_IP_FLOW_GENERATE GIG_CONTROL_IP_CHECKSUM_INHIBIT GIG_CONTROL_VLAN_GENERATE GIG_TRANSMIT_ERROR_GENERATE GIG_IP_CHECKSUM_ERROR_GENERATE Possible values for ucTransmitMode are: GIG_CONTINUOUS_MODE GIG_SINGLE_BURST_MODE GIG_MULTIBURST_MODE GIG_CONTINUOUS_MULTIBURST_MODE LAN-3710AE/AL/AS: These modules support the following fields: uiMainLength, ulGap, ucMainCRCError, uiVFD1Offset, iVFD1Range, ucVFD1Mode, ulVFD1CycleCount, ucVFD1Data[8], uiVFD2Offset, iVFD2Range, ucVFD2Mode, ulVFD2CycleCount, ucVFD2Data[8], uiVFD3Offset uiVFD3Range, ulVFD3Count, ucVFD3Mode, ulBurstCount, ulMultiburstCount, ulInterBurstGap, ucTransmitMode, uiVFD1BlockCount, uiVFD2BlockCount, uiVFD3BlockCount. 0 1 3 2 0x01 0x02 0x04 0x01 0x02

The ucError element is supported only for the GX-1420B SmartCard. Possible logical OR values are:

LAN-332xA modules do not support the Next Page bit (0x8000) or Acknowledge bit (0x4000).

Continues >

224 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

LAN-3710AE/AL/AS, XLW-372x, and XFP-373x How to calculate VFD3 length/range: VFD3 length (uiVFD3Range) must be calculated by the following formula, or the module may generate intermittent frames with corrupted data: (VFD3_Length in bytes + VFD3_Offset in bytes) <= (Frame Length without CRC in bytes) 16bytes) Examples: 1] VFD3 offset = 0 bytes Frame Length with CRC = 95 bytes Frame Length w/o CRC = 91 bytes Maximum VFD3 length = 75 bytes 2] VFD3 offset = 0 bytes Frame Length with CRC = 100 bytes Frame Length w/o CRC = 96 bytes Maximum VFD3 length = 80 bytes Note: Frame lengths less than 32 bytes (without CRC) are not recommended. typedef struct tagGIGTransmit { unsigned short uiMainLength;

/* length of main packet (bytes) (60 = default) */ unsigned char ucPreambleByteLength; /* preamble length (bytes) (8 = default) */ unsigned char ucFramesPerCarrier; /* reserved, forced to 1 (1 = default) */ unsigned long ulGap; /* interframe gap in units of bit times */ unsigned char ucMainRandomBackground;/* 1 = enable, 0 = disable (0 = default) */ unsigned char ucBG1RandomBackground;/* 1 = enable, 0 = disable (0 = default) */ unsigned char ucBG2RandomBackground;/* 1 = enable, 0 = disable (0 = default) */ unsigned char ucSS1RandomBackground;/* Reserved */ unsigned char ucSS2RandomBackground;/* Reserved */ unsigned char ucMainCRCError; /* 1 = enable, 0 = disable:0=default*/ unsigned char ucBG1CRCError; /* 1 = enable, 0 = disable: 0=default*/ unsigned char ucBG2CRCError; /* 1 = enable, 0 = disable: 0=default */ unsigned char ucSS1CRCError; /* Reserved */ unsigned char ucSS2CRCError; /* Reserved */ unsigned char ucJabberCount; /* for each unit, add 8K bytes to each frame to simulate jabber (0 = default) */ unsigned char ucLoopback; /* 1 = enable, 0 = disable (0 = default) */ unsigned long ulBG1Frequency; /* no. of main frames between each alternate frame (0 = default) */ unsigned long ulBG2Frequency; /* gap between periodic frames, in units of 32ns (0 = default) */ unsigned short uiBG1Length; /* length of alternate frame (bytes) (0= default) */ unsigned short uiBG2Length; /* length of periodic frame (bytes) (0 = default) */

Continues >

SmartLibrary Command Reference: Volume 2 | 225

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

unsigned short uiSS1Length; unsigned unsigned

unsigned short unsigned

unsigned unsigned unsigned short unsigned

unsigned unsigned unsigned unsigned

unsigned

unsigned

/* reserved -- not currently in use (0 = default) */ short uiSS2Length; /* reserved -- not currently in use (0 = default) */ short uiLinkConfiguration;/* use GIG_AFN_XXX values (0x20 = default)For non-TeraMetrics cards/modules use only his field for Link configuration during Autonegotiation. For TeraMetrics non XD cards/modules use this field and the uiLinkConfiguration field in GIG_STRUC_AUTO_FIBER_NEGOTIATE to set link configuration. For TeraMetrics XD cards/modules use the uiLinkConfiguration field in GIG_STRUC_AUTO_FIBER_NEGOTIATE to set link configuration.*/ short uiVFD1Offset; /* bit offset of VFD1: 0=default */ iVFD1Range; /* range of VFD1 (no. of bytes) (0 = default) */ char ucVFD1Mode; /* GIG_VFD_OFF, GIG_VFD_STATIC, GIG_VFD_INCREMENT, GIG_VFD_DECREMENT, or GIG_VFD_RANDOM (GIG_VFD_OFF = default) */ long ulVFD1CycleCount; /* no. of blocks before resetting to initial VFD1 pattern: 0=default*/ char ucVFD1Data[8]; /* initial VFD1 data (0 = default) */ short uiVFD2Offset; /* bit offset of VFD2: 0 = default */ iVFD2Range; /* range of VFD2 (number of bytes) (0 = default) */ char ucVFD2Mode; /* GIG_VFD_OFF, GIG_VFD_STATIC, GIG_VFD_INCREMENT, GIG_VFD_DECREMENT, or GIG_VFD_RANDOM (GIG_VFD_OFF = default) */ long ulVFD2CycleCount; /* no. of blocks before resetting to initial VFD2 pattern: 0=default*/ char ucVFD2Data[8]; /* initial VFD2 data: 0=default */ short uiVFD3Offset; /* bit offset of VFD3: 0 = default */ /* To specify VFD3 data, use GIG_STRUC_VFD3 */ short uiVFD3Range; /* range of VFD3 (number of bytes of VFD3 data per frame) (0 = default). For the LAN-3200A, GX-1405A/ B, and GX-1420A cards, if uiVFD3BlockCount is used (>=2), then the max VFD3 range is limited to 4. For XLW-372xA and XFP-373xA modules, the value of this field should be an integral multiple of 16 bytes.*/ long ulVFD3Count; /* no. of frames worth of VFD3 data (0 = default) Not applicable to LAN TeraMetrics modules, while it is applicable to XLW-372xA and XFP-373xA.*/ char ucVFD3Mode; /* GIG_VFD3_OFF or GIG_VFD3_ON (GIG_VFD3_OFF = default) */

Continues >

226 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

/* reserved -- not currently in use (0 = default) */ unsigned long ulBurstCount; /* number of frames per burst; when ucTransmitMode is set to GIG_CONTINUOUS_MODE, ulBurstCount must be greater than 0 (1 = default) */ unsigned long ulMultiburstCount; /* no. of bursts per multi-burst (1 = default) */ unsigned long ulInterBurstGap; /* gap between multi-bursts (nanoseconds) (0 = default) */ unsigned char ucTransmitMode; /* see GIG_xxx_MODE definitions (GIG_CONTINUOUS_MODE = default)*/ unsigned char ucEchoMode;/* 1 = enable, 0 = disable (0 = default) */ unsigned char ucPeriodicGap;/* gap between main frame and periodic frame, in increments of 32ns; valid values from 0 to 7 (0 to 224ns), but less than 3 defaults to 3 (96ns) (0 = default) */ unsigned char ucCountRcverrOrOvrsz; /* 0 = count oversized pkt errs; 1 = count receive errors (0 = default) */ unsigned char ucGapByBitTimesOrByRate;/* 0 = set ulGap parameter as the number of ns between the end of one packet and the start of the next; 1 = set ulGap parameter as the number of ns between the start of one packet and the start of the next (0 = default) /* unsigned char ucRandomLengthEnable;/* 1 = enable random pkt length 0 = disable (0 = default) */ unsigned short uiVFD1BlockCount; /* no. of VFD1 pattern repeats before next pattern: 1 = default*/ unsigned short uiVFD2BlockCount; /* no. of VFD2 pattern repeats before next pattern: 1 = default*/ unsigned short uiVFD3BlockCount; /* no. of VFD3 pattern repeats before next pattern: 1 = default. */ unsigned char ucControlBits; /* GIG_CONTROL_IP_FLOW_GENERATE, GIG_CONTROL_IP_CHECKSUM_INHIBIT, GIG_CONTROL_VLAN_GENERATE, (0 = default) */ unsigned char ucError; /* 0 = no errors are generated, GIG_TRANSMIT_ERROR_GENERATE, GIG_IP_CHECKSUM_ERROR_GENERATE */ } GIGTransmit;

unsigned char ucMainBG1Mode;

Comment

The ulBurstCount field should be set to a value greater than 0 when ucTransmit mode is set to GIG_CONTINUOUS_MODE. Otherwise, the ulGap value will not take effect, and frames will be transmitted with a minimum gap. For ucVFD1Mode and ucVFD2Mode, the following modes apply: GIG_VFD_OFF GIG_VFD_STATIC GIG_VFD_INCREMENT GIG_VFD_DECREMENT GIG_VFD_RANDOM

Continues >

SmartLibrary Command Reference: Volume 2 | 227

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

Comment (continued)

For ucVFD3Mode, the following modes apply: GIG_VFD3_OFF GIG_VFD3_ON For uiLinkConfiguration, use the GIG_AFN_XXX definitions: GIG_AFN_RESERVED0 0x0001 GIG_AFN_RESERVED1 0x0002 GIG_AFN_RESERVED2 0x0004 GIG_AFN_RESERVED3 0x0008 GIG_AFN_RESERVED4 0x0010 GIG_AFN_FULL_DUPLEX 0x0020 GIG_AFN_HALF_DUPLEX 0x0040 GIG_AFN_PAUSE1 0x0080 GIG_AFN_PAUSE2 0x0100 GIG_AFN_RESERVED9 0x0200 GIG_AFN_RESERVED10 0x0400 GIG_AFN_RESERVED11 0x0800 GIG_AFN_REMOTE_FAULT1 0x1000 GIG_AFN_REMOTE_FAULT2 0x2000 GIG_AFN_ACKNOWLEDGE 0x4000 GIG_AFN_NEXT_PAGE 0x8000 Some GIG_AFN_XXX bits can be combined: PAUSE2 PAUSE1 Pause Flow Control 0 0 None 0 1 Symmetric 1 0 Asymmetric->Link Partner 1 1 Asymmetric->Local Device REMOTE_FAULT2 0 0 1 1 REMOTE_FAULT1 0 1 0 1 Remote Fault Link OK Link Failure Offline Link Configuration Error

228 |

SmartLibrary Command Reference: Volume 2

Chapter 6: Gigabit Ethernet (GIG) GIG iType1 Commands and Structures

iType1 Description C Usage

GIG_STRUC_VFD3
Set VFD3 data, using an array of unsigned chars. To specify VFD3 offset and range, use GIG_STRUC_TX. HTSetStructure(GIG_STRUC_VFD3, 0, 0, 0, (void*) pUChar, sizeof(UChar), iHub, iSlot, iPort); HTSetStructure $GIG_STRUC_VFD3 0 0 0 \ myUChar \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

UChar

LAN-3710AE/AL/AS, XLW-372x, and XFP-373x: VFD3 length (uiVFD3Range) must be calculated by the following formula, or the module may generate intermittent frames with corrupted data: (VFD3_Length in bytes + VFD3_Offset in bytes) <= (Frame Length without CRC in bytes) 16bytes) Examples: 1] VFD3 offset = 0 bytes Frame Length with CRC = 95 bytes Frame Length w/o CRC = 91 bytes Maximum VFD3 length = 75 bytes 2] VFD3 offset = 0 bytes Frame Length with CRC = 100 bytes Frame Length w/o CRC = 96 bytes Maximum VFD3 length = 80 bytes Additionally the VFD3 total buffer size should be an integral multiple of the Number of uiVFD3Range of GIG_STRUC_TX.

SmartLibrary Command Reference: Volume 2 | 229

230 |

SmartLibrary Command Reference: Volume 2

Chapter 7

Layer 2 (L2)
This chapter describes the L2 Message Function iType1 commands.

In this chapter...

Supported Modules.....232 L2 HTGetStructure Summary Table.....232 L2 iType1 Commands and Structures.....233

SmartLibrary Command Reference: Volume 2 | 231

Chapter 7: Layer 2 (L2) Supported Modules

Supported Modules
The L2 iType1 commands and their related structures may be used with the following modules:

Module
ATM-3451A/AS ATM-3453A/AS LAN-3201B/C POS-3500B POS-3500BS

Description
ATM OC3c (STM-1c), 2-port, multi-mode/single mode, 1300/1310nm, TeraMetrics ATM OC3cOC12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/ 1310nm, TeraMetrics 1000Base-X Ethernet, GBIC, 1-port, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, multi-mode, 1300nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, single mode, 1310nm, SmartMetrics

SmartBits 600x/ 6000x


v

v v

L2 HTGetStructure Summary Table


iType 1
L2_READ_COUNTERS See Page 233 L2_READ_RATES See Page 234 0 0 0

2
0

3
0

4
0

pData
L2StatsInfo L2RateInfo

Description
Get L2 statistics information. Get L2 rate information.

232 |

SmartLibrary Command Reference: Volume 2

Chapter 7: Layer 2 (L2) L2 iType1 Commands and Structures

L2 iType1 Commands and Structures


iType1 Description C Usage

L2_READ_COUNTERS
Get L2 statistics information. HTGetStructure(L2_READ_COUNTERS, 0, 0, 0, (void*) pL2StatsInfo, sizeof(L2StatsInfo), iHub, iSlot, iPort); HTGetStructure $L2_READ_COUNTERS 0 0 0 \ myL2StatsInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
u64TxFrame; u64TxByte; u64TxTrigger; u64RxFrame; u64RxByte; u64RxTrigger; u64RxCRCError; u64RxOversize; u64RxUndersize;

L2StatsInfo
Yes Yes Yes Yes Yes Yes Yes No No

The following structure elements apply to ATM-345xA(s) modules:

typedef struct tagL2StatsInfo { U64 u64TxFrame; U64 u64TxByte; U64 u64TxTrigger; unsigned long ulTxLatency; U64 u64RxFrame; U64 u64RxByte; U64 u64RxTrigger; unsigned long ulRxLatency; U64 u64RxCRCError; U64 u64RxOversize; U64 u64RxUndersize; } L2StatsInfo;

/* /* /* /* /* /* /* /* /* /* /*

No. of transmitted frames No. of transmitted bytes No. of transmitted triggers Tx latency counter (50ns units) No. of received frames No. of received bytes No. of receive triggers Rx latency counter (50ns units) No. of frames with CRC errors No. of oversized frames No. of undersized frames

*/ */ */ */ */ */ */ */ */ */ */

Continues >

SmartLibrary Command Reference: Volume 2 | 233

Chapter 7: Layer 2 (L2) L2 iType1 Commands and Structures

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

iType1 Description C Usage

L2_READ_RATES
Get L2 rate information. HTGetStructure(L2_READ_RATES, 0, 0, 0, (void*) pL2RateInfo, sizeof(L2RateInfo), iHub, iSlot, iPort); HTGetStructure $L2_READ_RATES 0 0 0 \ myL2RateInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L2RateInfo
No No Yes No No Yes No No No

The following structure elements apply to ATM-345xA(s) modules: ulTxFrameRate; ulTxByteRate; ulTxTriggerRate; ulRxFrameRate; ulRxByteRate; ulRxTriggerRate; ulRxCRCErrorRate; ulRxOversizeRate; ulRxUndersizeRate;

typedef struct tagL2RateInfo { unsigned long ulTxFrameRate; /* transmitted frames per second unsigned long ulTxByteRate; unsigned long ulTxTriggerRate; unsigned long ulRxFrameRate; unsigned long ulRxByteRate; unsigned long ulRxTriggerRate; unsigned long ulRxCRCErrorRate; unsigned long ulRxOversizeRate; unsigned long ulRxUndersizeRate; } L2RateInfo;

*/

234 |

SmartLibrary Command Reference: Volume 2

Chapter 8

SmartMetrics / TeraMetrics (L3)


This chapter describes the Message Function iType1 commands for SmartMetrics and TeraMetrics cards and modules. These commands have the prefix L3. Note: For a detailed discussion on creating streams, refer to Chapter 5, Traffic Rates and Patterns in the SmartLibrary Overview and Procedures.

In this chapter...

Supported SmartCards and Modules.....236 L3 HTSetStructure Summary.....239 L3 HTGetStructure Summary.....244 L3 HTSetCommand Summary.....246 L3 iType1 Commands and Structures.....248

SmartLibrary Command Reference: Volume 2 | 235

Chapter 8: SmartMetrics / TeraMetrics (L3) Supported SmartCards and Modules

Supported SmartCards and Modules


The L3 commands (iType1s) and their related structures support the following SmartCards and modules.
Table 8-1. Card and Module Support: L3 Message Function iType1 Commands
Chassis SmartCard or Module
FBC-3601A FBC-3602A ATM-3451A/AS ATM-3453A/AS LAN-3101A/B LAN-3102A LAN-3111A LAN-3111As LAN-3201B/C LAN-3300A LAN-3301A LAN-3302A LAN-3306A LAN-3310A LAN-3311A LAN-3320A LAN-3321A LAN-3324A LAN-3325A LAN-3327A LAN-3710AE LAN-3710AL LAN-3710AS

Description
SAN 1G Fibre Channel, 2-port, SmartMetrics SAN 1G and 2G Fibre Channel, 2-port, SmartMetrics ATM OC3c (STM-1c), 2-port, multi-mode/single mode, 1300/1310nm, TeraMetrics ATM OC3cOC12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/1310nm, TeraMetrics 10/100Base-T Ethernet, 6-port, SmartMetrics 10/100Base-T Ethernet, 2-port, SmartMetrics 100Base-FX Ethernet, 6-port, multi-mode, 1300nm, SmartMetrics 100Base-FX Ethernet, 6-port, single mode, 1310nm, SmartMetrics 1000Base-X Ethernet, GBIC, 1-port, SmartMetrics 10/100/1000Base-T Ethernet, Copper, 2-port, SmartMetrics 10/100/1000Base-T Ethernet, Copper, 2-port, TeraMetrics 10/100Base-TX Ethernet, Copper, 2-port, TeraMetrics 10/100Base-TX Ethernet, Copper, 4-port, TeraMetricsXD 1000Base-X Ethernet, GBIC, 2-port, SmartMetrics 1000Base-X Ethernet, GBIC, 2-port, TeraMetrics 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 1-port, TeraMetrics XD 10GBase-ER Ethernet, 1-port, 2-slot, single mode, 1550nm 10GBase-LR Ethernet, 1-port, 2-slot, single mode, 1310nm 10GBase-SR Ethernet, 1-port, 2-slot, single mode, 850nm

SmartBits 200/2000

SmartBits 600x/6000x

236 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) Supported SmartCards and Modules

Table 8-1. Card and Module Support: L3 Message Function iType1 Commands (continued)
Chassis SmartCard or Module
ML-7710 ML-7711 ML-7711S ML-5710A POS-3500B POS-3500Bs POS-3502A POS-3502AS POS-3504AS/AR POS-3505AS/AR POS-3510A/As POS-3511A/As POS-3518AS/AR POS-3519AS/AR XLW-3720A XLW-3721A XFP-3730A XFP-3731A

Description
10/100Base-TX Ethernet, 1-port, SmartMetrics 10/100Base-FX Ethernet, 1-port, multi-mode, 1300nm, SmartMetrics 10/100Base-FX Ethernet, 1-port, single mode, 1310nm, SmartMetrics 10Base-T Ethernet/USB, 2-port, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, multi-mode, 1300nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, single mode, 1310nm, SmartMetrics POS OC-3c (STM-1c), 1-port, multi-mode, 1300nm, SmartMetrics POS OC-3c (STM-1c), 1-port, single mode, 1310nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, TeraMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/1310nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/1310nm, TeraMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310/1550nm, SmartMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310/1550nm, TeraMetrics 10GBase-Ethernet XENPAK MSA, 1-port, 2-slot, SmartMetrics 10GBase-Ethernet XENPAK MSA, 1-port, 2-slot, TeraMetrics 10GBase-Ethernet XFP MSA, 1-port, 1-slot, SmartMetrics 10GBase-Ethernet XFP MSA, 1-port, 1-slot, TeraMetrics

SmartBits 200/2000

SmartBits 600x/6000x

SmartLibrary Command Reference: Volume 2 | 237

Chapter 8: SmartMetrics / TeraMetrics (L3) Supported SmartCards and Modules

Notes and Exceptions

The following commands may be used only with the ML-5710A SmartCard: L3_USB_GET_USB_INFO L3_USB_MODE_ON L3_USB_MODE_OFF

The LAN-3201B/C module can be used in SmartMetrics tests, using the L3 commands. See the related section in this chapter for the basic setup steps.

Note: See Chapter 11, Packet Over SONET (POS) for setup steps for POS TeraMetrics and SmartMetrics modules, which also use the L3 commands.

238 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTSetStructure Summary

L3 HTSetStructure Summary
iType 1
L3_CAPTURE_SETUP See Page 252 L3_DEFINE_ICMP_IPV6_STREAM See Page 255 L3_DEFINE_ICMP_IPV6_STREAM_VLAN See Page 258 L3_DEFINE_ICMP_STREAM See Page 261 L3_DEFINE_ICMP_STREAM_VLAN See Page 263 L3_DEFINE_IP_STREAM See Page 265 L3_DEFINE_IP_STREAM_VLAN See Page 268 L3_DEFINE_IPV6_STREAM See Page 270 L3_DEFINE_IPV6_STREAM_VLAN See Page 273 L3_DEFINE_IPX_STREAM See Page 275 L3_DEFINE_MPLS See Page 277 L3_DEFINE_MULTI_ICMP_IPV6_STREAM See Page 278 L3_DEFINE_MULTI_ICMP_IPV6_STREAM_VLAN <x> See Page 281 L3_DEFINE_MULTI_ICMP_STREAM See Page 284 L3_DEFINE_MULTI_ICMP_STREAM_VLAN See Page 286 L3_DEFINE_MULTI_IP_STREAM See Page 288 L3_DEFINE_MULTI_IP_STREAM_VLAN See Page 290 <x> <c> 0 StreamIPVLAN <x> <c> 0 StreamIP <x> <c> 0 StreamICMPVLAN <x> <c> 0 StreamICMP <c> 0 StreamICMPIPv6VLAN <x> <c> 0 StreamICMPIPv6 Append similar copies of an IPv6 stream with ICMP configurations. Append similar copies of an IPv6 VLAN stream with ICMP configurations. Append similar copies of an IPv4 stream with ICMP configurations. Append similar copies of an IPv4 VLAN stream with ICMP configurations. Append similar copies of an IPv4 stream. Append similar copies of an IPv4 stream with VLAN tagging. <x> 0 0 NSMPLSList 0 0 0 StreamIPX 0 0 0 StreamIPv6VLAN 0 0 0 StreamIPv6 0 0 0 StreamIPVLAN 0 0 0 StreamIP 0 0 0 StreamICMPVLAN 0 0 0 StreamICMP 0 0 0 StreamICMPIPV6VLAN 0 0 0 StreamICMPIPV6 Create a list with one or more IPv6 streams with ICMP configurations. Create a list with one or more IPv6 streams with ICMP configurations. Create a list with one or more IPv4 streams with ICMP configurations. Create a list with one or more IPv4 VLAN streams with ICMP configurations. Create a list with one or more IPv4-compliant Tx streams. Create a list with one or more IPv4-compliant Tx streams with VLAN tagging. Create a list with one or more IPv6-compliant Tx streams. Create a list with one or more IPv6-compliant Tx streams with VLAN tagging. Create a list with one or more IPX-compliant Tx streams. Create a single MPLS stream.

2
0

3
0

4
0

pData
Layer3CaptureSetup

Description
Configure layer 3 capture on a port.

Continues >

SmartLibrary Command Reference: Volume 2 | 239

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTSetStructure Summary

iType 1
L3_DEFINE_MULTI_IPV6_STREAM See Page 292 L3_DEFINE_MULTI_IPV6_STREAM_VLAN See Page 295 L3_DEFINE_MULTI_IPX_STREAM See Page 297 L3_DEFINE_MULTI_SMARTBITS_STREAM See Page 299 L3_DEFINE_MULTI_SMARTBITS_128_STREAM See Page 301 L3_DEFINE_MULTI_STREAM_BINDING See Page 303 L3_DEFINE_MULTI_STREAM_EXTENSION See Page 304 L3_DEFINE_MULTI_TCP_IPV6_STREAM See Page 309 L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN See Page 312 L3_DEFINE_MULTI_TCP_STREAM See Page 315 L3_DEFINE_MULTI_TCP_STREAM_VLAN See Page 317 L3_DEFINE_MULTI_UDP_IPV6_STREAM See Page 319 L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN See Page 322 L3_DEFINE_MULTI_UDP_STREAM See Page 325 L3_DEFINE_MULTI_UDP_STREAM_VLAN See Page 327 L3_DEFINE_SMARTBITS_STREAM See Page 329 L3_DEFINE_SMARTBITS_128_STREAM See Page 331 L3_DEFINE_STREAM_BINDING See Page 333 0 0 0 L3StreamBinding 0 0 0 StreamSmartBits128 0 0 0 StreamSmartBits <x> <c> 0 StreamUDPVLAN <x> <c> 0 StreamUDP <x> <c> 0 StreamUDPIPv6VLAN <x> <c> 0 StreamUDPIPv6 <x> <c> 0 StreamTCPVLAN <x> <c> 0 StreamTCP <x> <c> 0 StreamTCPIPv6VLAN <x> <c> 0 StreamTCPIPv6 <x> <c> 0 L3StreamExtension Define extended stream parameters for multiple streams. Append similar copies of a TCP/IPv6 stream. Append similar copies of a TCP/IPv6 stream with VLAN tagging. Append similar copies of a TCP stream. Append similar copies of a TCP stream with VLAN tagging. Append similar copies of a UDP/IPv6 stream. Append similar copies of a UDP/IPv6 stream with VLAN tagging. Append similar copies of a UDP stream. Append similar copies of a UDP stream with VLAN tagging. Create a list with one or more customizable streams. Create a list with one or more streams with 128 bytes of customizable header. Associate one or multiple streams to a VC or VCs. <x> <c> 0 L3StreamBinding <x> <c> 0 StreamSmartBits128 <x> <c> 0 StreamSmartBits <x> <c> 0 StreamIPX <x> <c> 0 StreamIPv6VLAN

2
<x>

3
<c>

4
0

pData
StreamIPv6

Description
Append similar copies of an IPv6 stream. Append similar copies of an IPv6-compliant Tx stream with VLAN tagging. Append similar copies of an IPX stream. Append similar copies of a SmartBits stream. Append similar copies of a SmartBits stream. Associate multiple streams to VCs.

240 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTSetStructure Summary

iType 1
L3_DEFINE_STREAM_EXTENSION See Page 334 L3_DEFINE_TCP_IPV6_STREAM See Page 340 L3_DEFINE_TCP_IPV6_STREAM_VLAN See Page 343 L3_DEFINE_TCP_STREAM See Page 346 L3_DEFINE_TCP_STREAM_VLAN See Page 348 L3_DEFINE_UDP_IPV6_STREAM See Page 350 L3_DEFINE_UDP_IPV6_STREAM_VLAN See Page 353 L3_DEFINE_UDP_STREAM See Page 356 L3_DEFINE_UDP_STREAM_VLAN See Page 358 L3_DEFINE_VFD See Page 360 L3_DHCP_CONFIG See Page 363 L3_DHCP_RENEW See Page 371 L3_MOD_IPV6_STREAM See Page 402 L3_MOD_IPV6_STREAM_VLAN See Page 405 L3_MOD_ICMP_STREAM See Page 394 L3_MOD_ICMP_STREAM_VLAN See Page 396 L3_MOD_IP_STREAM See Page 398 <x> 0 0 StreamIP <x> 0 0 StreamICMPVLAN <x> 0 0 StreamICMP <x> 0 0 StreamICMPIPV6VLAN <x> 0 0 StreamICMPIPV6 0 0 0 Layer3DHCPRenew 0 0 0 Layer3DHCPConfig Set the rate at which DHCP messages are sent from the client to the server. Transmit a DHCP request message for one or more streams. Overwrite one IPv6 stream with ICMP configuration in the list at a given index. Overwrite one IPv6 VLAN stream with ICMP configuration in the list at a given index. Overwrite one IP stream in the list at a given index. Overwrite one IP VLAN stream in the list at a given index. Overwrite one IP stream in the list at a given index. 0 0 0 NSVFD 0 0 0 StreamUDPVLAN 0 0 0 StreamUDP 0 0 0 StreamUDPIPv6VLAN 0 0 0 StreamUDPIPv6 0 0 0 StreamTCPVLAN 0 0 0 StreamTCP 0 0 0 StreamTCPIPv6VLAN 0 0 0 StreamTCPIPv6

2
0

3
0

4
0

pData
L3StreamExtension

Description
Create a list with one or more stream extensions. Create a list with one or more TCP/IPv6-compliant Tx streams. Create a list with one or more TCP/IPv6-compliant Tx streams with VLAN tagging. Create a list with one or more TCP compliant Tx streams. Create a list with one or more TCP compliant Tx streams with VLAN tagging. Create a list with one or more UDP/IPv6-compliant Tx streams. Create a list with one or more UDP/IPv6-compliant Tx streams with VLAN tagging. Create a list with one or more UDP compliant Tx streams. Create a list with one or more UDP compliant Tx streams with VLAN tagging. Create a list of per-stream VFDs.

SmartLibrary Command Reference: Volume 2 | 241

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTSetStructure Summary

iType 1
L3_MOD_IP_STREAM_VLAN See Page 400 L3_MOD_IPV6_STREAM See Page 400 L3_MOD_IPV6_STREAM_VLAN See Page 405 L3_MOD_MPLS See Page 409 L3_MOD_IPX_STREAM See Page 407 L3_MOD_SMARTBITS_STREAM See Page 410 L3_MOD_SMARTBITS_128_STREAM See Page 412 L3_MOD_STREAM_BINDING See Page 414 L3_MOD_STREAM_EXTENSION See Page 415 L3_MOD_STREAMS_ARRAY See Page 421 L3_MOD_TCP_IPV6_STREAM See Page 426 L3_MOD_TCP_IPV6_STREAM_VLAN See Page 343 L3_MOD_TCP_STREAM See Page 432 L3_MOD_TCP_STREAM_VLAN See Page 434 L3_MOD_UDP_IPV6_STREAM See Page 436 L3_MOD_UDP_IPV6_STREAM_VLAN See Page 438 L3_MOD_UDP_STREAM See Page 441 L3_MOD_UDP_STREAM_VLAN See Page 443 <x> 0 0 StreamUDPVLAN <x> 0 0 StreamUDP <x> 0 0 StreamUDPIPv6VLAN <x> 0 0 StreamUDPIPv6 <x> 0 0 StreamTCPVLAN <x> 0 0 StreamTCP <x> 0 0 StreamTCPIPv6VLAN <x> 0 0 0 0 0 Layer3ModifyStream Array StreamTCPIPv6 Modify a field in a block of streams by overlaying an element from an array. Overwrite one TCP/IPv6 stream in the list at a given index. Overwrite one TCP/IPv6 stream with VLAN tagging in the list at a given index Overwrite one TCP stream in the list at a given index. Overwrite one TCP stream with VLAN tagging in the list at a given index. Overwrite one UDP/IPv6 stream in the list at a given index Overwrite one UDP/IPv6 stream with VLAN tagging in the list at a given index Overwrite one UDP stream in the list at a given index. Overwrite one UDP stream with VLAN tagging in the list at a given index. <x> 0 0 L3StreamExtension <x> 0 0 L3StreamBinding <x> 0 0 StreamSmartBits128 <x> 0 0 StreamSmartBits <x> 0 0 StreamIPX Overwrite one IPX stream in the list at a given index. Overwrite one SmartBits stream in the list at a given index. Overwrite one stream with 128 bytes of customizable header at the given index. Modify the association between a stream and a VC. Modify extended stream parameters. <x> 0 0 NSMPLSList <x> 0 0 StreamIPv6VLAN <x> 0 0 StreamIPv6

2
<x>

3
0

4
0

pData
StreamIPVLAN

Description
Overwrite one IP stream in the list at a given index with VLAN tagging. Overwrite one IPv6 stream in the list at a given index. Overwrite one IPv6 stream with VLAN tagging in the list at a given index. Modify a single MPLS stream.

242 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTSetStructure Summary

iType 1
L3_MOD_VFD See Page 445 L3_SET_ARP_GAP See Page 454 L3_STREAM_GROUP_DEFINE See Page 457 L3_STREAM_TRANSMIT_MODE See Page 462 L3_TX_ADDRESS See Page 464 L3_TX_IPV6_ADDRESS See Page 468 L3_TX_IPV6_PROTOCOL See Page 470 L3_WRITE_STREAM_BG See Page 475 <x> 0 0 L3StreamBGConfig Define the pattern for the stream background specified by "index". 0 0 0 Layer3IPv6Address Configure IPv6 Ping settings. 0 0 0 Layer3IPv6Address Set IPv6-related address information. 0 0 0 0 0 0 Layer3StreamTransmit Mode Layer3Address <x> 0 0 Layer3GroupInfo Defines the Group Id and group characteristics of streams. Sets a port into either group mode or stream mode for transmitting test frames. Set card device address information. 0 0 0 ULong

2
<x>

3
0

4
0

pData
NSVFD

Description
Overwrite one per-stream VFD in the list at a given index. Set ARP gap on all defined streams.

SmartLibrary Command Reference: Volume 2 | 243

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTGetStructure Summary

L3 HTGetStructure Summary
iType 1
L3_ARP_TIMES_INFO See Page 248 L3_CAPTURE_COUNT_INFO See Page 249 L3_CAPTURE_DETAIL_INFO See Page 250 L3_CAPTURE_PACKET_DATA_INFO See Page 251 L3_DEFINED_STREAM_COUNT_INFO See Page 363 L3_DHCP_CONFIG_INFO See Page 364 L3_DHCP_EXTENDED_HOST_INFO See Page 365 L3_DHCP_HOST_INFO See Page 367 L3_DHCP_PORT_COUNTER_INFO See Page 368 L3_DHCP_PORT_SESSION_INFO See Page 368 L3_DHCP_STATS_INFO See Page 372 L3_DHCP_STREAM_COUNT_INFO See Page 373 L3_DHCP_V2_EXTENDED_HOST_INFO See Page 373 L3_DHCP_V2_HOST_INFO See Page 373 L3_HIST_ACTIVE_TEST_INFO See Page 376 L3_HIST_LATENCY_DISTRIBUTION_INFO See Page 378 L3_HIST_RAW_TAGS_INFO See Page 379 0 0 0 Layer3HistTagInfo 0 0 0 Layer3StreamDistributionInfo 0 0 0 Layer3HistActiveTest 0 0 0 Layer3DHCPV2HostInfo 0 0 0 Layer3DHCPV2ExtendedHostInfo 0 0 0 ULong <x> <c> 0 Layer3DHCPStatsInfo <x> <c> 0 Layer3DHCPPortSessionInfo <x> <c> 0 Layer3DHCPPortCounterInfo <x> <c> 0 Layer3DHCPHostInfo <x> <c> 0 Layer3DHCPExtendedHostInfo Get DHCP host extended information from a card. Retrieve statistics for DHCP server host. Retrieve DHCP summary information for a port. Retrieve DHCP port session counters information for a port. Retrieve statistics for DHCP streams. Get the number of DHCP-capable streams. Get extended DHCP host informaton from a specified card. Get DHCP host informaton from a specified port. Get the number of histogram records and active histogram. Get Latency Distribution results. Get Raw Tags histogram records. 0 0 0 Layer3DHCPConfig 0 0 0 ULong Retrieve the count of streams in the list. Get DHCP settings. <x> 0 0 Layer3CaptureData Get captured frame. <x> 0 0 Layer3CaptureDetailInfo 0 0 0 Layer3CaptureCountInfo

2
0

3
0

4
0

pData
ULong

Description
Retrieve ARP Times for each Stream in the list. Get captured frame count. Get packet details.

244 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTGetStructure Summary

iType 1
L3_HIST_SEQUENCE_INFO See Page 380 L3_HIST_V2_LATENCY_INFO See Page 383 L3_HIST_V2_LATENCY_PER_STREAM_INFO See Page 385 0 0 0 Layer3StreamLongLatencyInfo 0 0 0 Layer3LongLatencyInfo

2
0

3
0

4
0

pData
Layer3SequenceInfo

Description
Get Sequence Tracking results. Get Latency over Time histogram results. Get combination histogram results: Latency Distribution, Latency per Stream, Sequence. Read back the pattern for the stream background specified by "index". Read back the stream extension parameters for a given stream specified by "index". Retrieve streams setup information in the streams list. Retrieve streams setup information in the streams list. Determine the transmit mode. Card device address information. Get IPv6-related address information. Get MAC address information from the attached USB device. Retrieve the VFD data starting a a given stream, using iType2 as index.

L3_READ_STREAM_BG See Page 448 L3_READ_STREAM_EXTENSION See Page 449

<x>

L3StreamBGConfig

<x>

L3StreamExtension

L3_STREAM_128_INFO See Page 458 L3_STREAM_INFO See Page 460 L3_STREAM_TRANSMIT_MODE_INFO See Page 463 L3_TX_ADDRESS_INFO See Page 466 L3_TX_IPV6_ADDRESS_INFO See Page 469 L3_USB_GET_USB_INFO See Page 470 L3_VFD_INFO See Page 472

<x>

StreamSmartBits128

<x>

StreamSmartBits

0 0 0 0

0 0 0 0

0 0 0 0

Layer3StreamTransmitMode Layer3Address Layer3IPv6Address USBInfo

<x>

NSVFD

SmartLibrary Command Reference: Volume 2 | 245

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTSetCommand Summary

L3 HTSetCommand Summary
iType 1
L3_ARP_ONE_STREAM See Page 248 L3_ARP_UNRESOLVED See Page 248 L3_CAPTURE_ALL_TYPE See Page 249 L3_CAPTURE_BAD_TYPE See Page 249 L3_CAPTURE_OFF_TYPE See Page 251 L3_CAPTURE_START See Page 254 L3_CAPTURE_STOP See Page 254 L3_CAPTURE_TRIGGERS_TYPE See Page 254 L3_DHCP_GET_ADDRESS See Page 366 L3_DHCP_GET_ADDRESS_ALL See Page 366 L3_DHCP_RELEASE_ADDRESS See Page 370 L3_DHCP_RELEASE_ADDRESS_ALL See Page 370 L3_DHCP_RESTART See Page 371 L3_DHCP_RESTART_ALL See Page 372 L3_ETHERNET_MODE_ON See Page 375 L3_HIST_LATENCY_DISTRIBUTION See Page 377 L3_HIST_RAW_TAGS See Page 379 L3_HIST_SEQUENCE See Page 379 <x> 0 0 0 <x> 0 0 0 0 0 0 Layer3HistDistribution 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Perform DHCP Release on one or more streams. Perform DHCP Release on all streams. Re-initiates the DHCP process for one or more DHCP active streams that are not in Bound State. Re-initiates the DHCP process for all DHCP active streams that are not in Bound State. Enable the Ethernet port. Reset the port after using the RNDIS mode. Specify/activate Latency Distribution histogram for Rx port. Specify/activate Raw Tag histogram for Rx port. Specify/activate Sequence Tracking histogram for Rx port. <x> <c> 0 0 <x> <c> 0 0 Start DHCP exchange for one or more streams. Start DHCP exchange for all streams. 0 0 0 0 Capture trigger frames only. 0 0 0 0 0 0 0 0 Start capture based on events defined by L3_CAPTURE_SETUP. Stop capture. 0 0 0 0 Turn capture off. 0 0 0 0 Capture errors frames only. 0 0 0 0 0 0 0 0

2
<x>

3
0

4
0

pData
0

Description
Send an ARP from the stream specified by index. Re-ARP for streams whose initial ARP did not get resolved. Capture all frames received.

246 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 HTSetCommand Summary

iType 1
L3_HIST_START See Page 381 L3_HIST_V2_LATENCY See Page 382 L3_HIST_V2_LATENCY_DISTRIBUTION See Page 382 L3_HIST_V2_LATENCY_PER_STREAM See Page 384 <x> 0 0 <x> 0 0 Layer3V2Tracking Distribution Layer3V2HistDistribution <x> 0 0 Layer3HistLatency

2
0

3
0

4
0

pData
0

Description
Clear histogram records. Histogram remains in Receive state. Specify/activate Latency over Time histogram for Rx port. Specify/Activate Latency Distribution histogram for Rx port. Specify/activate combination histogram (Latency Distribution, Latency Per Stream, and Sequence) for Rx port. Toggle RNDIS mode on, disabling the Ethernet port. Begin ARP exchange on all defined streams. Stop ARP exchange on all defined streams. Delete a stream group. Toggle USB port off, enabling the Ethernet port. Toggle USB mode on, disabling the Ethernet port.

L3_RNDIS_MODE_ON See Page 454 L3_START_ARPS See Page 455 L3_STOP_ARPS See Page 455 L3_STREAM_GROUP_DELETE See Page 457 L3_USB_MODE_OFF See Page 471 L3_USB_MODE_ON See Page 471

0 0 0 <x> 0 0

0 0 0 0 0 0

0 0 0 0 0 0

0 0 0 Layer3GroupInfo 0 0

SmartLibrary Command Reference: Volume 2 | 247

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

L3 iType1 Commands and Structures


iType1 Description C Usage Tcl Usage

L3_ARP_ONE_STREAM
Send an ARP from the stream specified by "index". HTSetCommand(L3_ARP_ONE_STREAM, <index>, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_ARP_ONE_STREAM <index> 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description

L3_ARP_TIMES_INFO
Retrieve ARP times for each stream in the list. For TeraMetrics modules, the ARP time unit is in 100 nanoseconds. For LAN-3101A/B modules, this command can be used for IPv4 and IPv6 streams. For LAN TeraMetrics modules (LAN-33xx and XLW/XFP-37xx), it can only be used for IPv4 streams.

C Usage

HTGetStructure(L3_ARP_TIMES_INFO, 0, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTGetStructure $L3_ARP_TIMES_INFO 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ULong

iType1 Description C Usage Tcl Usage

L3_ARP_UNRESOLVED
Resend ARP requests for unresolved streams. HTSetCommand(L3_ARP_UNRESOLVED, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_ARP_UNRESOLVED 0 0 0 \ "" \ $iHub $iSlot $iPort

248 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

L3_CAPTURE_ALL_TYPE
Capture all frames received HTSetCommand(L3_CAPTURE_ALL_TYPE, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_CAPTURE_ALL_TYPE 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage Tcl Usage

L3_CAPTURE_BAD_TYPE
Capture errors frames only HTSetCommand(L3_CAPTURE_BAD_TYPE, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_CAPTURE_BAD_TYPE 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage

L3_CAPTURE_COUNT_INFO
Get the count of captured frames HTGetStructure(L3_CAPTURE_COUNT_INFO, 0, 0, 0, (void*) pLayer3CaptureCountInfo, sizeof(Layer3CaptureCountInfo), iHub, iSlot, iPort); HTGetStructure $L3_CAPTURE_COUNT_INFO 0 0 0 \ myLayer3CaptureCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3CaptureCountInfo

A simple structure which returns the number of frames which are in the capture buffer. typedef struct tagLayer3CaptureCountInfo { unsigned long ulCount; /* count of frames in Capture buffer */ } Layer3CaptureCountInfo;

SmartLibrary Command Reference: Volume 2 | 249

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_CAPTURE_DETAIL_INFO
Get details of the packet. Note that "index" is the frame to retrieve information for. HTGetStructure(L3_CAPTURE_DETAIL_INFO, <index>, 0, 0, (void*) pLayer3CaptureDetailInfo, sizeof(Layer3CaptureDetailInfo), iHub, iSlot, iPort); HTGetStructure $L3_CAPTURE_DETAIL_INFO <index> 0 0 \ myLayer3CaptureDetailInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3CaptureDetailInfo

A structure which returns the details of any given capture frame. Note that to make the counters work properly you must transmit a tagged stream, and you must clear the histogram counters by first doing a group stop. This is implemented in ML-7710/7711/7711S cards version 1.07 and greater as well as ML-5710A cards. typedef struct tagLayer3CaptureDetailInfo { unsigned long ulStatus; /* Status bits of the packet, use L3_CAPTURE_STATUS_XXX definitions */ unsigned long ulPacketLength; /*Length of the packet received in bytes*/ unsigned long ulRxTimestamp; /*RxTimeStamp of Packet*/ unsigned long ulTxTimestamp; /*TxTimeStamp of Packet*/ unsigned long ulSequenceNumber; /*Stream transmitted sequence number*/ unsigned long ulStreamNumber; /*Stream number*/ unsigned char reserved[96]; } Layer3CaptureDetailInfo; //120

250 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

L3_CAPTURE_OFF_TYPE
Turn Capture off HTSetCommand(L3_CAPTURE_OFF_TYPE, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_CAPTURE_OFF_TYPE 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage

L3_CAPTURE_PACKET_DATA_INFO
Get the captured frame. Note that "index" is the frame for which to get information. HTGetStructure(L3_CAPTURE_PACKET_DATA_INFO, <index>, 0, 0, (void*) pLayer3CaptureData, sizeof(Layer3CaptureData), iHub, iSlot, iPort); HTGetStructure $L3_CAPTURE_PACKET_DATA_INFO <index> 0 0 \ myLayer3CaptureData \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3CaptureData

Layer3CaptureData is used to retrieve a captured frame from the capture buffer. The length of the frame is given in uiLength, and the captured frame data is put in cData. typedef struct tagLayer3CaptureData { unsigned short uiLength; /* the number of bytes in cData which represent the /* captured frame */ char cData[2048]; /* the captured frame data */ } Layer3CaptureData;

SmartLibrary Command Reference: Volume 2 | 251

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_CAPTURE_SETUP
Configures the capture of specified test frames on a specified port. HTSetStructure(L3_CAPTURE_SETUP, 0, 0, 0, (void*) pLayer3CaptureSetup, sizeof(Layer3CaptureSetup), iHub, iSlot, iPort); HTSetStructure $L3_CAPTURE_SETUP 0 0 0 \ myLayer3CaptureSetup \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3CaptureSetup

Configure the Capture engine to capture the correct frames. Some of the capture events only apply to certain cards: CAPTURE_EVENTS_OUT_OF_SEQUENCE, CAPTURE_EVENTS_SIGNATURE, and CAPTURE_EVENTS_NO_SIGNATURE only apply to the POS-3504As/AR, POS-3505As, LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A. Capture mode (ulCaptureMode) can be one of the following: CAPTURE_MODE_FILTER_ON_EVENTS CAPTURE_MODE_START_ON_EVENTS CAPTURE_MODE_STOP_ON_EVENTS Capture only the frames specified by the CAPTURE_EVENTS element. Begin capturing all frames after the first frame specified by the CAPTURE_EVENTS element. Not supported on LAN-31xxA/B. Capture all frames until the first frame specified by the CAPTURE_EVENTS element. Not supported on LAN-31xxA/B.

Capture length (ulCaptureLength) can be one of the following: CAPTURE_LENGTH_ENTIRE_FRAME CAPTURE_LENGTH_1ST_64_BYTES CAPTURE_LENGTH_LAST_64_BYTES CAPTURE_LENGTH_1ST_128_BYTES CAPTURE_LENGTH_LAST_128_BYTES Capture events (errored frame types: ulCaptureEvents) can be one of the following: CAPTURE_EVENTS_CRC_ERRORS CAPTURE_EVENTS_UNDERSIZE CAPTURE_EVENTS_OVERSIZE CAPTURE_EVENTS_VLAN_TAG CAPTURE_EVENTS_IP_CHECKSUM_ERROR CAPTURE_EVENTS_DATA_INTEGRITY_ERROR CAPTURE_EVENTS_RX_TRIGGER CAPTURE_EVENTS_RUNNING_DISPARITY_ERRORS CAPTURE_EVENTS_COLLISIONS CAPTURE_EVENTS_ALIGNMENT_ERRORS CAPTURE_EVENTS_ALL_FRAMES Frames with CRC errors. Undersize frames. Oversize frames. Reserved Frames with IP checksum errors. Frames with payload errors. Frames with an Rx trigger. Reserved Reserved Reserved All frames.

Continues >

252 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

ATM-345xA(s) modules. These support the following capture modes: CAPTURE_MODE_FILTER_ON_EVENTS CAPTURE_MODE_START_ON_EVENTS They support the following capture lengths: CAPTURE_LENGTH_ENTIRE_FRAME CAPTURE_LENGTH_1ST_64_BYTES CAPTURE_LENGTH_LAST_64_BYTES CAPTURE_LENGTH_1ST_128_BYTES CAPTURE_LENGTH_LAST_128_BYTES They support the following capture events: CAPTURE_EVENTS_RX_TRIGGER (trigger pattern must be set up within the first 48 bytes (cell) of the frame) CAPTURE_EVENTS_ALL_FRAMES typedef struct tagLayer3CaptureSetup { unsigned long ulCaptureMode;/* start, stop, or filter on events */ unsigned long ulCaptureLength;/* number of captured bytes per packet */ unsigned long ulCaptureEvents;/* capture events */ unsigned short uiFilterFrameLength;/* capture length filter frame; please include the CRC length(2 or 4 bytes) */ unsigned char ucReserved;/* not used */ } Layer3CaptureSetup;

SmartLibrary Command Reference: Volume 2 | 253

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

L3_CAPTURE_START
Start capturing using mode and events set up using L3_CAPTURE_SETUP. Clears current records. HTSetCommand(L3_CAPTURE_START, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_CAPTURE_START 0 0 0 \ \ $iHub $iSlot $iPort

iType1 Description C Usage Tcl Usage

L3_CAPTURE_STOP
Stop capture. HTSetCommand(L3_CAPTURE_STOP, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_CAPTURE_STOP 0 0 0 \ \ $iHub $iSlot $iPort

iType1 Description C Usage Tcl Usage

L3_CAPTURE_TRIGGERS_TYPE
Capture Trigger frames only HTSetCommand(L3_CAPTURE_TRIGGERS_TYPE, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_CAPTURE_TRIGGERS_TYPE 0 0 0 \ "" \ $iHub $iSlot $iPort

254 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_ICMP_IPV6_STREAM
Create a list with one or more IPv6 streams with ICMP configurations. HTSetStructure(L3_DEFINE_ICMP_IPV6_STREAM, 0, 0, 0, (void*) pStreamICMPIPv6, sizeof(StreamICMPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_ICMP_IPV6_STREAM 0 0 0 \ myStreamICMPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPIPv6

This structure contains values for IPv6 streams with ICMP configuration. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and is laid into the frame just before the CRC. Use caution when defining the frame length so that the signature does not overwrite important data. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_ICMP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As, and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

SmartLibrary Command Reference: Volume 2 | 255

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamICMPIPv6 { unsigned char ucActive; /* 1 = Enable Stream, 0 = Disable Stream */ unsigned char ucProtocolType; /* STREAM_PROTOCOL_ICMP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except POS-3500/3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* card's background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* Frame length, not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* In bits */ unsigned char ucVFD1Range; /* In bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* From 0(off) to 16,777,215. */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /* The initial VFD byte pattern */

Continues >

256 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short unsigned char unsigned char

/* In bits */ /* In bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* From 0 (off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /* The initial VFD byte pattern */ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char unsigned unsigned unsigned unsigned char char char char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* In bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

/* 0 = off, 1 = insert signature */ /* field into each frame */

DestinationMAC[6]; /* The stream's Dest MAC addr */ SourceMAC[6]; /* The stream's Source MAC addr */ ucTrafficClass; /* Packet priority */ ucNextHeader; /* Identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of hops until frame is dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Similar to gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned char ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ unsigned char ucCode; /* ICMP Code field */ unsigned short uiIdentifier; /* ICMP Identifier field */ unsigned char ucReserved[24]; }StreamICMPIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 257

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_ICMP_IPV6_STREAM_VLAN
Create a list with one or more IPv6 VLAN streams with ICMP configurations. HTSetStructure(L3_DEFINE_ICMP_IPV6_STREAM_VLAN, 0, 0, 0, (void*) pStreamICMPIPv6VLAN, sizeof(StreamICMPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_ICMP_IPV6_STREAM_VLAN 0 0 0 \ myStreamICMPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPIPv6VLAN

This structure contains values for ICMP compliant Streams for IPv6 that use VLAN tagging. The ICMP checksum is calculated automatically using the supplied header fields and inserted into the IP header. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less..

Continues >

258 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamICMPIPv6VLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_ICMP_IPV6_VLAN */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except POS-3500/3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /** VFD1 unsigned unsigned unsigned and VFD2 structure members short uiVFD1Offset; char ucVFD1Range; char ucVFD1Pattern; are /* /* /* /* /* ulVFD1PatternCount; /* /* /* /* ucVFD1StartVal[6]; /* uiVFD2Offset; ucVFD2Range; ucVFD2Pattern; /* /* /* /* /* reserved for later use. Set to 0. **/ in bits */ in bits */ HVFD_ENABLED, HVFD_STATIC, */ HVFD_INCR, HVFD_DECR, */ HVFD_RANDOM, HVFD_NONE */ from 0(off) to 16,777,215.*/ number to incr. or decr. */ through when using inc or */ dec pattern */ the initial VFD byte pattern */ in bits in bits HVFD_ENABLED, HVFD_STATIC, HVFD_INCR, HVFD_DECR, HVFD_RANDOM, HVFD_NONE */ */ */ */ */

unsigned long

unsigned char unsigned short unsigned char unsigned char

Continues >

SmartLibrary Command Reference: Volume 2 | 259

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

/* 0 = off, 1 = insert signature */ /* field into each frame */ /* the Stream's Dest MAC addr */ /* the Stream's Source MAC addr */

unsigned char unsigned char

DestinationMAC[6]; SourceMAC[6];

unsigned char ucTrafficClass; unsigned char ucNextHeader; unsigned unsigned unsigned unsigned unsigned unsigned unsigned

unsigned

/* Packet priority */ /* identifies the header type immediately following the IPV6 header */ char ucHopLimit; /* number of "hops" until frame */ /* will be dropped */ long ulFlowLabel; /* label packets to request special handling */ char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ char RouterIP[16]; /* Similar to gateway address */ char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /*VLAN identifier */

unsigned short VLAN_Vid; unsigned char ucType; unsigned char ucCode; unsigned short uiIdentifier; unsigned char ucReserved[24]; }StreamICMPIPv6VLAN;

/* ICMP Type Number: Echo Request, Reply, etc.*/ /* ICMP Code field */ /* ICMP Identifier field */

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

260 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_ICMP_STREAM
Create a list with one or more ICMP-compliant Tx Streams. HTSetStructure(L3_DEFINE_ICMP_STREAM, 0, 0, 0, (void*) pStreamICMP, sizeof(StreamICMP), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_ICMP_STREAM 0 0 0 \ myStreamICMP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMP

This structure contains values for ICMP-compliant Streams. The IP checksum is calculated automatically using the supplied header fields and inserted into the IP header. Note: For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of module limitations. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and is inserted in the frame just before the CRC. Use caution when defining the frame length so that the Signature field does not overwrite important data. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_ICMP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamICMP { unsigned char ucActive; /* 1 = Enable Stream, 0 = Disable Stream */ unsigned char ucProtocolType; /* STREAM_PROTOCOL_ICMP or STREAM_PROTOCOL_BRIDGED (ATM only)*/ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = Use uiFrameLength Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random length using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* card's background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* Frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* From 0 (off) to 16,777,215. */ /* number to incr. or decr.through when using inc or dec pattern */ unsigned char ucVFD1StartVal[6]; /* The initial VFD byte pattern */

Continues >

SmartLibrary Command Reference: Volume 2 | 261

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short unsigned char unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* From 0 (off) to 16,777,215 /* number to incr. or decr. /* through when using inc or /* dec pattern unsigned char ucVFD2StartVal[6]; /* The initial VFD byte pattern /****************************************************************/ unsigned short unsigned short unsigned char unsigned char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

*/ */ */ */ */

/* 0 = off, 1 = insert signature */ /* field into each frame */

unsigned char DestinationMAC[6]; /* The Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* The Stream's Source MAC addr */ unsigned char TypeOfService; /* The various levels of speed and/or reliability */ unsigned char TimeToLive; /* Number of hops until frame is dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number */ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Netmask address (e.g. 255.255.255.0) */ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1) */ unsigned char ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ unsigned char ucCode; /* ICMP Code field */ unsigned short uiIdentifier; /* ICMP Identifier field */ unsigned char extra[16]; /* Reserved */ unsigned long ulARPOut; unsigned long ulARPBack; unsigned long ulARPGap; } StreamICMP;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

262 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_ICMP_STREAM_VLAN
Create a list with one or more IPv4 VLAN streams with ICMP configurations. HTSetStructure(L3_DEFINE_ICMP_STREAM_VLAN, 0, 0, 0, (void*) pStreamICMPVLAN, sizeof(StreamICMPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_ICMP_STREAM_VLAN 0 0 0 \ myStreamICMPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPVLAN

This structure contains values for ICMP compliant Streams for IPv4 that use VLAN tagging. The ICMP checksum is calculated automatically using the supplied header fields and inserted into the IP header. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. typedef struct tagStreamICMPVLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_ICMP_VLAN */ unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern */ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

SmartLibrary Command Reference: Volume 2 | 263

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /* the initial VFD byte pattern */ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

/* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6]; /* the Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* the Stream's Source MAC addr */ unsigned char TypeOfService; /* The various levels of speed and/or reliability */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Netmask address (e.g. 255.255.255.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /*VLAN identifier */ unsigned char ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ unsigned char ucCode; /* ICMP Code field */ unsigned short uiIdentifier; /* ICMP Identifier field */ unsigned long ulARPOut; /* Reserved */ unsigned long ulARPBack; /* Reserved */ unsigned long ulARPGap; /* Reserved */ unsigned char ucReserved[24]; /* Reserved */ }StreamICMPVLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

264 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_IP_STREAM
Create a list with one or more IP-compliant Tx streams. This can be used with an array of streams. HTSetStructure(L3_DEFINE_IP_STREAM, 0, 0, 0, (void*) pStreamIP, sizeof(StreamIP), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_IP_STREAM 0 0 0 \ myStreamIP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIP

This structure holds information for IP-compliant streams. The IP checksum is automatically calculated using the supplied header fields and inserted into the IP header. For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of module limitation. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and is laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. Note: There is no support for VFD 1-3 on Ethernet modules. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_IP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamIP { unsigned char ucActive; unsigned char ucProtocolType; unsigned char

unsigned char

unsigned short

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_IP or STREAM_PROTOCOL_BRIDGED (ATM only) */ ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 265

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

unsigned char

ucVFD1Pattern;

Continues >

266 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature */ /* field into each frame */ unsigned char DestinationMAC[6];/* the Streams Dest MAC addr */ unsigned char SourceMAC[6]; /* the Streams Source MAC addr */ unsigned char TypeOfService; /* The various levels of speed and/or reliability */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned char Protocol; /* 4=IP on the IP assigned list */ unsigned char extra[17]; /* reserved */ unsigned short uiActualSequenceNumber; /* Actual Sequence number */ unsigned long ulARPStart; /* Return value for the Time of */ /* the last ARP initiated */ unsigned long ulARPEnd; /* Return value for the Time of */ /* the last ARP completed */ unsigned long ulARPGap; /* The time between ARPs, in 100ns units; /* not available on LAN-3300A, LAN-3301A, /* LAN-3310A, or LAN-3311A.*/ } StreamIP;

unsigned long

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 267

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_IP_STREAM_VLAN
Create a list with one or more IP-compliant Tx streams with VLAN tags. HTSetStructure(L3_DEFINE_IP_STREAM_VLAN, 0, 0, 0, (void*) pStreamIPVLAN, sizeof(StreamIPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_IP_STREAM_VLAN 0 0 0 \ myStreamIPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPVLAN

This structure contains values for IP-compliant Streams that use VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. typedef struct tagStreamIPVLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_IP_VLAN */ ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** * * * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char

Continues >

268 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

ucVFD1StartVal[6];/*the initial VFD byte pattern*/ uiVFD2Offset; /* in bits */ ucVFD2Range; /* in bits */ ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature */ /* field into each frame */ unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned char DestinationMAC[6];/* the Stream's Dest MAC addr */ char SourceMAC[6]; /* the Stream's Source MAC addr */ char TypeOfService; /* */ char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ short InitialSequenceNumber; /* Initial sequence number*/ char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ char Protocol; /* 4=IP on the IP assigned list */ char reserved[5]; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /*VLAN identifier */ /* /* /* /* /* /* reserved */ Return value for the Time of */ the last ARP initiated */ Return value for the Time of */ the last ARP completed */ The Time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */

unsigned unsigned unsigned unsigned

char short char char

unsigned short VLAN_Pri;

unsigned short VLAN_Cfi;

unsigned short VLAN_Vid; unsigned char unsigned long unsigned long unsigned long extra[12]; ulARPStart; ulARPEnd; ulARPGap;

} StreamIPVLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 269

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_IPV6_STREAM
Create a list with one or more IPv6-compliant Tx streams (can be used with an array of streams). HTSetStructure(L3_DEFINE_IPV6_STREAM, 0, 0, 0, (void*) pStreamIPv6, sizeof(StreamIPv6), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_IPV6_STREAM 0 0 0 \ myStreamIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPv6

This structure contains values for IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As. This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

270 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1 = Enable Stream, 0 = Disable Stream */ /* use STREAM_PROTOCOL_IPV6, or STREAM_PROTOCOL_BRIDGED (ATM only)*/ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except POS-3500/3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * The VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

SmartLibrary Command Reference: Volume 2 | 271

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

unsigned char unsigned short unsigned char unsigned char unsigned long

ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ uiVFD2Offset; ucVFD2Range; ucVFD2Pattern; /* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned char

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char unsigned unsigned unsigned unsigned char char char char 0 = off, 1 = insert Signature */ field into each frame */ DestinationMAC[6]; Destination MAC address */ SourceMAC[6]; Source MAC address */ ucTrafficClass; Packet priority */ ucNextHeader; identifies the header type immediately following the IPV6 header */ ucHopLimit; /* number of "hops" until frame */ /* will be dropped */ ulFlowLabel; /* label packets to request special handling */ SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ DestinationIP[16]; /* Destination IPv6 address (e.g.192.100.5.....4) */ RouterIP[16]; /* Similar to gateway address */ ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ ucTagField; /* /* /* /* /* /*

unsigned char unsigned long unsigned char unsigned char unsigned char unsigned char } StreamIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

272 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_IPV6_STREAM_VLAN
Create a list with one or more IPv6-compliant Tx streams with VLAN tags. HTSetStructure(L3_DEFINE_IPV6_STREAM_VLAN, 0, 0, 0, (void*) pStreamIPv6VLAN, sizeof(StreamIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_IPV6_STREAM_VLAN 0 0 0 \ myStreamIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPv6VLAN

This structure contains values for IPv6 compliant Streams that use VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less. typedef struct tagStreamIPv6VLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char unsigned short

ucRandomData; uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream */ /* Use STREAM_PROTOCOL_IPV6_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern */ /* Frame length not counting CRC */

/***************************************************************** * * * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

SmartLibrary Command Reference: Volume 2 | 273

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0 (off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char unsigned unsigned unsigned unsigned char char char char ucTagField; DestinationMAC[6]; SourceMAC[6]; ucTrafficClass; ucNextHeader; ucHopLimit; ulFlowLabel; SourceIP[16]; DestinationIP[16]; RouterIP[16]; ucPayloadLengthError; /* 0 = off, 1 = insert Signature field into each frame */ /* Destination MAC address */ /* Source MAC address */ /* Packet priority */ /* identifies the type header type immediately following the IPV6 header */ /* Number of "hops" until frame will be dropped */ /* label packets to request special handling */ /* Source IP address (e.g. 192.100.5.....4) */ /* Destination IP address (e.g. 192.100.5.....4) */ /* Gateway address */ /* 0 - disable, 1 - enable, generates error in frame length */ /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /* VLAN identifier */

ulVFD1PatternCount;

unsigned char unsigned long unsigned char unsigned char unsigned char unsigned char

unsigned short VLAN_Pri;

unsigned short VLAN_Cfi; unsigned short VLAN_Vid; } StreamIPv6VLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

274 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_IPX_STREAM
Create a list with one or more IPX-compliant Tx streams (can be used with an array of streams). HTSetStructure(L3_DEFINE_IPX_STREAM, 0, 0, 0, (void*) pStreamIPX, sizeof(StreamIPX), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_IPX_STREAM 0 0 0 \ myStreamIPX \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPX

This structure holds information for IPX compliant Streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. typedef struct tagStreamIPX { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_IPX */ unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** * For ETHERNET cards, VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 275

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6]; /* the Streams Dest MAC addr*/ unsigned char SourceMAC[6]; /* the Streams Source MAC addr */ unsigned short IPXlen; /* Length field in the IPX hdr */ unsigned char IPXhop; /* Hop field in the IPX hdr */ unsigned char IPXtype; /* IPX type field in the IPX hdr*/ unsigned char IPXdst[4]; /* Dest ID in the IPX hdr */ unsigned char IPXdstHost[6]; /* Dest host in the IPX hdr */ unsigned short IPXdstSocket; /* Dest Socket in the IPX hdr */ unsigned char IPXsrc[4]; /* Source ID in the IPX hdr */ unsigned char IPXsrcHost[6]; /* Source host in the IPX hdr */ unsigned short IPXsrcSocket; /* Source socket in the IPX hdr */ unsigned char extra[24]; /* reserved */ } StreamIPX;

unsigned char

ucVFD2Pattern;

276 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description

L3_DEFINE_MPLS
Insert MPLS label(s) for one or more streams. An array of NSMPLSList structures is required when inserting labels for multiple streams. Notes:

TeraMetrics LAN modules support up to 12 MPLS labels. TeraMetrics POS modules support up to 14 MPLS labels. ATM-3453A/3451A modules support up to 11 MPLS labels for IPv6 over MPLS, and support up to 9 MPLS labels for IPv4 over MPLS. This is because of the module limitation that the IP checksum must be in the first cell (within the first 48 bytes). When using customized VC encapsulation, the maximum number of labels supported depends on the encapsulation length for the IP checksum limitation.

C Usage

HTSetStructure(L3_DEFINE_MPLS, 0, 0, 0, (void*) pNSMPLSList, sizeof(NSMPLSList), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MPLS 0 0 0 \ myNSMPLSList \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSMPLSList
/* number of labels for this stream (32 max) */ /* list of MPLS labels for this stream */

typedef struct tagNSMPLSList { unsigned short uiNumLabels; NSMPLSLabel Labels[32]; } NSMPLSList;

Embedded Structure

NSMPLSLabel
/* /* /* /* [bit [bit [bit [bit 12 - 31] 9 - 11] 8] 0 - 7] */ */ */ */

typedef struct tagNSMPLSLabel { unsigned long ulLabel; unsigned char ucExperimentalUse; unsigned char ucBottomStack; unsigned char ucTimeToLive; } NSMPLSLabel;

SmartLibrary Command Reference: Volume 2 | 277

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_ICMP_IPV6_STREAM
Append similar copies of an IPv6 stream with ICMP configurations. <index> is the stream to copy and <count> is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_ICMP_IPV6_STREAM, <index>, <count>, 0, (void*) pStreamICMPIPv6, sizeof(StreamICMPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_ICMP_IPV6_STREAM <index> <count> 0 \ myStreamICMPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPIPv6

This structure contains values for IPv6 streams with ICMP configuration. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and is laid into the frame just before the CRC. Use caution when defining the frame length so that the signature does not overwrite important data. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_ICMP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

278 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamICMPIPv6 { unsigned char ucActive; /* 1 = Enable Stream, 0 = Disable Stream */ unsigned char ucProtocolType; /* STREAM_PROTOCOL_ICMP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except POS-3500/3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* card's background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* Frame length, not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* In bits */ unsigned char ucVFD1Range; /* In bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

SmartLibrary Command Reference: Volume 2 | 279

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD1PatternCount; /* From 0(off) to 16,777,215. */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /* The initial VFD byte pattern */ unsigned short uiVFD2Offset; /* In bits */ unsigned char ucVFD2Range; /* In bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* From 0 (off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /* The initial VFD byte pattern */ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char unsigned unsigned unsigned unsigned char char char char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* In bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

/* 0 = off, 1 = insert signature */ /* field into each frame */

DestinationMAC[6]; /* The stream's Dest MAC addr */ SourceMAC[6]; /* The stream's Source MAC addr */ ucTrafficClass; /* Packet priority */ ucNextHeader; /* Identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of hops until frame is dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Similar to gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned char ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ unsigned char ucCode; /* ICMP Code field */ unsigned short uiIdentifier; /* ICMP Identifier field */ unsigned char ucReserved[24]; }StreamICMPIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

280 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_ICMP_IPV6_STREAM_VLAN
Create a list with one or more IPv6 VLAN streams with ICMP configurations. HTSetStructure(L3_DEFINE_ICMP_IPV6_STREAM_VLAN, 0, 0, 0, (void*) pStreamICMPIPv6VLAN, sizeof(StreamICMPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_ICMP_IPV6_STREAM_VLAN 0 0 0 \ myStreamICMPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPIPv6VLAN

This structure contains values for ICMP compliant Streams for IPv6 that use VLAN tagging. The ICMP checksum is calculated automatically using the supplied header fields and inserted into the IP header. Values in the structure are delta values: A value of 0 retains the current value of the structure member (as set for the original stream); otherwise, the non-zero value is used as the amount by which to increment the structure member in each additional stream that is created. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data.

Continues >

SmartLibrary Command Reference: Volume 2 | 281

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamICMPIPv6VLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_ICMP_IPV6_VLAN */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except POS-3500/3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /** VFD1 unsigned unsigned unsigned and VFD2 structure members short uiVFD1Offset; char ucVFD1Range; char ucVFD1Pattern; are /* /* /* /* /* ulVFD1PatternCount; /* /* /* /* ucVFD1StartVal[6]; /* uiVFD2Offset; ucVFD2Range; reserved for later use. Set to 0. **/ in bits */ in bits */ HVFD_ENABLED, HVFD_STATIC, */ HVFD_INCR, HVFD_DECR, */ HVFD_RANDOM, HVFD_NONE */ from 0(off) to 16,777,215.*/ number to incr. or decr. */ through when using inc or */ dec pattern */ the initial VFD byte pattern */ */ */

unsigned long

unsigned char unsigned short unsigned char

/* in bits /* in bits

Continues >

282 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

ucVFD2Pattern;

unsigned

/* 0 = off, 1 = insert signature */ /* field into each frame */ char DestinationMAC[6]; /* the Stream's Dest MAC addr */ char SourceMAC[6]; /* the Stream's Source MAC addr */ char ucTrafficClass; /* Packet priority */ char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ char ucHopLimit; /* number of "hops" until frame */ /* will be dropped */ long ulFlowLabel; /* label packets to request special handling */ char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ char RouterIP[16]; /* Similar to gateway address */ char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /* /* /* /* VLAN ICMP ICMP ICMP identifier */ Type Number: Echo Request, Reply, etc.*/ Code field */ Identifier field */

unsigned short VLAN_Vid; unsigned char ucType; unsigned char ucCode; unsigned short uiIdentifier; unsigned char ucReserved[24]; }StreamICMPIPv6VLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 283

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_ICMP_STREAM
Append similar copies of a ICMP Stream. Note that <index> is the stream to copy and <count> is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_ICMP_STREAM, <index>, <count>, 0, (void*) pStreamICMP, sizeof(StreamICMP), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_ICMP_STREAM <index> <count> 0 \ myStreamICMP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMP

This structure contains values for ICMP-compliant Streams. The IP checksum is calculated automatically using the supplied header fields and inserted into the IP header. Note: For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of module limitations. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and is inserted in the frame just before the CRC. Use caution when defining the frame length so that the Signature field does not overwrite important data. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_ICMP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamICMP { unsigned char ucActive; /* 1 = Enable Stream, 0 = Disable Stream */ unsigned char ucProtocolType; /* STREAM_PROTOCOL_ICMP or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = Use uiFrameLength Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* card's background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* Frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

284 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD1PatternCount; /* From 0 (off) to 16,777,215. */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* From 0 (off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /* The initial VFD byte pattern */ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

/* 0 = off, 1 = insert signature */ /* field into each frame */

unsigned char DestinationMAC[6]; /* The Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* The Stream's Source MAC addr */ unsigned char TypeOfService; /* The various levels of speed and/or reliability */ unsigned char TimeToLive; /* Number of hops until frame is dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number */ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Netmask address (e.g. 255.255.255.0) */ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1) */ unsigned char ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ unsigned char ucCode; /* ICMP Code field */ unsigned short uiIdentifier; /* ICMP Identifier field */ unsigned char extra[16]; /* Reserved */ unsigned long ulARPOut; unsigned long ulARPBack; unsigned long ulARPGap; } StreamICMP;

SmartLibrary Command Reference: Volume 2 | 285

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_ICMP_STREAM_VLAN
Append similar copies of an IPv4 VLAN stream with ICMP configurations. The index is the stream to copy and count is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_ICMP_STREAM_VLAN, <index>, <count>, 0, (void*) pStreamICMPVLAN, sizeof(StreamICMPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_ICMP_STREAM_VLAN <index>\ <count> 0 \ myStreamICMPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPVLAN

This structure contains values for ICMP compliant Streams for IPv4 that use VLAN tagging. The ICMP checksum is calculated automatically using the supplied header fields and inserted into the IP header. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. typedef struct tagStreamICMPVLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned

unsigned

/** VFD1 unsigned unsigned unsigned

unsigned

unsigned unsigned unsigned

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_ICMP_VLAN */ /* 1 = enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum random lengths using NS_PORT_TRANSMIT when enabled. */ char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ and VFD2 structure members are reserved for later use. Set to 0. **/ short uiVFD1Offset; /* in bits */ char ucVFD1Range; /* in bits */ char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ long ulVFD1PatternCount; /* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ char ucVFD1StartVal[6]; /*the initial VFD byte pattern */ short uiVFD2Offset; /* in bits */ char ucVFD2Range; /* in bits */

Continues >

286 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /* the initial VFD byte pattern */ /****************************************************************/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6]; /* the Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* the Stream's Source MAC addr */ unsigned char TypeOfService; /* The various levels of speed and/or reliability */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber;/* Initial sequence number*/ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Netmask address (e.g. 255.255.255.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /*VLAN identifier */ unsigned char ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ unsigned char ucCode; /* ICMP Code field */ unsigned short uiIdentifier; /* ICMP Identifier field */ unsigned long ulARPOut; /* Reserved */ unsigned long ulARPBack; /* Reserved */ unsigned long ulARPGap; /* Reserved */ unsigned char ucReserved[24]; /* Reserved */ }StreamICMPVLAN;

unsigned char

ucVFD2Pattern;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 287

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_IP_STREAM
Append similar copies of an IP stream. The "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_IP_STREAM, <index>, <count>, 0, (void*) pStreamIP, sizeof(StreamIP), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_IP_STREAM <index><count>0 \ myStreamIP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIP

This structure holds information for IP-compliant streams. The IP checksum is automatically calculated using the supplied header fields and inserted into the IP header. For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of module limitation. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Values in the structure are delta values: A value of 0 retains the current value of the structure member (as set for the original stream); otherwise, the non-zero value is used as the amount by which to increment the structure member in each additional stream that is created. See Appendix B, Message Function Card Compatibility Information for further information. Notes:

The Signature field is 18 bytes long, and is laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_IP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED.

typedef struct tagStreamIP { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char unsigned short

ucRandomData; uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_IP or STREAM_PROTOCOL_BRIDGED (ATM only) */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */

Continues >

288 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range;/* in bits */ unsigned char ucVFD2Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature */ /* field into each frame */ unsigned char DestinationMAC[6];/* the Streams Dest MAC addr */ unsigned char SourceMAC[6]; /* the Streams Source MAC addr */ unsigned char TypeOfService; /* The various levels of speed and/or reliability */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber;/* Initial sequence number*/ unsigned char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned char Protocol; /* 4=IP on the IP assigned list */ unsigned char extra[17]; /* reserved */ unsigned short uiActualSequenceNumber;/* Actual Sequence number */ unsigned long ulARPStart; /* Return value for the Time of */ /* the last ARP initiated */ unsigned long ulARPEnd; /* Return value for the Time of */ /* the last ARP completed */ unsigned long ulARPGap; /* The time between ARPs, in 100ns units; /* not available on LAN-3300A, LAN-3301A, /* LAN-3310A, or LAN-3311A.*/ } StreamIP;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 289

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_IP_STREAM_VLAN
Append similar copies of an IP Stream with VLAN. Note that "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_IP_STREAM_VLAN, <index>, <count>, 0, (void*) pStreamIPVLAN, sizeof(StreamIPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_IP_STREAM_VLAN <index> \ <count> 0 \ myStreamIPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPVLAN

This structure contains values for IP compliant Streams that use VLAN tagging. The IP checksum is automatically calculated using the supplied header fields and inserted into the IP header. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. typedef struct tagStreamIPVLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_IP_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** * * * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

290 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature */ /* field into each frame */ unsigned char DestinationMAC[6];/* the Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* the Stream's Source MAC addr */ unsigned char TypeOfService; /* */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned char Protocol; /* 4=IP on the IP assigned list */ unsigned char reserved[5]; unsigned short VLAN_Pri; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /*VLAN identifier */ unsigned char extra[12]; /* reserved */ unsigned long ulARPStart; /* Return value for the Time of */ /* the last ARP initiated */ unsigned long ulARPEnd; /* Return value for the Time of */ /* the last ARP completed */ unsigned long ulARPGap; /* The Time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */ } StreamIPVLAN;

unsigned long

ulVFD1PatternCount;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 291

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_IPV6_STREAM
Append similar copies of an IPv6 stream. <index> is the stream to copy and <count> is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_IPV6_STREAM, <index>, <count>, 0, (void*) pStreamIPv6, sizeof(StreamIPv6), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_IPV6_STREAM <index> <count> 0 \ myStreamIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPv6

This structure contains values for IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

292 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_IPV6, or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except POS-3500/3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * The VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short unsigned char unsigned char uiVFD1Offset; ucVFD1Range; ucVFD1Pattern; /* /* /* /* /* in bits in bits HVFD_ENABLED, HVFD_STATIC, HVFD_INCR, HVFD_DECR, HVFD_RANDOM, HVFD_NONE */ */ */ */ */

Continues >

SmartLibrary Command Reference: Volume 2 | 293

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD1PatternCount;

unsigned char unsigned short unsigned char unsigned char unsigned long

ucVFD1StartVal[6]; uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ /*the initial VFD byte pattern*/

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char unsigned unsigned unsigned unsigned char char char char 0 = off, 1 = insert Signature */ field into each frame */ DestinationMAC[6]; Destination MAC address */ SourceMAC[6]; Source MAC address */ ucTrafficClass; Packet priority */ ucNextHeader; identifies the header type immediately following the IPV6 header */ ucHopLimit; /* number of "hops" until frame */ /* will be dropped */ ulFlowLabel; /* label packets to request special handling */ SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4)*/ DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ RouterIP[16]; /* Similar to gateway address */ ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ ucTagField; /* /* /* /* /* /*

unsigned char unsigned long unsigned char unsigned char unsigned char unsigned char } StreamIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

294 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_IPV6_STREAM_VLAN
Append similar copies of an IPv6 stream. The "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_IPV6_STREAM_VLAN, <index>, <count>, 0, (void*) pStreamIPv6VLAN, sizeof(StreamIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_IPV6_STREAM_VLAN <index> <count> 0 \ myStreamIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPv6VLAN

This structure contains values for IPv6 compliant Streams that use VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less. typedef struct tagStreamIPv6VLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char unsigned short

ucRandomData; uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream */ /* Use STREAM_PROTOCOL_IPV6_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern */ /* Frame length not counting CRC */

/***************************************************************** * * * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short unsigned char uiVFD1Offset; ucVFD1Range; /* in bits /* in bits */ */

Continues >

SmartLibrary Command Reference: Volume 2 | 295

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char

ucVFD1Pattern;

unsigned long

ulVFD1PatternCount;

unsigned unsigned unsigned unsigned

char short char char

ucVFD1StartVal[6]; uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

unsigned long

ulVFD2PatternCount;

unsigned char

ucVFD2StartVal[6];

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ /*the initial VFD byte pattern*/ /* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ /*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the type header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /* VLAN identifier */ } StreamIPv6VLAN; unsigned char ucTagField;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

296 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_IPX_STREAM
Append similar copies of an IPX stream. The "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_IPX_STREAM, <index>, <count>, 0, (void*) pStreamIPX, sizeof(StreamIPX), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_IPX_STREAM <index> <count> 0 \ myStreamIPX \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPX

This structure holds information for IPX compliant Streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Values in the structure are delta values: A value of 0 retains the current value of the structure member (as set for the original stream); otherwise, the non-zero value is used as the amount by which to increment the structure member in each additional stream that is created. See Appendix B, Message Function Card Compatibility Information for further information. typedef struct tagStreamIPX { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_IPX */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** * For ETHERNET cards, VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

SmartLibrary Command Reference: Volume 2 | 297

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6]; /* the Streams Dest MAC addr*/ unsigned char SourceMAC[6]; /* the Streams Source MAC addr */ unsigned short IPXlen; /* Length field in the IPX hdr */ unsigned char IPXhop; /* Hop field in the IPX hdr */ unsigned char IPXtype; /* IPX type field in the IPX hdr*/ unsigned char IPXdst[4]; /* Dest ID in the IPX hdr */ unsigned char IPXdstHost[6]; /* Dest host in the IPX hdr */ unsigned short IPXdstSocket; /* Dest Socket in the IPX hdr */ unsigned char IPXsrc[4]; /* Source ID in the IPX hdr */ unsigned char IPXsrcHost[6]; /* Source host in the IPX hdr */ unsigned short IPXsrcSocket; /* Source socket in the IPX hdr */ unsigned char extra[24]; /* reserved */ } StreamIPX;

unsigned long

ulVFD1PatternCount;

298 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_SMARTBITS_STREAM
Append similar copies of a SmartBits stream. The "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_SMARTBITS_STREAM, <index>, <count>, 0, (void*) pStreamSmartBits, sizeof(StreamSmartBits), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_SMARTBITS_STREAM <index> <count> 0 \ myStreamSmartBits \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamSmartBits

This structure holds information for customized streams (StreamSmartBits). The Background Fill Pattern and the ProtocolHeader[] can be used in combination to construct highly customized frames. Use HTFillPattern to specify the background pattern. Then define the ProtocolHeader array. This array (of up-to 64 bytes) is used as VFD3. It overwrites the background pattern at the specified offset and range. (ucVFD3Enable must be set to HVFD_ENABLED). A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Values in the structure are delta values: A value of 0 retains the current value of the structure member (as set for the original stream); otherwise, the non-zero value is used as the amount by which to increment the structure member in each additional stream that is created. See Appendix B, Message Function Card Compatibility Information for further information. Note: For ATM TeraMetrics modules, for any encapsulation type of the bound VC, NULL encapsulation is inserted in the stream. Only if the bound VC encapsulation is customized, the customized VC encapsulation is inserted in the stream. typedef struct tagStreamSmartBits { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_SMARTBITS */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on */ /* ATM Terametrics modules */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1 and VFD2 structure members are * * reserved for later use. Set to 0. * *****************************************************************/ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 299

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char unsigned long

ucVFD1Pattern;

unsigned unsigned unsigned unsigned

char short char char

unsigned long

unsigned char

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6];/*the initial VFD byte pattern*/ uiVFD2Offset; /* in bits */ ucVFD2Range; /* in bits */ ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR,*/ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6];/*the initial VFD byte pattern*/

/*****************************************************************/ unsigned short uiVFD3Offset; /* in bytes. May not be used with */ /* TeraMetrics-based modules. */ unsigned short uiVFD3Range; /* in bytes; Number of elements */ /* to use from ProtocolHeader */ /* No elements are used beyond */ /* the single specified range. */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE. May not be used with */ /* TeraMetrics-based modules. */ unsigned char ucTagField; /* 0 = off, 1 = insert Signature*/ /* field into each frame */ unsigned char ProtocolHeader[64];/* Defines up to 64 bytes used as VFD3*/ } StreamSmartBits;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

300 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_SMARTBITS_128_STREAM
Append similar copies of a SmartBits128-byte payload stream. Note that "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_SMARTBITS_128_STREAM, <index>, <count>, 0, (void*) pStreamSmartBits128, sizeof(StreamSmartBits128), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_SMARTBITS_128_STREAM <index> <count> 0 \ myStreamSmartBits128 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamSmartBits128

This structure contains values for customized streams. The Background Fill Pattern and the ProtocolHeader[] can be used in combination to construct highly customized frames. Use HTFillPattern to specify the background pattern. Then define the ProtocolHeader array. This array (of up to 128 bytes) is used as VFD3. It overwrites the background pattern at the specified offset and range. (ucVFD3Enable must be set to HVFD_ENABLED). A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). IMPORTANT! On TeraMetrics modules (except ATM, POS-3518As/AR and POS-3519As/AR), before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Note: For ATM TeraMetrics modules, for any encapsulation type of the bound VC, NULL encapsulation is inserted in the stream. Only if the bound VC encapsulation is customized, the customized VC encapsulation is inserted in the stream. typedef struct tagStreamSmartBits128 { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream*/ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_SMARTBITS*/ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on */ /* ATM Terametrics modules */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */

Continues >

SmartLibrary Command Reference: Volume 2 | 301

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/***************************************************************** * For ETHERNET, cards VFD1 and VFD2 structure members are * * reserved for later use. Set to 0. * *****************************************************************/ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern */ unsigned short uiVFD2Offset;/* in bits */ unsigned char ucVFD2Range;/* in bits */ unsigned char ucVFD2Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR,*/ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern */ /*****************************************************************/ unsigned short uiVFD3Offset;/* Reserved */ unsigned short uiVFD3Range;/* in bytes; Number of elements */ /* to use from ProtocolHeader */ /* No elements are used beyond */ /* the single specified range. */ unsigned char ucVFD3Enable;/* Reserved */ unsigned char ucTagField;/* 0 = off, 1 = insert Signature*/ /* field into each frame */ unsigned char ProtocolHeader[128];/* Defines up to 128 bytes used as VFD3*/ } StreamSmartBits128;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

302 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_STREAM_BINDING
Copy the binding setting (VC index and ATM CLP bit) of an existing stream of <index> for the stream binding of a number of <count> streams. HTSetStructure(L3_DEFINE_MULTI_STREAM_BINDING, <index>, <count>, 0, (void*) pL3StreamBinding, sizeof(L3StreamBinding), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_STREAM_BINDING <index> <count>\ 0 myL3StreamBinding \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamBinding

This structure is used to bind stream(s) to VC(s) and update the ATM CLP bit of the stream(s), or retrieve the information of the bound VCs and the ATM CLP setting with the stream(s). These structures are set up for every stream on the ATM TeraMetrics module, so they should be sent after streams are defined. This structure is used for four commands:

L3_DEFINE_STREAM_BINDING Bind one or more streams to one or more VCs, and update CLP bit in the stream(s). The starting stream index is always 1. The number of streams to be bound is the size of the L3StreamBinding array. L3_MOD_STREAM_BINDING Overwrites the stream binding set (the bound VC index and the ATM CLP bit) of the stream at a given index. L3_DEFINE_MULTI_STREAM_EXTENSION Creates an array of stream binding set based on a previously defined stream binding set. The uiBindIndex is delta value, and the uiATMFlags is ignored. L3_STREAM_BINDING_INFO reads back the stream binding parameters for a given stream specified by <index>.

typedef struct tagL3StreamBinding { unsigned char ucBindMode;

unsigned short uiBindIndex; unsigned short uiATMFlags;

/* STREAM_BIND_VC (binding to VC for ATM), required input for both configuration and reading back configurations */ /* VC index for ATM cards */ /* Flag to set CLP bit in ATM header for ATM card, AT_CLP_ON - set CLP bit in ATM header AT_CLP_OFF - not set CLP bit in ATM header*/

unsigned char ucReserved[56]; } L3StreamBinding;

SmartLibrary Command Reference: Volume 2 | 303

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_STREAM_EXTENSION
Append similar copies of a Stream Extension. Note that "index" is the stream extension to copy and "count" is the number of stream extensions to create. HTSetStructure(L3_DEFINE_MULTI_STREAM_EXTENSION, <index>, <count>, 0, (void*) pL3StreamExtension, sizeof(L3StreamExtension), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_STREAM_EXTENSION <index> <count> 0 \ myL3StreamExtension \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamExtension

This structure is used in conjunction with the StreamXX structures (StreamIP, StreamUDP, etc.). It adds information to a pre-created stream. The structure is required by POS-3500B/BS and LAN-3201B/C cards. Optionally, it may be applied in a limited fashion to the ML-7710/7711/7711S, LAN-31xxA/B, LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504As, and POS-3505As cards. It also may be applied in a limited fashion to the ATM-345xA(s) modules, and it is required in these modules to set the frame rate. (See Comments at bottom of table). It is used to configure additional stream information, including scheduling on a per-stream basis. These structures are set up for every stream, so they should be sent after streams are defined. This structure is used for four commands:

L3_DEFINE_STREAM_EXTENSION defines one or more L3StreamExtension. L3_MOD_STREAM_EXTENSION overwrites one L3StreamExtension at a given index. L3_DEFINE_MULTI_STREAM_EXTENSION creates an array of L3StreamExtensions based on a previously defined L3StreamExtension. L3_READ_STREAM_EXTENSION reads back the stream extension parameters for a given stream specified by index.

NoteS: To perform the payload data integrity verification, the stream minimum frame length is 30 bytes. For TeraMetrics modules, to perform the payload data integrity verification, you should use TRIGGER_ONE_ONLY, and that trigger PATTERN must be the last six bytes of _NETCOM_ ( 'E' 'T' 'C' 'O' 'M' '_' ). typedef struct tagL3StreamExtension { unsigned long ulFrameRate; unsigned

unsigned unsigned unsigned unsigned unsigned unsigned

/* frame transmit rate, in packets per second */ long ulTxMode; /* frame transmit mode, use one of L3_CONTINUOUS_MODE, L3_SINGLE_BURST_MODE, L3_MULTIBURST_MODE, L3_CONTINUOUS_MULTIBURST_MODE */ long ulBurstCount; /* the burst number */ long ulMBurstCount; /* the multi burst number */ long ulBurstGap; /* the gap between burst, in 32ns units */ short uiInitialSeqNumber; /* IP initial sequence number */ char ucIPHeaderChecksumError;/* 1 enabled, 0 disabled */ char ucIPTotalLengthError; /* 1 enabled, 0 disabled */

Continues >

304 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char unsigned char

ucIPManipulateMode; /* IP_xxx manipulate mode */ ucIncUDPPort; /* Increase UDP Source and Dst Port number per burst. 1 enabled, 0 disabled */ unsigned short uiIPLimitCount; /* The limit/cycle count is the number of times that the step value(ucStepCount) will be added/subtracted from the field before it is reset to its initial value. Values can range from 0 - 65535. Note that 0 indicates continuously incrementing/decrementing the field. For the LAN-310xA/B modules, this cycle count value applies to the first address referred to by the following IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source (source (source (source IP) IP) MAC) MAC)

unsigned long

unsigned long unsigned unsigned unsigned unsigned unsigned char char char char char

Use uiIPLimitCount2 to set the cycle count for the second address. */ ulStartOffset; /* all streams defined can not transmit at the same time, each stream has to start at the different time. ulStartOffset is the start offset from the previous stream. ulStartOffset's unit is tick. minimum is 10 tick. 1(tick) = 32(ns) */ ulBGPatternIndex; /* index of the stream background fill pattern that defined by L3StreamBGConfig */ ucDataCheckEnable; /* 1 enable payload check error, 0 disable */ ucCRCErrorEnable; /* 1 enable, 0 disable */ ucRandomBGEnable; /* 1 enable, 0 disable */ ucDataIntegrityErrorEnable; /* 1 enable, 0 disable */ ucStepCount; /* IP address increment/decrement step count: 1,3,5,etc. For the LAN-310xA/B modules, this value applies only to the first address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source IP) (source IP) (source MAC) (source MAC)

unsigned char unsigned char

ucIPBitsOffset; ucMPLSCount;

Use ucStepCount to set the step count for the second address. */ /* bit offset where the IP address is increment. */ /* Number of MPLS labels. 0 disable the MPLS */

Continues >

SmartLibrary Command Reference: Volume 2 | 305

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned unsigned unsigned unsigned

char long char char

unsigned char

ucIPOptionsCount; /* reserved */ ulCustomStreamID; /* reserved */ ucEnableCustomStreamID;/* reserved */ ucOAMHeaderPacketType;/* defined constants: OAM_PACKET_TYPE_NONE_OAM OAM_PACKET_TYPE_NORMAL_OAM OAM_PACKET_TYPE_IDLE_OAM */ ucStepCount2; /* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the Increment/decrement step count for the Second address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (dest. IP) IP_DEC_SRC_IP_AND_DST_IP (dest. IP) IP_INC_SRC_MAC_AND_DST_MAC (dest. MAC) IP_DEC_SRC_MAC_AND_DST_MAC (dest. MAC) Use ucStepCount to set the step count for the first address. */ /* Applicable for the LAN-310xA/B cards ONLY. The limit/cycle count is the number of times that the step value(ucStepCount2) will be added/subtracted from the field before it is reset to its initial value. Values can range from 0 - 65535. Note that 0 indicates continuously incrementing/decrementing the field. This value applies to the second address referred to by the following IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (dest. IP) IP_DEC_SRC_IP_AND_DST_IP (dest. IP) IP_INC_SRC_MAC_AND_DST_MAC (dest. MAC) IP_DEC_SRC_MAC_AND_DST_MAC (dest. MAC) Use uiIPLimitCount to set the cycle count for the first address. */ /* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the number Of frames that will repeat a pattern before Incrementing or decrementing to the next one. This applies to only the first address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source (source (source (source IP) IP) MAC) MAC)

unsigned short uiIPLimitCount2;

unsigned short uiBlockCount;

Use uiBlockCount2 to set the block count for the second address.

Continues >

306 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short uiBlockCount2;

/* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the number Of frames that will repeat a pattern before Incrementing or decrementing to the next one. This applies to only the second address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (dest. (dest. (dest. (dest. IP) IP) MAC) MAC)

Use uiBlockCount to set the block count for the first address. */ unsigned char ucMulticastKeepAliveEnable; /* Applicable for the TM LAN/POS modules ONLY. This field is used to enable/disable sending multicast keep alive packets for this stream with command NS_MULTICAST_KEEP_KEEP_ALIVE_CONFIG. 1- enable 0-disable Default: 0 */ unsigned char ucReserved[2]; /* Reserved */ } L3StreamExtension;

Comments

Some cards support this structure in a limited fashion only: The ucDataIntegrityErrorEnable field is applicable to the LAN-3100A, 3101A/B, 3102A cards. The LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504A, and POS-3505As/AR cards support the following fields: ulFrameRate, uiInitialSeqNumber, ucIPHeaderChecksumError, ucIPTotalLengthError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The ML-7710/7711/7711s card supports the following fields: ucIPManipulateMode, ucStepCount, and uiIPLimitCount fields. The LAN-3100A, 3101A/B, 3102A modules supports the following fields: ucDataIntegrityErrorEnable, ucIPManipulateMode, ucStepCount, ucStepCount2, uiIPLimitCount, uiIPLimitCount2, uiBlockCount and uiBlockCount2. The LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504A, and POS-3505As/AR cards support the following fields: ulFrameRate, ucIPHeaderChecksumError, ucIPTotalLengthError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The LAN-3710AL/AS/AE supports the following fields: uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, ucEnableCustomStreamID, and ucOAMHeaderPacketType. The XLW-372xA and XFP-373xA modules supports the following fields: uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. .

Continues >

SmartLibrary Command Reference: Volume 2 | 307

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Comments (continued)

The FBC-3601A and FBC-3602A cards support the following fields: ulTxMode, ulBurstCount, ulMBurstCount, ulBurstGap, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ucDataIntegrityErrorEnable, ulCustomStreamID and ucEnableCustomStreamID The AT-34xx cards support the following fields: ulFrameRate, uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucDataIntegrityErrorEnable, ulCustomStreamID and ucEnableCustomStreamID. Notes for the AT-34xx cards: - All streams bound to the same VC must have the same frame rate(ulFrameRate). Other fields in L3StreamExtension do not currently apply to these cards. The following modes for ucIPManipulateMode are supported on the LAN-3201B/C and POS cards: IP_INC_SRC_IP IP_INC_DST_IP IP_INC_DST_IP_AND_DST_MAC IP_INC_SRC_IP_AND_SRC_MAC IP_INC_SRC_IP_AND_DST_MAC IP_INC_DST_IP_AND_DRC_MAC The following modes for ucIPManipulateMode are currently supported on the ML-7710 card: IP_INC_SRC_IP IP_INC_DST_IP IP_DEC_SRC_IP IP_DEC_DST_IP IP_INC_SRC_IP_AND_SRC_MAC IP_INC_DST_IP_AND_DST_MAC IP_DEC_SRC_IP_AND_SRC_MAC IP_DEC_DST_IP_AND_DST_MAC

308 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_TCP_IPV6_STREAM
Append similar copies of a TCP stream. <index> is the stream to copy and <count> is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_TCP_IPV6_STREAM, <index>, <count>, 0, (void*) pStreamTCPIPv6, sizeof(StreamTCPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_TCP_IPV6_STREAM <index> <count> \ 0 \ myStreamTCPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPIPv6

This structure contains values for TCP IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and is laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256 (this applies to all TeraMetrics modules except the POS-3518As/AR, POS-3519As/AR and ATM-3451A/3453A). In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_TCP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, and POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

SmartLibrary Command Reference: Volume 2 | 309

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamTCPIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/

Continues >

310 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short unsigned char unsigned char

uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

unsigned long

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned short SourcePort; /* Source port */ unsigned short DestPort; /* Destination port */ unsigned short Window; /* Protocol window size, in bytes */ unsigned long TCPAck; /* Acknowledgment number */ unsigned long TCPSequence; /* TCP Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; /* Reserved */ } StreamTCPIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 311

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN
Append similar copies of a TCP/IPv6 stream with VLAN tags. The "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN, <index>, <count>, 0, (void*) pStreamTCPIPv6VLAN, sizeof(StreamTCPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN <index> <count> 0 \ myStreamTCPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPIPv6VLAN

This structure contains values for TCP IPv6 compliant Streams that use VLAN tags. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. This applies to all TeraMetrics modules except the POS-3518As/AR and POS-3519As/AR. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

312 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP_IPV6_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */

typedef struct tagStreamTCPIPv6VLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

Continues >

SmartLibrary Command Reference: Volume 2 | 313

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/****************************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short SourcePort; /* Source Port */ unsigned short DestPort; /* Destination Port */ unsigned short Window; /* Window size, in bytes*/ unsigned long TCPAck; /* Acknowledgment number */ unsigned long TCPSequence; /* Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; /* Reserved */ unsigned short VLAN_Pri; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /*VLAN identifier */ } StreamTCPIPv6VLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

314 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_TCP_STREAM
Append similar copies of a TCP stream. <index> is the stream to copy and <count> is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_TCP_STREAM, <index>, <count>, 0, (void*) pStreamTCP, sizeof(StreamTCP), iHub, iSlot, iPort) HTSetStructure $L3_DEFINE_MULTI_TCP_STREAM <index> <count> 0 \ myStreamTCP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCP

The L3_DEFINE_MULTI_TCP_STREAM function creates new TCP streams based upon an existing TCP stream. The StreamTCP structure contains values for TCP-compliant streams. The IP checksums are automatically calculated using the supplied field value, and inserted into the frame. For ATM Terametrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of a module limitation. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Values in the structure are delta values: A value of 0 retains the current value of the structure member (as set for the original stream); otherwise, the non-zero value is used as the amount by which to increment the structure member in each additional stream that is created. See Appendix B, Message Function Card Compatibility Information for further information. Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_TCP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamTCP { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /*****************************************************************/ /** VFD1, VFD2, and VFD3 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 315

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern */ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6];/* the Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* the Stream's Source MAC addr */ unsigned char TypeOfService; /* the various levels of speed and/or reliability, as described in RFC 1359 */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Netmask address (e.g. 255.255.255.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned short SourcePort; /* Source Port for TCP connection */ unsigned short DestPort; /* Destination Port for TCP connection */ unsigned short Window; /* TCP protocol window size, in bytes*/ unsigned char reserved[2]; unsigned long TCPAck; /* TCP Acknowledgment number */ unsigned long TCPSequence; /* TCP Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; unsigned long ulARPOut; /* reserved--not currently in use */ unsigned long ulARPBack; /* reserved--not currently in use */ unsigned long ulARPGap; /* the time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */ } StreamTCP;

unsigned char

ucVFD1Pattern;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

316 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_TCP_STREAM_VLAN
Append similar copies of a TCP Stream with VLAN. Note that "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_TCP_STREAM_VLAN, 0, 0, 0, (void*) pStreamTCPVLAN, sizeof(StreamTCPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_TCP_STREAM_VLAN 0 0 0 \ myStreamTCPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPVLAN

This structure contains values for TCP compliant Streams with VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. typedef struct tagStreamTCPVLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_TCP_VLAN */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern */ unsigned char ucRandomData; /* /* /* /* /* /* 1 = Random Data, 0 = use the */ cards background pattern */ not available on Frame Relay */ frame length not counting CRC*/ 0 - 2048 for Ethernet */ 0 - 8196 for Frame Relay */

unsigned short uiFrameLength;

/** VFD1 unsigned unsigned unsigned

unsigned

unsigned unsigned unsigned

and VFD2 structure members are reserved for later use. Set to 0. **/ short uiVFD1Offset; /* in bits */ char ucVFD1Range; /* in bits */ char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ long ulVFD1PatternCount;/* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ char ucVFD1StartVal[6];/*the initial VFD byte pattern */ short uiVFD2Offset; /* in bits */ char ucVFD2Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 317

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ /****************************************************************/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */

ucVFD2Pattern;

unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned

char DestinationMAC[6];/* the Stream's Dest MAC addr */ char SourceMAC[6]; /* the Stream's Source MAC addr */ char TypeOfService; /* */ char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ short InitialSequenceNumber; /* Initial sequence number*/ char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ char Netmask[4]; /*Netmask address (e.g. 255.255.255.0)*/ char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ short SourcePort; /* Source Port for TCP connection */ short DestPort; /* Destination Port for TCP connection */ short Window; /* TCP protocol window size */ /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ /*V LAN CFI bit: available constants */ /* VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /*VLAN identifier */ /* TCP Acknowledgment */ /* */ /* 1 is FIN, 2 is SYN, 4 is RST, 8 is PSH */ /* 16 is ACK, 32 is URG */ /**/ /* */ /**/ /**/

unsigned short VLAN_Pri;

unsigned short VLAN_Cfi;

unsigned short VLAN_Vid; unsigned long unsigned long unsigned char unsigned char TCPAck; TCPSequence; Flags; Spare[3]; ulARPOut; ulARPBack; ulARPGap;

unsigned long unsigned long unsigned long } StreamTCPVLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

318 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_UDP_IPV6_STREAM
Append similar copies of a UDP stream. <index> is the stream to copy and <count> is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_UDP_IPV6_STREAM, <index>, <count>, 0, (void*) pStreamUDPIPv6, sizeof(StreamUDPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_UDP_IPV6_STREAM <index> \ <count> 0 \ myStreamUDPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPIPv6

This structure contains values for UDP IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_UDP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

SmartLibrary Command Reference: Volume 2 | 319

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamUDPIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_UDP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * * * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short unsigned char uiVFD1Offset; ucVFD1Range; /* in bits /* in bits */ */

Continues >

320 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char ucTagField;

ucVFD1Pattern;

/* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* Identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field (currently not used) */ } StreamUDPIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 321

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN
Append similar copies of a UDP/IPv6 stream with VLAN tagging. The "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN, <index>, <count>, 0, (void*) pStreamUDPIPv6VLAN, sizeof(StreamUDPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN <index> <count> 0 \ myStreamUDPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPIPv6VLAN

This structure contains values for UDP IPv6 compliant Streams with VLAN tagginG. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. This applies to all TeraMetrics modules except the POS-3518As/AR and POS-3519As/AR. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less. typedef struct tagStreamUDPIPv6 { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char unsigned short

ucRandomData; uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_UDP_IPV6 */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics-based Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern */ /* frame length not counting CRC */

Continues >

322 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/****************************************************************************/ unsigned char ucTagField;/* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16];/* Destination IP address e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field - not used */ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /* VLAN identifier */ } StreamUDPIPv6VLAN;

Continues >

SmartLibrary Command Reference: Volume 2 | 323

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field - not used */ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /* VLAN identifier */ } StreamUDPIPv6VLAN;

unsigned char

ucTagField;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

324 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_UDP_STREAM
Append similar copies of a UDP Stream. <index> is the stream to copy and <count> is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_UDP_STREAM, <index>, <count>, 0, (void*) pStreamUDP, sizeof(StreamUDP), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_UDP_STREAM <index> <count> 0 \ myStreamUDP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDP

This structure contains values for UDP-compliant streams. The IP checksums are automatically calculated using the supplied field value and inserted into the frame. For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of a module limitation. The UDP checksum is set to 0, and so is not calculated. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Values in the structure are delta values: A value of 0 retains the current value of the structure member (as set for the original stream); otherwise, the non-zero value is used as the amount by which to increment the structure member in each additional stream that is created. See Appendix B, Message Function Card Compatibility Information for further information. Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_UDP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamUDP { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_UDP or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics-based Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ unsigned short uiFrameLength;/* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */

Continues >

SmartLibrary Command Reference: Volume 2 | 325

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset;/* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature field into each frame */ unsigned char DestinationMAC[6];/* the Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* the Stream's Source MAC addr */ unsigned char TypeOfService; /* */ unsigned char TimeToLive; /* number of "hops" until frame will be dropped */ unsigned short InitialSequenceNumber;/* Initial sequence number*/ unsigned char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned unsigned unsigned unsigned unsigned unsigned unsigned char short short short char short long Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ UDPSrc; /* UDP Source Port */ UDPDest; /* UDP Dest Port */ UDPLen; /* UDP Length field -- Not used */ extra[12]; /* reserved */ uiActualSequenceNumber;/* Actual Sequence number */ ulARPStart; /* Return value for the Time of the last ARP initiated */ ulARPEnd; /* Return value for the Time of the last ARP completed */ ulARPGap;/* The time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */ IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

unsigned long unsigned long } StreamUDP;

Comment

326 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_MULTI_UDP_STREAM_VLAN
Append similar copies of a UDP Stream with VLAN. Note that "index" is the stream to copy and "count" is the number of streams to create. HTSetStructure(L3_DEFINE_MULTI_UDP_STREAM_VLAN, <index>, <count>, 0, (void*) pStreamUDPVLAN, sizeof(StreamUDPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_MULTI_UDP_STREAM_VLAN <index> <count> 0 \ myStreamUDPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPVLAN

This structure is contains values for UDP-compliant streams with VLAN tagging. The IP checksums are automatically calculated using the supplied field value and inserted into the frame. The UDP checksum is set to 0, and so is not calculated. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. typedef struct tagStreamUDPVLAN { unsigned char ucActive;/* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType;/* use STREAM_PROTOCOL_UDP_VLAN

*/

unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData;/* 1 = Random Data, 0 = use the cards background pattern not available on Frame Relay */ unsigned short uiFrameLength;/* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset;/* in bits */ unsigned char ucVFD1Range;/* in bits */ unsigned char ucVFD1Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern*/

Continues >

SmartLibrary Command Reference: Volume 2 | 327

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short uiVFD2Offset; unsigned char ucVFD2Range; unsigned char ucVFD2Pattern; unsigned long

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6];/*the initial VFD byte pattern*/ /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

unsigned short uiVFD3Offset; unsigned short uiVFD3Range; unsigned char ucVFD3Enable;

/*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned char char char char short char char char char short short short DestinationMAC[6];/* the Stream's Dest MAC addr */ SourceMAC[6]; /* the Stream's Source MAC addr */ TypeOfService; /* */ TimeToLive; /* number of "hops" until frame */ /* will be dropped */ InitialSequenceNumber; /* Initial sequence number*/ DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ UDPSrc; /* UDP Source Port */ UDPDest; /* UDP Dest Port */ UDPLen; /* UDP Length field - not used */ /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /*VLAN identifier */ /* /* /* /* /* /* reserved */ Return value for the Time of */ the last ARP initiated */ Return value for the Time of */ the last ARP completed */ The Time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */

unsigned short VLAN_Pri;

unsigned short VLAN_Cfi; unsigned short VLAN_Vid; unsigned char unsigned long unsigned long unsigned long extra[12]; ulARPStart; ulARPEnd; ulARPGap;

} StreamUDPVLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

328 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_SMARTBITS_STREAM
Create a list with one or more customizable streams (can be used with an array of streams). HTSetStructure(L3_DEFINE_SMARTBITS_STREAM, 0, 0, 0, (void*) pStreamSmartBits, sizeof(StreamSmartBits), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_SMARTBITS_STREAM 0 0 0 \ myStreamSmartBits \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamSmartBits

This structure holds information for customized streams (StreamSmartBits). The Background Fill Pattern and the ProtocolHeader[] can be used in combination to construct highly customized frames. Use HTFillPattern to specify the background pattern. Then define the ProtocolHeader array. This array (of up-to 64 bytes) is used as VFD3. It overwrites the background pattern at the specified offset and range. (ucVFD3Enable must be set to HVFD_ENABLED). A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For ATM TeraMetrics modules, for any encapsulation type of the bound VC, NULL encapsulation is inserted in the stream. Only if the bound VC encapsulation is customized, the customized VC encapsulation is inserted in the stream. typedef struct tagStreamSmartBits { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_SMARTBITS*/

unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on */ /* ATM Terametrics or Frame Relay modules */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * * * For ETHERNET, cards VFD1 and VFD2 structure members are * * reserved for later use. Set to 0. * *****************************************************************/ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */

Continues >

SmartLibrary Command Reference: Volume 2 | 329

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char unsigned short unsigned char unsigned char

ucVFD1StartVal[6]; uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

/*the initial VFD byte pattern

*/

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR,*/ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ /*****************************************************************/ unsigned short uiVFD3Offset; /* in bytes. May not be used with */ /* TeraMetrics-based modules. */ unsigned short uiVFD3Range; /* in bytes; Number of elements */ /* to use from ProtocolHeader */ /* No elements are used beyond */ /* the single specified range. */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE. May not be used */ /* with TeraMetrics-based modules. */ unsigned char ucTagField; /* 0 = off, 1 = insert Signature*/ /* field into each frame */ unsigned char ProtocolHeader[64]; /* Defines up to 64 bytes used as VFD3*/ } StreamSmartBits;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

330 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_SMARTBITS_128_STREAM
Create a list with one or more streams with 128 bytes of customizable header. HTSetStructure(L3_DEFINE_SMARTBITS_128_STREAM, 0, 0, 0, (void*) pStreamSmartBits128, sizeof(StreamSmartBits128), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_SMARTBITS_128_STREAM 0 0 0 \ myStreamSmartBits128 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamSmartBits128

This structure holds information for customized streams (StreamSmartBits). The Background Fill Pattern and the ProtocolHeader[] can be used in combination to construct highly customized frames. Use HTFillPattern to specify the background pattern. Then define the ProtocolHeader array. This array (of up to 128 bytes) is used as VFD3. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). IMPORTANT! On TeraMetrics modules (except ATM, POS-3518As/AR and POS-3519As/AR), before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Note: For ATM TeraMetrics modules, for any encapsulation type of the bound VC, NULL encapsulation is inserted in the stream. Only if the bound VC encapsulation is customized, the customized VC encapsulation is inserted in the stream. typedef struct tagStreamSmartBits128 { unsigned char ucActive;/* 1=Enable Stream, 0=Disable Stream*/ unsigned char ucProtocolType;/* use STREAM_PROTOCOL_SMARTBITS*/ unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on */ /* ATM Terametrics or Frame Relay modules */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * * * For ETHERNET, cards VFD1 and VFD2 structure members are * * reserved for later use. Set to 0. * *****************************************************************/

Continues >

SmartLibrary Command Reference: Volume 2 | 331

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/** VFD1 and VFD2 unsigned short unsigned char unsigned char unsigned long

unsigned char unsigned short unsigned char unsigned char

structure members are reserved for later use. Set to 0. **/ uiVFD1Offset;/* in bits */ ucVFD1Range;/* in bits */ ucVFD1Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6];/*the initial VFD byte pattern */

uiVFD2Offset;/* in bits */ ucVFD2Range; /* in bits */ ucVFD2Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR,*/ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern */ /****************************************************************/ unsigned short uiVFD3Offset;/* Reserved */ unsigned short uiVFD3Range; /* in bytes; Number of elements */ /* to use from ProtocolHeader */ /* No elements are used beyond */ /* the single specified range. */ unsigned char ucVFD3Enable;/* Reserved */ unsigned char ucTagField;/* 0 = off, 1 = insert Signature*/ /* field into each frame */ unsigned char ProtocolHeader[128]; /* Defines up to 128 bytes used as VFD3*/ } StreamSmartBits128;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

332 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_STREAM_BINDING
Bind one or more streams to VC indices. HTSetStructure(L3_DEFINE_STREAM_BINDING, 0, 0, 0, (void*) pL3StreamBinding, sizeof(L3StreamBinding), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_STREAM_BINDING 0 0 0 \ myL3StreamBinding \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamBinding

This structure is used to bind stream(s) to VC(s) and update the ATM CLP bit of the stream(s), or retrieve the information of the bound VCs and the ATM CLP setting with the stream(s). These structures are set up for every stream on the ATM TeraMetrics module, so they should be sent after streams are defined. This structure is used for four commands:

L3_DEFINE_STREAM_BINDING Bind one or more streams to one or more VCs, and update CLP bit in the stream(s). The starting stream index is always 1. The number of streams to be bound is the size of the L3StreamBinding array. L3_MOD_STREAM_BINDING Overwrites the stream binding set (the bound VC index and the ATM CLP bit) of the stream at a given index. L3_DEFINE_MULTI_STREAM_EXTENSION Creates an array of stream binding set based on a previously defined stream binding set. The uiBindIndex is delta value, and the uiATMFlags is ignored. L3_STREAM_BINDING_INFO reads back the stream binding parameters for a given stream specified by <index>.

typedef struct tagL3StreamBinding { unsigned char ucBindMode;

unsigned short uiBindIndex; unsigned short uiATMFlags;

/* STREAM_BIND_VC (binding to VC for ATM), required input for both configuration and reading back configurations */ /* VC index for ATM cards */ /* Flag to set CLP bit in ATM header for ATM card, AT_CLP_ON - set CLP bit in ATM header AT_CLP_OFF - not set CLP bit in ATM header*/

unsigned char ucReserved[56]; } L3StreamBinding;

SmartLibrary Command Reference: Volume 2 | 333

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_STREAM_EXTENSION
Create a list with one or more stream extensions (can be used with an array). HTSetStructure(L3_DEFINE_STREAM_EXTENSION, 0, 0, 0, (void*) pL3StreamExtension, sizeof(L3StreamExtension), iHub, iSlot, iPort) HTSetStructure $L3_DEFINE_STREAM_EXTENSION 0 0 0 \ myL3StreamExtension \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamExtension

This structure is used in conjunction with the StreamXX structures (StreamIP, StreamUDP, etc.). It adds information to a pre-created stream. The structure is required by POS-3500B/BS and LAN-3201B/C cards. Optionally, it may be applied in a limited fashion to the ML-7710/7711/7711S, LAN-31xxA/B, LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504As, and POS-3505As cards. It also may be applied in a limited fashion to the ATM-345xA(s) modules, and it is required in these modules to set the frame rate. (See Comments at bottom of table ). It is used to configure additional stream information, including scheduling on a per-stream basis. These structures are set up for every stream, so they should be sent after the streams are defined. This structure is used for four commands: L3_DEFINE_STREAM_EXTENSION defines one or more L3StreamExtension. L3_MOD_STREAM_EXTENSION overwrites one L3StreamExtension at a given index. L3_DEFINE_MULTI_STREAM_EXTENSION creates an array of L3StreamExtensions based on a previously defined L3StreamExtension. L3_READ_STREAM_EXTENSION read back the stream extension parameters for a given stream specified by "index". Note: To perform the payload data integrity verification, the stream minimum frame length is 30 bytes. Note: For TeraMetrics modules, to perform the payload data integrity verification, you should use TRIGGER_ONE_ONLY, and that trigger PATTERN must be the last six bytes of _NETCOM_ ( 'E' 'T' 'C' 'O' 'M' '_' ). typedef struct tagL3StreamExtension { unsigned long ulFrameRate;

/* frame transmit rate, in packets per second */ unsigned long ulTxMode; /* frame transmit mode, use one of L3_CONTINUOUS_MODE, L3_SINGLE_BURST_MODE, L3_MULTIBURST_MODE, L3_CONTINUOUS_MULTIBURST_MODE */ unsigned long ulBurstCount; /* the burst number */ unsigned long ulMBurstCount; /* the multi burst number */ unsigned long ulBurstGap; /* the gap between burst, in 32ns units */ unsigned short uiInitialSeqNumber; /* IP initial sequence number */ unsigned char ucIPHeaderChecksumError;/* 1 enabled, 0 disabled */

Continues >

334 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char unsigned char unsigned char

ucIPTotalLengthError; /* 1 enabled, 0 disabled */ ucIPManipulateMode; /* IP_xxx manipulate mode */ ucIncUDPPort; /* Increase UDP Source and Dst Port number per burst. 1 enabled, 0 disabled */ unsigned short uiIPLimitCount; /* The limit/cycle count is the number of times that the step value(ucStepCount) will be added/subtracted from the field before it is reset to its initial value. Values can range from 0 - 65535. Note that 0 indicates continuously incrementing/decrementing the field. For the LAN-310xA/B modules, this cycle count value applies to the first address referred to by the following IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source (source (source (source IP) IP) MAC) MAC)

unsigned long

unsigned long unsigned unsigned unsigned unsigned unsigned char char char char char

Use uiIPLimitCount2 to set the cycle count for the second address. */ ulStartOffset; /* all streams defined can not transmit at the same time, each stream has to start at the different time. ulStartOffset is the start offset from the previous stream. ulStartOffset's unit is tick. minimum is 10 tick. 1(tick) = 32(ns) */ ulBGPatternIndex; /* index of the stream background fill pattern that defined by L3StreamBGConfig */ ucDataCheckEnable; /* 1 enable payload check error, 0 disable */ ucCRCErrorEnable; /* 1 enable, 0 disable */ ucRandomBGEnable; /* 1 enable, 0 disable */ ucDataIntegrityErrorEnable; /* 1 enable, 0 disable */ ucStepCount; /* IP address increment/decrement step count: 1,3,5,etc. For the LAN-310xA/B modules, this value applies only to the first address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source (source (source (source IP) IP) MAC) MAC)

unsigned char

ucIPBitsOffset;

Use ucStepCount to set the step count for the second address. */ /* bit offset where the IP address is increment. */

Continues >

SmartLibrary Command Reference: Volume 2 | 335

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char unsigned unsigned unsigned unsigned char long char char

ucMPLSCount;

unsigned char

/* Number of MPLS labels. 0 disable the MPLS */ ucIPOptionsCount; /* reserved */ ulCustomStreamID; /* reserved */ ucEnableCustomStreamID;/* reserved */ ucOAMHeaderPacketType;/* defined constants: OAM_PACKET_TYPE_NONE_OAM OAM_PACKET_TYPE_NORMAL_OAM OAM_PACKET_TYPE_IDLE_OAM */ ucStepCount2; /* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the Increment/decrement step count for the Second address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (dest. IP) IP_DEC_SRC_IP_AND_DST_IP (dest. IP) IP_INC_SRC_MAC_AND_DST_MAC (dest. MAC) IP_DEC_SRC_MAC_AND_DST_MAC (dest. MAC) Use ucStepCount to set the step count for the first address. */ /* Applicable for the LAN-310xA/B cards ONLY. The limit/cycle count is the number of times that the step value(ucStepCount2) will be added/subtracted from the field before it is reset to its initial value. Values can range from 0 - 65535. Note that 0 indicates continuously incrementing/decrementing the field. This value applies to the second address referred to by the following IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (dest. IP) IP_DEC_SRC_IP_AND_DST_IP (dest. IP) IP_INC_SRC_MAC_AND_DST_MAC (dest. MAC) IP_DEC_SRC_MAC_AND_DST_MAC (dest. MAC) Use uiIPLimitCount to set the cycle count for the first address. */ /* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the number Of frames that will repeat a pattern before Incrementing or decrementing to the next one. This applies to only the first address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (source IP) IP_DEC_SRC_IP_AND_DST_IP (source IP) IP_INC_SRC_MAC_AND_DST_MAC (source MAC) IP_DEC_SRC_MAC_AND_DST_MAC (source MAC) Use uiBlockCount2 to set the block count for the second address.

unsigned short uiIPLimitCount2;

unsigned short uiBlockCount;

Continues >

336 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short uiBlockCount2;

/* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the number Of frames that will repeat a pattern before Incrementing or decrementing to the next one. This applies to only the second address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (dest. (dest. (dest. (dest. IP) IP) MAC) MAC)

Use uiBlockCount to set the block count for the first address. */ unsigned char ucMulticastKeepAliveEnable; /* Applicable for the TM LAN/POS modules ONLY. This field is used to enable/disable sending multicast keep alive packets for this stream 1- enable 0-disable Default: 0 */ /* Reserved */

unsigned char ucReserved[2]; } L3StreamExtension;

Continues >

SmartLibrary Command Reference: Volume 2 | 337

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Comments

Some cards support this structure in a limited fashion only: The ML-7710/7711/7711S card supports the following fields: ucIPManipulateMode, ucStepCount, and uiIPLimitCount fields. The ucDataIntegrityErrorEnable field is applicable to the LAN-3100A, 3101A/B, 3102A cards. The LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504A, and POS-3505As/AR cards support the following fields: ulFrameRate, uiInitialSeqNumber, ucIPHeaderChecksumError, ucIPTotalLengthError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The LAN-3100A, 3101A/B, 3102A modules supports the following fields: ucDataIntegrityErrorEnable, ucIPManipulateMode, ucStepCount, ucStepCount2, uiIPLimitCount, uiIPLimitCount2, uiBlockCount and uiBlockCount2. Note that the cyclic flow related fields(all fields except ucDataIntegrityErrorEnable) are only applicable for IPv4 streams. The LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504A, and POS-3505As/AR cards support the following fields: ulFrameRate, ucIPHeaderChecksumError, ucIPTotalLengthError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The LAN-3710AL/AE/AS supports the following fields: uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, ucEnableCustomStreamID, and ucOAMHeaderPacketType. The XLW-372xA and XFP-373xA modules supports the following fields: uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The FBC-3601A and FBC-3602A cards supports the following fields: ulTxMode, ulBurstCount, ulMBurstCount, ulBurstGap, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ucDataIntegrityErrorEnable, ulCustomStreamID and ucEnableCustomStreamID.

Continues >

338 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Comments (continued)

The AT-34xx cards supports the following fields: ulFrameRate, uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucDataIntegrityErrorEnable, ulCustomStreamID and ucEnableCustomStreamID. Notes for the AT-34xx cards: - All streams bound to the same VC must have the same frame rate(ulFrameRate). Other fields in L3StreamExtension do not currently apply to these cards. The following modes for ucIPManipulateMode are currently supported on the LAN-3201B/C and POS cards: IP_INC_SRC_IP IP_INC_DST_IP IP_INC_DST_IP_AND_DST_MAC IP_INC_SRC_IP_AND_SRC_MAC IP_INC_SRC_IP_AND_DST_MAC IP_INC_DST_IP_AND_DRC_MAC The following modes for ucIPManipulateMode are currently supported on the ML-7710 card: IP_INC_SRC_IP IP_INC_DST_IP IP_DEC_SRC_IP IP_DEC_DST_IP IP_INC_SRC_IP_AND_SRC_MAC IP_INC_DST_IP_AND_DST_MAC IP_DEC_SRC_IP_AND_SRC_MAC IP_DEC_DST_IP_AND_DST_MAC The following modes for ucIPManipulateMode are currently supported on the LAN-310xA/B card: IP_INC_SRC_IP IP_INC_DST_IP IP_DEC_SRC_IP IP_DEC_DST_IP IP_INC_SRC_IP_AND_SRC_MAC IP_INC_DST_IP_AND_DST_MAC IP_DEC_SRC_IP_AND_SRC_MAC IP_DEC_DST_IP_AND_DST_MAC IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC Notes for ulCustomStreamID with L3_READ_STREAM_EXTENSION: Although stream ID (including custom stream ID or non-custom stream ID) is always 4 bytes, the signature field, by default provides only 2 bytes for the stream ID while the upper 2 bytes are for card/chassis ID, etc. Only when custom stream ID is enabled, all 4 bytes are available to stream ID, and then it's up to user to make sure the chassis/card uniqueness is taken into account when generating custom stream IDs. Therefore when the stream ID is retrieved via L3_READ_STREAM_EXTENSION, the value in the whole 4 bytes are valid only when custom stream ID is enabled. Otherwise only the lower 2 bytes values are valid for the stream ID.

SmartLibrary Command Reference: Volume 2 | 339

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_TCP_IPV6_STREAM
Create a list with one or more TCP/IPv6-compliant streams. HTSetStructure(L3_DEFINE_TCP_IPV6_STREAM, 0, 0, 0, (void*) pStreamTCPIPv6, sizeof(StreamTCPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_TCP_IPV6_STREAM 0 0 0 \ myStreamTCPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPIPv6

This structure contains values for TCP IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. This applies to all TeraMetrics modules except POS-3518As/AR, POS-3519As/AR and ATM-3451A/3453A. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_TCP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

340 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamTCPIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/

Continues >

SmartLibrary Command Reference: Volume 2 | 341

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short unsigned char unsigned char

uiVFD1Offset; ucVFD1Range; ucVFD1Pattern;

unsigned long

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6]; /*the initial VFD byte pattern*/

unsigned short unsigned char unsigned char

uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

unsigned long

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned short SourcePort; /* Source port */ unsigned short DestPort; /* Destination port */ unsigned short Window; /* Protocol window size, in bytes */ unsigned long TCPAck; /* Acknowledgment number */ unsigned long TCPSequence; /* TCP Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; /* Reserved */ } StreamTCPIPv6; unsigned char ucTagField;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

342 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_TCP_IPV6_STREAM_VLAN
Create a list with one or more TCP/IPv6-compliant Tx streams with VLAN tags. HTSetStructure(L3_DEFINE_TCP_IPV6_STREAM_VLAN, 0, 0, 0, (void*) pStreamTCPIPv6VLAN, sizeof(StreamTCPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_TCP_IPV6_STREAM_VLAN 0 0 0 \ myStreamTCPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPIPv6VLAN

This structure contains values for TCP IPv6 compliant Streams with VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. This applies to all TeraMetrics modules except the POS-3518As/AR and POS-3519As/AR. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

SmartLibrary Command Reference: Volume 2 | 343

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP_IPV6_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

typedef struct tagStreamTCPIPv6VLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

Continues >

344 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short SourcePort; /* Source Port */ unsigned short DestPort; /* Destination Port */ unsigned short Window; /* Window size, in bytes*/ unsigned long TCPAck; /* Acknowledgment number */ unsigned long TCPSequence; /* Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; /* Reserved */ unsigned short VLAN_Pri; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /*VLAN identifier */ } StreamTCPIPv6VLAN;

unsigned long

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 345

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_TCP_STREAM
Create a list with one or more TCP compliant Tx streams (can be used with an array). HTSetStructure(L3_DEFINE_TCP_STREAM, 0, 0, 0, (void*) pStreamTCP, sizeof(StreamTCP), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_TCP_STREAM 0 0 0 \ myStreamTCP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCP

This structure contains values for TCP-compliant streams. The IP checksums are automatically calculated using the supplied field value, and inserted into the frame. For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of a module limitation. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_TCP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamTCP { unsigned char ucActive; /* 1 = Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_TCP or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern not available on ATM or Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /*****************************************************************/ /** VFD1, VFD2, and VFD3 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern */ unsigned short uiVFD3Offset;/* in bytes */

Continues >

346 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short unsigned char unsigned char unsigned char unsigned char unsigned char unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned char short char char char char short short short

uiVFD3Range; /* in bytes */ ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ DestinationMAC[6];/* the Stream's Dest MAC addr */ SourceMAC[6]; /* the Stream's Source MAC addr */ TypeOfService; /* the various levels of speed and/or reliability, as described in RFC 1359 */ TimeToLive; /* number of "hops" until frame will be dropped */ InitialSequenceNumber; /* Initial sequence number*/ DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ Netmask[4]; /* Netmask address (e.g. 255.255.255.0)*/ Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ SourcePort; /* Source Port for TCP connection */ DestPort; /* Destination Port for TCP connection */ Window; /* TCP protocol window size, in bytes*/ reserved[2]; TCPAck; TCPSequence; Flags; extra[3]; ulARPOut; ulARPBack; ulARPGap; /* TCP Acknowledgment number */ /* TCP Sequence number */ /* use TCP_FLAG_XXX defines */ /* reserved--not currently in use */ /* reserved--not currently in use */ /* The time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */

unsigned char unsigned long unsigned long unsigned char unsigned char unsigned long unsigned long unsigned long } StreamTCP;

SmartLibrary Command Reference: Volume 2 | 347

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_TCP_STREAM_VLAN
Create a list with one or more TCP/IPv4-compliant Tx streams with VLAN tags. HTSetStructure(L3_DEFINE_TCP_STREAM_VLAN, 0, 0, 0, (void*) pStreamTCPVLAN, sizeof(StreamTCPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_TCP_STREAM_VLAN 0 0 0 \ myStreamTCPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPVLAN

This structure contains values for TCP/IPv4 compliant Streams that use VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. typedef struct tagStreamTCPVLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char

ucRandomData;

unsigned short uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */

/** VFD1 unsigned unsigned unsigned

unsigned

unsigned unsigned unsigned

and VFD2 structure members are reserved for later use. Set to 0. **/ short uiVFD1Offset; /* in bits */ char ucVFD1Range; /* in bits */ char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ long ulVFD1PatternCount;/* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ char ucVFD1StartVal[6];/*the initial VFD byte pattern */ short uiVFD2Offset; /* in bits */ char ucVFD2Range; /* in bits */

Continues >

348 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ /****************************************************************/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */

ucVFD2Pattern;

unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned

char DestinationMAC[6];/* the Stream's Dest MAC addr */ char SourceMAC[6]; /* the Stream's Source MAC addr */ char TypeOfService; /* */ char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ short InitialSequenceNumber; /* Initial sequence number*/ char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ char Netmask[4]; /*Netmask address (e.g. 255.255.255.0)*/ char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ short SourcePort; /* Source Port for TCP connection */ short DestPort; /* Destination Port for TCP connection */ short Window; /* TCP protocol window size */ /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ /*V LAN CFI bit: available constants */ /* VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /*VLAN identifier */ /* TCP Acknowledgment */ /* */ /* 1 is FIN, 2 is SYN, 4 is RST, 8 is PSH */ /* 16 is ACK, 32 is URG */ /**/ /* */ /**/ /**/

unsigned short VLAN_Pri;

unsigned short VLAN_Cfi;

unsigned short VLAN_Vid; unsigned long unsigned long unsigned char unsigned char TCPAck; TCPSequence; Flags; Spare[3]; ulARPOut; ulARPBack; ulARPGap;

unsigned long unsigned long unsigned long } StreamTCPVLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 349

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_UDP_IPV6_STREAM
Create a list with one or more UDP/IPv6-compliant streams. HTSetStructure(L3_DEFINE_UDP_IPV6_STREAM, 0, 0, 0, (void*) pStreamUDPIPv6, sizeof(StreamUDPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_UDP_IPV6_STREAM 0 0 0 \ myStreamUDPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPIPv6

This structure contains values for UDP IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_UDP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

350 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamUDPIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_UDP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 351

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* Identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field (currently not used) */ } StreamUDPIPv6; unsigned char ucTagField;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

352 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_UDP_IPV6_STREAM_VLAN
Create a list with one or more UDP/IPv6-compliant Tx streams with VLAN tags. HTSetStructure(L3_DEFINE_UDP_IPV6_STREAM_VLAN, 0, 0, 0, (void*) pStreamUDPIPv6VLAN, sizeof(StreamUDPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_UDP_IPV6_STREAM_VLAN 0 0 0 \ myStreamUDPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPIPv6VLAN

This structure contains values for UDP IPv6 compliant Streams with VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. This applies to all TeraMetrics modules except thePOS-3518As/AR and POS-3519As/AR. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less. typedef struct tagStreamUDPIPv6 { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char unsigned short

ucRandomData; uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_UDP_IPV6 */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern */ /* frame length not counting CRC */

Continues >

SmartLibrary Command Reference: Volume 2 | 353

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char unsigned unsigned unsigned unsigned char char char char /* 0 = off, 1 = insert Signature field into each frame */ DestinationMAC[6]; /* Destination MAC address */ SourceMAC[6]; /* Source MAC address */ ucTrafficClass; /* Packet priority */ ucNextHeader; /* identifies the header type immediately following the IPV6 header */ ucHopLimit; /* Number of "hops" until frame will be dropped */ ucTagField;

unsigned char

Continues >

354 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* Label packets to request special handling */ /* Source IP address (e.g. 192.100.5.....4) */ /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field - not used */ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /* VLAN identifier */ } StreamUDPIPv6VLAN;

unsigned long ulFlowLabel; unsigned char SourceIP[16]; unsigned char DestinationIP[16];

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 355

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_UDP_STREAM
Create a list with one or more UDP-compliant Tx streams (can be used with an array). HTSetStructure(L3_DEFINE_UDP_STREAM, 0, 0, 0, (void*) pStreamUDP, sizeof(StreamUDP), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_UDP_STREAM 0 0 0 \ myStreamUDP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDP

This structure holds information for UDP-compliant streams. The IP checksums are automatically calculated using the supplied field value and inserted into the frame. For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of a module limitation. The UDP checksum is set to 0, and so is not calculated. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_UDP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED.
typedef struct tagStreamUDP { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_UDP or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 number to increment or decrement through when using incrementing or decrementing pattern */

Continues >

356 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/*the initial VFD byte pattern*/ /* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215. Number to incr. or decr. through when using incr or decr pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6];/* the Streams Dest MAC addr */ unsigned char SourceMAC[6]; /* the Streams Source MAC addr */ unsigned char TypeOfService; /* */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6];/* the Streams Dest MAC addr */ unsigned char SourceMAC[6]; /* the Streams Source MAC addr */ unsigned char TypeOfService; /* */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field - Not used - */ unsigned char extra[12]; /* reserved */ unsigned short uiActualSequenceNumber;/* Actual Sequence number */ unsigned long ulARPStart; /* Return value for the Time of */ /* the last ARP initiated */ unsigned long ulARPEnd; /* Return value for the Time of */ /* the last ARP completed */ unsigned long ulARPGap; /* The time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */ } StreamUDP;

unsigned unsigned unsigned unsigned

char short char char

ucVFD1StartVal[6]; uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 357

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_UDP_STREAM_VLAN
Create a list with one or more UDP/IPv4-compliant Tx streams with VLAN tags. HTSetStructure(L3_DEFINE_UDP_STREAM_VLAN, 0, 0, 0, (void*) pStreamUDPVLAN, sizeof(StreamUDPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_UDP_STREAM_VLAN 0 0 0 \ myStreamUDPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPVLAN

This structure is contains values for UDP-compliant streams with VLAN tagging. The IP checksums are automatically calculated using the supplied field value and inserted into the frame. The UDP checksum is set to 0, and so is not calculated. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For the LAN-3710AL, LAN-3710AS, and LAN-3710AE modules, the maximum number of streams that can be created using L3_DEFINE_IP_STREAM is 7. An inactive default stream will be the first stream created, at index 0. typedef struct tagStreamUDPVLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char

ucRandomData;

unsigned short uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_UDP_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern. Not available on Frame Relay */ /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * ******************************************************************/ unsigned short uiVFD1Offset; unsigned char ucVFD1Range; unsigned char ucVFD1Pattern; /* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6]; /*the initial VFD byte pattern */

unsigned long

unsigned char

Continues >

358 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned char char char char short char char char char short short short DestinationMAC[6];/* the Stream's Dest MAC addr */ SourceMAC[6]; /* the Stream's Source MAC addr */ TypeOfService; /* */ TimeToLive; /* number of "hops" until frame */ /* will be dropped */ InitialSequenceNumber; /* Initial sequence number*/ DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ UDPSrc; /* UDP Source Port */ UDPDest; /* UDP Dest Port */ UDPLen; /* UDP Length field - not used */ /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /*VLAN identifier */ /* /* /* /* /* /* reserved */ Return value for the Time of */ the last ARP initiated */ Return value for the Time of */ the last ARP completed */ The Time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */

unsigned short uiVFD2Offset; unsigned char ucVFD2Range; unsigned char ucVFD2Pattern;

unsigned short VLAN_Pri;

unsigned short VLAN_Cfi;

unsigned short VLAN_Vid; unsigned char unsigned long unsigned long unsigned long extra[12]; ulARPStart; ulARPEnd; ulARPGap;

} StreamUDPVLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 359

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINE_VFD
Create one or more per-stream VFDs (can be used with an array). HTSetStructure(L3_DEFINE_VFD, 0, 0, 0, (void*) pNSVFD, sizeof(NSVFD), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_VFD 0 0 0 \ myNSVFD \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSVFD

This structure configures VFDs for a stream. The VFDs can be placed in the first 64 bytes of the frame; however the VFDs will be overwritten by the following fields of the frame: IP sequence number, IP header checksum, IP total length, UDP/TCP checksum, TCP sequence number, and the signature field. Example for ucCycleCount and ucBlockCount: ucMode = L3_VFD_INCR uiRange = 2 ulCycleCount = 4 ulBlockCount = 2 ucPattern = {0 0 0 0 0 0} The transmitted patterns will be as follows (in hex): 00 00 00 00 00 01 00 01 00 02 00 02 00 03 00 03 00 00 00 00 ... Example for ucStepValue and ucStepShift: ucMode = L3_VFD_INCR uiRange = 4 ucStepValue = 3 ucStepShift = 2 ucPattern = {0 0 0 0 0 0}

Continues >

360 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

The transmitted patterns will be as follows (in hex): 00 00 00 00 00 03 00 00 00 06 00 00 00 09 00 00 ... Example for ucSubnetMaskAware and ucSubnetMaskLength: ucMode = L3_VFD_INCR uiRange = 4 ucSubnetMaskAware = 1 ucSubnetMaskLength = 24 ucPattern = (0 0 0 0xFD 0 0} The transmitted patterns will be as follows (in hex): 00 00 00 FD 00 00 00 FE 00 00 00 01 00 00 00 02 ... typedef struct tagNSVFD { unsigned char ucType; unsigned char ucMode;

unsigned short uiOffset;

unsigned short uiRange; unsigned long ulCycleCount;

unsigned short uiBlockCount;

/* Specifies VFD1 or VFD2; use L3_VFD1 or L3_VFD2. */ /* VFD mode: static, increment, decrement, or random; use L3_VFD_STATIC, L3_VFD_INCR, L3_VFD_DECR, L3_VFD_RANDOM, or L3_VFD_OFF. */ /* Offset of the VFD, in bits. The VFD must fall within the first 128 bytes of the frame. Also, if the VFD falls in the last 18 bytes of the payload, and the signature field is enabled, the signature field will overwrite the VFD. Note: The offset should be in multiples of eight.*/ /* Range (length) of the VFD, in bytes. Valid ranges are from 1 to 6 bytes. */ /* For increment or decrement mode, the number of patterns before resetting to initial VFD pattern. May range from 0 to 16777215. If 0, the pattern will increment or decrement through its entire range without resetting. */ /* For increment or decrement mode, the number of frames that will repeat a pattern before incrementing or decrementing to the next one. May range from 0 to 4095. When used with ulCycleCount each block of patterns only counts as one toward the cycle count. NOTE: It is always a fixed value of one (1) when used with Multicast Keep Alive Stream.*/

Continues >

SmartLibrary Command Reference: Volume 2 | 361

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char

ucStepValue;

unsigned char

unsigned char

unsigned char

unsigned char

unsigned char

unsigned char } NSVFD;

/* For increment or decrement mode, the amount to add or subtract from the previous pattern. May range from 0 to 255. 255. Not available when ucSubnetAware is enabled. See the example in the structure description. When the ucMode = L3_VFD_INCR and ucStepValue = 0, the result will be static which means no change at all. When the ucMode = L3_VFD_INCR and ucStepValue = 1, the result will be incrementing by step as 1. */ ucStepShift; /* For increment or decrement mode, this field specifies the location in the pattern where the change will occur. The ucStepShift is the number of bytes to shift the step value left before adding or subtracting from the previous pattern. May range from 0 to 5, and is limited by the range of the pattern. See the example in the structure description. */ ucSubnetAware; /* Skip VFD patterns which are interpreted as subnet (0) or broadcast (255) addresses. 1 = enable, 0 = disable. See the example in the structure description. Note: This feature works only when uiRange is set to 4 and ucStepValue is set to 1. */ ucSubnetMaskLength; /* If ucSubnetAware is enabled, this is the number of bits in the subnet mask. See the example in the structure description. */ ucEnableCarryChaining; /* For increment or decrement mode, this field enables carry over from VFD1 to VFD2 on overflow or underflow. 1 = enable, 0 = disable. To enable the feature, this field must be set for both VFD1 and VFD2. VFD2 will remain static until VFD1 overflows or underflows. At that point, the next VFD pattern will begin (increment, decrement, or random). */ ucPattern[6]; /* Initial VFD pattern. Note: the transmitted pattern will start with the byte at index 0, even if the range is less than 6 bytes. */ ucReserved[16]; /* reserved */ IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

Comment

362 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DEFINED_STREAM_COUNT_INFO
Retrieve the count of Streams in the list. HTGetStructure(L3_DEFINED_STREAM_COUNT_INFO, 0, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTGetStructure $L3_DEFINED_STREAM_COUNT_INFO 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ULong

iType1 Description C Usage

L3_DHCP_CONFIG
Set the rate for DHCP client messages. HTSetStructure(L3_DHCP_CONFIG, 0, 0, 0, (void*) pLayer3DHCPConfig, sizeof(Layer3DHCPConfig), iHub, iSlot, iPort); HTSetStructure $L3_DHCP_CONFIG 0 0 0 \ myLayer3DHCPConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3DHCPConfig

A simple structure that sets up and retrieves the rate, in frames per second, at which DHCP DISCOVER and RELEASE messages are transmitted, if multiple DHCP-capable streams are initiated. The rate can be selected to adapt to the ability of the DHCP server host to respond to messages. ulRate is the rate, in frames per second, at which DHCP DISCOVER/RELEASE message will be sent. In DHCP messages from a client, the flag field includes a bit to indicate whether or not to broadcast the replies to these messages back to the client. By default, the broadcast flag will not be set. typedef struct tagLayer3DHCPConfig { unsigned long ulRate; /* In frames per second */ unsigned char ucBroadcastEnable; /* Enable(1) or disable(0) the use of the broadcast flag in DHCP discover and request messages. Supported on LAN-310xA/B, LAN-332xA, LAN-3306A, XLW-372XA, and XFP-373xA modules */ unsigned char ucReserved1[3]; /* Reserved */ unsigned long ulReserved[5]; /* Reserved, currently unused */ } Layer3DHCPConfig;

SmartLibrary Command Reference: Volume 2 | 363

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DHCP_CONFIG_INFO
Set the rate for DHCP client messages. HTGetStructure(L3_DHCP_CONFIG_INFO, 0, 0, 0, (void*) pLayer3DHCPConfig, sizeof(Layer3DHCPConfig), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_CONFIG_INFO 0 0 0 \ myLayer3DHCPConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3DHCPConfig

A simple structure that sets up and retrieves the rate, in frames per second, at which DHCP DISCOVER and RELEASE messages are transmitted, if multiple DHCP-capable streams are initiated. The rate can be selected to adapt to the ability of the DHCP server host to respond to messages. ulRate is the rate, in frames per second, at which DHCP DISCOVER/RELEASE message will be sent. In DHCP messages from a client, the flag field includes a bit to indicate whether or not to broadcast the replies to these messages back to the client. By default, the broadcast flag will not be set. typedef struct tagLayer3DHCPConfig { unsigned long ulRate; /* In frames per second */ unsigned char ucBroadcastEnable; /* Enable(1) or disable(0) the use of the broadcast flag in DHCP discover and request messages. Supported on LAN-310xA/B, LAN-332xA, LAN-3306A, XLW-372XA, and XFP-373xA modules */ unsigned char ucReserved1[3]; /* Reserved */ unsigned long ulReserved[5]; /* Reserved, currently unused */ } Layer3DHCPConfig;

364 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DHCP_EXTENDED_HOST_INFO
Get extended DHCP host information from a specified card. Note that "index" is the first stream to get info for and "count" is the total number of streams to get info for. HTGetStructure(L3_DHCP_EXTENDED_HOST_INFO, <index>, <count>, (void*) pLayer3ExtendedDHCPHostInfo, sizeof(Layer3ExtendedDHCPHostInfo), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_EXTENDED_HOST_INFO <index> <count> 0 \ myLayer3DHCPExtendedHostInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3DHCPExtendedHostInfo

A simple structure which returns extended DHCP host results. Possible values for uiState are: L3_DHCP_STATE_UNDEFINED L3_DHCP_STATE_INIT L3_DHCP_STATE_SELECTING L3_DHCP_STATE_REBOOT L3_DHCP_STATE_REBOOTING L3_DHCP_STATE_REQUESTING L3_DHCP_STATE_RENEW L3_DHCP_STATE_RENEWING L3_DHCP_STATE_BOUND L3_DHCP_STATE_REBINDING L3_DHCP_STATE_RELEASING typedef struct tagLayer3DHCPExtendedHostInfo { unsigned long ulStreamNumber; /* Stream index number */ unsigned char ucHostIP[4]; /* Host IP address */ unsigned char ucServerIP[4]; /* Server IP address */ unsigned char ucServerMAC[6]; /* Server MAC address */ unsigned char ucReserved[2]; /* Reserved, currently unused */ unsigned char ucGateway[4]; /* Currently reserved */ unsigned char ucSubnet[4]; /* Currently reserved */ unsigned short uiState; /* The DHCP State of the stream */ unsigned char ucReserved2[2]; /* Reserved, currently unused */ unsigned long ulTime; /* DHCP Time in 1/10 microseconds */ unsigned char szServerName[64]; /* Server Name */ unsigned char szFileName[128]; /* File Name */ unsigned char ucOption[312]; /* DHCP Option */ } Layer3DHCPExtendedHostInfo;

Comment

If <index> specifies a stream that is not DHCP-capable (i.e., not IP, UDP, or TCP), then it will start at the first stream on the card that is DHCP-capable. Streams that are not DHCP-capable are skipped.

SmartLibrary Command Reference: Volume 2 | 365

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage Comment

L3_DHCP_GET_ADDRESS
Start DHCP exchange for one or more streams (with or without VLAN). Note that index is the first stream to start the exchange for and count is the total number of streams to exchange for. HTSetCommand(L3_DHCP_GET_ADDRESS, <index>, <count>, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_DHCP_GET_ADDRESS <index> <count> 0 \ "" \ $iHub $iSlot $iPort If <index> specifies a stream that is not DHCP-capable (i.e., not IP, UDP, or TCP), then it will start at the first stream on the card that is DHCP-capable. Streams that are not DHCP-capable are skipped. Note: It is recommended to put a delay of two to four seconds between successive calls to L3_DHCP_GET_ADDRESS. This allows time for the card to process each call.

iType1 Description C Usage Tcl Usage Comment

L3_DHCP_GET_ADDRESS_ALL
Start DHCP exchange for all streams (with or without VLAN). HTSetCommand(L3_DHCP_GET_ADDRESS_ALL, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_DHCP_GET_ADDRESS_ALL 0 0 0 \ "" \ $iHub $iSlot $iPort Starts at the first stream on the card that is DHCP-capable. Streams that are not DHCP-capable are skipped.

366 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DHCP_HOST_INFO
Get DHCP host information from a specified port. Note that "index" is the first stream to get info for and "count" is the total number of streams to get info for. HTGetStructure(L3_DHCP_HOST_INFO, <index>, <count>, (void*) pLayer3DHCPHostInfo, sizeof(Layer3DHCPHostInfo), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_HOST_INFO <index> <count> 0 \ myLayer3DHCPHostInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3DHCPHostInfo

A simple structure which returns the DHCP host results. Possible values for uiState are: L3_DHCP_STATE_UNDEFINED L3_DHCP_STATE_INIT L3_DHCP_STATE_SELECTING L3_DHCP_STATE_REBOOT L3_DHCP_STATE_REBOOTING L3_DHCP_STATE_REQUESTING L3_DHCP_STATE_RENEW L3_DHCP_STATE_RENEWING L3_DHCP_STATE_BOUND L3_DHCP_STATE_REBINDING L3_DHCP_STATE_RELEASING typedef struct tagLayer3DHCPHostInfo { unsigned long ulStreamNumber; unsigned char ucHostIP[4]; unsigned char ucServerIP[4]; unsigned char ucServerMAC[6]; unsigned char ucReserved[2]; unsigned char ucGateway[4]; unsigned char ucSubnet[4]; unsigned short uiState; unsigned short uiReserved; unsigned long ulTime; } Layer3DHCPHostInfo;

/* /* /* /* /* /* /* /* /* /*

Stream index number */ Host IP address */ Server IP address */ Server MAC address */ Reserved, currently unused */ Currently reserved */ Currently reserved */ The DHCP State of the stream */ Reserved, currently unused */ DHCP Time in 1/10 microseconds */

Comment

If <index> specifies a stream that is not DHCP-capable (i.e., not IP, UDP, or TCP), then it will start at the first stream on the card that is DHCP-capable. Streams that are not DHCP-capable are skipped.

SmartLibrary Command Reference: Volume 2 | 367

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DHCP_PORT_COUNTER_INFO
Retrieve DHCP summary information for a port. HTGetStructure(L3_DHCP_PORT_COUNTER_INFO, 0, 0, 0, (void*) pLayer3DHCPPortCounterInfo, sizeof(Layer3DHCPPortCounterInfo), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_PORT_INFO 0 0 0 myLayer3DHCPPortCounterInfo\0 $iHub $iSlot $iPort Layer3DHCPPortCounterInfo

Tcl Usage Related Structure

/* One structure is returned for each stream */ typedef struct tagLayer3DHCPPortCounterInfo { unsigned short uiFailure; unsigned short uiTimeout; unsigned short uiDiscoverSent; unsigned short uiOfferReceived; unsigned short uiRequestSent; unsigned short uiAckReceived; unsigned short uiNakReceived; unsigned short uiReleaseSent; unsigned short uiDeclineSent; unsigned char ucReserved[128]; } Layer3DHCPPortCounterInfo;

/* Reserved */

iType1 Description C Usage

L3_DHCP_PORT_SESSION_INFO
This command retrieves DHCP port session counters information for a port. HTGetStructure(L3_DHCP_PORT_SESSION_INFO, 0, 0, 0, (void*) pLayer3DHCPPortSessionInfo, sizeof(Layer3DHCPPortSessionInfo), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_PORT_SESSION_INFO 0 0 0 myLayer3DHCPPortSessionInfo\0 $iHub $iSlot $iPort Layer3DHCPPortSessionInfo

Tcl Usage Related Structure

Continues >

368 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagLayer3DHCPPortSessionInfo { unsigned long ulStreams; /* Number of DHCP-enabled streams that are active */ unsigned long ulAttempting; /* Number of DHCP-enabled streams attempting DHCP protocol exchanges (not in DHCP INIT or DHCP UNDEFINED state).*/ unsigned long ulTotalFailure; /* Number of DHCP NAK received that resulted in returning the state to DHCP INIT from another state. It is the total number of failures */ unsigned long ulTotalSuccess; /* Number of DHCP ACK received that resulted in transiting to DHCP BOUND state. This includes DHCP renewal. In essence, this is the total number of successful DHCP exchanges resulting in updating of IP addresses */ unsigned long ulTotalAttempt; /* Total number of attempts that does is not from DHCP renew */ unsigned long ulTotalRenewAttempt; /* Number of DHCP enabled streams attempting DHCP renew from user renew command */ unsigned long ulTotalRenewFailure; /* Number of DHCP renew failure as a result of receiving DHCP ACK or an DHCP OFFER in DHCP RENEWING state */ unsigned long ulTotalRenewSuccess; /* Total number of DHCP renew */ U64 u64MinTime; /* The minimum amount of time for this port, in 100ns units, between the DHCP Discover being sent out for that stream, and the DHCP ACK being returned by the server. */ U64 u64MaxTime; /* is the maximum amount of time for this port, in 100ns units, between the DHCP Discover being sent out for that stream, and the DHCP ACK being returned by the server. */ U64 u64AccTime; /* The accumulative amount of time that this port, in 100 ns units for all the DHCP session between the DHCP Discover being sent out for that stream, and the DHCP ACK being returned by the server */ unsigned long ulBound; /* Number of DHCP-enabled streams in DHCP BOUND state */ unsigned long ulSelecting; /* Number of DHCP-enabled streams in DHCP SELECTING state */ unsigned long ulRequesting; /* Number of DHCP-enabled streams in DHCP REQUESTING state */ unsigned long ulInit; /* Number of DHCP-enabled streams in DHCP INIT state */ unsigned long ulRenewing; /* Number of DHCP-enabled streams in DHCP RENEWING state */ unsigned long ulBoundFromRenew; /* Reserved - Number of DHCP-enabled streams in DHCP BOUND state transited from DHCP RENEWING state. */ unsigned long ulUndefined; /* Reserved -Number of DHCP-enabled streams in DHCP UNDEFINED state */ U64 u64StartTime; /* Reserved - Time that the first DHCP DISCOVER is sent out. */ U64 u64LastSuccess; /* Reserved -Time that the last stream transited to DHCP BOUND state */ U64 u64RetrievalTime; /* Reserved - Time that this message is read in firmware */ unsigned char ucReserved[128]; }Layer3DHCPPortSessionInfo;

SmartLibrary Command Reference: Volume 2 | 369

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

L3_DHCP_RELEASE_ADDRESS
Perform DHCP Release for one or more streams, with or without VLAN. Note that index is the first stream and count is the total number of streams to perform the release for. HTSetCommand(L3_DHCP_RELEASE_ADDRESS, <index>, <count>, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_DHCP_RELEASE_ADDRESS <index> <count> 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage Tcl Usage

L3_DHCP_RELEASE_ADDRESS_ALL
Perform DHCP Release for all streams, with or without VLAN. HTSetCommand(L3_DHCP_RELEASE_ADDRESS_ALL, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_DHCP_RELEASE_ADDRESS_ALL 0 0 0 \ "" \ $iHub $iSlot $iPort

370 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DHCP_RENEW
Transmit a DHCP renew/request message for one or more streams. HTSetStructure(L3_DHCP_RENEW, <index>, <count>, 0, (void*) pLayer3DHCPRenew, sizeof(Layer3DHCPRenew), iHub, iSlot, iPort); HTSetStructure $L3_DHCP_RENEW <index> <count> 0 \ myLayer3DHCPRenew \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3DHCPRenew

The DHCP client (stream) must be in the "Bound" state before a request message will be sent in the "Renewing" state. This capability will be user-controlled. The module does not support the timers necessary to dynamically send a request message in the "Renewing" state when the lease time expires or is about to expire. Furthermore, once the request message is sent out, the module does not handle timeouts. You need to call L3_DHCP_RENEW again to have the module resend the request message. Once the "Renewing" state is finished, you need to poll the module to check if the IP address obtained is different from that of the original DHCP exchange. This IP address can be obtained from the L3_DHCP_HOST_INFO or L3_DHCP_EXTENDED_HOST_INFO commands. typedef struct tagLayer3DHCPRenew { unsigned long ulIndex; unsigned long ulCount; unsigned char ucReserved[8]; } Layer3DHCPRenew;

/* The index for the first stream */ /* The number of streams to send a DHCP request message for */ /* Reserved */

Comment

None.

iType1 Description

L3_DHCP_RESTART
Re-initiates the DHCP process for all DHCP capable active streams that are not in DHCP Bound State. This will include those streams that have not been started before with L3_DHCP_GET_ADDRESS/ L3_DHCP_GET_ADDRESS_ALL. Note that index is the first stream and count is the total number of streams to perform the release for.

C Usage Tcl Usage

HTSetCommand(L3_DHCP_RESTART, <index>, <count>, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_DHCP_RESTART <index> <count> 0 \ "" $iHub $iSlot $iPort

SmartLibrary Command Reference: Volume 2 | 371

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description

L3_DHCP_RESTART_ALL
Re-initiates the DHCP process for all DHCP capable active streams that are not in DHCP Bound State. This will include those streams that have not been started before with L3_DHCP_GET_ADDRESS/ L3_DHCP_GET_ADDRESS_ALL. HTSetCommand(L3_DHCP_RESTART_ALL, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_DHCP_RESTART_ALL 0 0 0 "" $iHub $iSlot $iPort

C Usage Tcl Usage

iType1 Description C Usage

L3_DHCP_STATS_INFO
Get DHCP statistics from a specified port. Note that "index" is the first stream to get info for and "count" is the total number of streams to get info for. HTGetStructure(L3_DHCP_STATS_INFO, <index>, <count>, 0, (void*) pLayer3DHCPStatsInfo, sizeof(Layer3DHCPStatsInfo), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_STATS_INFO <index> <count> 0 \ myLayer3DHCPStatsInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3DHCPStatsInfo

A simple structure which returns the DHCP host statistics. typedef struct tagLayer3DHCPStatsInfo { unsigned long ulStreamNumber; unsigned short uiFailure; unsigned short uiTimeout; unsigned short uiDiscoverSent; unsigned short uiOfferRcvd; unsigned short uiReqSent; unsigned short uiAckRcvd; unsigned short uiNakRcvd; unsigned short uiReleaseSent; unsigned short uiDeclineSent; unsigned short uiReserved; } Layer3DHCPStatsInfo;

/* /* /* /* /* /* /* /* /* /* /*

Stream index number */ Number of failure(s) */ Timeout value */ Number of DISCOVER packets sent */ Number of OFFER packets received */ Number of REQUEST packets sent */ Number of ACK pakcets received */ Number of NACK packets Received */ Number of RELEASE packets sent */ Number of DECLINE packets sent */ Reserved, currently unused */

Comment

If <index> specifies a stream that is not DHCP-capable (i.e., not IP, UDP, or TCP), then it will start at the first stream on the card that is DHCP-capable. Streams that are not DHCP-capable are skipped.

372 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_DHCP_STREAM_COUNT_INFO
Get the number of active, DHCP-capable streams. HTGetStructure(L3_DHCP_STREAM_COUNT_INFO, 0, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_STREAM_COUNT_INFO 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ULong

iType1 Description C Usage

L3_DHCP_V2_EXTENDED_HOST_INFO
Get extended DHCP host information from a specified card. Note that "index" is the first stream toget info for and "count" is the total number of streams to get info for.. HTGetStructure(L3_DHCP_V2_EXTENDED_HOST_INFO, <index>, <count>, (void*)pLayer3ExtendedDHCPV2HostInfo, sizeof(Layer3ExtendedDHCPV2HostInfo), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_V2_EXTENDED_HOST_INFO <index> <count> 0\ myLayer3DHCPV2ExtendedHostInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3DHCPV2ExtendedHostInfo

A simple structure which returns extended DHCP host results. Possible values for uiState are: L3_DHCP_STATE_UNDEFINED L3_DHCP_STATE_INIT L3_DHCP_STATE_SELECTING L3_DHCP_STATE_REBOOT L3_DHCP_STATE_REBOOTING L3_DHCP_STATE_REQUESTING L3_DHCP_STATE_RENEW L3_DHCP_STATE_RENEWING L3_DHCP_STATE_BOUND L3_DHCP_STATE_REBINDING L3_DHCP_STATE_RELEASING

Continues >

SmartLibrary Command Reference: Volume 2 | 373

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagLayer3DHCPV2ExtendedHostInfo { unsigned long ulStreamNumber; /* Stream index number */ unsigned char ucHostIP[4]; /* Host IP address */ unsigned char ucServerIP[4]; /* Server IP address */ unsigned char ucServerMAC[6]; /* Server MAC address */ unsigned char ucGateway[4]; /* Currently reserved */ unsigned char ucSubnet[4]; /* Currently reserved */ unsigned short uiState; /* The DHCP State of the stream */ unsigned long ulTime; /* DHCP Time in 1/10 microseconds */ unsigned char szServerName[64]; /* Server Name */ unsigned char szFileName[128]; /* File Name */ unsigned char ucOption[31]; unsigned long ulLeaseTime; /* Lease Time in microseconds offered from the DHCP server */ unsigned char ucReserved[128]; /* Reserved, currently unused */ } Layer3DHCPV2ExtendedHostInfo;

Comment

If <index> specifies a stream that is not DHCP-capable (i.e., not IP, UDP, or TCP), then it will start at the first stream on the card that is DHCP-capable. Streams that are not DHCP-capable are skipped.

iType1 Description C Usage

L3_DHCP_V2_HOST_INFO
Get DHCP host information from a specified port. Note that "index" is the first stream to get infofor and "count" is the total number of streams to get info for. HTGetStructure(L3_DHCP_V2_HOST_INFO, <index>, <count>, (void*) pLayer3DHCPHostInfo, sizeof(Layer3DHCPV2HostInfo), iHub, iSlot, iPort); HTGetStructure $L3_DHCP_V2_HOST_INFO <index> <count> 0 myLayer3DHCPV2HostInfo \0 $iHub $iSlot $iPort

Tcl Usage Related Structure

Layer3DHCPV2HostInfo
Continues >

374 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

A simple structure which returns the DHCP host results. Possible values for uiState are: L3_DHCP_STATE_UNDEFINED L3_DHCP_STATE_INIT L3_DHCP_STATE_SELECTING L3_DHCP_STATE_REBOOT L3_DHCP_STATE_REBOOTING L3_DHCP_STATE_REQUESTING L3_DHCP_STATE_RENEW L3_DHCP_STATE_RENEWING L3_DHCP_STATE_BOUND L3_DHCP_STATE_REBINDING L3_DHCP_STATE_RELEASING. typedef struct tagLayer3DHCPHostInfo { unsigned long ulStreamNumber; /* Stream index number */ unsigned char ucHostIP[4]; /* Host IP address */ unsigned char ucServerIP[4]; /* Server IP address */ unsigned char ucServerMAC[6]; /* Server MAC address */ unsigned char ucGateway[4]; /* Currently reserved */ unsigned char ucSubnet[4]; /* Currently reserved */ unsigned short uiState; /* The DHCP State of the stream */ unsigned long ulTime; /* DHCP Time in 1/10 microseconds */ unsigned long ulLeaseTime; /* Lease Time in microseconds offered from the DHCP server */ unsigned char ucReserved[128]; /* Reserved, currently unused */ } Layer3DHCPV2HostInfo;

Comment

If <index> specifies a stream that is not DHCP-capable (i.e., not IP, UDP, or TCP), then it will start at the first stream on the card that is DHCP-capable. Streams that are not DHCP-capable are skipped.

iType1 Description C Usage

L3_ETHERNET_MODE_ON
Enable the Ethernet port. Used to reset the port after using RNDIS mode. HTSetCommand(L3_ETHERNET_MODE_ON, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_ETHERNET_MODE_ON 0 0 0 \ "" \ $iHub $iSlot $iPort To set the port to RNDIS mode, use L3_RNDIS_MODE_ON on page 454.

Tcl Usage Comment

SmartLibrary Command Reference: Volume 2 | 375

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_HIST_ACTIVE_TEST_INFO
Get the number of histogram records and the active histogram HTGetStructure(L3_HIST_ACTIVE_TEST_INFO, 0, 0, 0, (void*) pLayer3HistActiveTest, sizeof(Layer3HistActiveTest), iHub, iSlot, iPort); HTGetStructure $L3_HIST_ACTIVE_TEST_INFO 0 0 0 \ myLayer3HistActiveTest \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3HistActiveTest

Used to retrieve the total number of records generated by the active histogram on the specified port. It also reports which histogram is active. Histogram records cease to be generated when: * Information is retrieved from the port using L3_HIST_ACTIVE_TEST_INFO. * Frames with signatures are no longer received. * Histogram records are retrieved from the port. Supported return values for ulTest are the following: L3_HIST_TEST_RAW_TAGS (5) L3_HIST_TEST_V2_LATENCY_PER_STREAM (7) L3_HIST_TEST_LATENCY_DISTRIBUTION(4) L3_HIST_TEST_SEQUENCE(1) L3_HIST_TEST_V2_LATENCY(6) typedef struct tagLayer3HistActiveTest { unsigned long ulTest; unsigned long ulRecords; } Layer3HistActiveTest;

Comments

For related commands and instructions on histogram results, refer to the SmartLibrary Overview and Procedures.

376 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description

L3_HIST_LATENCY_DISTRIBUTION
Specify/Activate Latency Distribution histogram for Rx port. Refer to Card Support for Latency Buckets on page 893 for information on the number of latency ranges (buckets) supported by different modules for the SmartBits 600x/6000x. HTSetCommand(L3_HIST_LATENCY_DISTRIBUTION, 0, 0, 0, pLayer3HistDistribution, iHub, iSlot, iPort); HTSetCommand $L3_HIST_LATENCY_DISTRIBUTION 0 0 0 \ myLayer3HistDistribution \ $iHub $iSlot $iPort

C Usage Tcl Usage Related Structure

Layer3HistDistribution

Defines the time interval ranges used in the Latency Distribution histogram. The maximum latency it can track is 6.5 milliseconds. NOTE: For 32 bit Latency Distribution tracking (with latency tracking up to 429.4 seconds) use the combination histogram set by L3_HIST_V2_LATENCY_PER_STREAM. Latency Distribution tracks how many frames fall within a given latency range. There are 16 configurable ranges in units of .1 microseconds. Example Values -------------If uiInterval[0] is set to 1, it tracks frames with a latency value of 0 to .1 us. If the next interval is 10, the range is from .2us to 1us. Mechanics --------When a frame is received, the latency is calculated from the timestamp in the signature field. The correct ulFrame[i] is incremented by one. A separate record containing the 16 different range tallies is generated for each stream. Resolution and accuracy ----------------------One unit is .1 microsecond (one clock tick). For a pair of 10Mbit ports accuracy is plus or minus .2 us. For a pair of 10/100Mbit ports transmitting at 100Mbits, accuracy is plus or minus .2 us. For a pair of 10/100Mbit ports transmitting at 10Mbits, accuracy is plus or minus .4 us. For 10/100Mbit ports transmitting to a 10Mbit port, accuracy is plus or minus .3 us. Results for this histogram are retrieved using the Layer3StreamDistributionInfo structure. typedef struct tagLayer3HistDistribution { unsigned short uiInterval[16]; /* 1 = 100 nanoseconds */ } Layer3HistDistribution;

SmartLibrary Command Reference: Volume 2 | 377

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_HIST_LATENCY_DISTRIBUTION_INFO
Get Latency Distribution histogram results. Note that "index" is the stream to get these results for. HTGetStructure(L3_HIST_LATENCY_DISTRIBUTION_INFO, <index>, 0, 0, (void*) pLayer3StreamDistributionInfo, sizeof(Layer3StreamDistributionInfo), iHub, iSlot, iPort); HTGetStructure $L3_HIST_LATENCY_DISTRIBUTION_INFO <index> 0 0 \ myLayer3StreamDistributionInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3StreamDistributionInfo

Contains Latency Distribution histogram results. Latency Distribution tracks how many frames fall within a given latency range. There are 16 configurable ranges in units of .1 microseconds. Example Values If uiInterval[0] is set to 1, it tracks frames with a latency value of 0 to .1 us. If the next interval is 10, the range is from .2 us to 1 us. Mechanics When a frame is received, the latency is calculated from the timestamp in the signature field. The correct ulFrame[i] is incremented by one. A separate record containing the 16 different range tallies is generated for each stream. Resolution and Accuracy One unit is .1 microsecond - 100ns (one clock tick). For a pair of 10Mbit ports accuracy is plus or minus .2 microseconds (.2 us). For a pair of 10/100Mbit ports transmitting at 100Mbits, accuracy is plus or minus .2 us. For a pair of 10/100Mbit ports transmitting at 10Mbits, accuracy is plus or minus .4 us. For 10/100Mbit ports transmitting to a 10Mbit port, accuracy is plus or minus .3 us. Setting Resolution (different structure) ---------------------------------------To set the distribution intervals, use L3_HIST_LATENCY_DISTRIBUTION. This iType1 uses the Layer3HistDistribution structure, where uiInterval[16] contains the different latency ranges. typedef struct tagLayer3StreamDistributionInfo { unsigned long ulStream; /* a unique Stream identifier unsigned long ulFrames[16]; /* Contains the number of frames /* with the specified latency range, /* for 16 different ranges. } Layer3StreamDistributionInfo;

*/ */ */ */

Comments

The Timestamp-Initialization Sequence must be used whenever the test involves latency-related measurements and a group. The timestamps on all ports in the group
must be simultaneously initialized. This process is described in the Timestamp-Initialization Sequence section located in SmartLibrary Command Reference Volume 1: Chapter 3, Original Functions and Structures.

378 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

L3_HIST_RAW_TAGS
Specify/Activate Raw Tag histogram for Rx port. HTSetCommand(L3_HIST_RAW_TAGS, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_HIST_RAW_TAGS 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage

L3_HIST_RAW_TAGS_INFO
Get Raw Tags histogram records. Note that "index" is the stream to get these records for. HTGetStructure(L3_HIST_RAW_TAGS_INFO, <index>, 0, 0, (void*) pLayer3HistTagInfo, sizeof(Layer3HistTagInfo), iHub, iSlot, iPort); HTGetStructure $L3_HIST_RAW_TAGS_INFO <index> 0 0 \ myLayer3HistTagInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3HistTagInfo

Contains the signature field information for the Raw Tags histogram. A separate record in generated for each SmartBits test frame (containing a signature) received at this port. typedef struct { unsigned long unsigned long unsigned long tagLayer3HistTagInfo a unique Stream identifier frame serial number timestamp of when this frame left its SmartBits port timestamp of when this frame was received by this SmartBits port */ */ */ */ */ */

ulStream; /* ulSequence; /* ulTransmitTime;/* /* unsigned long ulReceiveTime; /* /* } Layer3HistTagInfo;

Comment

None

iType1 Description C Usage Tcl Usage

L3_HIST_SEQUENCE
Specify/Activate Sequence Tracking histogram for Rx port. HTSetCommand(L3_HIST_SEQUENCE, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_HIST_SEQUENCE 0 0 0 \ "" \ $iHub $iSlot $iPort

SmartLibrary Command Reference: Volume 2 | 379

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_HIST_SEQUENCE_INFO
Get Sequence Tracking histogram results. Note that "index" is the stream to get these results for. HTGetStructure(L3_HIST_SEQUENCE_INFO, <index>, 0, 0, (void*) pLayer3SequenceInfo, sizeof(Layer3SequenceInfo), iHub, iSlot, iPort); HTGetStructure $L3_HIST_SEQUENCE_INFO <index> 0 0 \ myLayer3SequenceInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
Current Method

Layer3SequenceInfo

When a frame with A SmartBits Signature field is received, if the sequence number matches the expected number,
then both the in-sequence counter and the expected sequence value are incremented If the sequence number in the Signature field does not match the expected number, the in-sequence number is not incremented. The expected sequence value is changed to be one more than the sequence number that was received
Old Method (ML-7710/7711/7711S before v1.16) Contains Sequence Tracking histogram results. Sequence Tracking counts the number of frames per stream that are:

In sequence Duplicate Lost


A separate record is generated for each test stream received by the specified port. Sequence is tracked using the signature field embedded in each test frame. The Sequence Tracking algorithm is as follows: ----------------------------------------------* As long as frames are received in sequence, the ulSequenced value is incremented. * If a frame is received that is greater than the one expected, the number of missing frames (hole size) is noted, and a variable for the first of the missing frames is set. * Subsequent in-order frames falling after the sequence hole increment the ulSequence counter. * If the frame from the start of the hole is received, the hole-size variable is decremented. * If a frame from the middle of the hole is received, the earlier frames still not received from the sequence hole are counted as lost (ulLost). The hole-size variable is decremented, and the start of the hole begins after the received frame. The expected frame continues to be one more than the last frame received in sequence. * If another out-of-sequence frame is received before the previous sequence hole is filled, ulLost is incremented by the size of the previous sequence hole. The new hole is then tracked. * If while the new sequence hole is being tracked, a previous out-of-sequence frame arrives, ulDuplicate is incremented. * The ulSequenced value continues to increment for every frame received in sequence after the current sequence hole. For Example: 1,2,3 Three frames in sequence. 1,2,3,9,10,11 Sequence hole five frames. 10,11, in sequence. 1,2,3,9,10,11,4 Sequence hole is now four frames. 1,2,3,9,10,11,4,15 First hole closed, ulLost incremented by four. New hole three frames long. 1,2,3,9,10,11,4,15,5 ulDuplicate incremented by one. (5 is counted as a duplicate since the previous hole is no longer tracked).

Continues >

380 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct { unsigned long unsigned long unsigned long unsigned long

tagLayer3SequenceInfo ulStream; ulFrames; ulSequenced; ulDuplicate; /* Stream identifier for this record */ /* no. of frames rcvd for this Stream */ /* no. of frames rcvd in sequence */ /* Reserved.*/ For ML-7710 prior to the v1.16, no. of frames duplicated*/ Out of sequence frames.*/ For ML-7710 prior to the v1.16,*/ no. of frames that broke the*/ /* sequence and were either never rcvd,*/ /* or not received before another out- */ /* of-sequence frame was noted. */

/* /* /* /*

unsigned long ulLost;

} Layer3SequenceInfo;

Comment

IMPORTANT: See Sequence Tracking in the SmartLibrary Overview and Procedures.

iType1 Description C Usage Tcl Usage

L3_HIST_START
Clear Histogram records/Histogram remains in Receive state. HTSetCommand(L3_HIST_START, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_HIST_START 0 0 0 \ "" \ $iHub $iSlot $iPort

SmartLibrary Command Reference: Volume 2 | 381

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage Related Structure

L3_HIST_V2_LATENCY
Specify/Activate Latency Over Time histogram for Rx port HTSetCommand(L3_HIST_V2_LATENCY, 0, 0, 0, pLayer3HistLatency, iHub, iSlot, iPort); HTSetCommand $L3_HIST_V2_LATENCY 0 0 0 \ myLayer3HistLatency \ $iHub $iSlot $iPort

Layer3HistLatency

Used to setup time intervals for the Latency Over Time histogram. This structure is used with L3_HIST_V2_LATENCY. The Latency Over Time histogram provides the Minimum, Maximum, and Average Latency for all streams at specified intervals. ulInterval is the interval that latency values are checked. For example, if ulInterval is 2, latency values are calculated every 2 milliseconds. Latency Resolution and Accuracy One unit is .1 millisecond. * For a pair of 10Mbit ports, accuracy is plus or minus .2 us. * For a pair of 10/100Mbit ports transmitting at 100Mbits, accuracy is plus or minus .2 us. * For a pair of 10/100Mbit ports transmitting at 10Mbits, accuracy is plus or minus .4 us. * For 10/100Mbit ports transmitting to a 10Mbit port, accuracy is plus or minus .3 us. Results are retrieved using the Layer3LongLatencyInfo structure. typedef struct tagLayer3HistLatency { unsigned long ulInterval; /* 1 = 1 millisecond */ } Layer3HistLatency;

iType1 Description C Usage

L3_HIST_V2_LATENCY_DISTRIBUTION
Specify/Activate Latency Distribution histogram for Rx port. HTSetCommand(L3_HIST_V2_LATENCY_DISTRIBUTION, 0, 0, 0, pLayer3V2TrackingDistribution, iHub, iSlot, iPort); HTSetCommand $L3_HIST_V2_LATENCY_DISTRIBUTION 0 0 0 \ myLayer3V2TrackingDistribution \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3V2TrackingDistribution

typedef struct tagLayer3V2TrackingDistribution { unsigned long ulInterval[16]; } Layer3V2TrackingDistribution;

382 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_HIST_V2_LATENCY_INFO
Get Latency over Time histogram results. Note that "index" is the time interval to get these results for. HTGetStructure(L3_HIST_V2_LATENCY_INFO, <index>, 0, 0, (void*) pLayer3LongLatencyInfo, sizeof(Layer3LongLatencyInfo), iHub, iSlot, iPort); HTGetStructure $L3_HIST_V2_LATENCY_INFO <index> 0 0 \ myLayer3LongLatencyInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3LongLatencyInfo

Contains Latency Over Time histogram results. Provides the Minimum, Maximum, and Sum of Latency values for frames received during specified intervals. The values are the composite results of all streams averaged together. Setting the interval: On the Rx port, use the Layer3HistLatency structure and specify the ulInterval. This value determines how often latency values are compared. One Interval unit is 1 millisecond. The Latency measurements of Minimum, Maximum, and Average Latency are calculated to the nearest .1 microsecond. Each record (Min, Max, and Sum latency values) represents the latencies of the frames arriving in each interval. Use iType2 to specify the index of the first record (interval) to retrieve. Example If ulInterval is set to 10: The first Min, Max, and Sum latency value is for the first ten milliseconds. The second Min, Max, and Sum latency value is for the second ten milliseconds, and so on. Latency values are calculated from the timestamp in the signature field embedded within each test frame. The average latency for each time interval can be calculated by dividing the total latency by the number of frames. Note that the following cards do not support the Sum latency (u64Total): LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504As, and POS-3505As/AR. typedef struct { unsigned long unsigned long U64 unsigned long tagLayer3LongLatencyInfo ulMinimum; ulMaximum; u64Total; ulFrames; /* /* /* /* /* min frame latency in .1 microseconds */ max frame latency in .1 microseconds */ sum of all latencies in .1 microseconds */ frames with signature fields (tags), */ received in this interval. */

} Layer3LongLatencyInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

Comments

The Timestamp-Initialization Sequence must be used whenever the test involves latency-related measurements and a group. The timestamps on all ports in the group
must be simultaneously initialized. This process is described in the Timestamp-Initialization Sequence section located in SmartLibrary Command Reference Volume 1: Chapter 3, Original Functions and Structures.

SmartLibrary Command Reference: Volume 2 | 383

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description

L3_HIST_V2_LATENCY_PER_STREAM
Specify/Activate combination histogram (Latency Dist., Latency Per Strm, and Sequence) for Rx port. Refer to Card Support for Latency Buckets on page 893 for information on the number of latency ranges (buckets) supported by different modules for the SmartBits 600x/6000x. HTSetCommand(L3_HIST_V2_LATENCY_PER_STREAM, 0, 0, 0, pLayer3V2HistDistribution, iHub, iSlot, iPort); HTSetCommand $L3_HIST_V2_LATENCY_PER_STREAM 0 0 0 \ myLayer3V2HistDistribution \ $iHub $iSlot $iPort

C Usage Tcl Usage Related Structure

Layer3V2HistDistribution

Defines the time interval ranges used in the combination histogram specified by L3_HIST_V2_LATENCY_PER_STREAM. The maximum latency it can track is 429.4 seconds. Latency Distribution tracks how many frames have a latency that falls within a given range. There are 16 configurable ranges in units of .1 microsecond (one clock tick). Example Values If ulInterval[0] is set to 1, it tracks frames with a latency value of 0 to .1 us. If the next interval is 10, the range is from .2us to 1us. Mechanics When a frame is received, the latency is calculated from the timestamp in the signature field. The correct ulFrame[i] is incremented by one. A separate record containing the 16 different range tallies is generated for each stream. Resolution and accuracy One unit is .1 microsecond (one clock tick). For a pair of 10Mbit ports accuracy is plus or minus .2 us. For a pair of 10/100Mbit ports transmitting at 100Mbits, accuracy is plus or minus .2 us. For a pair of 10/100Mbit ports transmitting at 10Mbits, accuracy is plus or minus .4 us. For a 10/100Mbit port transmitting to a 10Mbit port, accuracy is plus or minus .3 us. Results for this histogram are retrieved using the Layer3StreamDistributionInfo structure. typedef struct tagLayer3V2HistDistribution { unsigned long ulInterval[16]; /* 1 = 1 millisecond */ } Layer3V2HistDistribution;

384 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description

L3_HIST_V2_LATENCY_PER_STREAM_INFO
Get combination histogram results - Latency Dist, Lat. Per Stream, Sequence. Note that "index" is the stream to get these results for. Latency values are shown for both in-sequence and out-of-sequence frames. HTGetStructure(L3_HIST_V2_LATENCY_PER_STREAM_INFO, <index>, 0, 0, (void*) pLayer3StreamLongLatencyInfo, sizeof(Layer3StreamLongLatencyInfo), iHub, iSlot, iPort); HTGetStructure $L3_HIST_V2_LATENCY_PER_STREAM_INFO <index> 0 0 \ myLayer3StreamLongLatencyInfo \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure
This histogram tracks:

Layer3StreamLongLatencyInfo

Contains results from a combination histogram, V2 Latency Per Stream. 1.) Latency Per Stream (Min, Max) 2.) Sequence Tracking 3.) Latency Distribution. One record is generated for each stream received. Statistics are tracked using the signature field embedded within each test frame. To specify this histogram, use L3_HIST_V2_LATENCY_PER_STREAM. Latency Resolution and Accuracy One unit is .1 microsecond (one clock tick). * For a pair of 10Mbit ports, accuracy is plus or minus .2 us. * For a pair of 10/100Mbit ports transmitting at 100Mbits, accuracy is plus or minus .2 us. * For a pair of 10/100Mbit ports transmitting at 10Mbits, accuracy is plus or minus .4 us. * For 10/100Mbit ports transmitting to a 10Mbit port, accuracy is plus or minus .3 us. Latency Per Stream Info. Latency Per Stream finds the Sum, Min, and Max latency value for each stream over the duration of the test. Sequence Tracking Info. Sequence Tracking counts the number of frames per stream that are: * Out of sequence * Duplicate * Lost A separate record is generated for each test stream received by the specified port.

Continues >

SmartLibrary Command Reference: Volume 2 | 385

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

The Sequence Tracking algorithm is as follows: ----------------------------------------------* As long as frames are received in sequence, the ulSequenced value is incremented. * If a frame is received that is greater than the one expected, the number of missing frames (hole size) is noted, and a variable for the first of the missing frames is set. * Subsequent in-order frames falling after the sequence hole increment the ulSequence counter. * If the frame from the start of the hole is received, the hole-size variable is decremented. * If a frame from the middle of the hole is received, the earlier frames still not received from the sequence hole are counted as lost (ulLost). The hole-size variable is decremented, and the start of the hole begins after the received frame. The expected frame continues to be one more than the last frame received in sequence. * If another out-of-sequence frame is received before the previous sequence hole is filled, ulLost is incremented by the size of the previous sequence hole. The new hole is then tracked. * If while the new sequence hole is being tracked, a previous out-of-sequence frame arrives, ulDuplicate is incremented. * The ulSequenced value continues to increment for every frame received in sequence after the current sequence hole. For Example: 1,2,3 1,2,3,9,10,11 1,2,3,9,10,11,4 1,2,3,9,10,11,4,15 1,2,3,9,10,11,4,15,5 tracked). Three frames in sequence. Sequence hole five frames. 10,11, in sequence Sequence hole is now four frames. First hole closed, ulLost incremented by four. New hole three frames long. ulDuplicate incremented by one. (5 is counted as a duplicate since the previous hole is no longer

Latency Distribution Info. ******************************** Latency Distribution tracks the number of frames with a latency that falls within a given range. (There are 16 configurable ranges). Example Values -------------If ulInterval[0] is set to 1, it tracks frames with a latency value of 0 to .1 us. If the next interval is 10, the range is from .2us to 1us. Mechanics --------When a frame is received, correct ulFrame[i] is incremented by one. A separate record containing the 16 different range tallies is generated for each stream. For Example: 1,2,3 1,2,3,9,10,11 1,2,3,9,10,11,4 1,2,3,9,10,11,4,15 Three frames in sequence. Sequence hole five frames. 10,11, in sequence Sequence hole is now four frames. First hole closed, ulLost incremented by four. New hole three frames long.

1,2,3,9,10,11,4,15,5 ulDuplicate incremented by one. (5 is counted as a duplicate since the previous hole is no longer tracked).

Continues >

386 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagLayer3StreamLongLatencyInfo { unsigned long ulStream; /* a unique Stream Identifier /* Latency Per Stream info. U64 u64Total; /* sum of latencies for this Stream unsigned long ulMinimum; /* min frame latency for this Stream unsigned long ulMaximum; /* max frame latency for this Stream /* unsigned long ulTotalFrames;/* unsigned long ulSequenced; /* /* unsigned long ulDuplicate; /* /* unsigned long ulLost; /* /* /* /* /*

*/ */ */ */ */

Sequenc Tracking info. */ total frames rcvd for this Stream */ no. frames rcvd in sequence */ MC only >> 1st timestamp rcvd for group stream */ no. of frames duplicated */ MC only >> last timestamp rcvd for group stream */ no. frames that broke the */ sequence and were either never rcvd,*/ or not received before another out- */ of-sequence frame was noted. */ currently unused for MC */

/* Latency Distribution info. */ unsigned long ulFrames[16]; /* Contains the number of frames */ /* with the specified latency range, */ /* for 16 different ranges . */ } Layer3StreamLongLatencyInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

Comments

The Timestamp-Initialization Sequence must be used whenever the test involves latency-related measurements and a group. The timestamps on all ports in the group
must be simultaneously initialized. This process is described in the Timestamp-Initialization Sequence section located in SmartLibrary Command Reference Volume 1: Chapter 3, Original Functions and Structures.

SmartLibrary Command Reference: Volume 2 | 387

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_ICMP_IPV6_STREAM
Overwrite one IPv6 stream with ICMP configurations in the list at <index>. HTSetStructure(L3_MOD_ICMP_IPV6_STREAM, <index>, 0, 0, (void*) pStreamICMPIPv6, sizeof(StreamICMPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_MOD_ICMP_IPV6_STREAM <index> 0 0 \ myStreamICMPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPIPv6

This structure contains values for IPv6 streams with ICMP configuration. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and is laid into the frame just before the CRC. Use caution when defining the frame length so that the signature does not overwrite important data. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_ICMP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

388 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamICMPIPv6 { unsigned char ucActive; /* 1 = Enable Stream, 0 = Disable Stream */ unsigned char ucProtocolType; /* STREAM_PROTOCOL_ICMP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except POS-3500/3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* card's background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* Frame length, not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* In bits */ unsigned char ucVFD1Range; /* In bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* From 0(off) to 16,777,215. */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /* The initial VFD byte pattern */

Continues >

SmartLibrary Command Reference: Volume 2 | 389

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short unsigned char unsigned char

/* In bits */ /* In bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* From 0 (off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /* The initial VFD byte pattern */ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char unsigned unsigned unsigned unsigned char char char char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* In bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

/* 0 = off, 1 = insert signature */ /* field into each frame */

DestinationMAC[6]; /* The stream's Dest MAC addr */ SourceMAC[6]; /* The stream's Source MAC addr */ ucTrafficClass; /* Packet priority */ ucNextHeader; /* Identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of hops until frame is dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Similar to gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned char ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ unsigned char ucCode; /* ICMP Code field */ unsigned short uiIdentifier; /* ICMP Identifier field */ unsigned char ucReserved[24]; }StreamICMPIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

390 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_ICMP_IPV6_STREAM_VLAN
Overwrite one IPv6 VLAN stream with ICMP configuration in the list at a given index. HTSetStructure(L3_MOD_ICMP_IPV6_STREAM_VLAN, <index>, 0, 0, (void*) pStreamICMPIPv6VLAN, sizeof(StreamICMPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_MOD_ICMP_IPV6_STREAM_VLAN <index> 0 0 \ myStreamICMPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPIPv6VLAN

This structure contains values for ICMP compliant Streams for IPv6 that use VLAN tagging. The ICMP checksum is calculated automatically using the supplied header fields and inserted into the IP header. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

SmartLibrary Command Reference: Volume 2 | 391

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamICMPIPv6VLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_ICMP_IPV6_VLAN */ unsigned char ucRandomLength; /* 1 =Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except POS-3500/3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /** VFD1 unsigned unsigned unsigned and VFD2 structure members short uiVFD1Offset; char ucVFD1Range; char ucVFD1Pattern; are /* /* /* /* /* ulVFD1PatternCount; /* /* /* /* ucVFD1StartVal[6]; /* uiVFD2Offset; ucVFD2Range; ucVFD2Pattern; /* /* /* /* /* reserved for later use. Set to 0. **/ in bits */ in bits */ HVFD_ENABLED, HVFD_STATIC, */ HVFD_INCR, HVFD_DECR, */ HVFD_RANDOM, HVFD_NONE */ from 0(off) to 16,777,215.*/ number to incr. or decr. */ through when using inc or */ dec pattern */ the initial VFD byte pattern */ in bits in bits HVFD_ENABLED, HVFD_STATIC, HVFD_INCR, HVFD_DECR, HVFD_RANDOM, HVFD_NONE */ */ */ */ */

unsigned long

unsigned char unsigned short unsigned char unsigned char

Continues >

392 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

/* 0 = off, 1 = insert signature */ /* field into each frame */ /* the Stream's Dest MAC addr */ /* the Stream's Source MAC addr */

unsigned char unsigned char

DestinationMAC[6]; SourceMAC[6];

unsigned char ucTrafficClass; unsigned char ucNextHeader; unsigned unsigned unsigned unsigned unsigned unsigned unsigned

unsigned

/* Packet priority */ /* identifies the header type immediately following the IPV6 header */ char ucHopLimit; /* number of "hops" until frame */ /* will be dropped */ long ulFlowLabel; /* label packets to request special handling */ char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ char RouterIP[16]; /* Similar to gateway address */ char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /*VLAN identifier */

unsigned short VLAN_Vid; unsigned char ucType; unsigned char ucCode; unsigned short uiIdentifier; unsigned char ucReserved[24]; }StreamICMPIPv6VLAN;

/* ICMP Type Number: Echo Request, Reply, etc.*/ /* ICMP Code field */ /* ICMP Identifier field */

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 393

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_ICMP_STREAM
Overwrite one ICMP stream in the list at a given index (<index>). HTSetStructure(L3_MOD_ICMP_STREAM, <index>, 0, 0, (void*) pStreamICMP, sizeof(StreamICMP), iHub, iSlot, iPort); HTSetStructure $L3_MOD_ICMP_STREAM <index> 0 0 \ myStreamICMP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMP

This structure contains values for ICMP-compliant Streams. The IP checksum is calculated automatically using the supplied header fields and inserted into the IP header. Note: For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of module limitations. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and is inserted in the frame just before the CRC. Use caution when defining the frame length so that the Signature field does not overwrite important data. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_ICMP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamICMP { unsigned char ucActive; /* 1 = Enable Stream, 0 = Disable Stream */ unsigned char ucProtocolType; /* STREAM_PROTOCOL_ICMP or STREAM_PROTOCOL_BRIDGED (ATM only)*/ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = Use uiFrameLength Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* card's background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* Frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

394 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD1PatternCount; /* From 0 (off) to 16,777,215. */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /* The initial VFD byte pattern */ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* From 0 (off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /* The initial VFD byte pattern */ /****************************************************************/ unsigned short unsigned short unsigned char unsigned char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

/* 0 = off, 1 = insert signature */ /* field into each frame */

unsigned char DestinationMAC[6]; /* The Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* The Stream's Source MAC addr */ unsigned char TypeOfService; /* The various levels of speed and/or reliability */ unsigned char TimeToLive; /* Number of hops until frame is dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number */ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Netmask address (e.g. 255.255.255.0) */ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1) */ unsigned char ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ unsigned char ucCode; /* ICMP Code field */ unsigned short uiIdentifier; /* ICMP Identifier field */ unsigned char extra[16]; /* Reserved */ unsigned long ulARPOut; unsigned long ulARPBack; unsigned long ulARPGap; } StreamICMP;

SmartLibrary Command Reference: Volume 2 | 395

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_ICMP_STREAM_VLAN
Overwrite one IPv4 VLAN stream with ICMP configuration in the list at a given index ("index"). HTSetStructure(L3_MOD_ICMP_STREAM_VLAN, <index>, 0, 0, (void*) pStreamICMPVLAN, sizeof(StreamICMPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_MOD_ICMP_STREAM_VLAN <index> 0 0 \ myStreamICMPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamICMPVLAN

This structure contains values for ICMP compliant Streams for IPv4 that use VLAN tagging. The ICMP checksum is calculated automatically using the supplied header fields and inserted into the IP header. A Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). The Signature field is 18 bytes long and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. typedef struct tagStreamICMPVLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned

unsigned

/** VFD1 unsigned unsigned unsigned

unsigned

unsigned unsigned unsigned unsigned

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_ICMP_VLAN */ /* 1 = enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics-based modules. Need to set the minimum random lengths using NS_PORT_TRANSMIT when enabled. */ char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ and VFD2 structure members are reserved for later use. Set to 0. **/ short uiVFD1Offset; /* in bits */ char ucVFD1Range; /* in bits */ char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ long ulVFD1PatternCount; /* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ char ucVFD1StartVal[6]; /*the initial VFD byte pattern */ short uiVFD2Offset; /* in bits */ char ucVFD2Range; /* in bits */ char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

396 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. /* through when using inc or /* dec pattern unsigned char ucVFD2StartVal[6]; /* the initial VFD byte pattern /****************************************************************/ unsigned unsigned unsigned unsigned short short char char uiVFD3Offset; uiVFD3Range; ucVFD3Enable; ucTagField; /* /* /* /* /*

*/ */ */ */

in bytes */ in bytes */ HVFD_ENABLED, HVFD_NONE */ 0 = off, 1 = insert signature */ field into each frame */

unsigned char unsigned char unsigned char unsigned char unsigned unsigned unsigned unsigned unsigned unsigned short char char char char short

DestinationMAC[6]; SourceMAC[6]; TypeOfService;

unsigned short

unsigned short unsigned char unsigned unsigned unsigned unsigned unsigned char short long long long

/* the Stream's Dest MAC addr */ /* the Stream's Source MAC addr */ /* The various levels of speed and/or reliability */ TimeToLive; /* number of "hops" until frame */ /* will be dropped */ InitialSequenceNumber;/* Initial sequence number*/ DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ Netmask[4]; /* Netmask address (e.g. 255.255.255.0)*/ Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ VLAN_Vid; /*VLAN identifier */ ucType; /* ICMP Type Number: Echo Request, Reply, etc. */ ucCode; /* ICMP Code field */ uiIdentifier; /* ICMP Identifier field */ ulARPOut; /* Reserved */ ulARPBack; /* Reserved */ ulARPGap; /* Reserved */ /* Reserved */

unsigned char

ucReserved[24];

}StreamICMPVLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 397

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_IP_STREAM
Overwrite one IP Stream in the list at a given index. HTSetStructure(L3_MOD_IP_STREAM, <index>, 0, 0, (void*) pStreamIP, sizeof(StreamIP), iHub, iSlot, iPort); HTSetStructure $L3_MOD_IP_STREAM <index> 0 0 \ myStreamIP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIP

This structure holds information for IP-compliant streams. The IP checksum is automatically calculated using the supplied header fields and inserted into the IP header. For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of module limitation. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_IP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamIP { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char

ucRandomData;

unsigned short

uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_IP or STREAM_PROTOCOL_BRIDGED (ATM only) */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits unsigned char ucVFD1Range; /* in bits

*/

Continues >

398 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature */ /* field into each frame */ unsigned char DestinationMAC[6]; /* the Streams Dest MAC addr */ unsigned char SourceMAC[6]; /* the Streams Source MAC addr */ unsigned char TypeOfService; /* The various levels of speed and/or reliability */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned char Protocol; /* 4=IP on the IP assigned list */ unsigned char extra[17]; /* reserved */ unsigned short uiActualSequenceNumber; /* Actual Sequence number */ unsigned long ulARPStart; /* Return value for the Time of */ /* the last ARP initiated */ unsigned long ulARPEnd; /* Return value for the Time of */ /* the last ARP completed */ unsigned long ulARPGap; /* The time between ARPs, in 100ns units; /* not available on LAN-3300A, LAN-3301A, /* LAN-3310A, or LAN-3311A.*/ } StreamIP;

unsigned char

ucVFD1Pattern;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 399

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_IP_STREAM_VLAN
Overwrite one IP Stream with VLAN in the list at a given index ("index"). HTSetStructure(L3_MOD_IP_STREAM_VLAN, <index>, 0, 0, (void*) pStreamIPVLAN, sizeof(StreamIPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_MOD_IP_STREAM_VLAN <index> 0 0 \ myStreamIPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPVLAN

This structure contains values for IP compliant Streams that use VLAN tagging. The IP checksum is automatically calculated using the supplied header fields and inserted into the IP header. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. typedef struct tagStreamIPVLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_IP_VLAN */ unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; unsigned char ucVFD1Range; unsigned char ucVFD1Pattern; /* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6];/*the initial VFD byte pattern*/

unsigned long

unsigned char

Continues >

400 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short uiVFD2Offset; unsigned char ucVFD2Range; unsigned char ucVFD2Pattern;

unsigned long

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6];/*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/

unsigned char

ucTagField;

/* 0 = off, 1 = insert Signature */ /* field into each frame */

char DestinationMAC[6];/* the Stream's Dest MAC addr */ char SourceMAC[6]; /* the Stream's Source MAC addr */ char TypeOfService; /* */ char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4];/* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned char Protocol; /* 4=IP on the IP assigned list */ unsigned char reserved[5]; unsigned short VLAN_Pri; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /*VLAN identifier */ unsigned char extra[12]; /* reserved */ unsigned long ulARPStart; /* Return value for the Time of */ /* the last ARP initiated */ unsigned long ulARPEnd; /* Return value for the Time of */ /* the last ARP completed */ unsigned long ulARPGap; /* The Time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */ } StreamIPVLAN;

unsigned unsigned unsigned unsigned

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 401

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_IPV6_STREAM
Overwrite one stream with an IPv6 stream at a given index. HTSetStructure(L3_MOD_IPV6_STREAM, <index>, 0, 0, (void*) pStreamIPv6, sizeof(StreamIPv6), iHub, iSlot, iPort); HTSetStructure $L3_MOD_IPV6_STREAM <index> 0 0 \ myStreamIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPv6

This structure contains values for IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, and POS-3510/11/A,As) this feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

402 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1 = Enable Stream, 0 = Disable Stream */ /* use STREAM_PROTOCOL_IPV6, or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN-33XX and POS-35XX(except /3502) cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * The VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short unsigned char unsigned char uiVFD1Offset; ucVFD1Range; ucVFD1Pattern; /* /* /* /* /* in bits in bits HVFD_ENABLED, HVFD_STATIC, HVFD_INCR, HVFD_DECR, HVFD_RANDOM, HVFD_NONE */ */ */ */ */

Continues >

SmartLibrary Command Reference: Volume 2 | 403

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

unsigned char unsigned short unsigned char unsigned char unsigned long

ulVFD1PatternCount; /* /* /* /* ucVFD1StartVal[6]; /* uiVFD2Offset; ucVFD2Range; ucVFD2Pattern; /* /* /* /* /* ulVFD2PatternCount; /* /* /* /* ucVFD2StartVal[6]; /*

from 0(off) to 16,777,215 number to incr. or decr. through when using inc or dec pattern the initial VFD byte pattern

*/ */ */ */ */

unsigned char

in bits */ in bits */ HVFD_ENABLED, HVFD_STATIC, */ HVFD_INCR, HVFD_DECR, */ HVFD_RANDOM, HVFD_NONE */ from 0(off) to 16,777,215 */ number to incr. or decr. */ through when using inc or */ dec pattern */ the initial VFD byte pattern */

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char unsigned unsigned unsigned unsigned char char char char 0 = off, 1 = insert Signature */ field into each frame */ DestinationMAC[6]; Destination MAC address */ SourceMAC[6]; Source MAC address */ ucTrafficClass; Packet priority */ ucNextHeader; identifies the header type immediately following the IPV6 header */ ucHopLimit; /* number of "hops" until frame */ /* will be dropped */ ulFlowLabel; /* label packets to request special handling */ SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4)*/ DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ RouterIP[16]; /* Similar to gateway address */ ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ ucTagField; /* /* /* /* /* /*

unsigned char unsigned long unsigned char unsigned char unsigned char unsigned char } StreamIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

404 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_IPV6_STREAM_VLAN
Overwrite one stream with an IPv6 stream with VLAN tags at a given index. HTSetStructure(L3_MOD_IPV6_STREAM_VLAN, <index>, 0, 0, (void*) pStreamIPv6VLAN, sizeof(StreamIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_MOD_IPV6_STREAM_VLAN <index> 0 0 \ myStreamIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPv6VLAN

This structure contains values for IPv6 compliant Streams that use VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less. typedef struct tagStreamIPv6VLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

/* 1=Enable Stream, 0=Disable Stream */ /* Use STREAM_PROTOCOL_IPV6_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern */ /* Frame length not counting CRC */

unsigned char unsigned short

ucRandomData; uiFrameLength;

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

SmartLibrary Command Reference: Volume 2 | 405

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

unsigned unsigned unsigned unsigned

char short char char

unsigned long

unsigned char

ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ uiVFD2Offset; /* in bits */ ucVFD2Range; /* in bits */ ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the type header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /* VLAN identifier */ } StreamIPv6VLAN; unsigned char ucTagField;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

406 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_IPX_STREAM
Overwrite one IPX Stream in the list at a given index. HTSetStructure(L3_MOD_IPX_STREAM, <index>, 0, 0, (void*) pStreamIPX, sizeof(StreamIPX), iHub, iSlot, iPort); HTSetStructure $L3_MOD_IPX_STREAM <index> 0 0 \ myStreamIPX \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPX

This structure holds information for IPX compliant Streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. typedef struct tagStreamIPX { unsigned char ucActive;/* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType;/* use STREAM_PROTOCOL_IPX */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** * For ETHERNET cards, VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 407

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char unsigned char unsigned char unsigned short unsigned char unsigned char unsigned char unsigned char unsigned short unsigned char unsigned char unsigned short unsigned char } StreamIPX; ucTagField; /* /* DestinationMAC[6]; SourceMAC[6]; /* IPXlen; /* IPXhop; /* IPXtype; /* IPXdst[4]; /* IPXdstHost[6]; /* IPXdstSocket; /* IPXsrc[4]; /* IPXsrcHost[6]; /* IPXsrcSocket; /* extra[24]; /* 0 = off, 1 = insert signature */ field into each frame */ /* the Streams Dest MAC addr*/ the Streams Source MAC addr */ Length field in the IPX hdr */ Hop field in the IPX hdr */ IPX type field in the IPX hdr*/ Dest ID in the IPX hdr */ Dest host in the IPX hdr */ Dest Socket in the IPX hdr */ Source ID in the IPX hdr */ Source host in the IPX hdr */ Source socket in the IPX hdr */ reserved */

unsigned char

ucVFD2Pattern;

408 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description

L3_MOD_MPLS
Modify a single MPLS stream. Create MPLS labels for one existing stream at a time. Notes:

TeraMetrics LAN modules support up to 12 MPLS labels. TeraMetrics POS modules support up to 14 MPLS labels. ATM-3453A/3451A modules support up to 11 MPLS labels for IPv6 over MPLS, and support up to 9 MPLS labels for IPv4 over MPLS. This is because of a module limitation that the IP checksum must be in the first cell (within the first 48 bytes). When using customized VC encapsulation, the maximum number of labels supported depends on the encapsulation length for the IP checksum limitation.

C Usage

HTSetStructure(L3_MOD_MPLS, <index>, 0, 0, (void*) pNSMPLSList, sizeof(NSMPLSList), iHub, iSlot, iPort); HTSetStructure $L3_MOD_MPLS <index> 0 0 \ myNSMPLSList \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSMPLSList
/* number of labels for this stream (32 max) */ /* list of MPLS labels for this stream */

typedef struct tagNSMPLSList { unsigned short uiNumLabels; NSMPLSLabel Labels[32]; } NSMPLSList;

Embedded Structure

NSMPLSLabel
/* /* /* /* [bit [bit [bit [bit 12 - 31] 9 - 11] 8] 0 - 7] */ */ */ */

typedef struct tagNSMPLSLabel { unsigned long ulLabel; unsigned char ucExperimentalUse; unsigned char ucBottomStack; unsigned char ucTimeToLive; } NSMPLSLabel;

SmartLibrary Command Reference: Volume 2 | 409

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_SMARTBITS_STREAM
Overwrite one SmartBits Stream in the list at a given index. HTSetStructure(L3_MOD_SMARTBITS_STREAM, <index>, 0, 0, (void*) pStreamSmartBits, sizeof(StreamSmartBits), iHub, iSlot, iPort); HTSetStructure $L3_MOD_SMARTBITS_STREAM <index> 0 0 \ myStreamSmartBits \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamSmartBits

This structure holds information for customized streams (StreamSmartBits). The Background Fill Pattern and the ProtocolHeader[] can be used in combination to construct highly customized frames. Use HTFillPattern to specify the background pattern. Then define the ProtocolHeader array. This array (of up-to 64 bytes) is used as VFD3. It overwrites the background pattern at the specified offset and range. (ucVFD3Enable must be set to HVFD_ENABLED). A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For ATM TeraMetrics modules, for any encapsulation type of the bound VC, NULL encapsulation is inserted in the stream. Only if the bound VC encapsulation is customized, the customized VC encapsulation is inserted in the stream. typedef struct tagStreamSmartBits { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_SMARTBITS */

Continues >

410 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1 and VFD2 structure members are * * reserved for later use. Set to 0. * *****************************************************************/ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR,*/ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ /*****************************************************************/ unsigned short uiVFD3Offset; /* in bytes. May not be used with */ /* TeraMetrics-based modules. */ unsigned short uiVFD3Range; /* in bytes; Number of elements */ /* to use from ProtocolHeader */ /* No elements are used beyond */ /* the single specified range. */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE. May not be used */ /* with TeraMetrics-based modules. */ unsigned char ucTagField; /* 0 = off, 1 = insert Signature*/ /* field into each frame */ unsigned char ProtocolHeader[64];/* Defines up to 64 bytes used as VFD3*/ } StreamSmartBits;

unsigned char

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 411

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_SMARTBITS_128_STREAM
Overwrite one SmartBits stream in the list at a given index. HTSetStructure(L3_MOD_SMARTBITS_128_STREAM, <index>, 0, 0, (void*) pStreamSmartBits128, sizeof(StreamSmartBits128), iHub, iSlot, iPort); HTSetStructure $L3_MOD_SMARTBITS_128_STREAM <index> 0 0 \ myStreamSmartBits128 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamSmartBits128

This structure holds information for customized streams (StreamSmartBits). The Background Fill Pattern and the ProtocolHeader[] can be used in combination to construct highly customized frames. Use HTFillPattern to specify the background pattern. Then define the ProtocolHeader array. This array (of up to 128 bytes) is used as VFD3. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). IMPORTANT! On TeraMetrics modules (except ATM, POS-3518As/AR and POS-3519As/AR), before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Note: For ATM TeraMetrics modules, for any encapsulation type of the bound VC, NULL encapsulation is inserted in the stream. Only if the bound VC encapsulation is customized, the customized VC encapsulation is inserted in the stream. typedef struct tagStreamSmartBits128 { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream*/ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_SMARTBITS*/ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN andPOS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1 and VFD2 structure members are * * reserved for later use. Set to 0. * *****************************************************************/

Continues >

412 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern */ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range;/* in bits */ unsigned char ucVFD2Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR,*/ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern */ /*****************************************************************/ unsigned short uiVFD3Offset; /* Reserved */ unsigned short uiVFD3Range; /* in bytes; Number of elements */ /* to use from ProtocolHeader */ /* No elements are used beyond */ /* the single specified range. */ unsigned char ucVFD3Enable; /* Reserved */ unsigned char ucTagField; /* 0 = off, 1 = insert Signature*/ /* field into each frame */ unsigned char ProtocolHeader[128];/* Defines up to 128 bytes used as VFD3*/ } StreamSmartBits128;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 413

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_STREAM_BINDING
Modify the stream binding setting - the bound VC index and the ATM CLP bit of the stream of <index>. HTSetStructure(L3_MOD_STREAM_BINDING, <index>, 0, 0, (void*) pL3StreamBinding, sizeof(L3StreamBinding), iHub, iSlot, iPort); HTSetStructure $L3_MOD_STREAM_BINDING <index> 0 0 \ myL3StreamBinding \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamBinding

This structure is used to bind stream(s) to VC(s) and update the ATM CLP bit of the stream(s), or retrieve the information of the bound VCs and the ATM CLP setting with the stream(s). These structures are set up for every stream on the ATM TeraMetrics module, so they should be sent after streams are defined. This structure is used for four commands:

L3_DEFINE_STREAM_BINDING Bind one or more streams to one or more VCs, and update CLP bit in the stream(s). The starting stream index is always 1. The number of streams to be bound is the size of the L3StreamBinding array. L3_MOD_STREAM_BINDING Overwrites the stream binding set (the bound VC index and the ATM CLP bit) of the stream at a given index. L3_DEFINE_MULTI_STREAM_EXTENSION Creates an array of stream binding set based on a previously defined stream binding set. The uiBindIndex is delta value, and the uiATMFlags is ignored. L3_STREAM_BINDING_INFO reads back the stream binding parameters for a given stream specified by <index>.

typedef struct tagL3StreamBinding { unsigned char ucBindMode;

unsigned short uiBindIndex; unsigned short uiATMFlags;

/* STREAM_BIND_VC (binding to VC for ATM), required input for both configuration and reading back configurations */ /* VC index for ATM cards */ /* Flag to set CLP bit in ATM header for ATM card, AT_CLP_ON - set CLP bit in ATM header AT_CLP_OFF - not set CLP bit in ATM header*/

unsigned char ucReserved[56]; } L3StreamBinding;

414 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_STREAM_EXTENSION
Overwrite one Stream Extension in the list at a given index. HTSetStructure(L3_MOD_STREAM_EXTENSION, <index>, 0, 0, (void*) pL3StreamExtension, sizeof(L3StreamExtension), iHub, iSlot, iPort); HTSetStructure $L3_MOD_STREAM_EXTENSION <index> 0 0 \ myL3StreamExtension \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamExtension

This structure is used in conjunction with the StreamXX structures (StreamIP, StreamUDP, etc.). It adds information to a pre-created stream. The structure is required by POS-3500B/BS and LAN-3201B/C cards. Optionally, it may be applied in a limited fashion to the ML-7710/7711/7711S, LAN-31xxA/B, LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504As, and POS-3505As cards. It also may be applied in a limited fashion to the ATM-345xA(s) modules, and it is required in these modules to set the frame rate. (See Comments at bottom of table). It is used to configure additional stream information, including scheduling on a per-stream basis. These structures are set up for every stream, so they should be sent after the streams are defined. This structure is used for four commands: L3_DEFINE_STREAM_EXTENSION defines one or more L3StreamExtension. L3_MOD_STREAM_EXTENSION overwrites one L3StreamExtension at a given index. L3_DEFINE_MULTI_STREAM_EXTENSION creates an array of L3StreamExtensions based on a previously defined L3StreamExtension. L3_READ_STREAM_EXTENSION read back the stream extension parameters for a given stream specified by "index". Note: To perform the payload data integrity verification, the stream minimum frame length is 30 bytes. Note: For TeraMetrics modules, to perform the payload data integrity verification, you should use TRIGGER_ONE_ONLY, and that trigger PATTERN must be the last six bytes of _NETCOM_ ( 'E' 'T' 'C' 'O' 'M' '_' ). typedef struct tagL3StreamExtension { unsigned long ulFrameRate;

/* frame transmit rate, in packets per second */ unsigned long ulTxMode; /* frame transmit mode, use one of L3_CONTINUOUS_MODE, L3_SINGLE_BURST_MODE, L3_MULTIBURST_MODE, L3_CONTINUOUS_MULTIBURST_MODE */ unsigned long ulBurstCount; /* the burst number */ unsigned long ulMBurstCount; /* the multi burst number */ unsigned long ulBurstGap; /* the gap between burst, in 32ns units */ unsigned short uiInitialSeqNumber; /* IP initial sequence number */ unsigned char ucIPHeaderChecksumError;/* 1 enabled, 0 disabled */

Continues >

SmartLibrary Command Reference: Volume 2 | 415

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char unsigned char unsigned char

ucIPTotalLengthError; ucIPManipulateMode; ucIncUDPPort;

unsigned short uiIPLimitCount;

/* 1 enabled, 0 disabled */ /* IP_xxx manipulate mode */ /* Increase UDP Source and Dst Port number per burst. 1 enabled, 0 disabled */ /* The limit/cycle count is the number of times that the step value(ucStepCount) will be added/subtracted from the field before it is reset to its initial value. Values can range from 0 - 65535. Note that 0 indicates continuously incrementing/decrementing the field. For the LAN-310xA/B modules, this cycle count value applies to the first address referred to by the following IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source (source (source (source IP) IP) MAC) MAC)

unsigned long

unsigned long unsigned unsigned unsigned unsigned unsigned char char char char char

Use uiIPLimitCount2 to set the cycle count for the second address. */ ulStartOffset; /* all streams defined can not transmit at the same time, each stream has to start at the different time. ulStartOffset is the start offset from the previous stream. ulStartOffset's unit is tick. minimum is 10 tick. 1(tick) = 32(ns) */ ulBGPatternIndex; /* index of the stream background fill pattern that defined by L3StreamBGConfig */ ucDataCheckEnable; /* 1 enable payload check error, 0 disable */ ucCRCErrorEnable; /* 1 enable, 0 disable */ ucRandomBGEnable; /* 1 enable, 0 disable */ ucDataIntegrityErrorEnable; /* 1 enable, 0 disable */ ucStepCount; /* IP address increment/decrement step count: 1,3,5,etc. For the LAN-310xA/B modules, this value applies only to the first address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source IP) (source IP) (source MAC) (source MAC)

unsigned char

ucIPBitsOffset;

Use ucStepCount to set the step count for the second address. */ /* bit offset where the IP address is increment. */

Continues >

416 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char unsigned unsigned unsigned unsigned char long char char

ucMPLSCount;

unsigned char

/* Number of MPLS labels. 0 disable the MPLS */ ucIPOptionsCount; /* reserved */ ulCustomStreamID; /* reserved */ ucEnableCustomStreamID;/* reserved */ ucOAMHeaderPacketType;/* defined constants: OAM_PACKET_TYPE_NONE_OAM OAM_PACKET_TYPE_NORMAL_OAM OAM_PACKET_TYPE_IDLE_OAM */ ucStepCount2; /* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the Increment/decrement step count for the Second address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (dest. IP) IP_DEC_SRC_IP_AND_DST_IP (dest. IP) IP_INC_SRC_MAC_AND_DST_MAC (dest. MAC) IP_DEC_SRC_MAC_AND_DST_MAC (dest. MAC) Use ucStepCount to set the step count for the first address. */ /* Applicable for the LAN-310xA/B cards ONLY. The limit/cycle count is the number of times that the step value(ucStepCount2) will be added/subtracted from the field before it is reset to its initial value. Values can range from 0 - 65535. Note that 0 indicates continuously incrementing/decrementing the field. This value applies to the second address referred to by the following IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (dest. IP) IP_DEC_SRC_IP_AND_DST_IP (dest. IP) IP_INC_SRC_MAC_AND_DST_MAC (dest. MAC) IP_DEC_SRC_MAC_AND_DST_MAC (dest. MAC) Use uiIPLimitCount to set the cycle count for the first address. */ /* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the number Of frames that will repeat a pattern before Incrementing or decrementing to the next one. This applies to only the first address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source (source (source (source IP) IP) MAC) MAC)

unsigned short uiIPLimitCount2;

unsigned short uiBlockCount;

Continues >

SmartLibrary Command Reference: Volume 2 | 417

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Use uiBlockCount2 to set the block count for the second address. unsigned short uiBlockCount2; /* Applicable for the LAN-310xA/B cards ONLY. This field is used to specify the number Of frames that will repeat a pattern before Incrementing or decrementing to the next one. This applies to only the second address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (dest. (dest. (dest. (dest. IP) IP) MAC) MAC)

Use uiBlockCount to set the block count for the first address. */ unsigned char ucMulticastKeepAliveEnable; /* Applicable for the TM LAN/POS modules ONLY. This field is used to enable/disable sending multicast keep alive packets for this stream 1- enable 0-disable Default: 0 */ unsigned char ucReserved[2]; /* Reserved */ / unsigned char ucReserved[2]; /* Reserved */ } L3StreamExtension;

Continues >

418 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Comments

Some cards support this structure in a limited fashion only: The ML-7710/7711/7711S card supports the following fields: ucIPManipulateMode, ucStepCount, and uiIPLimitCount fields. The ucDataIntegrityErrorEnable field is applicable to the LAN-3100A, 3101A/B, 3102A cards. The LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504A, and POS-3505As/AR cards support the following fields: ulFrameRate, uiInitialSeqNumber, ucIPHeaderChecksumError, ucIPTotalLengthError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. TheLAN-3100A, 3101A/B, 3102A modules supports the following fields: ucDataIntegrityErrorEnable, ucIPManipulateMode, ucStepCount, ucStepCount2, uiIPLimitCount, uiIPLimitCount2, uiBlockCount and uiBlockCount2. Note that the cyclic flow related fields(all fields except ucDataIntegrityErrorEnable) are only applicable for IPv4 streams. The LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504A, and POS-3505As/AR cards support the following fields: ulFrameRate, ucIPHeaderChecksumError, ucIPTotalLengthError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The LAN-3710AL/AE/AS supports the following fields: uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, ucEnableCustomStreamID, and ucOAMHeaderPacketType. The XLW-372xA and XFP-373xA modules supports the following fields: uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The FBC-3601A and FBC-3602A cards supports the following fields: ulTxMode, ulBurstCount, ulMBurstCount, ulBurstGap, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ucDataIntegrityErrorEnable, ulCustomStreamID and ucEnableCustomStreamID.

Continues >

SmartLibrary Command Reference: Volume 2 | 419

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Comments

The AT-34xx cards supports the following fields: ulFrameRate, uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucDataIntegrityErrorEnable, ulCustomStreamID and ucEnableCustomStreamID. Notes for the AT-34xx cards: - All streams bound to the same VC must have the same frame rate(ulFrameRate). Other fields in L3StreamExtension do not currently apply to these cards. The following modes for ucIPManipulateMode are currently supported on the LAN-3201B/C and POS cards: IP_INC_SRC_IP IP_INC_DST_IP IP_INC_DST_IP_AND_DST_MAC IP_INC_SRC_IP_AND_SRC_MAC IP_INC_SRC_IP_AND_DST_MAC IP_INC_DST_IP_AND_DRC_MAC The following modes for ucIPManipulateMode are currently supported on the ML-7710 card: IP_INC_SRC_IP IP_INC_DST_IP IP_DEC_SRC_IP IP_DEC_DST_IP IP_INC_SRC_IP_AND_SRC_MAC IP_INC_DST_IP_AND_DST_MAC IP_DEC_SRC_IP_AND_SRC_MAC IP_DEC_DST_IP_AND_DST_MAC The following modes for ucIPManipulateMode are currently supported on the LAN-310xA/B card: IP_INC_SRC_IP IP_INC_DST_IP IP_DEC_SRC_IP IP_DEC_DST_IP IP_INC_SRC_IP_AND_SRC_MAC IP_INC_DST_IP_AND_DST_MAC IP_DEC_SRC_IP_AND_SRC_MAC IP_DEC_DST_IP_AND_DST_MAC IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC Notes for ulCustomStreamID with L3_READ_STREAM_EXTENSION: Although stream ID (including custom stream ID or non-custom stream ID) is always 4 bytes, the signature field, by default provides only 2 bytes for the stream ID while the upper 2 bytes are for card/chassis ID, etc. Only when custom stream ID is enabled, all 4 bytes are available to stream ID, and then it's up to user to make sure the chassis/card uniqueness is taken into account when generating custom stream IDs. Therefore when the stream ID is retrieved via L3_READ_STREAM_EXTENSION, the value in the whole 4 bytes are valid only when custom stream ID is enabled. Otherwise only the lower 2 bytes values are valid for the stream ID.

420 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description

L3_MOD_STREAMS_ARRAY
Modify a field in a block of streams by overlaying an element from an array. For use with IP, UDP, and TCP streams, as well as the L3StreamExtension structure. The Layer3ModifyStreamArray structure is used to overwrite four bytes of a specified field in a block of streams already defined on the SmartBits module.

C Usage

HTSetStructure(L3_MOD_STREAMS_ARRAY, 0, 0, 0, (void*) pLayer3ModifyStreamArray, sizeof(Layer3ModifyStreamArray), iHub, iSlot, iPort); HTSetStructure $L3_MOD_STREAMS_ARRAY 0 0 0 \ myLayer3ModifyStreamArray \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3ModifyStreamArray

typedef struct tagLayer3ModifyStreamArray { unsigned long ulIndex; /* Index of the first stream to modify */ unsigned long ulCount; /* The total number of patterns to use */ /* If ulCount is larger than ulFieldCount, */ /* patterns will be repeated. */ unsigned long ulField; /* Field in the stream structure to mod */ /* See L3MS_FIELD_n defines */ */ */ */ */ */ */

unsigned long ulFieldCount; /* Number of patterns/elements to use /* from ulData[] array

unsigned long ulFieldRepeat; /* number of times each pattern will be /* repeated in a row. /* ulFieldRepeat = 1 does the same thing /* as ulFieldRepeat = 0

unsigned long ulData[L3_MODIFY_STREAM_ARRAY_SIZE]; /* Array of 1, 2, or 4 byte patterns/elements */ /* that will be overlaid (right justified) */ /* in the Field */ } Layer3ModifyStreamArray;

Continues >

SmartLibrary Command Reference: Volume 2 | 421

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Using the Layer3ModifyStreamArray structure

Identify the first stream to be modified using the ulIndex member. The total number of streams to be modified is calculated by the number of array elements to use, multiplied by the number of times in a row each element will be repeated:

ulCount * ulFieldRepeat

The byte patterns are defined in the elements of the ulData[] array. Each pattern is four bytes long. One full pattern per stream is written into the specified field from the least significant bit.

The field to be modified is specified by ulField. The acceptable field values are listed below. If the field is smaller than four bytes, fewer than four bytes will be overwritten. See Card Support: ulField in Layer3ModifyStreamArray on page 887 for compatibility information. Note: For MAC addresses, the least significant four bytes are overwritten. Since the count starts with 0, that means bytes 2, 3, 4, and 5 are overwritten. For the constants L3MS_FIELD_DIPV6, L3MS_FIELD_SIPV6, and L3MS_FIELD_ROUTER_ADDR, each stream modified will use a total of 8 elements of ulData[]. The first 4 elements are the IPv6 address to replace, and the last 4 elements are the bit mask value indicating which bits of the address to change. Note: The ulFieldCount and ulFieldRepeat fields cannot be used with the following SmartBits modules: LAN-3201B/C, LAN-3710AL, LAN-3710AS, LAN-3710AE, POS-3500B/BS. ATM-345A(s) TeraMetrics modules support the following constants: L3MS_FIELD_STREAM_ACTIVE L3MS_FIELD_FRAMELEN L3MS_FIELD_TTL L3MS_FIELD_ISEQNUM L3MS_FIELD_DIP L3MS_FIELD_SIP L3MS_FIELD_DIPV6 L3MS_FIELD_SIPV6 L3MS_FIELD_HOP_LIMIT L3MS_FIELD_NEXT_HEADER L3MS_FIELD_TRAFFIC_CLASS L3MS_FIELD_ROUTER_ADDR L3MS_FIELD_FLOW_LABEL L3MS_FIELD_SIPV6 L3MS_FIELD_DIPV6 L3MS_FIELD_SIPV6 L3MS_FIELD_VC_INDEX L3MS_FIELD_ATM_FLAGS L3MS_FIELD_DMAC L3MS_FIELD_SMAC The following constants are not currently usable with ML-7710/7711/7711S and ML-5710A SmartBits modules: L3MS_FIELD_DIPV6 L3MS_FIELD_SIPV6 L3MS_FIELD_ROUTER_ADDR L3MS_FIELD_TRAFFIC_CLASS L3MS_FIELD_FLOW_LABEL L3MS_FIELD_HOP_LIMIT L3MS_FIELD_NEXT_HEADER

Continues >

422 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

The following are the values for ulField: L3MS_FIELD_DMAC L3MS_FIELD_SMAC L3MS_FIELD_TTL L3MS_FIELD_ISEQNUM L3MS_FIELD_DIP L3MS_FIELD_SIP L3MS_FIELD_NETMASK L3MS_FIELD_GATEWAY L3MS_FIELD_SPRT L3MS_FIELD_DPRT L3MS_FIELD_FRAMELEN L3MS_FIELD_DIPA L3MS_FIELD_DIPB L3MS_FIELD_DIPC L3MS_FIELD_DIPD L3MS_FIELD_SIPA L3MS_FIELD_SIPB L3MS_FIELD_SIPC L3MS_FIELD_SIPD L3MS_FIELD_GATEWAYA L3MS_FIELD_GATEWAYB L3MS_FIELD_GATEWAYC L3MS_FIELD_GATEWAYD L4MS_FIELD_VLANID L3MS_FIELD_VLANTAG L4MS_FIELD_TCP_SEQUENCE L4MS_FIELD_TCP_WINDOW L4MS_FIELD_TCP_FLAGS L4MS_FIELD_TCP_LENGTH L3MS_FIELD_STREAM_ACTIVE L4MS_FIELD_STARTING_OFFSET L3MS_FIELD_RTP_SSRC L3MS_FIELD_RTP_PT L3MS_FIELD_STREAM_SIGNATURE L3MS_FIELD_STREAM_START L3MS_FIELD_IP_MAN_MODE L3MS_FIELD_IP_BITS_OFFSET L3MS_FIELD_IP_LIMIT_COUNT L3MS_FIELD_DMAC_BYTE01 L3MS_FIELD_SMAC_BYTE01 L3MS_FIELD_FRAME_RATE L3MS_FIELD_DIPV6 L3MS_FIELD_SIPV6 L3MS_FIELD_ROUTER_ADDR L3MS_FIELD_TRAFFIC_CLASS L3MS_FIELD_FLOW_LABEL L3MS_FIELD_HOP_LIMIT L3MS_FIELD_NEXT_HEADER L3MS_FIELD_VC_INDEX L3MS_FIELD_ATM_FLAGS L3MS_FIELD_SIG_SEQ_ID

Dest MAC address bytes 2, 3, 4 and 5 Source MAC address bytes 2, 3, 4 and 5 Time to Live field Initial Sequence Number field Dest IP address Source IP address The Netmask field Gateway address in the stream structure Source port number Dest port number Frame length First octet in dest IP address in the stream structure Second octet in dest IP address in the stream structure Third octet in dest IP address in the stream structure Fourth octet in dest IP address in the stream structure First octet in source IP address in the stream structure Second octet in source IP address in the stream structure Third octet in source IP address in the stream structure Fourth octet in source IP address in the stream structure First octet in Gateway address in the stream structure Second octet in Gateway address in the stream structure Third octet in Gateway address in the stream structure Fourth octet in Gateway address in the stream structure Vlan ID (2 bytes) in the packet Vlan Tag (2 bytes) in the packet TCP Sequence in the Stream struc TCP Window size in the Stream struc TCP Flags in the Stream struc TCP Length in the Stream struc Modify the stream active bit Starting time in transmit cycle Modify RTP Synchronization Source ID Modify RTP Payload Type ucTagField in the stream struct start or stop active and configured stream(s) ucIPManipulateMode in L3StreamExtension ucIPBitsOffset in L3StreamExtension ucIPLimitCount in L3StreamExtension Dest MAC address bytes 0 and 1 Source MAC address bytes 0 and 1 ulFrameRate in WNStreamExtCfg Destination IPv6 address Source IPv6 address IPv6 router address IPv6 traffic class IPv6 flow label IPv6 hop limit IPv6 next header VC index of ATM ATM flag Initial Signature sequence number

Continues >

SmartLibrary Command Reference: Volume 2 | 423

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

L3MS_FIELD_STREAM_FRAME_RATE Stream frame rate in stream extension configuration L3MS_FIELD_CUSTOM_STREAM_ID Custom stream ID in stream extension configuration L3MS_FIELD_BG_INDEX Background index in stream extension configuration L3MS_FIELD_IP_CHECKSUM_ERROR_ENABLE Enable IP header checksum error in stream extension configuration L3MS_FIELD_DATA_CHECK_ENABLE Enable data integrity in stream extension configuration L3MS_FIELD_DATA_INTEGRITY_ERROR_ENABLE Enable data integrity error in stream extension configuration L3MS_FIELD_CRC_ERROR_ENABLE Enable CRC error in stream extension configuration L3MS_FIELD_RANDOM_BG_ENABLE Enable random background in stream extension configuration L3MS_FIELD_CUSTOM_STREAM_ID_ENABLE Enable custom stream id in stream extension configuration Example 1: ulIndex = 2 (start here) ulCount = 3 (total number of patterns to use) ulField = L3MS_FIELD_TTL (Time to Live field) ulFieldCount = 4 (number of patterns [elements] to use from array) ulFieldRepeat = 2 (number of times to repeat pattern) ulData [5] [7] [99] [100] (pattern definitions) (Total fields changed ulCount * ulFieldRepeat = 6) Before Index TTL-Value 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 After Index TTL-Value 1 1 2 5 3 5 4 7 5 7 6 99 7 99 8 1 9 1 10 1

Continues >

424 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Example 2: ulIndex = 2 (start here) ulCount = 4 (total number of patterns to use) ulField = L3MS_FIELD_TTL (Time to Live field) ulFieldCount = 2 (number of patterns [elements] to use from array) ulFieldRepeat = 2 (number of times to repeat pattern) ulData [5] [7] [99] [100] (pattern definitions) (Total fields changed ulCount * ulFieldRepeat = 8) Before Index TTL-Value 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 After Index TTL-Value 1 1 2 5 3 5 4 7 5 7 6 5 7 5 8 7 9 7 10 1

SmartLibrary Command Reference: Volume 2 | 425

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_TCP_IPV6_STREAM
Overwrite one stream with a TCP/IPv6-compliant stream, using iType2 as the stream index. HTSetStructure(L3_MOD_TCP_IPV6_STREAM, <index>, 0, 0, (void*) pStreamUDPIPv6, sizeof(StreamUDPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_MOD_TCP_IPV6_STREAM <index> 0 0 \ myStreamUDPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPIPv6

This structure contains values for TCP IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. This applies to all TeraMetrics modules except the POS-3518As/AR, POS-3519As/AR and ATM-3451A/3453A. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_TCP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

426 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamTCPIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/

Continues >

SmartLibrary Command Reference: Volume 2 | 427

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short unsigned char unsigned char

uiVFD1Offset; ucVFD1Range; ucVFD1Pattern;

unsigned long

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6]; /*the initial VFD byte pattern*/

unsigned short unsigned char unsigned char

uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

unsigned long

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned short SourcePort; /* Source port */ unsigned short DestPort; /* Destination port */ unsigned short Window; /* Protocol window size, in bytes */ unsigned long TCPAck; /* Acknowledgment number */ unsigned long TCPSequence; /* TCP Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; /* Reserved */ } StreamTCPIPv6; unsigned char ucTagField;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

428 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_TCP_IPV6_STREAM_VLAN
Overwrite one stream with a TCP/IPv6-compliant stream with VLAN tags, using iType2 as the stream index. HTSetStructure(L3_DEFINE_TCP_IPV6_STREAM_VLAN, <index>, 0, 0, (void*) pStreamTCPIPv6VLAN, sizeof(StreamTCPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_DEFINE_TCP_IPV6_STREAM_VLAN <index> 0 0 \ myStreamTCPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPIPv6VLAN

This structure contains values for TCP IPv6 compliant Streams that use VLAN tags. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. This applies to all TeraMetrics modules except the POS-3518As/AR and POS-3519As/AR. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

SmartLibrary Command Reference: Volume 2 | 429

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP_IPV6_VLAN */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

typedef struct tagStreamTCPIPv6VLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

Continues >

430 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short SourcePort; /* Source Port */ unsigned short DestPort; /* Destination Port */ unsigned short Window; /* Window size, in bytes*/ unsigned long TCPAck; /* Acknowledgment number */ unsigned long TCPSequence; /* Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; /* Reserved */ unsigned short VLAN_Pri; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /*VLAN identifier */ } StreamTCPIPv6VLAN;

unsigned long

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 431

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_TCP_STREAM
Overwrite one TCP Stream in the list at a given index, using iType2 as the index. HTSetStructure(L3_MOD_TCP_STREAM, <index>, 0, 0, (void*) pStreamTCP, sizeof(StreamTCP), iHub, iSlot, iPort) HTSetStructure $L3_MOD_TCP_STREAM <index> 0 0 \ myStreamTCP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCP

This structure contains values for TCP-compliant streams. The IP checksums are automatically calculated using the supplied field value, and inserted into the frame. For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of a module limitation. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_TCP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamTCP { unsigned char ucActive; unsigned char ucProtocolType;

/* 1 = Enable Stream, 0 = Disable Stream */ /* use STREAM_PROTOCOL_TCP or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /*****************************************************************/ /** VFD1, VFD2, and VFD3 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */

Continues >

432 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

unsigned unsigned unsigned unsigned

char short char char

unsigned long

unsigned char unsigned short

ulVFD1PatternCount; /* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6];/*the initial VFD byte pattern */ uiVFD2Offset; /* in bits */ ucVFD2Range; /* in bits */ ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6];/*the initial VFD byte pattern*/ uiVFD3Offset; /* /* in bytes */

unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE * /*****************************************************************/ unsigned char unsigned char unsigned char unsigned char unsigned char unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned short char char char char short short short ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */

DestinationMAC[6]; /* the Stream's Dest MAC addr */ SourceMAC[6]; /* the Stream's Source MAC addr */ TypeOfService; /* the various levels of speed and/or reliability, as described in RFC 1359 */ TimeToLive; /* number of "hops" until frame */ /* will be dropped */ InitialSequenceNumber;/* Initial sequence number*/ DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ Netmask[4]; /* Netmask address (e.g. 255.255.255.0)*/ Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ SourcePort; /* Source Port for TCP connection */ DestPort; /* Destination Port for TCP connection */ Window; /* TCP protocol window size, in bytes*/ reserved[2]; TCPAck; TCPSequence; Flags; extra[3]; ulARPOut; ulARPBack; ulARPGap; /* TCP Acknowledgment number */ /* TCP Sequence number */ /* use TCP_FLAG_XXX defines */ /* reserved--not currently in use */ /* reserved--not currently in use */ /* The time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */

unsigned char unsigned long unsigned long unsigned unsigned unsigned unsigned unsigned char char long long long

} StreamTCP;

SmartLibrary Command Reference: Volume 2 | 433

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_TCP_STREAM_VLAN
Overwrite one TCP Stream with VLAN in the list at a given index ("index"). HTSetStructure(L3_MOD_TCP_STREAM_VLAN, 0, 0, 0, (void*) pStreamTCPVLAN, sizeof(StreamTCPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_MOD_TCP_STREAM_VLAN 0 0 0 \ myStreamTCPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPVLAN

This structure contains values for TCP compliant Streams with VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). typedef struct tagStreamTCPVLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType; /* use STREAM_PROTOCOL_TCP_VLAN */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215.*/ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern */ unsigned short uiVFD2Offset; unsigned char ucVFD2Range; unsigned char ucVFD2Pattern; /* /* /* /* /* in bits in bits HVFD_ENABLED, HVFD_STATIC, HVFD_INCR, HVFD_DECR, HVFD_RANDOM, HVFD_NONE */ */ */ */ */

Continues >

434 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned long

/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ /****************************************************************/ unsigned short uiVFD3Offset; unsigned short uiVFD3Range; unsigned char ucVFD3Enable; unsigned char unsigned unsigned unsigned unsigned ucTagField; /* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE */ */ */

ulVFD2PatternCount;

/* 0 = off, 1 = insert signature */ /* field into each frame */

/* the Stream's Dest MAC addr */ /* the Stream's Source MAC addr */ /* */ /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /*Netmask address (e.g. 255.255.255.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned short SourcePort; /* Source Port for TCP connection */ unsigned short DestPort; /* Destination Port for TCP connection */ unsigned short Window; /* TCP protocol window size */ unsigned short VLAN_Pri; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ /* VLAN CFI bit: available constants */ /* VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /* VLAN identifier */ /* TCP Acknowledgment */ /* */ /* 1 is FIN, 2 is SYN, 4 is RST, 8 is PSH */ /* 16 is ACK, 32 is URG */ /**/ /* */ /**/ /**/

char DestinationMAC[6]; char SourceMAC[6]; char TypeOfService; char TimeToLive;

unsigned short VLAN_Cfi; unsigned short VLAN_Vid; unsigned long unsigned long unsigned char unsigned char TCPAck; TCPSequence; Flags; Spare[3]; ulARPOut; ulARPBack; ulARPGap;

unsigned long unsigned long unsigned long } StreamTCPVLAN;

SmartLibrary Command Reference: Volume 2 | 435

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_UDP_IPV6_STREAM
Overwrite one UDP/IPv6-compliant stream in the list, using iType2 as the stream index. HTSetStructure(L3_MOD_UDP_IPV6_STREAM, <index>, 0, 0, (void*) pStreamUDPIPv6, sizeof(StreamUDPIPv6), iHub, iSlot, iPort); HTSetStructure $L3_MOD_UDP_IPV6_STREAM <index> 0 0 \ myStreamUDPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPIPv6

This structure contains values for UDP IPv6-compliant streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_UDP_IPV6. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less. typedef struct tagStreamUDPIPv6 { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

unsigned char unsigned short

ucRandomData; uiFrameLength;

/* 1=Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_UDP_IPV6 or STREAM_PROTOCOL_BRIDGED (ATM only) */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on LAN POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern */ /* frame length not counting CRC */ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */

Continues >

436 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* Identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field (currently not used) */ } StreamUDPIPv6;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 437

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_UDP_IPV6_STREAM_VLAN
Overwrite one UDP/IPv6-compliant stream with VLAN tags in the list, using iType2 as the stream index. HTSetStructure(L3_MOD_UDP_IPV6_STREAM_VLAN, <index>, 0, 0, (void*) pStreamUDPIPv6VLAN, sizeof(StreamUDPIPv6VLAN), iHub, iSlot, iPort); HTSetStructure $L3_MOD_UDP_IPV6_STREAM_VLAN <index> 0 0 \ myStreamUDPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPIPv6VLAN

This structure contains values for UDP/IPv6 compliant Streams that use VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. This applies to all TeraMetrics modules except the POS-3518As/AR and POS-3519As/AR. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. Note: The ucRandomLength field has the following limitations: 1. For the specific TeraMetrics modules (LAN-3310A/11A, LAN-3301A, POS-3504/5/As,AR, POS-3510A/As and POS-3511A/As). This feature is supported only when the start of IP (either IPv4 or IPv6) occurs at byte 63 or less. 2. For specific TeraMetrics modules (LAN-332x, XLW-372xA/ XFP-373xA, and POS-3518/19As, AR) this feature is supported when the start of IP (either IPv4 or IPv6) occurs at byte 127 or less.

Continues >

438 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagStreamUDPIPv6VLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_UDP_IPV6_VLAN */

unsigned char unsigned short

ucRandomData; uiFrameLength;

/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern */ /* frame length not counting CRC */

/***************************************************************** For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short unsigned char uiVFD1Offset; ucVFD1Range; /* in bits /* in bits */ */

Continues >

SmartLibrary Command Reference: Volume 2 | 439

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */s unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field - not used */ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /* VLAN identifier */ } StreamUDPIPv6VLAN;

unsigned char

ucVFD1Pattern;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

440 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_UDP_STREAM
Overwrite one UDP Stream in the list at a given index. HTSetStructure(L3_MOD_UDP_STREAM, <index>, 0, 0, (void*) pStreamUDP, sizeof(StreamUDP), iHub, iSlot, iPort); HTSetStructure $L3_MOD_UDP_STREAM <index> 0 0 \ myStreamUDP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDP

This structure holds information for UDP-compliant streams. The IP checksums are automatically calculated using the supplied field value and inserted into the frame. For ATM TeraMetrics modules, the IP checksum has to be in the first cell (within the first 48 bytes) because of a module limitation. The UDP checksum is set to 0, and so is not calculated. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: For ATM TeraMetrics modules, if the bound VC does not use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_UDP. If the bound VC does use BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_BRIDGED. typedef struct tagStreamUDP { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_UDP or STREAM_PROTOCOL_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on ATM or Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 1 - 32767 for ATM */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */

Continues >

SmartLibrary Command Reference: Volume 2 | 441

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ uiVFD2Offset; /* in bits */ ucVFD2Range; /* in bits */ ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6]; /* the Streams Dest MAC addr */ unsigned char SourceMAC[6]; /* the Streams Source MAC addr */ unsigned char TypeOfService; /* */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field -- Not used */ unsigned char extra[12]; /* reserved */ unsigned short uiActualSequenceNumber;/* Actual Sequence number */ unsigned long ulARPStart; /* Return value for the Time of */ /* the last ARP initiated */ unsigned long ulARPEnd; /* Return value for the Time of */ /* the last ARP completed */ unsigned long ulARPGap; /* The time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */ } StreamUDP;

unsigned unsigned unsigned unsigned

char short char char

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

442 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_UDP_STREAM_VLAN
Overwrite one UDP/IPv4-compliant stream with VLAN tags in the list, using iType2 as the stream index. HTSetStructure(L3_MOD_UDP_STREAM_VLAN, <index>, 0, 0, (void*) pStreamUDPVLAN, sizeof(StreamUDPVLAN), iHub, iSlot, iPort); HTSetStructure $L3_MOD_UDP_STREAM_VLAN <index> 0 0 \ myStreamUDPVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPVLAN

This structure is contains values for UDP-compliant streams with VLAN tagging. The IP checksums are automatically calculated using the supplied field value and inserted into the frame. The UDP checksum is set to 0, and so is not calculated. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). typedef struct tagStreamUDPVLAN { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_UDP_VLAN */

/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the */ /* cards background pattern */ /* not available on Frame Relay */ unsigned short uiFrameLength; /* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /***************************************************************** * * * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; unsigned char ucVFD1Range; unsigned char ucVFD1Pattern; /* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ /*the initial VFD byte pattern*/

unsigned long

ulVFD1PatternCount;

unsigned char

ucVFD1StartVal[6];

Continues >

SmartLibrary Command Reference: Volume 2 | 443

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short uiVFD2Offset; unsigned char ucVFD2Range; unsigned char ucVFD2Pattern;

unsigned long

ulVFD2PatternCount;

unsigned unsigned unsigned unsigned

char short short char

ucVFD2StartVal[6]; uiVFD3Offset; uiVFD3Range; ucVFD3Enable;

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ /*the initial VFD byte pattern*/ /* in bytes */ /* in bytes */ /* HVFD_ENABLED, HVFD_NONE */

/*****************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert signature */ /* field into each frame */ unsigned char DestinationMAC[6]; /* the Stream's Dest MAC addr */ unsigned char SourceMAC[6]; /* the Stream's Source MAC addr */ unsigned char TypeOfService; /* */ unsigned char TimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short InitialSequenceNumber; /* Initial sequence number*/ unsigned char DestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char SourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char Netmask[4]; /* Network Mask (e.g. 255.255.0.0)*/ unsigned char Gateway[4]; /* Gateway addr (e.g. 192.100.1.1)*/ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field - not used */ unsigned short VLAN_Pri; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ /*VLAN identifier */ /* /* /* /* /* /* reserved */ Return value for the Time of */ the last ARP initiated */ Return value for the Time of */ the last ARP completed */ The Time between ARPs, in 100ns units; not available on LAN-3300A, LAN-3301A, LAN-3310A, or LAN-3311A. */

unsigned short VLAN_Vid; unsigned char unsigned long unsigned long unsigned long extra[12]; ulARPStart; ulARPEnd; ulARPGap;

} StreamUDPVLAN;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

444 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_MOD_VFD
Overwrite one per-stream VFD in the list. HTSetStructure(L3_MOD_VFD, <index>, 0, 0, (void*) pNSVFD, sizeof(NSVFD), iHub, iSlot, iPort); HTSetStructure $L3_MOD_VFD <index> 0 0 \ myNSVFD \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSVFD

This structure configures VFDs for a stream. The VFDs can be placed in the first 64 bytes of the frame; however the VFDs will be overwritten by the following fields of the frame: IP sequence number, IP header checksum, IP total length, UDP/TCP checksum, TCP sequence number, and the signature field. Example for ucCycleCount and ucBlockCount: ucMode = L3_VFD_INCR uiRange = 2 ulCycleCount = 4 ulBlockCount = 2 ucPattern = {0 0 0 0 0 0} The transmitted patterns will be as follows (in hex): 00 00 00 00 00 01 00 01 00 02 00 02 00 03 00 03 00 00 00 00 ... Example for ucStepValue and ucStepShift: ucMode = L3_VFD_INCR uiRange = 4 ucStepValue = 3 ucStepShift = 2 ucPattern = {0 0 0 0 0 0}

Continues >

SmartLibrary Command Reference: Volume 2 | 445

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

The transmitted patterns will be as follows (in hex): 00 00 00 00 00 03 00 00 00 06 00 00 00 09 00 00 ... Example for ucSubnetMaskAware and ucSubnetMaskLength: ucMode = L3_VFD_INCR uiRange = 4 ucSubnetMaskAware = 1 ucSubnetMaskLength = 24 ucPattern = (0 0 0 0xFD 0 0} Example for ucStepValue and ucStepShift: ucMode = L3_VFD_INCR uiRange = 4 ucStepValue = 3 ucStepShift = 2 ucPattern = {0 0 0 0 0 0} The transmitted patterns will be as follows (in hex): 00 00 00 00 00 03 00 00 00 06 00 00 00 09 00 00 ... Example for ucSubnetMaskAware and ucSubnetMaskLength: ucMode = L3_VFD_INCR uiRange = 4 ucSubnetMaskAware = 1 ucSubnetMaskLength = 24 ucPattern = (0 0 0 0xFD 0 0} The transmitted patterns will be as follows (in hex): 00 00 00 FD 00 00 00 FE 00 00 00 01 00 00 00 02 ...

Continues >

446 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagNSVFD { unsigned char ucType; unsigned char ucMode;

/* Specifies VFD1 or VFD2; use L3_VFD1 or L3_VFD2. */ /* VFD mode: static, increment, decrement, or random; use L3_VFD_STATIC, L3_VFD_INCR, L3_VFD_DECR, L3_VFD_RANDOM, or L3_VFD_OFF. */ unsigned short uiOffset; /* Offset of the VFD, in bits. The VFD must fall within the first 128 bytes of the frame. Also, if the VFD falls in the last 18 bytes of the payload, and the signature field is enabled, the signature field will overwrite the VFD. */ unsigned short uiRange; /* Range (length) of the VFD, in bytes. Valid ranges are from 1 to 6 bytes. */ unsigned long ulCycleCount; /* For increment or decrement mode, the number of patterns before resetting to initial VFD pattern. May range from 0 to 16777215. If 0, the pattern will increment or decrement through its entire range without resetting. */ unsigned short uiBlockCount; /* For increment or decrement mode, the number of frames that will repeat a pattern before incrementing or decrementing to the next one. May range from 0 to 4095. When used with ulCycleCount each block of patterns only counts as one toward the cycle count. NOTE: It is always a fixed value of one (1) when used with Multicast Keep Alive Stream.*/ unsigned char ucStepValue; /* For increment or decrement mode, the amount to add or subtract from the previous pattern. May range from 0 to 255. Not available when ucSubnetAware is enabled. See the example in the structure description. When the ucMode = L3_VFD_INCR and ucStepValue = 0, the result will be static which means no change at all. When the ucMode = L3_VFD_INCR and ucStepValue = 1, the result will be incrementing by step as 1. */ unsigned char ucStepShift; /* For increment or decrement mode, this field specifies the location in the pattern where the change will occur. The ucStepShift is the number of bytes to shift the step value left before adding or subtracting from the previous pattern. May range from 0 to 5, and is limited by the range of the pattern. See the example in the structure description. */ unsigned char ucSubnetAware; /* Skip VFD patterns which are interpreted as subnet (0) or broadcast (255) addresses. 1 = enable, 0 = disable. See the example in the structure description. Note: This feature works only when uiRange is set to 4 and ucStepValue is set to 1. */

Continues >

SmartLibrary Command Reference: Volume 2 | 447

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char

ucSubnetMaskLength; /* If ucSubnetAware is enabled, this is the number of bits in the subnet mask. See the example in the structure description. */

ucEnableCarryChaining; /* For increment or decrement mode, this field enables carry over from VFD1 to VFD2 on overflow or underflow. 1 = enable, 0 = disable. To enable the feature, this field must be set for both VFD1 and VFD2. VFD2 will remain static until VFD1 overflows or underflows. At that point, the next VFD pattern will begin (increment, decrement, or random). */ unsigned char ucPattern[6]; /* Initial VFD pattern. Note: the transmitted pattern will start with the byte at index 0, even if the range is less than 6 bytes. */ unsigned char ucReserved[16]; /* reserved */ } NSVFD;

unsigned char

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

iType1 Description C Usage

L3_READ_STREAM_BG
Read back the pattern for the stream background specified by "index". HTGetStructure(L3_READ_STREAM_BG, <index>, 0, 0, (void*) pL3StreamBGConfig, sizeof(L3StreamBGConfig), iHub, iSlot, iPort); HTGetStructure $L3_READ_STREAM_BG <index> 0 0 \ myL3StreamBGConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamBGConfig

Represents one background fill pattern for use with a particular stream. POS-3500B/BS, POS-3502A/AS and LAN-3201B/C modules allow a total of 16 patterns of 64 bytes each. The pattern can be written or read at an index between 0 and 15 given in iType2. To assign a defined pattern to a stream, use the ulBGPatternIndex field of the L3StreamExtension structure. Multiple streams can share the same background pattern by using the same index. The TeraMetrics modules support only two unique stream backgrounds. typedef struct tagL3StreamBGConfig { unsigned char ucPattern[64]; } L3StreamBGConfig;

/* background data pattern */

448 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_READ_STREAM_EXTENSION
Read back the stream extension parameters for a given stream specified by "index". HTGetStructure(L3_READ_STREAM_EXTENSION, <index>, 0, 0, (void*) pL3StreamExtension, sizeof(L3StreamExtension), iHub, iSlot, iPort); HTGetStructure $L3_READ_STREAM_EXTENSION <index> 0 0 \ myL3StreamExtension \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamExtension

This structure is used in conjunction with the StreamXX structures (StreamIP, StreamUDP, etc.). It adds information to a pre-created stream. The structure is required by POS-3500B/BS and LAN-3201B/C cards. Optionally, it may be applied in a limited fashion to the ML-7710/7711/7711S, LAN-31xxA/B, LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504As, and POS-3505As cards. It also may be applied in a limited fashion to the ATM-345xA(s) modules, and it is required in these modules to set the frame rate. (See Comments at bottom of table). It is used to configure additional stream information, including scheduling on a per-stream basis. These structures are set up for every stream, so they should be sent after the streams are defined. This structure is used for four commands: L3_DEFINE_STREAM_EXTENSION defines one or more L3StreamExtension. L3_MOD_STREAM_EXTENSION overwrites one L3StreamExtension at a given index. L3_DEFINE_MULTI_STREAM_EXTENSION creates an array of L3StreamExtensions based on a previously defined L3StreamExtension. L3_READ_STREAM_EXTENSION read back the stream extension parameters for a given stream specified by "index". Note: To perform the payload data integrity verification, the stream minimum frame length is 30 bytes. Note: For TeraMetrics modules, to perform the payload data integrity verification, you should use TRIGGER_ONE_ONLY, and that trigger PATTERN must be the last six bytes of _NETCOM_ ( 'E' 'T' 'C' 'O' 'M' '_' ). Notes for ulCustomStreamID with L3_READ_STREAM_EXTENSION: Although stream ID (including custom stream ID or non-custom stream ID) is always 4 bytes, the signature field, by default provides only 2 bytes for the stream ID while the upper 2 bytes are for card/chassis ID, etc. Only when custom stream ID is enabled, all 4 bytes are available to stream ID, and then it's up to user to make sure the chassis/card uniqueness is taken into account when generating custom stream IDs. Therefore when the stream ID is retrieved via L3_READ_STREAM_EXTENSION, the value in the whole 4 bytes are valid only when custom stream ID is enabled. Otherwise only the lower 2 bytes values are valid for the stream ID.

Continues >

SmartLibrary Command Reference: Volume 2 | 449

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagL3StreamExtension { unsigned long ulFrameRate;

/* frame transmit rate, in packets per second */ unsigned long ulTxMode; /* frame transmit mode, use one of L3_CONTINUOUS_MODE, L3_SINGLE_BURST_MODE, L3_MULTIBURST_MODE, L3_CONTINUOUS_MULTIBURST_MODE */ unsigned long ulBurstCount; /* the burst number */ unsigned long ulMBurstCount; /* the multi burst number */ unsigned long ulBurstGap; /* the gap between burst, in 32ns units */ unsigned short uiInitialSeqNumber; /* IP initial sequence number */ unsigned char ucIPHeaderChecksumError;/* 1 enabled, 0 disabled */ unsigned char ucIPTotalLengthError; /* 1 enabled, 0 disabled */ unsigned char ucIPManipulateMode; /* IP_xxx manipulate mode */ unsigned char ucIncUDPPort; /* Increase UDP Source and Dst Port number per burst. 1 enabled, 0 disabled */ unsigned short uiIPLimitCount; /* The limit/cycle count is the number of times that the step value(ucStepCount) will be added/subtracted from the field before it is reset to its initial value. Values can range from 0 - 65535. Note that 0 indicates continuously incrementing/decrementing the field. For the LAN-310xA/B modules, this cycle count value applies to the first address referred to by the following IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source (source (source (source IP) IP) MAC) MAC)

unsigned long

ulStartOffset;

unsigned long unsigned char unsigned char unsigned char

ulBGPatternIndex; ucDataCheckEnable; ucCRCErrorEnable; ucRandomBGEnable;

Use uiIPLimitCount2 to set the cycle count for the second address. */ /* all streams defined can not transmit at the same time, each stream has to start at the different time. ulStartOffset is the start offset from the previous stream. ulStartOffset's unit is tick. minimum is 10 tick. 1(tick) = 32(ns) */ /* index of the stream background fill pattern that defined by L3StreamBGConfig */ /* 1 enable payload check error, 0 disable */ /* 1 enable, 0 disable */ /* 1 enable, 0 disable */

Continues >

450 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char unsigned char unsigned char

ucRandomBGEnable; /* 1 enable, 0 disable */ ucDataIntegrityErrorEnable;/* 1 enable, 0 disable */ ucStepCount; /* IP address increment/decrement step count: 1,3,5,etc. For the LAN-3101x modules, this value applies only to the first address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (source IP) IP_DEC_SRC_IP_AND_DST_IP (source IP) IP_INC_SRC_MAC_AND_DST_MAC (source MAC) IP_DEC_SRC_MAC_AND_DST_MAC (source MAC) Use ucStepCount to set the step count for the second address. */ /* bit offset where the IP address is increment. */ /* Number of MPLS labels. 0 disable the MPLS */ /* reserved */ /* reserved */ /* reserved */ /* defined constants: OAM_PACKET_TYPE_NONE_OAM OAM_PACKET_TYPE_NORMAL_OAM OAM_PACKET_TYPE_IDLE_OAM */ /* Applicable for the LAN-3101 cards ONLY. This field is used to specify the Increment/decrement step count for the Second address referred to by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (dest. IP) IP_DEC_SRC_IP_AND_DST_IP (dest. IP) IP_INC_SRC_MAC_AND_DST_MAC (dest. MAC) IP_DEC_SRC_MAC_AND_DST_MAC (dest. MAC) Use ucStepCount to set the step count for the first address. */

unsigned char unsigned char unsigned unsigned unsigned unsigned char long char char

ucIPBitsOffset; ucMPLSCount; ucIPOptionsCount; ulCustomStreamID; ucEnableCustomStreamID; ucOAMHeaderPacketType;

unsigned char

ucStepCount2;

Continues >

SmartLibrary Command Reference: Volume 2 | 451

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned short uiIPLimitCount2;

unsigned short uiBlockCount;

/* Applicable for the LAN-3101 cards ONLY. The limit/cycle count is the number of times that the step value(ucStepCount2) will be added/subtracted from the field before it is reset to its initial value. Values can range from 0 - 65535. Note that 0 indicates continuously incrementing/decrementing the field. This value applies to the second address referred to by the following IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP (dest. IP) IP_DEC_SRC_IP_AND_DST_IP (dest. IP) IP_INC_SRC_MAC_AND_DST_MAC (dest. MAC) IP_DEC_SRC_MAC_AND_DST_MAC (dest. MAC) Use uiIPLimitCount to set the cycle count for the first address. */ /* Applicable for the LAN-3101 cards ONLY. This field is used to specify the number Of frames that will repeat a pattern before Incrementing or decrementing to the next one. This applies to only the first address referred To by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (source (source (source (source IP) IP) MAC) MAC)

unsigned short uiBlockCount2;

Use uiBlockCount2 to set the block count for the second address. */ /* Applicable for the LAN-3101 cards ONLY. This field is used to specify the number Of frames that will repeat a pattern before Incrementing or decrementing to the next one. This applies to only the second address referred To by these IP manipulate modes(ucIPManipulateMode): IP_INC_SRC_IP_AND_DST_IP IP_DEC_SRC_IP_AND_DST_IP IP_INC_SRC_MAC_AND_DST_MAC IP_DEC_SRC_MAC_AND_DST_MAC (dest. (dest. (dest. (dest. IP) IP) MAC) MAC)

unsigned char ucReserved[3]; } L3StreamExtension;

Use uiBlockCount to set the block count for the first address. */ /* Reserved */

Continues >

452 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

Comments

Some cards support this structure in a limited fashion only: The ML-7710/7711/7711S and LAN-3100A, 3101A/B, 3102A support the ucIPManipulateMode, ucStepCount, and uiIPLimitCount fields. The ucDataIntegrityErrorEnable field is applicable to the LAN-3100A, 3101A/B, 3102A cards. The LAN-3300A, LAN-3301A, LAN-3310A, LAN-3311A, POS-3504A, and POS-3505As/AR cards support the following fields: ulFrameRate, uiInitialSeqNumber, ucIPHeaderChecksumError, ucIPTotalLengthError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The LAN-3710AL/AS/AE supports the following fields: uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, ucEnableCustomStreamID, and ucOAMHeaderPacketType. The XLW-372xA and XFP-373xA modules supports the following fields: uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ulCustomStreamID, and ucEnableCustomStreamID. The FBC-3601A and FBC-3602A cards supports the following fields: ulTxMode, ulBurstCount, ulMBurstCount, ulBurstGap, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucRandomBGEnable, ucDataIntegrityErrorEnable, ulCustomStreamID and ucEnableCustomStreamID. The AT-34xx cards supports the following fields: ulFrameRate, uiInitialSeqNumber, ucIPHeaderChecksumError, ulBGPatternIndex, ucDataCheckEnable, ucCRCErrorEnable, ucDataIntegrityErrorEnable, ulCustomStreamID and ucEnableCustomStreamID. Notes for the AT-34xx cards: - All streams bound to the same VC must have the same frame rate(ulFrameRate). Other fields in L3StreamExtension do not currently apply to these cards. The following modes for ucIPManipulateMode are currently supported on the LAN-3201B/C and POS cards: IP_INC_SRC_IP IP_INC_DST_IP IP_INC_DST_IP_AND_DST_MAC IP_INC_SRC_IP_AND_SRC_MAC IP_INC_SRC_IP_AND_DST_MAC IP_INC_DST_IP_AND_DRC_MAC The following modes for ucIPManipulateMode are currently supported on the ML-7710/7711/7711S card: IP_INC_SRC_IP IP_INC_DST_IP IP_DEC_SRC_IP IP_DEC_DST_IP IP_INC_SRC_IP_AND_SRC_MAC IP_INC_DST_IP_AND_DST_MAC IP_DEC_SRC_IP_AND_SRC_MAC IP_DEC_DST_IP_AND_DST_MAC

SmartLibrary Command Reference: Volume 2 | 453

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_RNDIS_MODE_ON
Toggle RNDIS mode on, disabling the Ethernet port. HTSetCommand(L3_RNDIS_MODE_ON, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_RNDIS_MODE_ON 0 0 0 \ "" \ $iHub $iSlot $iPort To return the port to Ethernet mode, use L3_ETHERNET_MODE_ON on page 375.

Tcl Usage Comment

iType1 Description C Usage

L3_SET_ARP_GAP
Set ARP gap on all defined Streams. HTSetStructure(L3_SET_ARP_GAP, 0, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTSetStructure $L3_SET_ARP_GAP 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ULong

454 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

L3_START_ARPS
Begin ARP exchange on all defined streams. HTSetCommand(L3_START_ARPS, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_START_ARPS 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage Tcl Usage

L3_STOP_ARPS
Stop ARP exchange on all defined streams. HTSetCommand(L3_STOP_ARPS, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_STOP_ARPS 0 0 0 \ "" \ $iHub $iSlot $iPort

SmartLibrary Command Reference: Volume 2 | 455

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_STREAM_BINDING_INFO
Retrieve stream binding information for the stream at the index given by iType2. HTGetStructure(L3_STREAM_BINDING_INFO, <index>, 0, 0, (void*) pL3StreamBinding, sizeof(L3StreamBinding), iHub, iSlot, iPort); HTGetStructure $L3_STREAM_BINDING_INFO <index> 0 0 \ myL3StreamBinding \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamBinding

This structure is used to bind stream(s) to VC(s) and update the ATM CLP bit of the stream(s), or retrieve the information of the bound VCs and the ATM CLP setting with the stream(s). These structures are set up for every stream on the ATM TeraMetrics module, so they should be sent after streams are defined. This structure is used for four commands:

L3_DEFINE_STREAM_BINDING Bind one or more streams to one or more VCs, and update CLP bit in the stream(s). The starting stream index is always 1. The number of streams to be bound is the size of the L3StreamBinding array. L3_MOD_STREAM_BINDING Overwrites the stream binding set (the bound VC index and the ATM CLP bit) of the stream at a given index. L3_DEFINE_MULTI_STREAM_EXTENSION Creates an array of stream binding set based on a previously defined stream binding set. The uiBindIndex is delta value, and the uiATMFlags is ignored. L3_STREAM_BINDING_INFO reads back the stream binding parameters for a given stream specified by <index>.

typedef struct tagL3StreamBinding { unsigned char ucBindMode;

unsigned short uiBindIndex; unsigned short uiATMFlags;

/* STREAM_BIND_VC (binding to VC for ATM), required input for both configuration and reading back configurations */ /* VC index for ATM cards */ /* Flag to set CLP bit in ATM header for ATM card, AT_CLP_ON - set CLP bit in ATM header AT_CLP_OFF - not set CLP bit in ATM header*/

unsigned char ucReserved[56]; } L3StreamBinding;

456 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_STREAM_GROUP_DEFINE
Create a stream group and set group characteristics. Use iType2 for group index. HTSetStructure(L3_STREAM_GROUP_DEFINE, <index>, 0, 0, (void*) pLayer3StreamGroup, sizeof(Layer3StreamGroup), iHub, iSlot, iPort); HTSetStructure $L3_STREAM_GROUP_DEFINE <index> 0 0 \ myLayer3StreamGroup 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3StreamGroup

This structure defines the Group Id and the group characteristics for group mode. typedef struct tagLayer3StreamGroup { unsigned long ulFrameLength; unsigned long ulFrameGap;

unsigned short uiNumberOfStreams; unsigned short uiMembers[L3_MAX_GROUP_SIZE]; } Layer3StreamGroup;

/* frame length for all streams in the group */ /* gap between frames and between this group and the next group */ /* number of streams in the group */ /* group members, by stream index */

Comment

None.

iType1 Description C Usage

L3_STREAM_GROUP_DELETE
Delete a stream group. Use iType2 for group index. HTSetCommand(L3_STREAM_GROUP_DELETE, <index>, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_STREAM_GROUP_DELETE <index> 0 0 \ "" \ $iHub $iSlot $iPort None.

Tcl Usage

Related Structure

SmartLibrary Command Reference: Volume 2 | 457

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_STREAM_128_INFO
Retrieve Streams setup information in the Streams list. Note than "index" is the stream to retrieve information for. HTGetStructure(L3_STREAM_128_INFO, <index>, 0, 0, (void*) pStreamSmartBits128, sizeof(StreamSmartBits128), iHub, iSlot, iPort); HTGetStructure $L3_STREAM_128_INFO <index> 0 0 \ myStreamSmartBits128 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamSmartBits128

This structure holds information for customized streams (StreamSmartBits). The Background Fill Pattern and the ProtocolHeader[] can be used in combination to construct highly customized frames. Use HTFillPattern to specify the background pattern. Then define the ProtocolHeader array. This array (of up to 128 bytes) is used as VFD3. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). IMPORTANT! On TeraMetrics modules (except ATM, POS-3518As/AR and POS-3519As/AR), before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT (NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Note: For ATM TeraMetrics modules, for any encapsulation type of the bound VC, NULL encapsulation is inserted in the stream. Only if the bound VC encapsulation is customized, the customized VC encapsulation is inserted in the stream. typedef struct tagStreamSmartBits128 { unsigned char ucActive; /* unsigned char ucProtocolType; unsigned char ucRandomLength;/* 1 0 =

unsigned char

ucRandomData;/* /* /* /*

1=Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_SMARTBITS*/ = Enable random frame length, use uiFrameLength. Available on LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ 1 = Random Data, 0 = use the */ cards background pattern */ not available on */ ATM Terametrics modules */

unsigned short

uiFrameLength;/* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 0 - 8196 for Frame Relay */

Continues >

458 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/***************************************************************** * For ETHERNET, cards VFD1 and VFD2 structure members are * * reserved for later use. Set to 0. * *****************************************************************/ unsigned short unsigned char unsigned char unsigned long uiVFD1Offset;/* in bits */ ucVFD1Range;/* in bits */ ucVFD1Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6];/*the initial VFD byte pattern */

unsigned char unsigned short unsigned char unsigned char

uiVFD2Offset;/* in bits */ ucVFD2Range;/* in bits */ ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR,*/ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern */ /*****************************************************************/ unsigned short uiVFD3Offset;/* Reserved */ unsigned short uiVFD3Range;/* in bytes; Number of elements */ /* to use from ProtocolHeader */ /* No elements are used beyond */ /* the single specified range. */ unsigned char ucVFD3Enable;/* Reserved */ unsigned char ucTagField; /* 0 = off, 1 = insert Signature*/ /* field into each frame */ unsigned char ProtocolHeader[128]; /* Defines up to 128 bytes used as VFD3*/ } StreamSmartBits128;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 459

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description

L3_STREAM_INFO
Retrieve streams setup information in the streams list, at the index given by iType2. Note: Unless you are already using this command, it is recommended to use L3_STREAM_128_INFO instead. L3_STREAM_128_INFO accommodates larger stream types and retrieves the stream information in the natural byte order.

C Usage

HTGetStructure(L3_STREAM_INFO, <index>, 0, 0, (void*) pStreamSmartBits, sizeof(StreamSmartBits), iHub, iSlot, iPort); HTGetStructure $L3_STREAM_INFO <index> 0 0 \ myStreamSmartBits \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamSmartBits

This structure holds information for customized streams (StreamSmartBits). The Background Fill Pattern and the ProtocolHeader[] can be used in combination to construct highly customized frames. Use HTFillPattern to specify the background pattern. Then define the ProtocolHeader array. This array (of up-to 64 bytes) is used as VFD3. It overwrites the background pattern at the specified offset and range. (ucVFD3Enable must be set to HVFD_ENABLED). A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). typedef struct tagStreamSmartBits { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_SMARTBITS */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on the LAN and POS TeraMetrics modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */

unsigned char unsigned short

/* frame length not counting CRC*/ /* 0 - 2048 for Ethernet */ /* 0 - 8196 for Frame Relay */ /* 0 - 8196 for Frame Relay * /***************************************************************** * For ETHERNET, cards VFD1 and VFD2 structure members are * * reserved for later use. Set to 0. * *****************************************************************/ /** VFD1 and VFD2 structure members are reserved for later use. Set to 0. **/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/

ucRandomData; uiFrameLength;

Continues >

460 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR,*/ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ /*****************************************************************/ unsigned short uiVFD3Offset; /* in bytes. May not be used with */ /* TeraMetrics-based modules. */ unsigned short uiVFD3Range; /* in bytes; Number of elements */ /* to use from ProtocolHeader */ /* No elements are used beyond */ /* the single specified range. */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE. May not be used */ /* with TeraMetrics-based modules. */ unsigned char ucTagField; /* 0 = off, 1 = insert Signature*/ /* field into each frame */ unsigned char ProtocolHeader[64]; /* Defines up to 64 bytes used as VFD3*/ } StreamSmartBits;

unsigned short unsigned char unsigned char

uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 461

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_STREAM_TRANSMIT_MODE
Enable or disable the group mode for a port. HTSetStructure(L3_STREAM_TRANSMIT_MODE, 0, 0, 0, (void*) pLayer3StreamTransmitMode, sizeof(Layer3StreamTransmitMode), iHub, iSlot, iPort); HTSetStructure $L3_STREAM_TRANSMIT_MODE 0 0 0 \ myLayer3StreamTransmitMode \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3StreamTransmitMode

This structure is used to specify or get the mode in which the streams are transmitted from the port, either group mode or stream mode (individual streams). typedef struct tagLayer3StreamTransmitMode { unsigned long ulMode; /* For the Transmit Mode field: */ /* L3_STREAM_TRANSMIT_STREAM_MODE to indicate Stream mode */ /* L3_STREAM_TRANSMIT_GROUP_MODE to indicate Group mode */ unsigned long ulReserved[3];/* Reserved fields */

462 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_STREAM_TRANSMIT_MODE_INFO
Determine the transmit mode. HTGetStructure(L3_STREAM_TRANSMIT_MODE_INFO, 0, 0, 0, (void*) pLayer3StreamTransmitMode, sizeof(Layer3StreamTransmitMode), iHub, iSlot, iPort); HTGetStructure $L3_STREAM_TRANSMIT_MODE_INFO 0 0 0 \ myLayer3StreamTransmitMode \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3StreamTransmitMode

This structure is used to specify or get the mode in which the streams are transmitted from the port, either group mode or stream mode (individual streams). typedef struct tagLayer3StreamTransmitMode { unsigned long ulMode; /* For the Transmit Mode field: */ /* L3_STREAM_TRANSMIT_STREAM_MODE to indicate Stream mode */ /* L3_STREAM_TRANSMIT_GROUP_MODE to indicate Group mode */ unsigned long ulReserved[3];/* Reserved fields */

SmartLibrary Command Reference: Volume 2 | 463

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_TX_ADDRESS
Set card device address information as if it were a separate Layer 3 device. HTSetStructure(L3_TX_ADDRESS, 0, 0, 0, (void*) pLayer3Address, sizeof(Layer3Address), iHub, iSlot, iPort); HTSetStructure $L3_TX_ADDRESS 0 0 0 \ myLayer3Address \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3Address

This structure is used to set/get the device addresses of the card as if it were a separate Layer 3 device. Possible values for iControl include: L3_CTRL_ARP_RESPONSES L3_CTRL_PING_RESPONSES L3_CTRL_SNMP_OR_RIP_RESPONSES Control of ARP replies with iControl field: 1. If stream is configured and destination IP address of ARP request matches with the source IP address of the configured stream. Then it doesnt matter what is set for iControl, ARP replies with matched stream's MAC address. 2. If stream is not configured or not matched, and L3_CTRL_ARP_RESPONSES is set for iControl, ARP replies with the port MAC address - the replied MAC address will always be the same for any ARP requests. 3. If stream is not configured or not matched, and L3_CTRL_ARP_RESPONSES_WITH_UNIQUE_MAC is set for iControl, ARP replies with unique MAC address in which the first two bytes consists of the first two bytes of the port MAC address, and the last four bytes consists of the destination IP address of ARP request. For example, if port MAC address: b1.b2.b3.b4.b5.b6 ARP is received with destination IP address: a.b.c.b then the port will reply to ARP with this new MAC address: b1.b2.a.b.c.d

Continues >

464 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagLayer3Address { unsigned char szMACAddress[6]; unsigned char IP[4]; unsigned char Netmask[4]; unsigned char Gateway[4]; unsigned char PingTargetAddress[4]; int iControl;

/* /* /* /*

sets sets sets sets

MAC addr of this card IP addr of this card Netmask for this card Gateway addr for this

*/ */ */ Card */

/* the address where PINGs are sent*/ /* /* /* /* /* /* /* 10 /* /* use L3_CTRL_ defines (see above) */ L3_CTRL_ARP_RESPONSES */ L3_CTRL_PING_RESPONSES */ L3_CTRL_SNMP_OR_RIP_RESPONSES */ L3_CTRL_ARP_RESPONSES_WITH_UNIQUE_MAC */ enables PING, ARP, SNMP or RIP */ in seconds - 0 disables. Each unit causes Pings to be sent (per second) */ in seconds - 0 disables */ in seconds - 0 disables */

int iPingTime; int iSNMPTime; int iRIPTime; int iGeneralIPResponse; } Layer3Address;

/* obsolete */

/* defines for the iControl variable*/ #define L3_CTRL_ARP_RESPONSES #define L3_CTRL_PING_RESPONSES #define L3_CTRL_SNMP_OR_RIP_RESPONSES #define L3_CTRL_ARP_RESPONSES_WITH_UNIQUE_MAC

0x01 0x02 0x04 0x08

SmartLibrary Command Reference: Volume 2 | 465

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_TX_ADDRESS_INFO
Retrieve card device address information. X HTGetStructure(L3_TX_ADDRESS_INFO, 0, 0, 0, (void*) pLayer3Address, sizeof(Layer3Address), iHub, iSlot, iPort); HTGetStructure $L3_TX_ADDRESS_INFO 0 0 0 \ myLayer3Address \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3Address

This structure is used to set/get the device addresses of the card as if it were a separate Layer 3 device. Possible values for iControl include: L3_CTRL_ARP_RESPONSES L3_CTRL_PING_RESPONSES L3_CTRL_SNMP_OR_RIP_RESPONSES Control of ARP replies with iControl field: 1. If stream is configured and destination IP address of ARP request matches with the source IP address of the configured stream. Then it doesnt matter what is set for iControl, ARP replies with matched stream's MAC address. 2. If stream is not configured or not matched, and L3_CTRL_ARP_RESPONSES is set for iControl, ARP replies with the port MAC address - the replied MAC address will always be the same for any ARP requests. 3. If stream is not configured or not matched, and L3_CTRL_ARP_RESPONSES_WITH_UNIQUE_MAC is set for iControl, ARP replies with unique MAC address in which the first two bytes consists of the first two bytes of the port MAC address, and the last four bytes consists of the destination IP address of ARP request. For example, if port MAC address: b1.b2.b3.b4.b5.b6 ARP is received with destination IP address: a.b.c.b then the port will reply to ARP with this new MAC address: b1.b2.a.b.c.d

Continues >

466 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

typedef struct tagLayer3Address { unsigned char szMACAddress[6]; unsigned char IP[4]; unsigned char Netmask[4]; unsigned char Gateway[4]; unsigned char PingTargetAddress[4]; int iControl;

/* /* /* /*

sets sets sets sets

MAC addr of this card IP addr of this card Netmask for this card Gateway addr for this

*/ */ */ Card */

/* the address where PINGs are sent*/ /* /* /* /* /* /* /* 10 /* /* use L3_CTRL_ defines (see above) */ L3_CTRL_ARP_RESPONSES */ L3_CTRL_PING_RESPONSES */ L3_CTRL_SNMP_OR_RIP_RESPONSES */ L3_CTRL_ARP_RESPONSES_WITH_UNIQUE_MAC */ enables PING, ARP, SNMP or RIP */ in seconds - 0 disables. Each unit causes Pings to be sent (per second) */ in seconds - 0 disables */ in seconds - 0 disables */

int iPingTime; int iSNMPTime; int iRIPTime; int iGeneralIPResponse; } Layer3Address;

/* obsolete */

/* defines for the iControl variable*/ #define L3_CTRL_ARP_RESPONSES #define L3_CTRL_PING_RESPONSES #define L3_CTRL_SNMP_OR_RIP_RESPONSES #define L3_CTRL_ARP_RESPONSES_WITH_UNIQUE_MAC

0x01 0x02 0x04 0x08

SmartLibrary Command Reference: Volume 2 | 467

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_TX_IPV6_ADDRESS
Set IPv6-related address information. HTSetStructure(L3_TX_IPV6_ADDRESS, 0, 0, 0, (void*) pLayer3IPv6Address, sizeof(Layer3IPv6Address), iHub, iSlot, iPort); HTSetStructure $L3_TX_IPV6_ADDRESS 0 0 0 \ myLayer3IPv6Address \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3IPv6Address

This structure is used to set/get the IPv6 related addresses of the card as if it were a separate Layer 3 device. Control of Neighbor Discovery respond with iControl field: 1. If the stream is configured the destination IP address of Neighbor Discovery request matches the source IP address of the configured stream. No matter what is set for iControl, Neighbor Discovery replies with the matched stream's MAC address. 2. If the stream is not configured or not matched, and L3_CTRL_IPV6_ND_RESPONSES is set for iControl, the Neighbor Discovery replies with the port MAC address - the replied MAC address will always be the same for any Neighbor Discovery requests. 3. If the stream is not configured or not matched, and L3_CTRL_IPV6_ND_RESPONSES_WITH_UNIQUE_MAC is set for iControl, the Neighbor Discovery replies with a unique MAC address - in which the first two bytes are the first two bytes of the port MAC address, and the last four bytes are the last four bytes of destination IP address of Neighbor Discovery request. For example, if port MAC address: b1.b2.b3.b4.b5.b6 Neighbor Discovery is received with destination IP address: FF02:0000:0000:0000:0000:0000:0a0b:0c0d Then the port will reply to Neighbor Discovery with this new MAC address b1.b2.a.b.c.d.e */ typedef struct tagLayer3IPv6Address { unsigned char ucMACAddress[6]; unsigned char ucPrefixLength; unsigned char IP[16]; unsigned char Gateway[16]; unsigned logn ulControl;

unsigned char ucReserved[29]; } Layer3IPv6Address;

/* MAC address */ /* Prefix length in bits */ /* IP address */ /* Gateway address */ /*use L3_CTRL_IPV^ defines below*/ /* L3_CTRL_IPV6_ND_RESPONSES */ /* L3_CTRL_IPV6_ND_RESPONSES_WITH_UNIQUE_MAC */ /* enables Neighbor Discovery respond*/ /* Reserved */

/* defines for the ulControl variable */ #define L3_CTRL_IPV6_ND_RESPONSES #define L3_CTRL_IPV6_ND_RESPONSES_WITH_UNIQUE_MAC

0x00000001 0x00000002

468 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_TX_IPV6_ADDRESS_INFO
Retrieve IPv6 related address information. HTGetStructure(L3_TX_IPV6_ADDRESS_INFO, 0, 0, 0, (void*) pLayer3IPv6Address, sizeof(Layer3IPv6Address), iHub, iSlot, iPort); HTGetStructure $L3_TX_IPV6_ADDRESS_INFO 0 0 0 \ myLayer3IPv6Address \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3IPv6Address

This structure is used to set/get the IPv6 related addresses of the card as if it were a separate Layer 3 device. Control of Neighbor Discovery respond with iControl field: 1. If the stream is configured the destination IP address of Neighbor Discovery request matches the source IP address of the configured stream. No matter what is set for iControl, Neighbor Discovery replies with the matched stream's MAC address. 2. If the stream is not configured or not matched, and L3_CTRL_IPV6_ND_RESPONSES is set for iControl, the Neighbor Discovery replies with the port MAC address - the replied MAC address will always be the same for any Neighbor Discovery requests. 3. If the stream is not configured or not matched, and L3_CTRL_IPV6_ND_RESPONSES_WITH_UNIQUE_MAC is set for iControl, the Neighbor Discovery replies with a unique MAC address - in which the first two bytes are the first two bytes of the port MAC address, and the last four bytes are the last four bytes of destination IP address of Neighbor Discovery request. For example if port MAC address: b1.b2.b3.b4.b5.b6 Neighbor Discovery is received with destination IP address: FF02:0000:0000:0000:0000:0000:0a0b:0c0d Then the port will reply to Neighbor Discovery with this new MAC address b1.b2.a.b.c.d.e */ typedef struct tagLayer3IPv6Address { unsigned char ucMACAddress[6]; unsigned char ucPrefixLength; unsigned char IP[16]; unsigned char Gateway[16]; unsigned logn ulControl;

unsigned char ucReserved[29]; } Layer3IPv6Address;

/* MAC address */ /* Prefix length in bits */ /* IP address */ /* Gateway address */ /*use L3_CTRL_IPV^ defines below*/ /* L3_CTRL_IPV6_ND_RESPONSES */ /* L3_CTRL_IPV6_ND_RESPONSES_WITH_UNIQUE_MAC */ /* enables Neighbor Discovery respond*/ /* Reserved */

/* defines for the ulControl variable */ #define L3_CTRL_IPV6_ND_RESPONSES #define L3_CTRL_IPV6_ND_RESPONSES_WITH_UNIQUE_MAC

0x00000001 0x00000002

SmartLibrary Command Reference: Volume 2 | 469

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_TX_IPV6_PROTOCOL
Configure IPv6 Ping settings. HTSetStructure(L3_TX_IPV6_PROTOCOL, 0, 0, 0, (void*) pLayer3IPv6Protocol, sizeof(Layer3IPv6Protocol), iHub, iSlot, iPort); HTSetStructure $L3_TX_IPV6_PROTOCOL 0 0 0 \ myLayer3IPv6Protocol \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3IPv6Protocol

This structure is used to set the Ping target address and Ping time. typedef struct tagLayer3IPv6Protocol { unsigned char ucPingTargetAddress[16];/* Ping target address */ unsigned short uiPingTime;/* Ping time: For TeraMetrics modules, this is in units of 1 second; for the LAN-31xxA/B, it is in units of 100 milliseconds. A value of 0 disables ping */ unsigned char ucReserved[10];/* Reserved */ } Layer3IPv6Protocol;

Comments

None

iType1 Description C Usage

L3_USB_GET_USB_INFO
Gets MAC address information from the attached USB device. HTGetStructure(L3_USB_GET_USB_INFO, 0, 0, 0, (void*) pUSBInfo, sizeof(USBInfo), iHub, iSlot, iPort); HTGetStructure $L3_USB_GET_USB_INFO 0 0 0 \ myUSBInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

USBInfo

A simple structure which returns the MAC address of the USB. Future releases will include other pertinent USB information. typedef struct tagUSBInfo { unsigned char szUSBMAC[6]; } USBInfo;

/* MAC Address received from the attached USB device */

Comments

None

470 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

L3_USB_MODE_OFF
Toggle USB port off, enabling the Ethernet port. HTSetCommand(L3_USB_MODE_OFF, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_USB_MODE_OFF 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage

L3_USB_MODE_ON
Toggle USB mode on, disabling the Ethernet port. HTSetCommand(L3_USB_MODE_ON, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $L3_USB_MODE_ON 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

SmartLibrary Command Reference: Volume 2 | 471

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_VFD_INFO
Retrieve the VFD data starting at a given stream; ucType field is input. HTGetStructure(L3_VFD_INFO, <index>, 0, 0, (void*) pNSVFD, sizeof(NSVFD), iHub, iSlot, iPort); HTGetStructure $L3_VFD_INFO <index> 0 0 \ myNSVFD \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSVFD

This structure configures VFDs for a stream. The VFDs can be placed in the first 64 bytes of the frame; however the VFDs will be overwritten by the following fields of the frame: IP sequence number, IP header checksum, IP total length, UDP/TCP checksum, TCP sequence number, and the signature field. Example for ucCycleCount and ucBlockCount: ucMode = L3_VFD_INCR uiRange = 2 ulCycleCount = 4 ulBlockCount = 2 ucPattern = {0 0 0 0 0 0} The transmitted patterns will be as follows (in hex): 00 00 00 00 00 01 00 01 00 02 00 02 00 03 00 03 00 00 00 00 ... Example for ucStepValue and ucStepShift: ucMode = L3_VFD_INCR uiRange = 4 ucStepValue = 3 ucStepShift = 2 ucPattern = {0 0 0 0 0 0}

Continues >

472 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

The transmitted patterns will be as follows (in hex): 00 00 00 00 00 03 00 00 00 06 00 00 00 09 00 00 ... Example for ucSubnetMaskAware and ucSubnetMaskLength: ucMode = L3_VFD_INCR uiRange = 4 ucSubnetMaskAware = 1 ucSubnetMaskLength = 24 ucPattern = (0 0 0 0xFD 0 0} The transmitted patterns will be as follows (in hex): 00 00 00 FD 00 00 00 FE 00 00 00 01 00 00 00 02 ... typedef struct tagNSVFD { unsigned char ucType; unsigned char ucMode;

unsigned short uiOffset;

unsigned short uiRange; unsigned long ulCycleCount;

unsigned short uiBlockCount;

/* Specifies VFD1 or VFD2; use L3_VFD1 or L3_VFD2. */ /* VFD mode: static, increment, decrement, or random; use L3_VFD_STATIC, L3_VFD_INCR, L3_VFD_DECR, L3_VFD_RANDOM, or L3_VFD_OFF. */ /* Offset of the VFD, in bits. The VFD must fall within the first 128 bytes of the frame. Also, if the VFD falls in the last 18 bytes of the payload, and the signature field is enabled, the signature field will overwrite the VFD. */ /* Range (length) of the VFD, in bytes. Valid ranges are from 1 to 6 bytes. */ /* For increment or decrement mode, the number of patterns before resetting to initial VFD pattern. May range from 0 to 16777215. If 0, the pattern will increment or decrement through its entire range without resetting. */ /* For increment or decrement mode, the number of frames that will repeat a pattern before incrementing or decrementing to the next one. May range from 0 to 4095. When used with ulCycleCount each block of patterns only counts as one toward the cycle count. */

Continues >

SmartLibrary Command Reference: Volume 2 | 473

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

unsigned char

ucStepValue;

unsigned char

unsigned char

unsigned char

unsigned char

unsigned char

unsigned char } NSVFD;

/* For increment or decrement mode, the amount to add or subtract from the previous pattern. May range from 0 to 255. Not available when ucSubnetAware is enabled. See the example in the structure description. When the ucMode = L3_VFD_INCR and ucStepValue = 0, the result will be static which means no change at all. When the ucMode = L3_VFD_INCR and ucStepValue = 1, the result will be incrementing by step as 1. */ ucStepShift; /* For increment or decrement mode, this field specifies the location in the pattern where the change will occur. The ucStepShift is the number of bytes to shift the step value left before adding or subtracting from the previous pattern. May range from 0 to 5, and is limited by the range of the pattern. See the example in the structure description. */ ucSubnetAware; /* Skip VFD patterns which are interpreted as subnet (0) or broadcast (255) addresses. 1 = enable, 0 = disable. See the example in the structure description. Note: This feature works only when uiRange is set to 4 and ucStepValue is set to 1. */ ucSubnetMaskLength; /* If ucSubnetAware is enabled, this is the number of bits in the subnet mask. See the example in the structure description. */ ucEnableCarryChaining;/* For increment or decrement mode, this field enables carry over from VFD1 to VFD2 on overflow or underflow. 1 = enable, 0 = disable. To enable the feature, this field must be set for both VFD1 and VFD2. VFD2 will remain static until VFD1 overflows or underflows. At that point, the next VFD pattern will begin (increment, decrement, or random). */ ucPattern[6]; /* Initial VFD pattern. Note: the transmitted pattern will start with the byte at index 0, even if the range is less than 6 bytes. */ ucReserved[16]; /* reserved */ IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

Comment

474 |

SmartLibrary Command Reference: Volume 2

Chapter 8: SmartMetrics / TeraMetrics (L3) L3 iType1 Commands and Structures

iType1 Description C Usage

L3_WRITE_STREAM_BG
Define the pattern for the stream background specified by "index". HTSetStructure(L3_WRITE_STREAM_BG, <index>, 0, 0, (void*) pL3StreamBGConfig, sizeof(L3StreamBGConfig), iHub, iSlot, iPort); HTSetStructure $L3_WRITE_STREAM_BG <index> 0 0 \ myL3StreamBGConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

L3StreamBGConfig

Represents one background fill pattern for use with a particular stream. POS-3500B/BS, POS-3502A/AS and LAN-3201B/C modules allow a total of 16 patterns of 64 bytes each. This selected 64 bit pattern has the following parameters: -Repeats for each frame. The pattern is repeated within the frame on the 64 byte boundary until the entire payload is filled. If the payload is 200 bytes, the pattern fills payload bytes 0-63 and repeats from bytes 0-63, 128-191 and 192-200. -Can be written or read at an index between 0 and 15 given in iType2. -Does not include protocol headers (L2, L3). To assign a defined pattern to a stream, use the ulBGPatternIndex field of the L3StreamExtension structure.Multiple streams can share the same background pattern by using the same index. The TeraMetrics modules support only two unique stream backgrounds. Refer to HtFillPattern (SmartLibrary Command Reference: Volume 1) if you want to overwrite the protocol header field. typedef struct tagL3StreamBGConfig { unsigned char ucPattern[64]; } L3StreamBGConfig;

/* background data pattern */

SmartLibrary Command Reference: Volume 2 | 475

476 |

SmartLibrary Command Reference: Volume 2

Chapter 9

MPLS (MPLS)
This chapter describes the Message Function iType1commands for MPLS. These have the prefix MPLS.

In this chapter...

Supported Modules.....478 MPLS HTSetStructure Summary Table.....479 MPLS HTGetStructure Summary Table.....480 MPLS iType1 Commands and Structures.....481

SmartLibrary Command Reference: Volume 2 | 477

Chapter 9: MPLS (MPLS) Supported Modules

Supported Modules
The MPLS commands (iType1s) and their related structures are used with the following cards and modules.
Chassis SmartBits 600x/ 6000x

Module
LAN-3300A LAN-3301A LAN-3302A LAN-3306A LAN-3310A LAN-3311A LAN-3320A LAN-3321A LAN-3324A LAN-3325A LAN-3327A LAN-3710AE LAN-3710AL LAN-3710AS POS-3504AS/AR POS-3505AS/AR POS-3510A/AS POS-3511A/AS POS-3518AS/AR POS-3519AS/AR

Description
10/100/1000Base-T Ethernet, Copper, 2-port, SmartMetric 10/100/1000Base-T, Copper, 2-port, TeraMetrics 10/100Base-TX Ethernet, Copper, 2-port, TeraMetrics 10/100Base-TX Ethernet, Copper, 4-port, TeraMetrics 1000Base-X Ethernet, GBIC, 2-port, SmartMetrics 1000Base-X Ethernet, GBIC, 2-port, TeraMetrics 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 1-port, TeraMetrics XD 10GBase-ER Ethernet, 1-port, 2-slot, single mode, 1550nm 10GBase-LR Ethernet, 1-port, 2-slot, single mode, 1310nm 10GBase-SR Ethernet, 1-port, 2-slot, single mode, 850nm POS OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, TeraMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/ 1310nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/ 1310nm, TeraMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310/1550nm, SmartMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310/1550nm, TeraMetrics

478 |

SmartLibrary Command Reference: Volume 2

Chapter 9: MPLS (MPLS) MPLS HTSetStructure Summary Table

MPLS HTSetStructure Summary Table


iType 1
MPLS_ATTRIBUTE_OBJECT_CREATE See Page 481 MPLS_EXPLICIT_ROUTE_OBJECT_CREATE See Page 482 MPLS_LSP_BIND_STREAMS See Page 483 MPLS_LSP_COPY_DELTA See Page 484 MPLS_LSP_COUNT_INFO See Page 484 MPLS_LSP_CREATE See Page 485 MPLS_LSP_DELETE_ALL See Page 486 MPLS_OBJECT_DELETE See Page 488 MPLS_ROUTING_DOMAIN_CREATE See Page 489 MPLS_ROUTING_DOMAIN_DELETE_ALL See Page 490 MPLS_SERVICE_OBJECT_CREATE See Page 492 MPLS_START See Page 493 0 0 0 MPLSStart Start MPLS signaling. <x> 0 0 0 0 0 MPLSRoutingDomain DeleteAll MPLSServiceObject Delete an MPLS interface. Create a service object. 0 0 0 MPLSRoutingDomain Configure the MPLS interface. 0 0 0 MPLSObjectDelete Removes objects in Object Pool. 0 0 0 0 0 0 MPLSLSP MPLSObjectID MPLSDeleteAll <x> 0 0 MPLSLSPCountInfo Set number of LSPs in a Routing Domain. Create LSPs. Delete all LSPs. <x> <c> 0 MPLSLSPCopyDelta Copy an existing LSP. <x> 0 0 MPLSLSPBindStreams Bind streams to an LSP. <x> 0 0 MPLSExplicitObject Create Explicit object.

2
<x>

3
<c>

4
0

pData
MPLSAttributeObject

Description
Create attribute object.

SmartLibrary Command Reference: Volume 2 | 479

Chapter 9: MPLS (MPLS) MPLS HTGetStructure Summary Table

MPLS HTGetStructure Summary Table


iType 1
MPLS_LABEL_DATA_INFO See Page 483 MPLS_LSP_INFO See Page 486 MPLS_LSP_NOT_COMPLETE See Page 487 MPLS_RSVP_COUNT_INFO See Page 491 <x> 0 0 MPLSRSVPCountInfo 0 0 0 MPLSLSPNotComplete Shows whether all LSPs have been established. Gets RSVP information on a Routing Domain. <x> <c> 0 MPLSLSPInfo

2
<x>

3
<c>

4
0

pData
MPLSLSPInfo

Description
Get number of LSPs in a routing domain. Get status for an LSP.

480 |

SmartLibrary Command Reference: Volume 2

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

MPLS iType1 Commands and Structures


iType1 Description C Usage

MPLS_ATTRIBUTE_OBJECT_CREATE
Creates attribute object. HTSetStructure(MPLS_ATTRIBUTE_OBJECT_CREATE, <index>, 0, 0, (void*) pMPLSAttributeObject, sizeof(MPLSAttributeObject), iHub, iSlot, iPort); HTSetStructure $MPLS_ATTRIBUTE_OBJECT_CREATE <index> 0 0 \ myMPLSAttributeObject \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSAttributeObject

typedef struct tagMPLSAttributeObject { unsigned char ucSetupPriority; /* unsigned char ucHoldPriority; /* unsigned char ucOptions; /* unsigned char ucNameLength; /* unsigned char ucName[MAX_OBJ_BUFF_SIZE];/* unsigned long ulAttributeObjectID; unsigned char ucReserved[32]; }MPLSAttributeObject;

(0-7) priority for setup */ (0-7)*/ MPLS_RSVP_ATTRIBUTE */ length of tunnel name */ name of tunnel */

SmartLibrary Command Reference: Volume 2 | 481

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_EXPLICIT_ROUTE_OBJECT_CREATE
Creates Explicit object. HTSetStructure(MPLS_EXPLICIT_ROUTE_OBJECT_CREATE, <index>, 0, 0, (void*) pMPLSExplicitObject, sizeof(MPLSExplicitObject), iHub, iSlot, iPort); HTSetStructure $MPLS_EXPLICIT_ROUTE_OBJECT_CREATE <index> 0 0 \ myMPLSExplicitObject \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSExplicitObject

typedef struct tagMPLSExplicitObject { unsigned short uiExplicitRouteType;

unsigned char ucIPAddress[16]; unsigned char ucLoose; unsigned char ucPrefix; unsigned char ucFlags;

/* EXPLICIT_ROUTE_IPV4 supported EXPLICIT_ROUTE_IPV6 not supported EXPLICIT_ROUTE_AS not supported EXPLICIT_ROUTE_LSP_ID not supported */ /* IP Address of Router/Intermediate Hop */ /* It Indicates whether intermidiate Router/ Hop must follow the given path or not */ /* Network mask prefix..related with IP Address */ /* Specify whether to use RSVP or CR-LDP (LDP) at each router. 1 - RSVP ONLY, 0 - any protocol. Default is 0 */

unsigned long ulExplicitObjectID; unsigned char ucReserved[32]; }MPLSExplicitObject;

482 |

SmartLibrary Command Reference: Volume 2

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_LABEL_DATA_INFO
Number of LSPs in a Routing Domain. HTGetStructure(MPLS_LSP_INFO, <index>, <count>, 0, (void*) pMPLSLSPInfo, sizeof(MPLSLSPInfo), iHub, iSlot, iPort); HTGetStructure $MPLS_LSP_INFO <index> <count> 0 \ myMPLSLSPInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSLSPInfo

typedef struct tagMPLSLSPInfo { unsigned long ulLabel; unsigned char ucStatus;

/* Label on the LSP */ /* MPLS_LSP_NOT_INITIALIZED 1 MPLS_LSP_INITIALIZED 2 MPLS_LSP_SIGNALING 3 MPLS_LSP_ESTABLISHED 4 MPLS_LSP_DOWN 5*/

unsigned char ucReserved[7]; }MPLSLSPInfo;

iType1 Description C Usage

MPLS_LSP_BIND_STREAMS
Bind streams to an LSP. HTSetStructure(MPLS_LSP_BIND_STREAMS, <index>, 0, 0, (void*) pMPLSLSPBindStreams, sizeof(MPLSLSPBindStreams), iHub, iSlot, iPort); HTSetStructure $MPLS_LSP_BIND_STREAMS <index> 0 0 \ myMPLSLSPBindStreams \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSLSPBindStreams

typedef struct tagMPLSLSPBindStreams { unsigned short uiStreamIndex; }MPLSLSPBindStreams;

/* StreamIndex or StreamIndexes */

SmartLibrary Command Reference: Volume 2 | 483

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_LSP_COPY_DELTA
Copies an existing LSP. HTSetStructure(MPLS_LSP_COPY_DELTA, <index>, <count>, 0, (void*) pMPLSLSPCopyDelta, sizeof(MPLSLSPCopyDelta), iHub, iSlot, iPort); HTSetStructure $MPLS_LSP_COPY_DELTA <index> <count> 0 \ myMPLSLSPCopyDelta \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSLSPCopyDelta

typedef struct tagMPLSLSPCopyDelta { unsigned char ucEgressIp[4]; unsigned long ulExtendedTunnelID; unsigned short uiTunnelID; unsigned char ucReserved[50]; }MPLSLSPCopyDelta;

/* Enter value to increment field by.*/ /* Enter value to increment field by.*/ /* Enter value to increment field by.*/

iType1 Description C Usage

MPLS_LSP_COUNT_INFO
Get the number of LSPs in a Routing Domain. HTGetStructure(MPLS_LSP_COUNT_INFO, <index>, 0, 0, (void*) pMPLSLSPCountInfo, sizeof(MPLSLSPCountInfo), iHub, iSlot, iPort); HTGetStructure $MPLS_LSP_COUNT_INFO <index> 0 0 \ myMPLSLSPCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSLSPCountInfo

typedef struct tagMPLSLSPCountInfo { unsigned long ulLSPCount; }MPLSLSPCountInfo;

/* Number of LSP's on the Routing Domain */

484 |

SmartLibrary Command Reference: Volume 2

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_LSP_CREATE
Creates LSPs. HTSetStructure(MPLS_LSP_CREATE, 0, 0, 0, (void*) pMPLSLSP, sizeof(MPLSLSP), iHub, iSlot, iPort); HTSetStructure $MPLS_LSP_CREATE 0 0 0 \ myMPLSLSP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSLSP

typedef struct tagMPLSLSP { unsigned long ulRoutingDomainIndex;

/* The Routing Domain must be configured before the related LSP is configured */ unsigned short uiIngressLSPOptions; /* MPLS_RSVP_RECORD_ROUTE */ unsigned char ucEgressIP[4]; /* For each ingress LSP that is defined, a corresponding egress LSP is automatically created. This information is used to create the corresponding Egress LSP. */ unsigned short uiTunnelID; /* Id used for establishing LSP tunnel */ unsigned long ulExtendedTunnelID; /* Id used for establishing LSP external tunnel */ unsigned short uiNumberOfObjects; /* Number of objects that will bind to this LSP */ MPLSObjectID ObjectList[MAX_OBJECTS]; /* Objects on this LSP */ unsigned long ulLSPIndex; unsigned char ucReserved[4]; }MPLSLSP;

Embedded Structure

MPLSObjectID

typedef struct tagMPLSObjectID { unsigned short uiObjectType;

unsigned short uiObjectIndex; }MPLSObjectID;

/* MPLS_EXPLICIT_ROUTE_OBJECT, MPLS_SERVICE_OBJECT, MPLS_OPAQUE_OBJECT, MPLS_ATTRIBUTE_OBJECT, MPLS_FILTER_OBJECT */ /* Object Index, starts from 0,1,2.. */

SmartLibrary Command Reference: Volume 2 | 485

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_LSP_DELETE_ALL
Delete all LSPs. HTSetStructure(MPLS_LSP_DELETE_ALL, 0, 0, 0, (void*) pMPLSLSPDeleteAll, sizeof(MPLSLSPDeleteAll), iHub, iSlot, iPort); HTSetStructure $MPLS_LSP_DELETE_ALL 0 0 0 \ myMPLSLSPDeleteAll \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSLSPDeleteAll

typedef struct tagMPLSLSPDeleteAll { unsigned long ulPacketRate; unsigned char ucReserved[4]; }MPLSLSPDeleteAll;

/* Packets per second, teardown rate */

iType1 Description C Usage

MPLS_LSP_INFO
Get status for an LSP. HTGetStructure(MPLS_LSP_INFO, <index>, <count>, 0, (void*) pMPLSLSPInfo, sizeof(MPLSLSPInfo), iHub, iSlot, iPort); HTGetStructure $MPLS_LSP_INFO <index> <count> 0 \ myMPLSLSPInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSLSPInfo

typedef struct tagMPLSLSPInfo { unsigned long ulLabel; unsigned char ucStatus;

/* Label on the LSP */ /* MPLS_LSP_NOT_INITIALIZED 1 MPLS_LSP_INITIALIZED 2 MPLS_LSP_SIGNALING 3 MPLS_LSP_ESTABLISHED 4 MPLS_LSP_DOWN 5*/

unsigned char ucReserved[7]; }MPLSLSPInfo;

486 |

SmartLibrary Command Reference: Volume 2

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_LSP_NOT_COMPLETE
Returns information on whether all LSP's have been established. If it returns zero, this function should not be called again. HTGetStructure(MPLS_LSP_NOT_COMPLETE, 0, 0, 0, (void*) pMPLSLSPNotComplete, sizeof(MPLSLSPNotComplete), iHub, iSlot, iPort); HTGetStructure $MPLS_LSP_NOT_COMPLETE 0 0 0 \ myMPLSLSPNotComplete \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSLSPNotComplete

typedef struct tagMPLSISLSPComplete { unsigned long ulCount; }MPLSLSPNotComplete;

/* Number of uncompleted LSP's */

SmartLibrary Command Reference: Volume 2 | 487

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_OBJECT_DELETE
Removes objects in Object Pool. HTSetStructure(MPLS_OBJECT_DELETE, 0, 0, 0, (void*) pMPLSObjectDelete, sizeof(MPLSObjectDelete), iHub, iSlot, iPort); HTSetStructure $MPLS_OBJECT_DELETE 0 0 0 \ myMPLSObjectDelete \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSObjectDelete

typedef struct tagMPLSObjectDelete { unsigned short uiObjectType;

/* Type of Object to remove, all objects of this type will be removed. Possible values are: MPLS_EXPLICIT_ROUTE_OBJECT 0 MPLS_SERVICE_OBJECT 1 MPLS_OPAQUE_OBJECT 3 MPLS_ATTRIBUTE_OBJECT 4 */

unsigned char ucReserved[4]; }MPLSObjectDelete;

488 |

SmartLibrary Command Reference: Volume 2

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_ROUTING_DOMAIN_CREATE
Configure the MPLS interface. HTSetStructure(MPLS_ROUTING_DOMAIN_CREATE, 0, 0, 0, (void*) pMPLSRoutingDomain, sizeof(MPLSRoutingDomain), iHub, iSlot, iPort); HTSetStructure $MPLS_ROUTING_DOMAIN_CREATE 0 0 0 \ myMPLSRoutingDomain \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSRoutingDomain

typedef struct tagMPLSRoutingDomain { /* MPLS-RSVP_UDP_ENABLE, MPLS_RSVP_REFRESH_REDUCTION_CAPABLE, MPLS_RSVP_PHP_ENABLE */ unsigned char ucLocalIPAddress[4]; /* IP Address of this Routing Domain */ unsigned char ucPeerIPAddress[4]; /* The destination IP of the MPLS frame. This is the next MPLS hop, not the final IP destination. */ unsigned char ucLocalNetMask[4]; /* IP NetMask of this Routing Domain */ unsigned long ulMaxLSPRequest; /* Maximum LSP's on Ingress */ unsigned long ulMaxLSPDistribution; /* Maximum number of Egress distribution frames per second (if used), per Routing Domain */ unsigned long ulMeanRefreshInterval; /* Number of milli-seconds between refresh message frames. Default is 0 seconds */ unsigned short uiRSVPRetransmitDelay; /* Delay for first transmission, default is 5000(5s) Units is in milli-seconds */ unsigned short uiRSVPRetransmitDelta; /* Time to retransmit again, default is 1s Units is in milli-seconds */ unsigned short uiRSVPMaxRetransmitCount; /* Maximum retransmit count, default is 3 */ unsigned long ulSummaryMessageTime; unsigned long ulBundleMessageTime; unsigned long ulRoutingDomainIndex; unsigned long ulReserved[48]; }MPLSRoutingDomain; unsigned long ulOptions;

SmartLibrary Command Reference: Volume 2 | 489

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_ROUTING_DOMAIN_DELETE_ALL
Delete an MPLS interface. HTSetStructure(MPLS_ROUTING_DOMAIN_DELETE_ALL, 0, 0, 0, (void*) pMPLSRoutingDomainDeleteAll, sizeof(MPLSRoutingDomainDeleteAll), iHub, iSlot, iPort); HTSetStructure $MPLS_ROUTING_DOMAIN_DELETE_ALL 0 0 0 \ myMPLSRoutingDomainDeleteAll \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSRoutingDomainDeleteAll

typedef struct tagMPLSRoutingDomainDeleteAll { unsigned long ulPacketRate; /* Packet per second, tear down speed */ unsigned long ulLeaveLSPs; /* 0 - Delete LSP's also default, 1 - Delete Routing Domain but leave related LSPs */ unsigned char ucReserved[4]; }MPLSRoutingDomainDeleteAll;

490 |

SmartLibrary Command Reference: Volume 2

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_RSVP_COUNT_INFO
Gets RSVP information on a Routing Domain. HTGetStructure(MPLS_RSVP_COUNT_INFO, <index>, 0, 0, (void*) pMPLSRSVPCountInfo, sizeof(MPLSRSVPCountInfo), iHub, iSlot, iPort); HTGetStructure $MPLS_RSVP_COUNT_INFO <index> 0 0 \ myMPLSRSVPCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSRSVPCountInfo

typedef struct tagMPLSRSVPCountInfo { unsigned long ulType; unsigned long ulResvIn; unsigned long ulPathIn; unsigned long ulResvTearIn; unsigned long ulPathTearIn; unsigned long ulResvErrorIn; unsigned long ulPathErrorIn; unsigned long ulAckIn; unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned long long long long long long long long long long long ulResvOut; ulPathOut; ulResvTearOut; ulPathTearOut; ulResvErrorOut; ulPathErrorOut; ulAckOut; ulLSPIngress; ulLSPEgress; ulLabelIn; ulLabelOut;

/* number of reservation in received */ /* number of path in */

unsigned long ulCardTimeStamp; unsigned char ucReserved[32]; }MPLSRSVPCountInfo;

SmartLibrary Command Reference: Volume 2 | 491

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_SERVICE_OBJECT_CREATE
Creates service object. HTSetStructure(MPLS_SERVICE_OBJECT_CREATE, <index>, 0, 0, (void*) pMPLSServiceObject, sizeof(MPLSServiceObject), iHub, iSlot, iPort); HTSetStructure $MPLS_SERVICE_OBJECT_CREATE <index> 0 0 \ myMPLSServiceObject \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSServiceObject

typedef struct tagMPLSServiceObject { unsigned short uiObjectType;

unsigned short uiMaxPacketSize; unsigned char ucCOS; float fTokenBucketRate; float fTokenBucketSize; float fPeakDataRate; unsigned long ulMinPoliceUnit; float fRate; unsigned long ulSlackTerm; unsigned long ulServiceObjectID; unsigned char ucReserved[32]; }MPLSServiceObject;

/* RSVP_SERVICE_COS_OBJECT, RSVP_SERVICE_CONTROLLED_LOAD_OBJECT, RSVP_SERVICE_GUARANTEED_OBJECT */ /* bytes, RFC-2211, COS, Controlled, or Guaranteed object type.*/ /* 0-7 - for COS (class of service) object type. */ /* bytes per second */ /* bytes */ /* bytes per second */ /* guaranteed QoS. */ /* bytes per second, Guaranteed QoS.*/ /* number of micro seconds,Guaranteed QoS object type. */

492 |

SmartLibrary Command Reference: Volume 2

Chapter 9: MPLS (MPLS) MPLS iType1 Commands and Structures

iType1 Description C Usage

MPLS_START
Start MPLS signaling. HTSetStructure(MPLS_START, 0, 0, 0, (void*) pMPLSStart, sizeof(MPLSStart), iHub, iSlot, iPort); HTSetStructure $MPLS_START 0 0 0 \ myMPLSStart \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

MPLSStart

typedef struct tagMPLSStart { unsigned long ulPacketRate; unsigned char ucReserved[8];

/* Per second, required packet per second. Minimum is 1 */

SmartLibrary Command Reference: Volume 2 | 493

494 |

SmartLibrary Command Reference: Volume 2

Chapter 10

Universal (NS)
The NS Message Function iType1 commands apply across several card and module families. They provide a consistent interface among these different cards and technologies.

In this chapter...

Supported SmartCards and Modules.....496 NS HTSetStructure Summary Table.....498 NS HTGetStructure Summary Table.....504 NS HTSetCommand Summary Table.....511 NS iType1 Commands and Structures.....512

SmartLibrary Command Reference: Volume 2 | 495

Chapter 10: Universal (NS) Supported SmartCards and Modules

Supported SmartCards and Modules


The NS commands (iType1s) and their related structures are used with the following cards and modules.
Table 10-1. Supported Cards and Modules: NS Commands
Chassis SmartCard or Module
ML-7710 ML-7711 ML-7711S

Description
10/100Base-TX Ethernet, 1-port, SmartMetrics 10/100Base-FX Ethernet, 1-port, multi-mode, 1300nm, SmartMetrics 10/100Base-FX Ethernet, 1-port, single mode, 1310nm, SmartMetrics 10Base-T Ethernet/USB, 2-port, SmartMetrics ATM OC3c (STM-1c), 2-port, multi-mode, 1300nm, TeraMetrics ATM OC3c (STM-1c), 2-port, single mode, 1310nm, TeraMetrics ATM OC3cOC12c (STM-1c/STM-4c), 2-port, multi-mode, 1300nm, TeraMetrics ATM OC3cOC12c (STM-1c/STM-4c), 2-port, single mode, 1310nm, TeraMetrics 10/100Base-T Ethernet, 6-port, SmartMetrics 10/100Base-T Ethernet, 2-port, SmartMetrics 100Base-FX Ethernet, 6-port, multi-mode, 1300nm, SmartMetrics 100Base-FX Ethernet, 6-port, single mode, 1310nm, SmartMetrics 10/100/1000Base-T Ethernet, Copper, 2-port, SmartMetrics 10/100/1000Base-T, Copper, 2-port, TeraMetrics 10/100Base-TX Ethernet, Copper, 2-port, TeraMetrics 10/100Base-TX Ethernet, Copper, 4-port, TeraMetrics 1000Base-X Ethernet, GBIC, 2-port, SmartMetrics 1000Base-X Ethernet, GBIC, 2-port, TeraMetrics

SmartBits 200/2000

SmartBits 600x/6000x

ML-5710A ATM-3451A ATM-3451As ATM-3453A ATM-3453As LAN-3101A/B LAN-3102A LAN-3111A LAN-3111AS LAN-3300A LAN-3301A LAN-3302A LAN-3306A LAN-3310A LAN-3311A

496 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) Supported SmartCards and Modules

Table 10-1. Supported Cards and Modules: NS Commands (continued)


Chassis SmartCard or Module
LAN-3320A LAN-3321A LAN-3324A LAN-3325A LAN-3327A LAN-3710AE LAN-3710AL LAN-3710AS POS-3504AS/AR POS-3505AS/AR POS-3510A/AS POS-3511A/AS POS-3518AS/AR POS-3519AS/AR XLW-3720A XLW-3721A XFP-3730A XFP-3731A

Description
10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 2-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, SmartMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 4-port, TeraMetrics XD 10/100/1000 Mbps and Gigabit Ethernet Fiber, 1-port, TeraMetrics XD 10GBase-ER Ethernet, 1-port, 2-slot, single mode, 1550nm 10GBase-LR Ethernet, 1-port, 2-slot, single mode, 1310nm 10GBase-SR Ethernet, 1-port, 2-slot, single mode, 850nm POS OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, TeraMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/1310nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode/single mode, 1300/1310nm, TeraMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310/1550nm, SmartMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310/1550nm, TeraMetrics 10GBase-Ethernet XENPAK MSA, 1-port, 2-slot, SmartMetrics 10GBase-Ethernet XENPAK MSA, 1-port, 2-slot, TeraMetrics 10GBase-Ethernet XFP MSA, 1-port, 1-slot, SmartMetrics 10GBase-Ethernet XFP MSA, 1-port, 1-slot, TeraMetrics

SmartBits 200/2000

SmartBits 600x/6000x

Note: Some of the NS Commands do not function with all cards and modules described in this table. Refer to the Command Description for specific hardware compatibility issues.

SmartLibrary Command Reference: Volume 2 | 497

Chapter 10: Universal (NS) NS HTSetStructure Summary Table

NS HTSetStructure Summary Table


Table 10-2. NS HTSetStructure Summary Table
iType 1
NS_ALTERNATE_KEY_CONFIG See Page 512 NS_ALTERNATE_KEY_HASH_CONFIG See Page 516 NS_ARP_CONFIG See Page 519 NS_CAPTURE_SETUP See Page 529 NS_CT_CONFIG See Page 538 NS_CREATE_SUBPROCESS See Page 537 NS_DEFINE_IPV6_EXT_AUTHENTICATION See Page 539 NS_DEFINE_IPV6_EXT_DESTINATION See Page 541 NS_DEFINE_IPV6_EXT_ESP See Page 542 0 0 0 NSIPv6ExtESP 0 0 0 NSIPv6ExtDestination 0 0 0 NSIPv6ExtAuthentication 0 0 0 NSCreateSubprocess 0 0 0 NSCTConfig Inject CRC errors into frames. Create a new subprocess or on-board application. Define one or more IPv6 Authentication Extension headers. Define one or more IPv6 Destination Extension headers. Define one or more IPv6 Encapsulated Security Payload Extension headers. Define one or more IPv6 Fragment Extension headers. Define one or more IPv6 Hop-by-Hop Extension headers. Define one or more IPv6 Routing Extension headers. Create one or more IPv4 streams to be used to encapsulate existing IPv6 streams. 0 0 0 NSCaptureSetup Set up capture parameters. 0 0 0 NSARPConfig 0 0 0 NSAlternateKeyHashConfig

2
0

3
0

4
0

pData
NSAlternateKeyConfig

Description
Configure an alternate key to use in grouping frames for statistical purposes. Configure an alternate key hash. Set the ARP mode.

NS_DEFINE_IPV6_EXT_FRAGMENT See Page 544 NS_DEFINE_IPV6_EXT_HOP_BY_HOP See Page 545 NS_DEFINE_IPV6_EXT_ROUTING See Page 546 NS_DEFINE_IPV6_OVER_IPV4_TUNNELING See Page 548

NSIPv6ExtFragment

NSIPv6ExtHopByHop

NSIPv6ExtRouting

NSIPv6OverIPv4Tunneling

498 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS HTSetStructure Summary Table

Table 10-2. NS HTSetStructure Summary Table (continued)


iType 1
NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELI NG See Page 550 NS_DESTROY_SUBPROCESS See Page 552 NS_DIFF_SERV See Page 552 NS_DIFF_SERV_CONFIG See Page 553 NS_DIFF_SERV_V2_CONFIG See Page 558 NS_DOT1X_DOWNLOAD_CERTIFICATE_FILES See Page 564 NS_DOT1X_SUPPLICANT_CONFIG See Page 565 NS_DOT1X_SUPPLICANT_CONTROL See Page 571 NS_DOT1X_SUPPLICANT_COPY See Page 573 NS_DOT1X_SUPPLICANT_FILL See Page 574 NS_DOT1X_SUPPLICANT_MODIFY See Page 577 NS_DOT1X_SUPPLICANT_PORT_CONFIG See Page 582 NS_HIST_COMBO_PER_STREAM See Page 602 NS_HIST_ENHANCED_LATENCY_OPTION See Page 604 NS_HIST_LATENCY_DIST_PER_STREAM See Page 608 NS_HIST_LATENCY_OPTION See Page 611 0 0 0 0 0 0 NSHistLatencyDistPer Stream NSHistLatencyOption 0 0 0 NSHistEnhancedLatencyOption 0 0 0 NSHistComboPerStream 0 0 0 NSDOT1XSupplicantPortConfig Port configuration for supplicants. Set up combination histogram tracking. Configure port to track latency type. Set up Latency Distribution per stream histogram tracking. Configure a port to track either minimum or total latency in latency histogram tests. 0 0 0 NSDOT1XSupplicantModify 0 0 0 NSDOT1XSupplicantFill 0 0 0 NSDOT1XSupplicantCopy 0 0 0 NSDOT1XSupplicantControl Perform an action on supplicants. Copy configuration of one supplicant to another. Increment a parameter for one or more supplicants. Modify supplicants. 0 0 0 NSDOT1XSupplicantConfig 0 0 0 NSDOT1XDownloadCertificateFiles 0 0 0 NSDiffServV2Config 0 0 0 NSDiffServConfig 0 0 0 NSDiffServ Set up DiffServ parameters. Configure DiffServ settings. Configure Differentiated Services. Download Certificate, Key, and Random files. Configure supplicants. 0 0 0 ULong

2
<x>

3
<c>

4
0

pData
NSIPv6OverIPv4Tunneling

Description
Create one or more IPv6-over-IPv4 tunneled streams based on an existing tunneled stream. Destroy a subprocess.

SmartLibrary Command Reference: Volume 2 | 499

Chapter 10: Universal (NS) NS HTSetStructure Summary Table

Table 10-2. NS HTSetStructure Summary Table (continued)


iType 1
NS_HIST_LATENCY_OVER_TIME See Page 613 NS_HIST_MULTICAST_LATENCY_PER_STREAM See Page 615 0 0 0 NSHistLatencyDistPer Stream

2
0

3
0

4
0

pData
NSHistLatencyOverTime

Description
Set up Latency Distribution per stream histogram tracking. Specify and activate MulticastIP Latency Distribution histogram with first and last Receive timestamp. Configure the port.

NS_HW_CONFIG See Page 619 NS_IGMP_CONFIG See Page 621 NS_IGMP_JOIN See Page 623 NS_IGMP_JOIN_VLAN See Page 625 NS_IGMP_LEAVE See Page 626 NS_IGMP_LEAVE_VLAN See Page 627 NS_IGMPV2_JOIN See Page 631 NS_IGMPV2_LEAVE See Page 633 NS_IGMPV3_CONFIG See Page 636 NS_IGMPV3_GROUP_CONFIG See Page 640 NS_IGMPV3_GROUP_MOD See Page 644 NS_IP_OPTION_CONFIG See Page 649 NS_IPV4_PROTOCOL_HEADER_INFO See Page 651 NS_IPV6_CONFIG See Page 649

NSHWConfig

NSIGMPConfig

Configure and initialize the IGMP protocol stack. Join multicast group.

NSIGMPAddress

NSIGMPAddressVLAN

Join multicast group with VLAN tags. Leave multicast group.

NSIGMPAddress

NSIGMPAddressVLAN

Leave multicast group with VLAN tags. Join one or more multicast groups for IGMPv1 or IGMPv2. Leave a multicast group for IGMPv1 or IGMPv2. Initialize and configure the IGMP stack. Set the interface for one or more multicast groups. Modify an existing multicast group, or add a multicast group. Set up IP options.

NSIGMPv2GroupID

NSIGMPv2GroupID

NSIGMPv3Config

NSIGMPv3GroupConfig

NSIGMPv3GroupMod

NSIPOptions

NSIPv4Header

Retrieve IPv4 Protocol information for a stream. Configure the IPv6 protocol stack.

NSIPv6Config

500 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS HTSetStructure Summary Table

Table 10-2. NS HTSetStructure Summary Table (continued)


iType 1
NS_IPV6_PROTOCOL_HEADER_INFO See Page 667 NS_LINK_FAULT_CONFIG See Page 683 NS_MLD_CLEAR_COUNTERS See Page 687 NS_MLDV1_LISTEN See Page 696 NS_MLDV2_GROUP_CONFIG See Page 698 NS_MLDV2_GROUP_MOD See Page 700 0 0 0 NSMLDv2GroupMod 0 0 0 NSMLDv2GroupConfig 0 0 0 NSMLDv1Listen 0 0 0 NSMLDConfig 0 0 0 NSLinkFaultConfig

2
0

3
0

4
0

pData
NSIPv6Header

Description
Retrieve IPv6 Protocol information for a stream. Configure/Clear Remote and Local Faults for XFP test modules. Initialize and configure the MLD stack. Specify one or more multicast addresses to start or stop listening. Configures an interface for one or more multicast groups. Modify an existing multicast group, or add a new multicast group if the multicast group or interface is new. Configures the Type and the Destination Address fields for Multicast Listener Report. Modify one stream at a given index with IPv6 Authentication Extension header. Modify one stream at a given index with IPv6 Destination Extension header. Modify one stream at a given index with IPv6 Encapsulation SeuExtension header. Modify one stream at a given index with IPv6 Fragment Extension header. Modify one stream at a given index with IPv6 Hop-by-Hop Extension header.

NS_MLDV2_LISTENER_REPORT_CONFIG See Page 702

NSMLDv2ListenerReport Config

NS_MOD_IPV6_EXT_AUTHENTICATION See Page 704

<x>

NSIPv6ExtAuthentication

NS_MOD_IPV6_EXT_DESTINATION See Page 706

<x>

NSIPv6ExtDestination

NS_MOD_IPV6_EXT_ESP See Page 707

<x>

NSIPv6ExtESP

NS_MOD_IPV6_EXT_FRAGMENT See Page 704

<x>

NSIPv6ExtFragment

NS_MOD_IPV6_EXT_HOP_BY_HOP See Page 710

<x>

NSIPv6ExtHopByHop

SmartLibrary Command Reference: Volume 2 | 501

Chapter 10: Universal (NS) NS HTSetStructure Summary Table

Table 10-2. NS HTSetStructure Summary Table (continued)


iType 1
NS_MOD_IPV6_EXT_ROUTING See Page 711 NS_MOD_IPV6_OVER_IPV4_TUNNELING See Page 713 <x> 0 0 NSIPv6OverIPv4Tunneling

2
<x>

3
0

4
0

pData
NSIPv6ExtRouting

Description
Modify one stream at a given index with IPv6 Routing Extension header. Modify the IPv4 protocol header of an existing IPv6-over-IPv4 tunneled stream at a specified index. Start and stop sending multicast Keep Alive packets. Configure OAM settings.

NS_MULTICAST_KEEP_ALIVE_CONFIG See Page 715 NS_OAM_CONFIG See Page 721 NS_OAM_PATTERN See Page 723 NS_PHY_CONFIG_INFO See Page 726 NS_PHY_DEFAULT_CONFIG See Page 728 NS_PORT_CONFIG See Page 733 NS_PORT_TRANSMIT See Page 735 NS_PROTOCOL_HEADER_INFO See Page 741 NS_REAL_TIME_TRACKING_RX_CONFIG See Page 744 NS_REAL_TIME_TRACKING_TX_CONFIG See Page 746 NS_RESOLVE_ARPS See Page 748 NS_RUNTIME_HIST_STATS_CONFIG See Page 748 NS_SIGNATURE_DETECT_MODE See Page 750

<x>

myNSMulticastKeepAliveConfig

NSOAMConfig

UChar

Set the OAM pattern.

NSPhyConfig

Retrieve Layer 2 protocol mode of operation. Set Phy default setting on the TM XD LAN port. Configure port settings.

NSPhyDefaultConfig

NSPortConfig

NSPortTransmit

Set up transmit parameters. Retrieve Protocol header information for a stream. Configure real-time tracking on Rx side. Configure real-time tracking on Tx side. Resolve ARPs for streams on a port. Specifies the stream ID's for Run-Time stats. Set detection mode for signature fields not right-aligned in incoming IP frames. Set up the stream schedule table.

NSProtocolHeaderInfo

NSRealTimeTracking Config NSRealTimeTrackingConfig

NSResolveArps

NSRunTimeHistStatsConfig

NSSignatureDetectMode

NS_STREAM_SCHEDULE See Page 755

NSStreamScheduleEntry

502 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS HTSetStructure Summary Table

Table 10-2. NS HTSetStructure Summary Table (continued)


iType 1
NS_TRANSMIT_PADDING_MODE See Page 763 NS_TRIGGER_CONFIG See Page 765 NS_WAIT_FOR_EVENT See Page 773 0 0 0 NSWaitForEvent Wait until all marked events have been completed or timeout occurs. Configure WAN Interface Sublayer. Write to MDIO register. 0 0 0 NSTrigger

2
0

3
0

4
0

pData
NSTransmitPaddingMode

Description
Set the mode for padding on the transmit frame. Configure triggers.

NS_WIS_CONFIG See Page 773 NS_WRITE_MDIO See Page 781

NSWISConfig

NSMDIORegister

SmartLibrary Command Reference: Volume 2 | 503

Chapter 10: Universal (NS) NS HTGetStructure Summary Table

NS HTGetStructure Summary Table


Table 10-3. NS HTGetStructure Summary Table
iType 1
NS_ALTERNATE_KEY_CONFIG_INFO See Page 514 NS_ALTERNATE_KEY_HASH_CONFIG_INFO See Page 518 NS_ARP_CONFIG_INFO See Page 522 NS_ARP_STATUS_INFO See Page 525 NS_CAPTURE_COUNT_INFO See Page 527 NS_CAPTURE_DATA_INFO See Page 528 NS_CAPTURE_STATS_INFO See Page 531 NS_CARD_HARDWARE_INFO See Page 533 NS_COUNTER_INFO See Page 534 NS_CT_CONFIG_INFO See Page 538 NS_DIFF_SERV_CONFIG_INFO See Page 554 NS_DIFF_SERV_COUNTER_INFO See Page 555 NS_DIFF_SERV_INFO See Page 556 NS_DIFF_SERV_RATE_INFO See Page 557 NS_DIFF_SERV_V2_CONFIG_INFO See Page 560 NS_DIFF_SERV_V2_COUNTER_INFO See Page 562 NS_DIFF_SERV_V2_RATE_INFO See Page 563 0 0 0 NSDiffServV2RateInfo 0 0 0 NSDiffServV2CounterInfo 0 0 0 NSDiffServV2Config 0 0 0 NSDiffServRateInfo 0 0 0 NSDiffServ 0 0 0 NSDiffServCounterInfo 0 0 0 NSDiffServConfig 0 0 0 NSCTConfig Retrieve cut-through configurations. Retrieve DiffServ settings. Get the DiffServ counter structure from the card. Get DiffServ counter information. Retrieve DiffServ rates. Retrieve Differentiated Services Configuration. Retrieve Differentiated Services Counters. Retrieve Differentiated Services Rates. 0 0 0 NSCounterInfo 0 0 0 NSCardHardwareInfo <x> 0 0 NSCaptureStatsInfo Get statistics about one or more captured frames. Get card hardware information. Retrieve port counters. 0 0 0 NSCaptureDataInfo 0 0 0 NSCaptureCountInfo 0 0 0 NSARPStatusInfo Query the ARP counters. Get the count of frames in the capture buffer. Get a captured frame. 0 0 0 0 0 0 NSAlternateKeyHash Config NSARPConfig

2
0

3
0

4
0

pData
NSAlternateKeyConfig

Description
Query the alternate key configuration. Query the alternate key hash configuration. Get the ARP mode.

504 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS HTGetStructure Summary Table

Table 10-3. NS HTGetStructure Summary Table (continued)


iType 1
NS_DOT1X_SUPPLICANT_CONFIG_INFO See Page 568 NS_DOT1X_SUPPLICANT_PORT_CONFIG_INFO See Page 586 NS_DOT1X_SUPPLICANT_SESSION_STATS_INFO See Page 590 NS_DOT1X_SUPPLICANT_STATS_INFO See Page 592 NS_DOT1X_SUPPLICANT_STATUS_INFO See Page 594 NS_DOT1X_SUPPLICANT_STATUS_SEARCH_INFO See Page 599 NS_HIST_COMBO_PER_STREAM_INFO See Page 603 NS_HIST_ACTIVE_TEST_INFO See Page 602 NS_HIST_ENHANCED_LATENCY_OPTION_INFO See Page 606 NS_HIST_LATENCY_DIST_PER_STREAM_INFO See Page 610 <x> 0 0 NSHistLatencyDistPerStreamInfo 0 0 0 NSHistEnhancedLatencyOption 0 0 0 <x> 0 0 NSHistComboPerStream Info Layer3HistActiveTest 0 0 0 NSDOT1XSupplicantStatusSearchInfo <x> <c> 0 NSDOT1XSupplicantStatusInfo <x> <c> 0 NSDOT1XSupplicantStatsInfo 0 0 0 NSDOT1XSupplicantSessionStatsInfo 0 0 0 NSDOT1XSupplicantPortConfig

2
<x>

3
<c>

4
0

pData
NSDOT1XSupplicantConfig

Description
Retrieve supplicant configuration. Retrieve port configuration for supplicants. Retrieve global supplicant statistics for a port. Retrieve statistics from supplicants. Retrieve status information for supplicants. Retrieve a field in the DOT1X status structure. Get combination histogram tracking records. Get number of histogram records and active histogram. Retrieve historgram latency settings. Get Latency Distribution per stream histogram tracking records. Retrieve histogram-related options. Retrieve Latency over Time histogram records. Specify/activate MulticastIP latency distribution histogram. Retrieve Raw Signature histogram information. Get Sequence histogram records.

NS_HIST_LATENCY_OPTION_INFO See Page 612 NS_HIST_LATENCY_OVER_TIME_INFO See Page 614 NS_HIST_MULTICAST_LATENCY_PER_STREAM_IN FO See Page 615 NS_HIST_RAW_SIGNATURE_INFO See Page 617 NS_HIST_SEQUENCE_PER_STREAM_INFO See Page 618

NSHistLatencyOption

<x>

NSHistLatencyOverTimeInfo

<x>

NSHistMulticastLatencyPerStream Info NSHistRawSignatureInfo

<x>

<x>

SmartLibrary Command Reference: Volume 2 | 505

Chapter 10: Universal (NS) NS HTGetStructure Summary Table

Table 10-3. NS HTGetStructure Summary Table (continued)


iType 1
NS_HW_CONFIG_INFO See Page 620 NS_IGMP_COUNTER_INFO See Page 622 NS_IGMP_GROUP_COUNT_INFO See Page 624 NS_IGMP_TIMESTAMP_INFO See Page 628 NS_IGMP_VLAN_TIMESTAMP_INFO See Page 628 0 0 0 NSIGMPVLANTimestampInfo 0 0 0 NSIGMPTimestampInfo 0 0 0 ULong 0 0 0 NSIGMPCounterInfo

2
0

3
0

4
0

pData
NSHWConfig

Description
Get the port configuration. Retrieve IGMP counter information. Returns the number of IGMP multicast groups on a port. Retrieve multicast group Join and Leave timestamps. Retrieve multicast VLAN-tagged group Join and Leave timestamps. Retrieve Join and Leave timestamps for all specified multicast groups (v1, v2). Retrieve Join and Leave timestamps for a specific multicast group (v1, v2). Retrieve Join and Leave timestamps for all multicast groups and interfaces. Retrieve Join and Leave timestamps for a specific multicast group and interface. Collect data for IGMPv3 only. Query the IPv6 protocol stack. Retrieve IPv6-related counters. Retrieve the number of IPv6 Next Hop Determination per port. Retrieve the results of IPv6 Next Hop Determination per stream.

NS_IGMPV2_ALL_INFO See Page 629

NSIGMPv2Info

NS_IGMPV2_INFO See Page 630

NSIGMPv2Info

NS_IGMPV3_ALL_GROUP_INFO See Page 634

NSIGMPv3GroupInfo

NS_IGMPV3_GROUP_INFO See Page 642

NSIGMPv3GroupInfo

NS_IGMPV3_STATS_INFO See Page 647 NS_IPV6_CONFIG_INFO See Page 649 NS_IPV6_COUNTER_INFO See Page 665 NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO See Page 666

0 0 0 0

0 0 0 0

0 0 0 0

NSIGMPv3StatsInfo NSIPv6Config NSIPv6CounterInfo NSIPv6NextHopResultsCountInfo

NS_IPV6_NEXT_HOP_RESULTS_INFO See Page 666

<x>

<c>

NSIPv6NextHopResultsInfo

506 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS HTGetStructure Summary Table

Table 10-3. NS HTGetStructure Summary Table (continued)


iType 1
NS_IPV6_RATE_INFO See Page 668 NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO See Page 669 0 0 0 NSIPv6RouterDiscoveryCountInfo

2
0

3
0

4
0

pData
NSIPv6RateInfo

Description
Retrieve IPv6-related rate counters. Retrieve the number of IPv6 Router Discovery information retrieved from Router Advertisements. Retrieve information from IPv6 Router Advertisements, excluding prefix information. Retrieve the number of IPv6 prefix information, per port, obtained from Router Advertisements. Retrieve prefix information obtained from IPv6 Router Advertisements, excluding prefix information. Retrieve the number of configured addresses currently stored. Retrieve the configured addresses for protocol streams. Retrieve the status of the IPv6 stack. Read back IPv6 stream data. Read back IPv6 stream data with VLAN tagging. Retrieve the type of fault present on the port. Retrieve information on all multicast groups. Retrieve MLD counter information.

NS_IPV6_ROUTER_DISCOVERY_INFO See Page 669

NSIPv6RouterDiscoveryInfo

NS_IPV6_ROUTER_PREFIX_COUNT_INFO See Page 671

NSIPv6RouterPrefixCountInfo

NS_IPV6_ROUTER_PREFIX_INFO See Page 672

<x>

<c>

NSIPv6RouterPrefixInfo

NS_IPV6_STATELESS_ADDRESS_COUNT_INFO See Page 673 NS_IPV6_STATELESS_ADDRESS_INFO See Page 674 NS_IPV6_STATUS_INFO See Page 675 NS_IPV6_STREAM_INFO See Page 679 NS_IPV6_STREAM_VLAN_INFO See Page 681 NS_LINK_FAULT_INFO See Page 684 NS_MLD_ALL_GROUP_INFO See Page 685 NS_MLD_COUNTER_INFO See Page 690

NSIPv6StatelessAddressCountInfo

NSIPv6StatelessAddressInfo

0 <x> <x>

0 0 0

0 0 0

NSIPv6StatusInfo StreamIPv6 StreamIPv6VLAN

<x>

NSLinkFaultInfo

0 0

0 0

0 0

NSMLDGroupInfo NSMLDCounterInfo

SmartLibrary Command Reference: Volume 2 | 507

Chapter 10: Universal (NS) NS HTGetStructure Summary Table

Table 10-3. NS HTGetStructure Summary Table (continued)


iType 1
NS_MLD_GROUP_COUNT_INFO See Page 691 NS_MLD_GROUP_INFO See Page 692 0 0 0 NSMLDGroupInfo

2
0

3
0

4
0

pData
ULong

Description
Returns the number of MLD multicast groups on a port. Retrieve group information for a specific multicast group. Retrieve MLD Join and Leave timestamps for all multicast groups. Retrieve report counters for a specific multicast group. Retrieve all TeraMetrics counters. Replaces:
NS_PROTOCOL_COUN TER _INFO NS_PROTOCOL_RATE_ INFO NS_COUNTER_INFO NS_RATE_INFO

NS_MLD_TIMESTAMP_INFO See Page 695

NSMLDTimestampInfo

NS_MLDV2_STATS_INFO See Page 702 NS_MULTI_COUNTER_INFO See Page 717

NSMLDv2StatsInfo

NSMultiCounterInfo

NS_OAM_COUNTER_INFO See Page 722 NS_OAM_RATE_INFO See Page 723 NS_PER_STREAM_COUNTER_INFO See Page 725 NS_PHY_DEFAULT_CONFIG_INFO See Page 730

0 0 0 0

0 0 0 0

0 0 0 0

NSOAMCounterInfo NSOAMRateInfo NSPerStreamCounterInfo NSPhyDefaultConfig

Retrieve OAM counter information. Retrieve OAM rate information. Get per-stream counter information. Read current PHY default configuration on the TM XD LAN port. Get port settings. Get transmit parameters. Get counters for a port from the card protocol stack. Get rates for a port from the card protocol stack.

NS_PORT_CONFIG_INFO See Page 734 NS_PORT_TRANSMIT_INFO See Page 738 NS_PROTOCOL_COUNTER_INFO See Page 740 NS_PROTOCOL_RATE_INFO See Page 742

0 0 0

0 0 0

0 0 0

NSPortConfigInfo NSPortTransmit NSProtocolCounterInfo

NSProtocolCounterInfo

508 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS HTGetStructure Summary Table

Table 10-3. NS HTGetStructure Summary Table (continued)


iType 1
NS_RATE_INFO See Page 743 NS_READ_MDIO_INFO See Page 744 NS_REAL_TIME_TRACKING_RX_COUNTERS See Page 745 NS_REAL_TIME_TRACKING_TX_COUNTERS See Page 746 NS_SIGNATURE_DETECT_MODE_INFO See Page 751 0 0 0 NSSignatureDetectMode 0 0 0 NSRealTimeTrackingTxCounters 0 0 0 NSRealTimeTrackingRxCounters 0 0 0 NSMDIORegister

2
0

3
0

4
0

pData
NSRateInfo

Description
Get rates for TeraMetrics modules. Read an MDIO register. Retrieve real-time tracking data on Rx side. Retrieve real-time tracking data on Tx side. Query the detection mode for signature fields that are not right-aligned in incoming IP frames. Retrieve the SONET alarms and counters. Retrieve the stream IDs being tracked on a port. Get the total entry of the stream schedule table from the card. Get the stream schedule table from the card. Determine type of stream. Read back TCP IPv6 stream data. Read back TCP IPv6 VLAN stream data. Query the mode for padding on the transmit frame. Retrieve trigger configuration. Read back UDP IPv6 stream data. Read back UDP IPv6 VLAN stream data.

NS_SONET_COUNTER_INFO See Page 752 NS_STREAM_ID_TABLE_INFO See Page 753 NS_STREAM_SCHEDULE_COUNT_INFO See Page 755 NS_STREAM_SCHEDULE_INFO See Page 756 NS_STREAM_TYPE_INFO See Page 757 NS_TCP_IPV6_STREAM_INFO See Page 758 NS_TCP_IPV6_STREAM_VLAN_INFO See Page 761 NS_TRANSMIT_PADDING_MODE_INFO See Page 764 NS_TRIGGER_CONFIG_INFO See Page 767 NS_UDP_IPV6_STREAM_INFO See Page 769 NS_UDP_IPV6_STREAM_VLAN_INFO See Page 771

0 0

0 0

0 0

NSSonetCounterInfo NSStreamIDTableInfo

ULong

NSStreamScheduleInfo

<x> <x> <x> 0

0 0 0 0

0 0 0 0

ULong StreamTCPIPv6 StreamTCPIPv6VLAN NSTransmitPaddingMode

0 <x> <x>

0 0 0

0 0 0

NSTrigger StreamUDPIPv6 StreamUDPIPv6VLAN

SmartLibrary Command Reference: Volume 2 | 509

Chapter 10: Universal (NS) NS HTGetStructure Summary Table

Table 10-3. NS HTGetStructure Summary Table (continued)


iType 1
NS_WIS_CONFIG_INFO See Page 771 NS_WIS_LINE_STATUS_INFO See Page 771 <x> 0 0 NSWISLineStatusInfo

2
<x>

3
0

4
0

pData
NSWISConfig

Description
Read back WAN Interface Sublayer settings. Retrieve WAN Interface Sublayer counters (events/rates)

510 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS HTSetCommand Summary Table

NS HTSetCommand Summary Table


Table 10-4. NS HTSetCommand Summary Table
iType 1
NS_CAPTURE_START See Page 531 NS_CAPTURE_STOP See Page 532 NS_COMMIT_CONFIG See Page 534 NS_DOT1X_SUPPLICANT_RESET See Page 589 NS_HIST_RAW_SIGNATURE See Page 616 NS_HIST_SEQUENCE_PER_STREAM See Page 617 NS_IGMP_CLEAR_COUNTERS See Page 627 NS_IGMP_RESET See Page 627 NS_IGMPV3_LEAVE_ALL See Page 646 NS_MLD_CLEAR_COUNTERS See Page 694 NS_MLD_RESET See Page 694 NS_MLD_STOP_LISTEN See Page 694 NS_REAL_TIME_TRACKING_RX_STOP See Page 746 NS_REAL_TIME_TRACKING_TX_STOP See Page 747 NS_WIS_LINE_STATUS_RESET See Page 747 0 0 0 0 0 0 0 0 0 0 0 0 Stop listening for all groups, MLDv1 and MLDv2. Stop real-time tracking on Rx side. Stop real-time tracking on Tx side. Clear WAN Interface Sublayer counters (events/rates). 0 0 0 0 0 0 Clear MLD port coutners and group statistics. Reset the MLD stack. 0 0 0 Leave all multicast groups. 0 0 0 0 0 0 0 0 0 Set up Sequence histogram tracking. Clear IGMP port counters and group statistics. Reset IGMP protocol stack. 0 0 0 0 0 0 0 0 0 Apply all stream configurations and schedule streams and VCs for transmission. Delete all supplicants and statistics on the port. Set up Raw Signature tracking. 0 0 0 Turn data capture off.

2
0

3
0

4
0

pData

Description
Turn data capture on.

SmartLibrary Command Reference: Volume 2 | 511

Chapter 10: Universal (NS) NS iType1 Commands and Structures

NS iType1 Commands and Structures


iType1 Description

NS_ALTERNATE_KEY_CONFIG
Configure an alternate key to use in grouping frames for statistical purposes. Note: This command currently applies only to the following TeraMetrics modules: LAN (including XENPAK), POS, and ATM. It applies per port.

C Usage

HTSetStructure(NS_ALTERNATE_KEY_CONFIG, 0, 0, 0, (void*) pNSAlternateKeyConfig, sizeof(NSAlternateKeyConfig), iHub, iSlot, iPort); HTSetStructure $NS_ALTERNATE_KEY_CONFIG 0 0 0 \ myNSAlternateKeyConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSAlternateKeyConfig

The Alternate Key and Hashing Algorithm provide the capability for applications to group received frames for statistical purposes. The grouping is accomplished by creating a key from data in the received frames and then using the key to lookup the index in a statistics table. The primary look up key for each received frame is the stream identifier from the signature field. Up to 16 bits of Alternate Key may be defined at a specified offset within the received frames. The primary and Alternate Keys are logically combined to from the look up key. The key mask shall not be protocol dependent. If the received frames contains multiple protocols, the statistics data collected will unreliable, as the key mask may not apply to a field for the different protocols. Note: On POS cards, the offset for the Alternate Key Mask is from the beginning of the two-byte Address/Control couplet (FF03), not from the beginning of the Protocol Bytes. This brings Alternate Key Mask offset into conformity with the existing convention of measuring offset for trigger and VFDs from the beginning of the FF03. typedef struct tagNSAlternateKeyConfig { unsigned long ulMode; /* Enable/disable Alternate Key with/without prefilter. NS_ALTERNATE_KEY_DISABLE = 0(default) NS_ALTERNATE_KEY_ENABLE NS_ALTERNATE_KEY_TRIG_PREFILTER NS_ALTERNATE_KEY_INVERSE_TRIG_PREFILTER */ unsigned long ulOffset; /* Offset in bytes from the byte offset 2 of the frame to the location of the alternate key. For POS modules, the byte offset starts from 4. */ unsigned long ulMask; /* Determines which bits from Alternate Key will overwrite bits in Lookup Key. Valid value is between 0x00000000 and 0x0000FFFF */ unsigned char ucReserved[20]; /* reserved for future use*/ } NSAlternateKeyConfig;

Continues >

512 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Comment

ulEnable enables Alternate Key. All other fields are ignored unless this is enabled. Values follow: NS_ALTERNATE_KEY_DISABLE Disable Alternate Key. NS_ALTERNATE_KEY_ENABLE Enable Alternate Key (without trigger prefiltering). NS_ALTERNATE_KEY_TRIG_PREFILTER Enable Alternate Key with trigger prefiltering. All incoming frames that match the trigger settings will be processed according to alternate key settings. NS_ALTERNATE_KEY_INVERSE_TRIG_PREFILTER Enable Alternate Key with inverse trigger prefiltering. All incoming frames that do not match the trigger settings will be processed according to alternate key settings. Two aspects (transmit and receive) are related to the Alternate Key feature. 1 Transmit Port Interface Although Alternate Key is strictly speaking a receive port feature, many applications will need to access related functionality on the transmit port as well. That is to write the desired value (if any) to the Lookup Key (sometimes called StreamID) in the signature field. The interface to this functionality already exists in the ucEnableCustomStreamID and ulCustomStreamID fields of the L3StreamExtension structure used with L3_DEFINE_STREAM_EXTENSION. 2 Receive Port Interface A. Alternate Key On the receive port, you can configure the Alternate Key settings (globally), as follows: The Alternate Key is four bytes (Dword) at a user-specified setback from the beginning of the incoming frame. The user specifies a 32-bit Mask. Bits set in this mask are used to determine which bits from the Alternate Key will be combined with bits in the 32-bit Lookup Key. Note that the lower 16 bits of the Lookup Key are the significant ones and in general most applications will use these lower 16bits only. B. Alternate Key with Trigger An interface already exists to set up triggers on the receive port. A new interface, described below, enables you to use the trigger functionality as a pre-filter ahead of Alternate Key. Three settings are possible: Disable Trigger pre-filter: All incoming frames will be processed according to Alternate Key settings. Enable Trigger pre-filter: All incoming frames that match the trigger settings will be processed according to Alternate Key settings. Enable Inverse Trigger pre-filter: All incoming frames that do not match the trigger settings will be processed. C. Related functionality An interface exists already to enable you to retrieve: The number of streams for which histogram(s) are available. This is available in the ulRecords field of the Layer3HistActiveTest structure. It is used in conjunction with the L3_HIST_ACTIVE_TEST_INFO message. The Stream ID (Lookup Key) field associated with the histogram. This field will have already been modified by the Alternate key. It is already available via the ulStreamID field of the structure corresponding to the histogram currently configured on the port (NSHistComboPerStreamInfo, NSHistLatencyDistPerStreamInfo, etc.)

SmartLibrary Command Reference: Volume 2 | 513

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_ALTERNATE_KEY_CONFIG_INFO
Query the alternate key configuration. Note: This command currently applies only to the following TeraMetrics modules: LAN (including XENPAK), POS, and ATM. It applies per port.

C Usage

HTGetStructure(NS_ALTERNATE_KEY_CONFIG_INFO, 0, 0, 0, (void*) pNSAlternateKeyConfig, sizeof(NSAlternateKeyConfig), iHub, iSlot, iPort); HTGetStructure $NS_ALTERNATE_KEY_CONFIG_INFO 0 0 0 \ myNSAlternateKeyConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSAlternateKeyConfig

The Alternate Key and Hashing Algorithm provide the capability for applications to group received frames for statistical purposes. The grouping is accomplished by creating a key from data in the received frames and then using the key to lookup the index in a statistics table. The primary look up key for each received frame is the stream identifier from the signature field. Up to 16 bits of Alternate Key may be defined at a specified offset within the received frames. The primary and Alternate Keys are logically combined to from the look up key. The key mask shall not be protocol dependent. If the received frames contains multiple protocols, the statistics data collected will unreliable, as the key mask may not apply to a field for the different protocols. Note: On POS cards, the offset for the Alternate Key Mask is from the beginning of the two-byte Address/Control couplet (FF03), not from the beginning of the Protocol Bytes. This brings Alternate Key Mask offset into conformity with the existing convention of measuring offset for trigger and VFDs from the beginning of the FF03. typedef struct tagNSAlternateKeyConfig { unsigned long ulMode; /* Enable/disable Alternate Key with/without prefilter. NS_ALTERNATE_KEY_DISABLE = 0(default) NS_ALTERNATE_KEY_ENABLE NS_ALTERNATE_KEY_TRIG_PREFILTER NS_ALTERNATE_KEY_INVERSE_TRIG_PREFILTER */ unsigned long ulOffset; /* Offset in bytes from the byte offset 2 of the frame to the location of the alternate key. For POS modules, the byte offset starts from 4. */ unsigned long ulMask; /* Determines which bits from Alternate Key will overwrite bits in Lookup Key. Valid value is between 0x00000000 and 0x0000FFFF */ unsigned char ucReserved[20]; /* reserved for future use*/ } NSAlternateKeyConfig;

Continues >

514 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Comment

ulEnable enables Alternate Key. All other fields are ignored unless this enabled. Values are as follows: NS_ALTERNATE_KEY_DISABLE Disable Alternate Key. NS_ALTERNATE_KEY_ENABLE Enable Alternate Key (without trigger prefiltering). NS_ALTERNATE_KEY_TRIG_PREFILTER Enable Alternate Key with trigger prefiltering. All incoming frames that match the trigger settings will be processed according to alternate key settings. NS_ALTERNATE_KEY_INVERSE_TRIG_PREFILTER Enable Alternate Key with inverse trigger prefiltering. All incoming frames that do not match the trigger settings will be processed according to alternate key settings. Two aspects (transmit and receive) are related to the Alternate Key feature. 1 Transmit Port Interface Although Alternate Key is strictly speaking a receive port feature, many applications will need to access related functionality on the transmit port as well. That is to write the desired value (if any) to the Lookup Key (sometimes called StreamID) in the signature field. The interface to this functionality already exists in the ucEnableCustomStreamID and ulCustomStreamID fields of the L3StreamExtension structure used with L3_DEFINE_STREAM_EXTENSION. 2 Receive Port Interface A. Alternate Key On the receive port, you can configure the Alternate Key settings (globally), as follows: The Alternate Key is four bytes (Dword) at a user-specified setback from the beginning of the incoming frame. The user specifies a 32-bit Mask. Bits set in this mask are used to determine which bits from the Alternate Key will be combined with bits in the 32-bit Lookup Key. Note that the lower 16 bits of the Lookup Key are the significant ones and in general most applications will use these lower 16bits only. B. Alternate Key with Trigger An interface already exists to set up triggers on the receive port. A new interface, described below, enables you to use the trigger functionality as a pre-filter ahead of Alternate Key. Three settings are possible: Disable Trigger pre-filter: All incoming frames will be processed according to Alternate Key settings. Enable Trigger pre-filter: All incoming frames that match the trigger settings will be processed according to Alternate Key settings. Enable Inverse Trigger pre-filter: All incoming frames that do not match the trigger settings will be processed.

Continues >

SmartLibrary Command Reference: Volume 2 | 515

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Comment
(continued)

C. Related functionality An interface exists already to enable you to retrieve: The number of streams for which histogram(s) are available. This is available in the ulRecords field of the Layer3HistActiveTest structure. It is used in conjunction with the L3_HIST_ACTIVE_TEST_INFO message. The Stream ID (Lookup Key) field associated with the histogram. This field will have already been modified by the Alternate key. It is already available via the ulStreamID field of the structure corresponding to the histogram currently configured on the port (NSHistComboPerStreamInfo, NSHistLatencyDistPerStreamInfo, etc.)

iType1 Description

NS_ALTERNATE_KEY_HASH_CONFIG
Configure the alternate key hash. Note: This command currently applies only to the following TeraMetrics modules: LAN (including XENPAK), POS, and ATM. It applies per port.

C Usage

HTSetStructure(NS_ALTERNATE_KEY_HASH_CONFIG, 0, 0, 0, (void*) pNSAlternateKeyHashConfig, sizeof(NSAlternateKeyHashConfig), iHub, iSlot, iPort); HTSetStructure $NS_ALTERNATE_KEY_HASH_CONFIG 0 0 0 \ myNSAlternateKeyHashConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSAlternateKeyHashConfig
Continues >

516 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Configure the Alternate Key Hash or query the configured Alternate Key Hash. The 32 bits of the Lookup Key are divided into two 16-bit regions: 16 care bits and 16 concern bits. We are primarily concerned with the 16 care bits as these are the ones that map in a useful and straightforward way to a histogram. The care bits in the existing 32-bit Lookup key are discontiguous. The least-significant byte of the Lookup Key contains 8 care bits normally used to encode the stream number. Another 8 discontiguous bits located in the third and fourth bytes are normally used to encode the Hub/Slot/Port. Although such an arrangement could have been left intact for Alternate Key, it was obviously more desirable to make all 16 bits contiguous. So the alternate key feature is being implemented to include hashing algorithm improvements in hardware whereby the 16 care bits will be contiguous. Note that two modes will be possible. When the card is in contiguous-hashing-bit mode, the 16 care will all be located contiguously in the first and second bytes. When the card is not in contiguous-hashing-bit mode, the old discontiguous arrangement of care bits will be in effect. Note also that in hardware, the switch to enable/disable the contiguous arrangement of care bits is independent of Alternate key. Note however that differences in the concern bit region can cause multiple histograms to be accumulated for frames whose care bit regions are identical. This is normally an unintentional side-effect. In order to avoid this possibility, a switch will be provided to zero-out the concern bit region of the Lookup Key. This zeroing out will be done after the alternate key has been anded-in to the Lookup Key. This means that the user will have three choices: 1. NS_LOOKUP_KEY_DISCONTIGUOUS: leave the old discondiguous hashing algorithm in effect. 2. NS_LOOKUP_KEY_CONTIGUOUS: enable the contiguous hashing algorithm without zeroing out the concern bit region. This means that all 32 bits can potentially impact the hashing in an unintended way. 3. NS_LOOKUP_KEY_CONTIGUOUS_16BIT_MAX: enable the contiguous hashing algorithm and zero-out the concern bit region. This means that only the 16 care bits will be used in the hashing algorithm and the possibility of unintended side-effects is eliminated. Note: Generally when using alternate key, applications should use the macros NS_LOOKUP_KEY_CONTIGUOUS_16BIT_MAX. This will limit the effective size of the Lookup Key to a maximum of 16 bits, zeroing-out or disabling the upper 16 "concern" bits on the receive port. typedef struct tagNSAlternateKeyHashConfig { unsigned long ulKeyArrangement; /* Determines whether the "care bits in the "Lookup Key" will be contiguous or discontiguous. NS_LOOKUP_KEY_CONTIGUOUS_16BIT_MAX NS_LOOKUP_KEY_DISCONTIGUOUS NS_LOOKUP_KEY_CONTIGUOUS */ unsigned char ucReserved[16]; /* reserved for future use */ } NSAlternateKeyHashConfig;

SmartLibrary Command Reference: Volume 2 | 517

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_ALTERNATE_KEY_HASH_CONFIG_INFO
Query the configured alternate key hash. Note: This command currently applies only to the following TeraMetrics modules: LAN (including XENPAK), POS, and ATM. It applies per port.

C Usage

HTGetStructure(NS_ALTERNATE_KEY_HASH_CONFIG_INFO, 0, 0, 0, (void*) pNSAlternateKeyHashConfig, sizeof(NSAlternateKeyHashConfig), iHub, iSlot, iPort); HTGetStructure $NS_ALTERNATE_KEY_HASH_CONFIG_INFO 0 0 0 \ myNSAlternateKeyHashConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSAlternateKeyHashConfig

Query the configured Alternate Key Hash or configure the Alternate Key Hash. The 32 bits of the Lookup Key are divided into two 16-bit regions: 16 care bits and 16 concern bits. We are primarily concerned with the 16 care bits as these are the ones that map in a useful and straightforward way to a histogram. The care bits in the existing 32-bit Lookup key are discontiguous. The least-significant byte of the Lookup Key contains 8 care bits normally used to encode the stream number. Another 8 discontiguous bits located in the third and fourth bytes are normally used to encode the Hub/Slot/Port. Although such an arrangement could have been left intact for Alternate Key, it was obviously more desirable to make all 16 bits contiguous. So the alternate key feature is being implemented to include hashing algorithm improvements in hardware whereby the 16 care bits will be contiguous. Note that two modes will be possible. When the card is in contiguous-hashing-bit mode, the 16 care will all be located contiguously in the first and second bytes. When the card is not in contiguous-hashing-bit mode, the old discontiguous arrangement of care bits will be in effect. Note also that in hardware, the switch to enable/disable the contiguous arrangement of care bits is independent of Alternate key. Note however that differences in the concern bit region can cause multiple histograms to be accumulated for frames whose care bit regions are identical. This is normally an unintentional side-effect. In order to avoid this possibility, a switch will be provided to zero-out the concern bit region of the Lookup Key. This zeroing out will be done after the alternate key has been anded-in to the Lookup Key. This means that the user will have three choices: 1. NS_LOOKUP_KEY_DISCONTIGUOUS: leave the old discondiguous hashing algorithm in effect. 2. NS_LOOKUP_KEY_CONTIGUOUS: enable the contiguous hashing algorithm without zeroing out the concern bit region. This means that all 32 bits can potentially impact the hashing in an unintended way. 3. NS_LOOKUP_KEY_CONTIGUOUS_16BIT_MAX: enable the contiguous hashing algorithm and zero-out the concern bit region. This means that only the 16 care bits will be used in the hashing algorithm and the possibility of unintended side-effects is eliminated. Note: Generally when using alternate key, applications should use the macros NS_LOOKUP_KEY_CONTIGUOUS_16BIT_MAX. This will limit the effective size of the Lookup Key to a maximum of 16 bits, zeroing-out or disabling the upper 16 "concern" bits on the receive port.

Continues >

518 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSAlternateKeyHashConfig { unsigned long ulKeyArrangement; /* Determines whether the "care bits in the "Lookup Key" will be contiguous or discontiguous. NS_LOOKUP_KEY_CONTIGUOUS_16BIT_MAX NS_LOOKUP_KEY_DISCONTIGUOUS NS_LOOKUP_KEY_CONTIGUOUS */ unsigned char ucReserved[16]; /* reserved for future use */ } NSAlternateKeyHashConfig;

iType1 Description C Usage

NS_ARP_CONFIG
Set the ARP mode. HTSetStructure(NS_ARP_CONFIG, 0, 0, 0, (void*) pNSARPConfig, sizeof(NSARPConfig), iHub, iSlot, iPort); HTSetStructure $NS_ARP_CONFIG 0 0 0 \ myNSARPConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSARPConfig

This command provides the ability for ARP requests to be sent using virtual stream/cyclic flow. Base streams can be defined using existing messages (e.g. L3_MOD_IP_STREAM/L3_DEFINE_IP_STREAM, etc.) Virtual streams/cyclic flows are created when varying IP/MAC address(s) of defined base stream(s) using existing VFD messages (e.g. L3_MOD_VFD, etc.). L3_SET_ARP_GAP can also be used to set ARP rate. NS_ARP_CONFIG with ucARPMode set to ARP_VIRTUAL_MODE(1), is used to enable virtual ARP Mode. L3_START_ARPS is used to start ARPS. L3_ARP_UNRESOLVED is used to Re-ARP streams whose intial ARP's didn't get resolved. Its used on base streams. VFD1 and VFD2 can be used to vary the Source IP, Destination IP and Source MAC of base stream. The possible combinations are: - Only Source IP - Source IP (VFD1) and Destination IP (VFD2) - Source IP (VFD1) and Source MAC (VFD2) The total number of virtual streams that can be supported per port is 4,096,000. If there is one original base stream, 4,000,000 virtual streams can be generated per port. If there are 2 original base streams, each stream can generate 2,048,000 virtual streams. If there are 512 original base streams, each stream can generate 8000 virtual streams.

Continues >

SmartLibrary Command Reference: Volume 2 | 519

Chapter 10: Universal (NS) NS iType1 Commands and Structures

NS_ARP_CONFIG supports the following options for NSVFD: - ucType - L3_VFD1 and L3_VFD2 - ucMode - L3_VFD_INCR - uiOffset - Source IP, Dest IP, Source MAC and - Dest MAC. - uiRange - 4 or 6 - ulCycleCount - the number of requests for each stream. - uiBlockCount - number of times ARP request will be sent for a particular virtual stream. The following fields are also supported: ucStepValue,ucStepShift, ucSunbetAware, ucSubnetMaskLength and ucPattern. ucEnableCarryChaining - not supported Note: The user should not send traffic after resolving NeigborDiscovery because it is not going to store received MAC addresses in virtual mode. Storing of MAC addresses is only done in Basic Mode. Address ranges should be mutually exclusive for source IP address. They should not overlap. For example: Base stream 1: 10.100.10.0 vfd (uiRange): vfd (uiBlockCount): vfd (ulCycleCount) vfd (ucStepValue) 1 1 10 10

The next base stream 2: should start from 10.100.10.101 Comments for IPv4 Cyclic ARP (ucARPMode) Base stream: A stream definition excluding its VFD or IP Manipulation Mode configuration. There exists only one base stream per stream definition. Virtual stream: A logical transmission entity created by VFD or IP Manipulation Mode configuration of a stream definition. There is no frame content modification caused by VFD (or IP Manipulation Mode) across frames that are generated by the same virtual stream. Instead, frame content modification is found across frames that are generated by different virtual streams of a single stream definition. For the LAN-3100A, 3101A/B, 3102A modules, one stream definition can have up to 2^16 - 1 virtual streams. Cyclic Stream: For a single stream definition, the user can vary the frame content from frame to frame by using a feature called Variable Field Definition (VFD) or another similar feature called IP Manipulation Mode that is included in each stream definition. Under usual circumstances, only one of these features is supported on a given module. For the modules that support VFD, there are 3 VFDs available in each stream definition, termed VFD1, VFD2 and VFD3. Here, VFD refers to VFD1 or VFD2, which are the same in nature. Each allows you to specify which portion of a frame should be modified and how it should be modified (step size, cycle count, increment, or decrement). IP Manipulation Mode is a VFD-like feature with predefined location(s) at which frame modification(s) can take place. Currently, the LAN-3100A, 3101A/B, 3102A only supports IP Manipulation Mode. A cyclic stream is a stream definition with VFD or IP Manipulation Mode feature enabled. A common application of cyclic streams is to simulate large number (up to 216-1) of source and/or destination nodes. If the cyclic stream ARP request feature is enabled(i.e. ucARPMode is set to ARP_VIRTUAL_MODE) and the L3_START_ARPS command is received, ARP requests from all the active base streams will be sent first and then followed by ARP requests from the virtual streams of the corresponding base streams. A virtual stream will send out an ARP request only when you choose to increment or decrement the base streams source IP address. If frame modification takes place at location(s) anywhere other than the source IP portion of a frame, only ARP request from the base stream will be sent.

Continues >

520 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

ARP reply packets from a DUT in response to the ARP request packets originated from base streams are processed in the same way as they were in previous releases. For ARP reply packets in response to the ARP requests originated from virtual streams, the module will keep track only of whether or not a particular virtual stream has received an ARP reply. The source MAC addresses of ARP reply packets in response to the ARP request packets originated from virtual streams will not be utilized. For the LAN-3101A/B modules, a cyclic stream that has received all of the ARP replies for its virtual streams and its base stream will have a resolved status; otherwise, an unresolved status will be set. This limitation does not apply for the TeraMetrics modules since these modules are capable of tracking each virtual stream individually. The resolved/unresolved status can be obtained with the NS_ARP_STATUS_INFO command. The L3_ARP_UNRESOLVED command can be used to re-send ARP requests for the streams that have an unresolved status. Comments for the TeraMetrics modules: Virtual streams/ cyclic flows are created when varying IP/MAC address(s) of defined base stream(s) using existing VFD messages (e.g. L3_MOD_VFD, etc.). VFD1 and VFD2 can be used to vary the Source IP, Destination IP and Source MAC of base stream. The possible combinations are: - Only Source IP - Source IP (VFD1) and Destination IP (VFD2) - Source IP (VFD1) and Source MAC (VFD2) The total number of virtual streams that can be supported per port is 4,096,000. If there is one original base stream, 4,000,000 virtual streams can be generated per port. If there are two original base streams, each stream can generate 2,048,000 virtual streams. If there are 512 original base streams, each stream can generate 8000 virtual streams. typedef struct tagNSARPConfig { unsigned char ucARPMode; unsigned char ucGratuitousARPEnable; unsigned char ucVLANARPMode;

/* ARP_NORMAL_MODE, ARP_VIRTUAL_MODE */ /* 0 to disable, 1 to enable */ /* Possible values: ARP_ALL_VLAN_TAG - ARP requests/replies will be sent/resolved with all vlan tags. ARP_INNER_VLAN_TAG - ARP requests/replies will be sent/resolved with the innermost vlan tag. Note: This field is currently only applicable for the TeraMetrics family of modules. */

unsigned char ucReserved[18]; } NSARPConfig;

SmartLibrary Command Reference: Volume 2 | 521

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_ARP_CONFIG_INFO
Retrieve information on the ARP mode. HTGetStructure(NS_ARP_CONFIG_INFO, 0, 0, 0, (void*) pNSARPConfig, sizeof(NSARPConfig), iHub, iSlot, iPort); HTGetStructure $NS_ARP_CONFIG_INFO 0 0 0 \ myNSARPConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSARPConfig

This command provides the ability for ARP requests to be sent using virtual stream/cyclic flow. Base streams can be defined using existing messages (e.g. L3_MOD_IP_STREAM/L3_DEFINE_IP_STREAM, etc.) Virtual streams/cyclic flows are created when varying IP/MAC address(s) of defined base stream(s) using existing VFD messages (e.g. L3_MOD_VFD, etc.). L3_SET_ARP_GAP can also be used to set ARP rate. NS_ARP_CONFIG with ucARPMode set to ARP_VIRTUAL_MODE(1), is used to enable virtual ARP Mode. L3_START_ARPS is used to start ARPS. L3_ARP_UNRESOLVED is used to Re-ARP streams whose intial ARP's didn't get resolved. Its used on base streams. VFD1 and VFD2 can be used to vary the Source IP, Destination IP and Source MAC of base stream. The possible combination are: - Only Source IP - Source IP(VFD1) and Destination IP(VFD2) - Source IP(VFD1) and Source MAC(VFD2) The total number of virtual streams that can be supported per port is 4,096,000. If there is one original base stream, 4,000,000 virtual streams can be generated per port. If there are 2 original base streams, each stream can generate 2,048,000 virtual streams and if there are 512 original base streams, each stream can generate 8000 virtual streams. NS_ARP_CONFIG supports the following options for NSVFD: - ucType - L3_VFD1 and L3_VFD2 - ucMode - L3_VFD_INCR - uiOffset - Source IP, Dest IP, Source MAC and - Dest MAC. - uiRange - 4 or 6 - ulCycleCount - the number of requests for each stream. - uiBlockCount - number of times ARP request will be sent for a particular virtual stream. The following fields are also supported: ucStepValue,ucStepShift, ucSunbetAware, ucSubnetMaskLength and ucPattern. ucEnableCarryChaining - not supported

Continues >

522 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Note: The user should not send traffic after resolving NeigborDiscovery because it is not going to store received MAC addresses in virtual mode. Storing of MAC addresses is only done in Basic Mode. Address ranges should be mutually exclusive for source IP address. They should not overlap. For example: Base stream 1: 10.100.10.0 vfd (uiRange): vfd (uiBlockCount): vfd (ulCycleCount) vfd (ucStepValue) 1 1 10 10

The next base stream 2: should start from 10.100.10.101. Comments for IPv4 Cyclic ARP (ucARPMode) Base stream: A stream definition excluding its VFD or IP Manipulation Mode configuration. There exists only one base stream per stream definition. Virtual stream: A logical transmission entity created by VFD or IP Manipulation Mode configuration of a stream definition. There is no frame content modification caused by VFD (or IP Manipulation Mode) across frames that are generated by the same virtual stream. Instead, frame content modification is found across frames that are generated by different virtual streams of a single stream definition. For the LAN-3100A, 3101A/B, 3102A modules, one stream definition can have up to 2^16 - 1 virtual streams. Cyclic Stream: For a single stream definition, the user can vary the frame content from frame to frame by using a feature called Variable Field Definition (VFD) or another similar feature called IP Manipulation Mode that is included in each stream definition. Under usual circumstances, only one of these features is supported on a given module. For the modules that support VFD, there are 3 VFDs available in each stream definition, termed VFD1, VFD2 and VFD3. Here, VFD refers to VFD1 or VFD2, which are the same in nature. Each allows you to specify which portion of a frame should be modified and how it should be modified (step size, cycle count, increment, or decrement). IP Manipulation Mode is a VFD-like feature with predefined location(s) at which frame modification(s) can take place. Currently, the LAN-3100A, 3101A/B, 3102A modules only supports IP Manipulation Mode. A cyclic stream is a stream definition with VFD or IP Manipulation Mode feature enabled. A common application of cyclic streams is to simulate large number (up to 216-1) of source and/or destination nodes. If the cyclic stream ARP request feature is enabled(i.e. ucARPMode is set to ARP_VIRTUAL_MODE) and the L3_START_ARPS command is received, ARP requests from all the active base streams will be sent first and then followed by ARP requests from the virtual streams of the corresponding base streams. A virtual stream will send out an ARP request only when you choose to increment or decrement the base streams source IP address. If frame modification takes place at location(s) anywhere other than the source IP portion of a frame, only ARP request from the base stream will be sent. ARP reply packets from a DUT in response to the ARP request packets originated from base streams are processed in the same way as they were in previous releases. For ARP reply packets in response to the ARP requests originated from virtual streams, the module will keep track only of whether or not a particular virtual stream has received an ARP reply. The source MAC addresses of ARP reply packets in response to the ARP request packets originated from virtual streams will not be utilized. For the LAN-3101A/B modules, a cyclic stream that has received all of the ARP replies for its virtual streams and its base stream will have a resolved status; otherwise, an unresolved status will be set. This limitation does not apply for the TeraMetrics modules since these modules are capable of tracking each virtual stream individually. The resolved/unresolved status can be obtained with the NS_ARP_STATUS_INFO command. The L3_ARP_UNRESOLVED command can be used to re-send ARP requests for the streams that have an unresolved status.

Continues >

SmartLibrary Command Reference: Volume 2 | 523

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Comments for the TeraMetrics modules: Virtual streams/ cyclic flows are created when varying IP/MAC address(s) of defined base stream(s) using existing VFD messages (e.g. L3_MOD_VFD, etc.). VFD1 and VFD2 can be used to vary the Source IP, Destination IP and Source MAC of base stream. The possible combinations are: - Only Source IP - Source IP (VFD1) and Destination IP (VFD2) - Source IP (VFD1) and Source MAC (VFD2) The total number of virtual streams that can be supported per port is 4,096,000. If there is one original base stream, 4,000,000 virtual streams can be generated per port. If there are two original base streams, each stream can generate 2,048,000 virtual streams. If there are 512 original base streams, each stream can generate 8000 virtual streams. typedef struct tagNSARPConfig { unsigned char ucARPMode; unsigned char ucGratuitousARPEnable; unsigned char ucVLANARPMode;

/* ARP_NORMAL_MODE, ARP_VIRTUAL_MODE */ /* 0 to disable, 1 to enable */ /* Possible values: ARP_ALL_VLAN_TAG - ARP requests/replies will be sent/resolved with all vlan tags. ARP_INNER_VLAN_TAG - ARP requests/replies will be sent/resolved with the innermost vlan tag. Note: This field is currently only applicable for the TeraMetrics family of modules. */

unsigned char ucReserved[18]; } NSARPConfig;

524 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_ARP_STATUS_INFO
Retrieve ARP and Neighbor Discovery counters. HTGetStructure(NS_ARP_STATUS_INFO, 0, 0, 0, (void*) pNSARPStatusInfo, sizeof(NSARPStatusInfo), iHub, iSlot, iPort); HTGetStructure $NS_ARP_STATUS_INFO 0 0 0 \ myNSARPStatusInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSARPStatusInfo

Use this command to query the ARP counters. Example: Before L3_START_ARPS has taken place: If the number of configured streams is 100 of 50 IPv4 streams and 50 IPv6 streams, then the ARP status counters will show: ulRequestsSent = 0 ulRequestsRecv = 0 ulRepliesSent = 0 ulRepliesRecv = 0 u64NeighborSolicitationSent.high = 0 u64NeighborSolicitationSent.low = 0 u64NeighborSolicitationRecv.high = 0 u64NeighborSolicitationRecv.low = 0 u64NeighborAdvertisementSent.high = 0 u64NeighborAdvertisementSent.low = 0 u64NeighborAdvertisementRecv.high = 0 u64NeighborAdvertisementRecv.low = 0 ulResolved = 0 ulUnresolved = 100 ulTotal = 100

Continues >

SmartLibrary Command Reference: Volume 2 | 525

Chapter 10: Universal (NS) NS iType1 Commands and Structures

After calling L3_START_ARPS, if only 45 ARP requests have been Resolved (meaning 25 replies have been received for IPv4 and 20 ulNeighborAdvertisementRecv ), then the ARP status counters will show: ulRequestsSent = 50 ulRequestsRecv = 0 ulRepliesSent = 0 ulRepliesRecv = 25 u64NeighborSolicitationSent.high = 0 u64NeighborSolicitationSent.low = 50 u64NeighborSolicitationRecv.high = 0 u64NeighborSolicitationRecv.low = 0 u64NeighborAdvertisementSent.high = 0 u64NeighborAdvertisementSent.low = 0 u64NeighborAdvertisementRecv.high = 0 u64NeighborAdvertisementRecv.low = 20 ulResolved = 45 ulUnresolved = 55 ulTotal = 100 NOTE: L3_ARP_UNRESOLVED can be used to re-ARP for streams whose initial ARPs did not get resolved. typedef struct tagNSARPStatusInfo { /* IPv4 */ unsigned long ulRequestsSent; unsigned long ulRequestsRecv; unsigned long ulRepliesSent; unsigned long ulRepliesRecv; /* IPv6 */ U64 u64NeighborSolicitationSent; /* Number of neighbor solicitations sent U64 u64NeighborSolicitationRecv; /* Number of neighbor solicitations received */ U64 u64NeighborAdvertisementSent; /* Number of neighbor advertisements sent */ U64 u64NeighborAdvertisementRecv; /* Number of neighbor advertisements received */ /* ARP status info for both IPv4 and IPv6 */ unsigned long ulResolved; /* Number of ARP requests and neighbor discovery that have been resolved */ unsigned long ulUnresolved; /* Number of ARP requests and neighbor that are still unresolved */ unsigned long ulTotal; /* Total number of ARP requests and neighbor discovery to be resolved */ */

/* /* /* /*

The The The The

number number number number

of of of of

ARP ARP ARP ARP

requests sent */ requests received */ replies sent */ replies received */

Continues >

526 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned long ulGratuitousRecv;

unsigned char ucReserved[60]; } NSARPStatusInfo;

/* Total number of gratuitous ARP packets (requests and replies) received that match a stream configured on the port */ /* Reserved for future use */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

iType1 Description C Usage

NS_CAPTURE_COUNT_INFO
Get the count of frames in the capture buffer. HTGetStructure(NS_CAPTURE_COUNT_INFO, 0, 0, 0, (void*) pNSCaptureCountInfo, sizeof(NSCaptureCountInfo), iHub, iSlot, iPort); HTGetStructure $NS_CAPTURE_COUNT_INFO 0 0 0 \ myNSCaptureCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCaptureCountInfo

typedef struct tagNSCaptureCountInfo { unsigned long ulCount; /* count of frames in capture buffer */ unsigned char ucReserved[16]; /* reserved */ } NSCaptureCountInfo;

SmartLibrary Command Reference: Volume 2 | 527

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_CAPTURE_DATA_INFO
Get a captured frame. HTGetStructure(NS_CAPTURE_DATA_INFO, 0, 0, 0, (void*) pNSCaptureDataInfo, sizeof(NSCaptureDataInfo), iHub, iSlot, iPort); HTGetStructure $NS_CAPTURE_DATA_INFO 0 0 0 \ myNSCaptureDataInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCaptureDataInfo

Retrieve a slice of captured frames. typedef struct tagNSCaptureDataInfo { unsigned long ulFrameIndex; /* the frame index (input) */ unsigned long ulByteOffset; /* if the total captured frame is greater than 2048, use this field as input to specify a byte offset greater than 0 to retrieve the rest of the frame (input)*/ unsigned long ulRequestedLength; /* the number of bytes of capture data to retrieve (input)*/ unsigned long ulRetrievedLength; /* the length of ucData filled with the contents of the captured frame*/ unsigned char ucReserved[16]; /* reserved */ unsigned char ucData[2048]; /* the captured frame data */ } NSCaptureDataInfo;

528 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_CAPTURE_SETUP
Set up capture parameters. HTSetStructure(NS_CAPTURE_SETUP, 0, 0, 0, (void*) pNSCaptureSetup, sizeof(NSCaptureSetup), iHub, iSlot, iPort); HTSetStructure $NS_CAPTURE_SETUP 0 0 0 \ myNSCaptureSetup \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCaptureSetup

See Card Support: NS_CAPTURE_SETUP Options on page 890 for information on support of the options for Events, Mode, and Length by SmartCards and modules. For ulCaptureEvents the LAN-3100A, SX-7410B and SX-7210 cards support only CAPTURE_EVENTS_CRC_ERRORS, CAPTURE_EVENTS_RX_TRIGGER, and CAPTURE_EVENTS_COLLISIONS. uiFilterFrameLength can only be used on LAN-3710AL/AE/AS when CAPTURE_EVENTS_FILTER_LENGHT is enabled. Also for ulCaptureEvents, only the LAN-3710A/AE/AS supports CAPTURE_EVENTS_FILTER_FRAME_LEGNTH. GX-1405B/BS, GX-1420B, and LAN-3200A/As modules: Support only CAPTURE_EVENTS_CRC_ERRORS and CAPTURE_EVENTS_RX_TRIGGER. GX-1405B/BS, GX-1420B, and LAN-3200A/As cards: When capturing trigger frames the interframe gap must be at least 128ns. If the gap is set to a minimum of 96ns, the card will capture the frame following the trigger frame instead. For ulCaptureLength, only the LAN-3710AL/AE/AS cards support CAPTURE_LENGTH_1ST_128_BYTES and CAPTURE_LENGTH_LAST_128_BYTES. ATM-345xA(s) modules. These support the following capture modes: CAPTURE_MODE_FILTER_ON_EVENTS CAPTURE_MODE_START_ON_EVENTS They support the following capture lengths: CAPTURE_LENGTH_ENTIRE_FRAME CAPTURE_LENGTH_1ST_64_BYTES CAPTURE_LENGTH_LAST_64_BYTES CAPTURE_LENGTH_1ST_128_BYTES CAPTURE_LENGTH_LAST_128_BYTES CAPTURE_LENGTH_CUSTOM They support the following capture events: CAPTURE_EVENTS_RX_TRIGGER (trigger pattern must be set up within the first 48 bytes (cell) of the frame) CAPTURE_EVENTS_ALL_FRAMES

Continues >

SmartLibrary Command Reference: Volume 2 | 529

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSCaptureSetup { unsigned long ulCaptureMode;

/* start, stop, or filter on events CAPTURE_MODE_FILTER_ON_EVENTS CAPTURE_MODE_START_ON_EVENTS CAPTURE_MODE_STOP_ON_EVENTS */ /* use one of defined below CAPTURE_LENGTH_ENTIRE_FRAME CAPTURE_LENGTH_1ST_64_BYTES CAPTURE_LENGTH_LAST_64_BYTES CAPTURE_LENGTH_1ST_128_BYTES CAPTURE_LENGTH_LAST_128_BYTES CAPTURE_LENGTH_CUSTOM For AT-345xA(s) mod-

unsigned long

ulCaptureLength;

ules only */ /* capture events CAPTURE_EVENTS_CRC_ERRORS CAPTURE_EVENTS_UNDERSIZE CAPTURE_EVENTS_OVERSIZE CAPTURE_EVENTS_VLAN_TAG CAPTURE_EVENTS_IP_CHECKSUM_ERROR CAPTURE_EVENTS_DATA_INTEGRITY_ERROR CAPTURE_EVENTS_RX_TRIGGER CAPTURE_EVENTS_RUNNING_DISPARITY_ERRORS CAPTURE_EVENTS_ABORT CAPTURE_EVENTS_COLLISIONS CAPTURE_EVENTS_ALIGNMENT_ERRORS CAPTURE_EVENTS_OUT_OF_SEQUENCE CAPTURE_EVENTS_SIGNATURE CAPTURE_EVENTS_NO_SIGNATURE CAPTURE_EVENTS_FILTER_FRAME_LENGTH CAPTURE_EVENTS_OAM_FRAME_ONLY CAPTURE_EVENTS_IP_OPTION CAPTURE_EVENTS_ALL_FRAMES */ unsigned short uiFilterFrameLength; /* capture length filter frame; please include the CRC length(2 or 4 bytes) */ unsigned short uiCustomCaptureLength; /* Reserved for ATM-345xA(s) modules, specifies number of bytes to capture using with CAPTURE_LENGTH_CUSTOM */ unsigned char ucReserved[52]; /* reserved */ unsigned long ulCaptureEvents; }NSCaptureSetup;

Comments

To capture on a ATM-345xA(s) port, the virtual circuit must be configured in the ATVC structure as follows: - Set uxRxEnable = 1 - Set ucCaptureEnable = 1

530 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

NS_CAPTURE_START
Turn capture on. HTSetCommand(NS_CAPTURE_START, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_CAPTURE_START 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage

NS_CAPTURE_STATS_INFO
Get statistics about one or more captured frames. HTGetStructure(NS_CAPTURE_STATS_INFO, <index>, 0, 0, (void*) pNSCaptureStatsInfo, sizeof(NSCaptureStatsInfo), iHub, iSlot, iPort); HTGetStructure $NS_CAPTURE_STATS_INFO <index> 0 0 \ myNSCaptureStatsInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCaptureStatsInfo

This structure gets statistics about frames in the capture buffer. You can retrieve information for more than one frame by passing it an array of NSCaptureStatsInfo structures. For example, if the iType2 is 0 and the structure array size is 10, you will get capture information for frames 1 to 10. For ulStatus, the following bit value constants are supported: NS_CAPTURE_STATUS_UNDERSIZE NS_CAPTURE_STATUS_OVERSIZE NS_CAPTURE_STATUS_TRIGGER NS_CAPTURE_STATUS_CRC_ERROR NS_CAPTURE_STATUS_RUN_DISPARITYNS_CAPTURE_STATUS_DATA_INTEGRITY_ERROR NS_CAPTURE_STATUS_IP_CHECKSUM_ERROR NS_CAPTURE_STATUS_VLAN NS_CAPTURE_STATUS_ALIGNMENT_ERROR NS_CAPTURE_STATUS_SIGNATURE NS_CAPTURE_STATUS_DATA_INTEGRITY_MARKER

Continues >

SmartLibrary Command Reference: Volume 2 | 531

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSCaptureStatsInfo { unsigned long ulIndex; /* index of this frame */ unsigned long ulLength; /* length of the frame in bytes */ unsigned long ulStatus; /* bitmask of status for this frame */ U64 u64Timestamp; /* timestamp, in units of 1ns */ unsigned char ucPreambleCount;/* unsigned short uiVPI; /* unsigned short uiVCI; /* unsigned char ucReserved[15]; /* } NSCaptureStatsInfo; preamble reserved reserved reserved length in bits, for Ethernet cards */ */ */ */

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

iType1 Description C Usage Tcl Usage

NS_CAPTURE_STOP
Turn capture off. HTSetCommand(NS_CAPTURE_STOP, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_CAPTURE_STOP 0 0 0 \ "" \ $iHub $iSlot $iPort

532 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_CARD_HARDWARE_INFO
Get the card hardware structure. HTGetStructure(NS_CARD_HARDWARE_INFO, 0, 0, 0, (void*) pNSCardHardwareInfo, sizeof(NSCardHardwareInfo), iHub, iSlot, iPort); HTGetStructure $NS_CARD_HARDWARE_INFO 0 0 0 \ myNSCardHardwareInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCardHardwareInfo

Retrieve the hardware information for a card. typedef struct tagNSCardHardwareInfo { unsigned short ulRAMSize; /* for TeraMetrics modules, the size of RAM, in megabytes */ unsigned long ucSerialNumber[35]; /* for TeraMetrics modules, the serial number of the card */ unsigned char ucReserved[91]; /* reserved */ } NSCardHardwareInfo;

SmartLibrary Command Reference: Volume 2 | 533

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

NS_COMMIT_CONFIG
This command applies all stream configurations: schedules the streams and VCs for transmission for the ATM TeraMetrics modules (ATM-345x). It completes the configuration procedures. HTSetCommand(NS_COMMIT_CONFIG, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_COMMIT_CONFIG 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage

NS_COUNTER_INFO
Retrieve counter information. To generate collision errors when testing back-to-back, set the transmitting and receiving ports to half-duplex mode before transmitting. HTGetStructure(NS_COUNTER_INFO, 0, 0, 0, (void*) pNSCounterInfo, sizeof(NSCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_COUNTER_INFO 0 0 0 \ myNSCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCounterInfo
Continues >

See Table 10-5 on page 536 for support for counters by card type. This command is not supported on the LAN-3100 module.

534 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSCounterInfo { /* Fields supported by both LAN-310xA/B and Terametric cards */ U64 u64TxFrames; /* number of frames transmitted */ U64 u64RxFrames; /* number of frames received */ U64 u64TxBytes; /* number of bytes transmitted */ U64 u64RxBytes; /* number of bytes received */ U64 u64Undersize; /* number of undersize errors detected */ U64 u64Oversize; /* number of oversize errors detected */ U64 u64AlignError; /* number of alignment errors detected */ U64 u64CRCError; /* number of CRC errors */ U64 u64RxTriggers; /* number of triggers received */ U64 u64Collisions; /* number of collisions */ U64 u64RxJumboFrames; /* number of jumbo frames received */ unsigned long ulTxLatency; unsigned long ulRxLatency; /* Fields supported by only LAN-310xA/B */ U64 u64TxJumboFrames; /* number of jumbo frames transmitted */ /* Fields supported by only Terametric cards */ U64 u64TxTriggers; /* number of triggers received , supported on only Terametric cards */ U64 u64TxSignature; /* Tx Signature frame, only TM cards */ U64 u64RxSignature; /* Rx Signature frame, only TM cards */ U64 u64TxTimeStamp; /* Tx Time Stamp, only TM cards */ U64 u64RxTimeStamp; /* Rx Time Stamp, only TM cards */ U64 u64RxIPChecksumErrors; /* Rx IP Checksum errors */ unsigned char ucReserved[252]; }NSCounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

SmartLibrary Command Reference: Volume 2 | 535

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Card Support for NS_COUNTER_INFO (NSCounterInfo)


Table 10-5 lists the counters in NSCounterInfo and shows their support by module type.
Table 10-5. Card Support for NSCounterInfo
LAN-3101A, LAN-3101B LAN-3102A, LAN-3111A/AS LAN-3300A/3301A/3302A

XLW-372xA/XFP-373xA Y Y Y Y Y Y N Y Y N N Y Y N Y Y Y Y Y Y

LAN-3310A/3311A

LAN-3306A/332xA

Counter u64TxFrames u64RxFrames u64TxBytes u64RxBytes u64Undersize u64Oversize u64AlignError u64CRCError u64RxTriggers u64Collisions u64RxJumboFrames ulTxLatency ulRxLatency u64TxJumboFrames u64TxTriggers u64TxSignature u64RxSignature u64TxTimeStamp u64RxTimeStamp u64RxIPChecksumErrors Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N N N

Y Y Y Y Y Y N Y Y Y Y Y Y N Y Y Y Y Y Y

Y Y Y Y Y Y N Y Y N Y Y Y N Y Y Y Y Y Y

Y Y Y Y Y Y N Y Y Y Y Y Y N Y Y Y Y Y Y

Y Y Y Y N N N Y Y N Y Y Y N Y Y Y Y Y Y

536 |

SmartLibrary Command Reference: Volume 2

POS-3504As/AR POS-3505As/AR POS-3518As/AR POS-3519As/AR

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_CREATE_SUBPROCESS
Creates a new subprocess or on-board application. HTSetStructure(NS_CREATE_SUBPROCESS, 0, 0, 0, (void*) pNSCreateSubprocess, sizeof(NSCreateSubprocess), iHub, iSlot, iPort); HTSetStructure $NS_CREATE_SUBPROCESS 0 0 0 \ myNSCreateSubprocess \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCreateSubprocess

Set subprocess creation parameters. Creates a subprocess on a per-card basis, meaning that it ignores the port parameter of the HTSetStructure command. typedef struct tagNSCreateSubprocess { unsigned long ulUserID; unsigned long ulGroupID; unsigned short uiModuleID; unsigned long ulSharedMemKey; unsigned char ucCommand[1024]; unsigned char ucReserved[50]; unsigned long ulSubprocessHandle; } NSCreateSubprocess;

/* /* /* /* /*

user ID of subprocess */ group ID of subprocess */ module ID */ key for shared memory segment */ subprocess command line */

/* output */

SmartLibrary Command Reference: Volume 2 | 537

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_CT_CONFIG
Use this to inject CRC errors into frames from the cut-through channel. Note: This command is currently supported by LAN TeraMetrics modules only (LAN-33xx, XD, and XENPAK).

C Usage

HTSetStructure(NS_CT_CONFIG, 0, 0, 0, (void*) pNSCTConfig, sizeof(NSCTConfig), iHub, iSlot, iPort); HTSetStructure $NS_CT_CONFIG 0 0 0 \ myNSCTConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCTConfig
/* 1 - enable (inject CRC errors) 0 - reset CRC errors */

typedef struct tagNSCTConfig { unsigned char ucCRCErrorEnable; unsigned char ucReserved[64]; } NSCTConfig;

iType1 Description

NS_CT_CONFIG_INFO
Retrieve cut-through configurations. Note: This command currently applies only to LAN TeraMetrics modules (LAN-33xx, XD, and XENPAK).

C Usage

HTGetStructure(NS_CT_CONFIG_INFO, 0, 0, 0, (void*) pNSCTConfig, sizeof(NSCTConfig), iHub, iSlot, iPort); HTGetStructure $NS_CT_CONFIG_INFO 0 0 0 \ myNSCTConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSCTConfig
/* 1 - enable (inject CRC errors) 0 - disable CRC errors */

typedef struct tagNSCTConfig { unsigned char ucCRCErrorEnable; unsigned char ucReserved[64]; } NSCTConfig;

538 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DEFINE_IPV6_EXT_AUTHENTICATION
Define one or more IPv6 Authentication Extension headers (can be used with an array). HTSetStructure(NS_DEFINE_IPV6_EXT_AUTHENTICATION, 0, 0, 0, (void*) pNSIPv6ExtAuthentication, sizeof(NSIPv6ExtAuthentication), iHub, iSlot, iPort); HTSetStructure $NS_DEFINE_IPV6_EXT_AUTHENTICATION 0 0 0 \ myNSIPv6ExtAuthentication \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtAuthentication

This command provides the ability to define IPv6 Authentication Extension headers for existing (already defined) IPv6 Streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The IP Authentication Header (AH) is used to provide connectionless integrity and data origin authentication for IP datagrams, and to provide protection against replays. The protocol immediately preceding the AH header will contain the value 51 in its Protocol (IPv4) or Next Header (IPv6, Extension) field. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics). For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6). Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

Continues >

SmartLibrary Command Reference: Volume 2 | 539

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6ExtAuthentication { unsigned char ucNextHeader; /* Identifies the type of header immediately following the Authentication header */ unsigned char ucHeaderExtensionLength;/*Length of AH in 4-byte units, including all fields */ unsigned long ulSPI; /* Security Parameters index, an arbitrary value that, in combination with the destination IP address and security protocol (AH), uniquely identifies the security association for this packet */ unsigned long ulSeqNumber; /* Monotonically increasing counter value (sequence number). In the current implementation, the field does not increment with each packet; it is a static value configured by user. Or user may enable a VFD field to do the incrementation. */

unsigned char ucAuthenticationDataLength;/* Length of Authenication Data field */ unsigned char ucAuthenticationData[255];/* Contains the Integrity Check Value (ICV) for this packet */ unsigned char ucReserved[20]; }NSIPv6ExtAuthentication;

540 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DEFINE_IPV6_EXT_DESTINATION
Define one or more IPv6 Destination Extension headers (can be used with an array). HTSetStructure(NS_DEFINE_IPV6_EXT_DESTINATION, 0, 0, 0, (void*) pNSIPv6ExtDestination, sizeof(NSIPv6ExtDestination), iHub, iSlot, iPort); HTSetStructure $NS_DEFINE_IPV6_EXT_DESTINATION 0 0 0 \ myNSIPv6ExtDestination \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtDestination

This command provides the ability to define IPv6 Destination Extension headers for existing (already defined) IPv6 Streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The Destination Options header is used to carry optional information that need be examined only by a packet's destination node(s). The Destination Options header is identified by a Next Header value of 60 in the immediately preceding header. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics). For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6). Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

typedef struct tagNSIPv6ExtDestination { unsigned char ucNextHeader;

/* Identifies the type of header immediately following the Destination header */ unsigned char ucHeaderExtensionLength;/* Length of the Destination header in 8-byte units, including all fields */ unsigned char ucOptionDataLength; unsigned char ucOptionData[255]; /* Length of the Option Data field of to be used, in bytes */ /* Option-Type-specific data*/

unsigned char ucReserved[20]; }NSIPv6ExtDestination;

SmartLibrary Command Reference: Volume 2 | 541

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DEFINE_IPV6_EXT_ESP
Define one or more IPv6 Encapsulated security payload(ESP) Extension headers (can be used with an array). HTSetStructure(NS_DEFINE_IPV6_EXT_ESP, 0, 0, 0, (void*) pNSIPv6ExtESP, sizeof(NSIPv6ExtESP), iHub, iSlot, iPort); HTSetStructure $NS_DEFINE_IPV6_EXT_ESP 0 0 0 \ myNSIPv6ExtESP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtESP

If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. This command provides the ability to define IPv6 Encapsulated security payload(ESP) Extension headers for existing (already defined) IPv6 Streams. The Encapsulating Security Payload (ESP) header is designed to provide a mix of security services in and IPv6. ESP may be applied alone, in combination with the IP Authentication Header (AH), or in a nested fashion, e.g., through the use of tunnel mode. The protocol header immediately preceding the ESP header will contain the value 50. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics). For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6). Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

Continues >

542 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6ExtESP { unsigned char ucNextHeader; unsigned long ulSPI;

unsigned long ulSeqNumber;

/* Identifies the type of header immediately following the ESP header */ /* Security Parameters index, an arbitrary value that, in combination with the destination IP address and security protocol (ESP), uniquely identifies the security association for this packet */ /* Monotonically increasing counter value (sequence number). In the current implementation, the field does not increment with each packet; it is a static value configured by user. Or user may enable a VFD field to do the incrementation. */ /* The sender MAY add 0-255 bytes of padding. Inclusion of the Padding field in an ESP packet is optional, Note: for TeraMetrics LAN maximum accepted length is 74 bytes and for POS TM is 84 bytes */ /* Length in bytes of ucPadding */

unsigned char ucPadding[255];

unsigned char ucPaddingLength; unsigned char ucPayloadData[255];

/* A variable-length field containing data described by the Next Header field. The Payload Data field is mandatory and is an integral number of bytes in length */ unsigned char ucPayloadDataLength; /* Length of Payload Data field */ unsigned char ucAuthenticationData[255];/*contains the Integrity Check Value (ICV) for this packet */ unsigned char ucAuthenticationDataLength;/* Length of Authenication Data field */ unsigned char ucReserved[20]; }NSIPv6ExtESP;

SmartLibrary Command Reference: Volume 2 | 543

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DEFINE_IPV6_EXT_FRAGMENT
Define one or more IPv6 Fragment Extension headers (can be used with an array). HTSetStructure(NS_DEFINE_IPV6_EXT_FRAGMENT, 0, 0, 0, (void*) pNSIPv6ExtFragment, sizeof(NSIPv6ExtFragment), iHub, iSlot, iPort); HTSetStructure $NS_DEFINE_IPV6_EXT_FRAGMENT 0 0 0 \ myNSIPv6ExtFragment \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtFragment

This command provides the ability to define IPv6 Fragment Extension headers for existing (already defined) IPv6 Streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The Fragment header is used by an IPv6 source to send a packet larger than would fit in the path MTU to its destination. The Fragment header is identified by a Next Header value of 44 in the immediately preceding header. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics). For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6). Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

typedef struct tagNSIPv6ExtFragment { unsigned char ucNextHeader; unsigned short uiFragmentOffset;

/* Identifies the type of header immediately following the Fragment header */ /* The offset, in 8-byte units, of the data following this header is relative to the start of the Fragment-able Part of the original packet. */ /* 1 = more fragments; 0 = last fragment */ /* Unique Identification for packet that need to be fragmented*/

unsigned char ucMFlag; unsigned long ulIdentification; unsigned char ucReserved[20]; }NSIPv6ExtFragment;

544 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DEFINE_IPV6_EXT_HOP_BY_HOP
Define one or more IPv6 Hop-by-Hop Extension headers (can be used with an array). HTSetStructure(NS_DEFINE_IPV6_EXT_HOP_BY_HOP, 0, 0, 0, (void*) pNSIPv6ExtHopByHop, sizeof(NSIPv6ExtHopByHop), iHub, iSlot, iPort); HTSetStructure $NS_DEFINE_IPV6_EXT_HOP_BY_HOP 0 0 0 \ myNSIPv6ExtHopByHop \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtHopByHop

This command provides the ability to define IPv6 Hop-By-Hop Extension headers for existing (already defined) IPv6 streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The Hop-by-Hop Options header is used to carry optional information that must be examined by every node along the packet's delivery path. The Hop-by-Hop Options header is identified by Next Header value of 0 in the IPv6 header. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics) For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6) Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

typedef struct tagNSIPv6ExtHopByHop { unsigned char ucNextHeader; unsigned char

/* Identifies the type of header immediately following the Hop-by-Hop Options header */ ucHeaderExtensionLength;/* Length of the Hop-by-Hop Options header in 8-byte units, including all fields */ /* Length of the Option Data field of to be used, bytes */ /* Option-Type-specific data */

/* Options */ unsigned char ucOptionDataLength; unsigned char ucOptionData[255]; unsigned char ucReserved[20]; }NSIPv6ExtHopByHop;

SmartLibrary Command Reference: Volume 2 | 545

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DEFINE_IPV6_EXT_ROUTING
Define one or more IPv6 Routing Extension headers (can be used with an array). HTSetStructure(NS_DEFINE_IPV6_EXT_ROUTING, 0, 0, 0, (void*) pNSIPv6ExtRouting, sizeof(NSIPv6ExtRouting), iHub, iSlot, iPort); HTSetStructure $NS_DEFINE_IPV6_EXT_ROUTING 0 0 0 \ myNSIPv6ExtRouting \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtRouting

This command provides the ability to define IPv6 Routing(Type 0) Extension headers for existing (already defined) IPv6 Streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The Routing header is used by an IPv6 source to list one or more intermediate nodes to be "visited" on the way to a packet's destination. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics) For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6) Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

Continues >

546 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6ExtRouting { unsigned char ucNextHeader;

/* Identifies the type of header immediately following the Routing header */ unsigned char ucHeaderExtensionLength;/* Length of the Routing header In 8-byte units, including all fields */ unsigned char ucSegmentsLeft; /* Number of route segments remaining, i.e., number of explicitly listed intermediate nodes still to be visited before reaching the final destination */ NSIPv6Address IPAddress[20]; /* The maximum accepted number of addresses for TeraMetrics LAN cards and for TeraMetrics POS cards is 4 */ /* Number of addresses to use in IP Address */

unsigned char ucNumAddress; unsigned char ucReserved[20]; }NSIPv6ExtRouting;

Embedded Structure

NSIPv6Address

typedef struct tagNSIPv6Address { unsigned char ucIPAddress[16]; } NSIPv6Address;

SmartLibrary Command Reference: Volume 2 | 547

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DEFINE_IPV6_OVER_IPV4_TUNNELING
Create one or more IPv4 streams (packets) that will be used to encapsulate existing IPv6 streams (packets). Can be used with an array. HTSetStructure(NS_DEFINE_IPV6_OVER_IPV4_TUNNELING, 0, 0, 0, (void*) pNSIPv6OverIPv4Tunneling, sizeof(NSIPv6OverIPv4Tunneling), iHub, iSlot, iPort); HTSetStructure $NS_DEFINE_IPV6_OVER_IPV4_TUNNELING 0 0 0 \ myNSIPv6OverIPv4Tunneling \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6OverIPv4Tunneling

Tunneling is used to tunnel IPv6 datagrams over regions of IPv4 routing topology by encapsulating them within IPv4 packets. This structure holds IPv4 information to be used to encapsulate existing IPv6 streams. IPv6 streams should be defined first. If L3_DEFINE_XX_STREAM or L3_MOD_XX_STREAM is called on streams with IPv6-over-IPv4 tunneling, the streams will will be replaced. L3_DEFINE_MULTI_XX_STREAMS cannot be used on IPv6-over-IPv4 streams. Use NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING. ucIgnoreTunneling field is applicable only when NS_DEFINE_IPV6_OVER_IPV4_TUNNELING is used. Behavior For NS_DEFINE_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations: Non-IPv6 stream - Stream will be left untouched with no error returned. IPv6 stream - Stream will become tunneled. Tunneled stream - IPv4 part of tunneled stream will be replaced with new IPv4 configuration. Mixture of non-IPv6 and IPv6 streams - Non-IPv6 streams will be left untouched, IPv6 streams will be tunneled. Mixture of non-IPv6 and tunneled streams - Non-IPv6 streams will be left untouched, IPv4 portion of tunneled stream will be replaced. Mixture of IPv6 and tunneled streams - IPv6 streams will be tunneled, IPv4 portion of tunneled stream will be replaced. Mixture of non-IPv6, IPv6, and tunneled streams - Non-IPv6 streams will be left untouched, IPv6 streams will become tunneled, and IPv4 portion of tunneled stream will be replaced.

Continues >

548 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

For NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations (delta values are only applicable to IPv4 portion of the tunneled stream if command is successful): Base streams: Non-IPv6 streams - An error will be returned. IPv6 streams - An error will be returned. Tunneled streams - IPv4 portion of tunneled stream wil be copied. Destination streams: Non-IPv6 stream - Stream will be left untouched with no error returned. IPv6 stream - Stream will become tunneled. Mixture of non-IPv6 and IPv6 streams - Non-IPv6 streams will be left untouched, IPv6 streams will be tunneled. Mixture of non-IPv6 and tunneled streams - Non-IPv6 streams will be left untouched, IPv4 portion of tunneled stream will be replaced. For NS_MOD_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations: Non-IPv6 streams - An error will be returned. IPv6 stream - Stream will become tunneled. Tunneled stream - IPv4 part of tunneled stream will be replaced with new IPv4 configuration. typedef struct tagNSIPv6OverIPv4Tunneling { unsigned char ucIgnoreTunneling; /* specifies if tunneling should be enabled, 0 - (default) enable Tunneling, 1 - disable tunneling */ unsigned char ucTypeOfService; /* Used to indicate the quality of the service desired */ unsigned char ucTimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short uiInitialSequenceNumber;/* Initial sequence number */ unsigned char ucDestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char ucSourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char ucNetmask[4]; /* Network Mask (e.g. 255.255.0.0) */ unsigned char ucGateway[4]; /* Gateway addr (e.g. 192.100.1.1) */ unsigned char ucReserved[64]; }NSIPv6OverIPv4Tunneling;

SmartLibrary Command Reference: Volume 2 | 549

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING
Craete one or more IPv6-over-IPv4 tunneled streams based on an existing tunneled stream. The index is the stream to copy and count is the number of streams to create. HTSetStructure(NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING, <index>, <count>, 0, (void*) pNSIPv6OverIPv4Tunneling, sizeof(NSIPv6OverIPv4Tunneling), iHub, iSlot, iPort); HTSetStructure $NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING <index> <count> 0 \ myNSIPv6OverIPv4Tunneling \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6OverIPv4Tunneling

Tunneling is used to tunnel IPv6 datagrams over regions of IPv4 routing topology by encapsulating them within IPv4 packets. This structure holds IPv4 information to be used to encapsulate existing IPv6 streams. IPv6 streams should be defined first. If L3_DEFINE_XX_STREAM or L3_MOD_XX_STREAM is called on streams with IPv6-over-IPv4 tunneling, the streams will will be replaced. L3_DEFINE_MULTI_XX_STREAMS cannot be used on IPv6-over-IPv4 streams. Use NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING. ucIgnoreTunneling field is applicable only when NS_DEFINE_IPV6_OVER_IPV4_TUNNELING is used. Behavior For NS_DEFINE_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations: Non-IPv6 stream - Stream will be left untouched with no error returned. IPv6 stream - Stream will become tunneled. Tunneled stream - IPv4 part of tunneled stream will be replaced with new IPv4 configuration. Mixture of non-IPv6 and IPv6 streams - Non-IPv6 streams will be left untouched, IPv6 streams will be tunneled. Mixture of non-IPv6 and tunneled streams - Non-IPv6 streams will be left untouched, IPv4 portion of tunneled stream will be replaced. Mixture of IPv6 and tunneled streams - IPv6 streams will be tunneled, IPv4 portion of tunneled stream will be replaced. Mixture of non-IPv6, IPv6, and tunneled streams - Non-IPv6 streams will be left untouched, IPv6 streams will become tunneled, and IPv4 portion of tunneled stream will be replaced.

Continues >

550 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

For NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations (delta values are only applicable to IPv4 portion of the tunneled stream if command is successful): Base streams: Non-IPv6 streams - An error will be returned. IPv6 streams - An error will be returned. Tunneled streams - IPv4 portion of tunneled stream wil be copied. Destination streams: Non-IPv6 stream - Stream will be left untouched with no error returned. IPv6 stream - Stream will become tunneled. Mixture of non-IPv6 and IPv6 streams - Non-IPv6 streams will be left untouched, IPv6 streams will be tunneled. Mixture of non-IPv6 and tunneled streams - Non-IPv6 streams will be left untouched, IPv4 portion of tunneled stream will be replaced. For NS_MOD_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations: Non-IPv6 streams - An error will be returned. IPv6 stream - Stream will become tunneled. Tunneled stream - IPv4 part of tunneled stream will be replaced with new IPv4 configuration. typedef struct tagNSIPv6OverIPv4Tunneling { unsigned char ucIgnoreTunneling; /* specifies if tunneling should be enabled, 0 - (default) enable Tunneling, 1 - disable tunneling */ unsigned char ucTypeOfService; /* Used to indicate the quality of the service desired */ unsigned char ucTimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short uiInitialSequenceNumber;/* Initial sequence number */ unsigned char ucDestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char ucSourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char ucNetmask[4]; /* Network Mask (e.g. 255.255.0.0) */ unsigned char ucGateway[4]; /* Gateway addr (e.g. 192.100.1.1) */ unsigned char ucReserved[64]; }NSIPv6OverIPv4Tunneling;

SmartLibrary Command Reference: Volume 2 | 551

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DESTROY_SUBPROCESS
Destroys a subprocess. HTSetStructure(NS_DESTROY_SUBPROCESS, 0, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTSetStructure $NS_DESTROY_SUBPROCESS 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ULong

iType1 Description C Usage

NS_DIFF_SERV
Set up DiffServ parameters. HTSetStructure(NS_DIFF_SERV, 0, 0, 0, (void*) pNSDiffServ, sizeof(NSDiffServ), iHub, iSlot, iPort); HTSetStructure $NS_DIFF_SERV 0 0 0 \ myNSDiffServ \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServ

typedef struct tagNSDiffServ { unsigned char ucEnableOffsetFromIP; */ unsigned short unsigned char uiByteOffset; ucDestinationIP[4];

/* TRUE diffserv bytes are from IP header FALSE diffserv bytes are from start of frame /* Offset in bytes for tracking DiffServ Counters - 2 bytes */ /* Non Zero value: Only frames whose SmartMetrics Destination IP address field match value in DiffServsDestIP will cause an update of the DiffServCounters.*/ /* Zero Value: All frames which are long enough to include the specified offset value in BytesOffset will be used for updating the DiffServ Counters.*/

unsigned char } NSDiffServ;

ucReserved[20];

552 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_CONFIG
Configure DiffServ settings. HTSetStructure(NS_DIFF_SERV_CONFIG, 0, 0, 0, (void*) pNSDiffServConfig, sizeof(NSDiffServConfig), iHub, iSlot, iPort); HTSetStructure $NS_DIFF_SERV_CONFIG 0 0 0 \ myNSDiffServConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServConfig

DiffServ is a feature used to track frames based upon the value of one byte in the frame. This feature provides a set of 256 counters and rates that can be retrieved using the NS_DIFF_SERV_COUNTER_INFO and NS_DIFF_SERV_RATE_INFO commands, respectively. A common usage is to configure DiffServ to filter on the ToS field in the IP header. Each of the 256 counters and rates would correspond to the frames received with the matching ToS value. Note: The LAN-33xxA modules will automatically detect the ToS/CoS field in the incoming packets. The ucOffsetMode and ulOffset fields are not applicable to these modules. This structure is used to configure or retrieve the DiffServ settings on the port. Set ucEnable to 1 to start data collection. Since the data collection may be very expansive if the sampling rate is high, you should disable data collection when it is not needed.
typedef struct tagNSDiffServConfig { unsigned char ucEnable; /* Enable(1) or disable(0) traffic counter collection for rate calculation */ unsigned char ucOffsetMode; /* Specifies where ulOffset begins relative to the frame. Defined constants: OFFSET_FROM_START_OF_FRAME - Offset Starts from the beginning of the frame. OFFSET_FROM_IP_HEADER - Offset starts From the beginning of the IP header. */ unsigned long ulOffset; /* Offset to start data collection(in bytes) */ unsigned char ucIPAddress[4]; /* The destination IP address to filter on. */ unsigned char ucReserved[900]; /* Reserved */ } NSDiffServConfig;

SmartLibrary Command Reference: Volume 2 | 553

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_CONFIG_INFO
Retrieve DiffServ settings. HTGetStructure(NS_DIFF_SERV_CONFIG_INFO, 0, 0, 0, (void*) pNSDiffServConfig, sizeof(NSDiffServConfig), iHub, iSlot, iPort); HTGetStructure $NS_DIFF_SERV_CONFIG_INFO 0 0 0 \ myNSDiffServConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServConfig

DiffServ is a feature used to track frames based upon the value of one byte in the frame. This feature provides a set of 256 counters and rates that can be retrieved using the NS_DIFF_SERV_COUNTER_INFO and NS_DIFF_SERV_RATE_INFO commands, respectively. A common usage is to configure DiffServ to filter on the ToS field in the IP header. Each of the 256 counters and rates would correspond to the frames received with the matching ToS value. This structure is used to configure or retrieve the DiffServ settings on the port. Set ucEnable to 1 to start data collection. Since the data collection may be very expansive if the sampling rate is high, you should disable data collection when it is not needed.
typedef struct tagNSDiffServConfig { unsigned char ucEnable; /* Enable(1) or disable(0) traffic counter collection for rate calculation */ unsigned char ucOffsetMode; /* Specifies where ulOffset begins relative to the frame. Defined constants: OFFSET_FROM_START_OF_FRAME - Offset Starts from the beginning of the frame. OFFSET_FROM_IP_HEADER - Offset starts From the beginning of the IP header. */ unsigned long ulOffset; /* Offset to start data collection(in bytes) */ unsigned char ucIPAddress[4]; /* The destination IP address to filter on. */ unsigned char ucReserved[900]; /* Reserved */ } NSDiffServConfig;

554 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_COUNTER_INFO
Get DiffServ counter structure. HTGetStructure(NS_DIFF_SERV_COUNTER_INFO, 0, 0, 0, (void*) pNSDiffServCounterInfo, sizeof(NSDiffServCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_DIFF_SERV_COUNTER_INFO 0 0 0 \ myNSDiffServCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServCounterInfo

This structure gets the DiffServ counter structure from the card. typedef struct tagNSDiffServCounterInfo { unsigned longulRxFrame[256];/* The rate for each DiffServ (0-255) value. */ } NSDiffServCounterInfo;

SmartLibrary Command Reference: Volume 2 | 555

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_INFO
Get DiffServ counter information. HTGetStructure(NS_DIFF_SERV_INFO, 0, 0, 0, (void*) pNSDiffServ, sizeof(NSDiffServ), iHub, iSlot, iPort); HTGetStructure $NS_DIFF_SERV_INFO 0 0 0 \ myNSDiffServ \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServ

typedef struct tagNSDiffServ { unsigned char ucEnableOffsetFromIP;/* TRUE diffserv bytes are from IP header FALSE diffserv bytes are from start of frame */ unsigned short uiByteOffset; /* Offset in bytes for tracking DiffServ Counters - 2 bytes */ unsigned char ucDestinationIP[4];/* Non Zero value: Only frames whose SmartMetrics Destination IP address field match value in DiffServsDestIP will cause an update of the DiffServCounters.*/ /* Zero Value: All frames which are long enough to include the specified offset value in DiffServBytesOffset will be used for updating the DiffServCounters.*/ unsigned char ucReserved[20]; } NSDiffServ;

556 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_RATE_INFO
Retrieve DiffServ rates. HTGetStructure(NS_DIFF_SERV_RATE_INFO, 0, 0, 0, (void*) pNSDiffServRateInfo, sizeof(NSDiffServRateInfo), iHub, iSlot, iPort); HTGetStructure $NS_DIFF_SERV_RATE_INFO 0 0 0 \ myNSDiffServRateInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServRateInfo

typedef struct tagNSDiffServRateInfo { unsigned long ulRxFrameRate[MAX_DIFFSERV_VALUES];/* The rate for each DiffServ (0 - 255) value (output). */ unsigned char ucReserved[100];/* Reserved */ } NSDiffServRateInfo;

SmartLibrary Command Reference: Volume 2 | 557

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_V2_CONFIG
Configure DiffServ settings. HTSetStructure(NS_DIFF_SERV_V2_CONFIG, 0, 0, 0, (void*) pNSDiffServV2Config, sizeof(NSDiffServV2Config), iHub, iSlot, iPort); HTSetStructure $NS_DIFF_SERV_V2_CONFIG 0 0 0 \ myNSDiffServV2Config \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServV2Config

Differentiated services is a feature used to track frames based upon the value of one byte in the frame. This feature provides a set of 256 counters and rates that can be retrieved using the NS_DIFF_SERV_V2_COUNTER_INFO and NS_DIFF_SERV_V2_RATE_INFO commands, respectively. A common usage is to configure DiffServ to filter on the ToS field in IPv4 header and the IPv6 Traffic Class octet. Each of the 256 counters and rates would correspond to the frames received with the matching ToS or Traffic class octet value. This structure is used to configure or retrieve the DiffServ settings on the port. Set ucEnable to 1 for rate counters. Disable rate calculation when not being used. This is supported on TeraMetrics XD, XENPAK and 10G XFP modules only. ucRateCounterMode possible values DIFFSERV_IPV4_COUNTERS DIFFSERV_IPV6_COUNTERS DIFFSERV_AGGREGATE_IPV4_IPV6_COUNTERS ucOffsetMode possible value DIFFSERV_OFFSET_FROM_IPV4_HEADER

Continues >

558 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDiffServV2Config { unsigned char ucEnable; /* Enable or disable traffic counter collection for rate calculation. Possible values are: 0 - disable rates, counters are enabled 1 - enable rates */ unsigned char ucConfigMode; /* (IPv4 only)Specify if values from filter (destination addresses) and/or Offset are to be used for configuration. Possible values are: 0 - disable ConfigMode, previous values are used for filter and Offset 1 -enable ConfigMode, values for filter and Offset are used */ unsigned char ucRateCounterMode; /* Rate Counter mode, IPv4, IPv6 or both DIFFSERV_IPV4_COUNTERS DIFFSERV_IPV6_COUNTERS DIFFSERV_AGGREGATE_IPV4_IPV6_COUNTERS */ unsigned char ucOffsetMode; /* Specifies where ulOffset begins relative to the frame, for IPv6 its always from start of IPv6 frame. Default is from the start of the frame (0) DIFFSERV_OFFSET_FROM_IPV4_HEADER - Offset starts from the beginning of the IP header (for only IPv4). */ unsigned long ulOffset; /* Offset to start data collection(in bytes), based on ucOffsetMode (applicable to only IPv4) */

unsigned char ucIPv4Address[4];

/* The destination IPv4 address to filter on, if its 0's there is no filtering */ unsigned char ucIPv6Address[16]; /* The destination IPv6 address to filter on, if its 0's there is no filtering */ unsigned char ucReserved[784];/* Reserved */ } NSDiffServV2Config;

SmartLibrary Command Reference: Volume 2 | 559

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_V2_CONFIG_INFO
Retrieve DiffServ settings. HTGetStructure(NS_DIFF_SERV_V2_CONFIG_INFO, 0, 0, 0, (void*) pNSDiffServV2Config, sizeof(NSDiffServV2Config), iHub, iSlot, iPort); HTGetStructure $NS_DIFF_SERV_V2_CONFIG_INFO 0 0 0 \ myNSDiffServV2Config \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServV2Config

Differentiated services is a feature used to track frames based upon the value of one byte in the frame. This feature provides a set of 256 counters and rates that can be retrieved using the NS_DIFF_SERV_V2_COUNTER_INFO and NS_DIFF_SERV_V2_RATE_INFO commands, respectively. A common usage is to configure DiffServ to filter on the ToS field in IPv4 header and the IPv6 Traffic Class octet. Each of the 256 counters and rates would correspond to the frames received with the matching ToS or Traffic class octet value. This structure is used to configure or retrieve the DiffServ settings on the port. Set ucEnable to 1 for rate counters. Disable rate calculation when not being used. This is supported on TeraMetrics XD, XENPAK and 10G XFP modules only. ucRateCounterMode possible values DIFFSERV_IPV4_COUNTERS DIFFSERV_IPV6_COUNTERS DIFFSERV_AGGREGATE_IPV4_IPV6_COUNTERS ucOffsetMode possible value DIFFSERV_OFFSET_FROM_IPV4_HEADER

Continues >

560 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDiffServV2Config { unsigned char ucEnable; /* Enable or disable traffic counter collection for rate calculation. Possible values are: 0 - disable rates, counters are enabled 1 - enable rates */ unsigned char ucConfigMode; /* (IPv4 only) Specify if values from filter (destination addresses) and/or Offset are to be used for configuration. Possible values are: 0 - disable ConfigMode, default values are used for filter and Offset (IPv4 only) 1 - disable ConfigMode, values for filter and Offset are used */ unsigned char ucRateCounterMode; /* Rate Counter mode, IPv4, IPv6 or both DIFFSERV_IPV4_COUNTERS DIFFSERV_IPV6_COUNTERS DIFFSERV_AGGREGATE_IPV4_IPV6_COUNTERS */ unsigned char ucOffsetMode; /* Specifies where ulOffset begins relative to the frame, for IPv6 its always from start of IPv6 frame. Default is from the start of the frame (0) DIFFSERV_OFFSET_FROM_IPV4_HEADER - Offset starts from the beginning of the IP header (for only IPv4). */ unsigned long ulOffset; /* Offset to start data collection(in bytes), based on ucOffsetMode (applicable to only IPv4) */

unsigned char ucIPv4Address[4];

/* The destination IPv4 address to filter on, if its 0's there is no filtering */ unsigned char ucIPv6Address[16]; /* The destination IPv6 address to filter on, if its 0's there is no filtering */ unsigned char ucReserved[784];/* Reserved */ } NSDiffServV2Config;

SmartLibrary Command Reference: Volume 2 | 561

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_V2_COUNTER_INFO
Retrieve DiffServ rates. HTGetStructure(NS_DIFF_SERV_V2_COUNTER_INFO, 0, 0, 0, (void*) pNSDiffServV2CounterInfo, sizeof(NSDiffServV2CounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_DIFF_SERV_V2_COUNTER_INFO 0 0 0 \ myNSDiffServV2CounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure Embedded Structure

NSDiffServV2CounterInfo
typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

This is supported on TeraMetrics XD, Xenpak and 10G XFP modules only. typedef struct tagNSDiffServV2CounterInfo { unsigned char ucCounterMode; /* Input - Counter mode, IPv4, IPv6 or both DIFFSERV_IPV4_COUNTERS DIFFSERV_IPV6_COUNTERS DIFFSERV_AGGREGATE_IPV4_IPV6_COUNTERS */ U64 u64RxFrame[MAX_DIFFSERV_VALUES]; unsigned char ucReserved[256]; /* Reserved */ } NSDiffServV2CounterInfo;

562 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DIFF_SERV_V2_RATE_INFO
Retrieve DiffServ Rates. HTGetStructure(NS_DIFF_SERV_V2_RATE_INFO, 0, 0, 0, (void*) pNSDiffServV2RateInfo, sizeof(NSDiffServV2RateInfo), iHub, iSlot, iPort); HTGetStructure $NS_DIFF_SERV_V2_RATE_INFO 0 0 0 \ myNSDiffServV2RateInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDiffServRateInfo

For the ulAlgorithm field, there are currently 2 rate calculation algorithms available. SIMPLE_RATE_AVERAGE: Calculate the rates for each time interval first before taking an average of these rates. This algorithm provides a finer resolution for the rate. SIMPLE_COUNTER_AVERAGE: Calculate the average of the counters first before calculating the rate from the average counters. This is supported on TeraMetrics XD, Xenpak and 10G XFP modules only. typedef struct tagNSDiffServV2RateInfo { unsigned long ulAlgorithm; /* Input - The algorithm to use when computing the rates from the counter data. Possible values are: SIMPLE_RATE_AVERAGE SIMPLE_COUNTER_AVERAGE (default) */ /* Output - The rate for each DiffServ(0 - 255)value. */ /* Reserved */

unsigned long ulRxFrameRate[MAX_DIFFSERV_VALUES]; unsigned char ucReserved[256]; } NSDiffServV2RateInfo;

SmartLibrary Command Reference: Volume 2 | 563

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_DOWNLOAD_CERTIFICATE_FILES
Download Certificate, Key, and random files .
HTSetStructure(NS_DOT1X_DOWNLOAD_CERTIFICATE_FILES, 0, 0, 0, (void*) pNSDOT1XDownloadCertificateFiles, sizeof(NSDOT1XDownloadCertificateFiles), iHub, iSlot, iPort); HTSetStructure $NS_DOT1X_DOWNLOAD_CERTIFICATE_FILES 0 0 0 \ myNSDOT1XDownloadCertificateFiles\ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDOT1XDownloadCertificateFiles

NSDOT1XDownloadCertificateFiles description: Download Certificate and Key Files. All files with extension pem, cer, der, p12 are copied from the specified source directories onto the card. Random File should also be in the same folder. Example formats in specifying directory and file names: Windows C:/ C:/temp C:/temp/temp2 Unix /home/username/temp typedef struct tagNSDOT1XDownloadCertificateFiles { char szDirectory[128]; /* Directory where root certificates, certificate files, and random files are copied from. */ /* The file name for Random file, specify only the file name. The file should also be under szDirectory folder. */

char szRandomFileName[128];

char szKeyDirectory[128];

/* Directory where key files are copied from */ /* Reserved */

unsigned char ucReserved[384]; }NSDOT1XDownloadCertificateFiles;

564 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_CONFIG
Configure one or more 802.1x supplicants. HTSetStructure(NS_DOT1X_SUPPLICANT_CONFIG, 0, 0, 0, (void*) pNSDOT1XSupplicantConfig, sizeof(NSDOT1XSupplicantConfig), iHub, iSlot, iPort); HTSetStructure $NS_DOT1X_SUPPLICANT_CONFIG 0 0 0 \ myNSDOT1XSupplicantConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDOT1XSupplicantConfig

Note: If two or more supplicants are configured with one call to NS_DOT1X_SUPPLICANT_CONFIG, the supplicants will have the same configuration, including source MAC address/ID/password. To change these fields, you have to use other modification messages (NS_DOT1X_SUPPLICANT_MODIFY, NS_DOT1X_SUPPLICANT_FILL). The maximum number of supplicants per port is 256, starting with an index of 0. The supplicant will be created if it does not exist. The existing configuration will be overwritten and the supplicant will first log off and re-authenticate if it is in an authenticated or authenticating session state. All information except the index number will be duplicated when multiple supplicants are configured and need a modification message to change individual parameters such as ID and MAC address. ucAuthenticationMode:

If ucAuthenticationMode is set to DOT1X_AUTHENTICATION_MODE_ACTIVE, supplicants will send EAPOL-Start packets, and therefore will be the initiator for EAPOL packet exchanges. There will be setup rate control in this mode, using values from NS_DOT1X_SUPPLICANT_PORT_CONFIG. For DOT1X_AUTHENTICATION _MODE_PASSIVE, no EAPOL-Start packet is sent from the supplicant. In this case the authenticator is the initiator of EAPOL packets. There is no setup rate control in passive mode. The supplicant will respond as fast as it can. The supplicant process will be active for both active and passive modes.

uiAuthenticationTime: This is the time period a supplicant waits for a response from the authenticator before timing out. uiHeldTime: This is the time period during which a supplicant will not attempt to acquire an authenticator, after authentication failure.

Continues >

SmartLibrary Command Reference: Volume 2 | 565

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDOT1XSupplicantConfig { unsigned long ulIndex; /* starting index number of supplicants, range of possible values is 0 - 255 */ unsigned long ulCount; /* Number of supplicants to configure with consecutive indexes, maximum is 256 */ /* Unique source MAC address of supplicant */ /* Optional, in most cases, this should not be defined (all zeros). The authenticator MAC address is learned during protocol exchanges. If configured, it forces supplicant to send its packets to this destination MAC address */ /* If set, supplicant sends out EAPOL-start message when session authentication is attempted. Otherwise, it waits for the authenticator (DUT) to send an ID Request. Default is 1 (set) */ /* EAP-MD5, EAP-TLS ,EAP-PEAP possible values are DOT1X_EAP_TYPE_EAPMD5 (default), DOT1X_EAP_TYPE_EAPTLS DOT1X_EAP_TYPE_EAPPEAP DOT1X_EAP_TYPE_TTLS*/

unsigned char ucSourceMAC[6];

unsigned char ucAuthenticatorMAC[6];

unsigned char ucEnableSendEAPStart;

unsigned char ucAuthenticationType;

unsigned short uiMaxStart;

/* Maximum successive EAPOL-start packets, default is 3 */ /* Start Period, time when EAPOL start packet is to be transmitted, default is 30 s */ /* Authentication period, range is 1 to 255 seconds, default is 30 s */

unsigned short uiStartTime;

unsigned short uiAuthenticationTime;

unsigned short uiHeldTime;

/* Time to hold after a failure: 1 to 255 seconds, default is 60 s*/ /* Number of times to retry authentication after failure, default is 0,maximum 65535 */ /* Supplicant ID, This is the ID used in EAPOL-response/Identity and used by authentication server for EAP */

unsigned short uiRetryCount;

unsigned char ucSupplicantID[256];

Continues >

566 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned char ucUserPassword[16];

/* This is used for MD5 or MSCHAPV2 and corresponds to the password used in authentication server database. It is also used as password for phase two EAP exchanges */

unsigned char ucUserName[256];

/* This is the user name used in MD5 and PEAP phase two protocol such as MSCHAPV2 */ /* Reserved field*/

unsigned char ucUserMode;

unsigned char ucEnableAuthWithoutResponse; /* If set, supplicant becomes authenticated when there is no response to maxStart number of START packet */ /* VLAN Configuration */ unsigned char ucVLANEnable; unsigned char ucPRI; unsigned char ucCFI; unsigned short uiVID; unsigned char ucKeyPassword[16]

/*1 - enable,0 - disabled specifies whether or not this supplicant has an associated VLAN tag*/ /* user priority 0-7 (3 bits) */ /* 1 = RIF present, 0 = RIF absent */ /* VLAN ID (12 bits) */ /*Key password*/ /* Use Port level certificate or Supplicant Level certificate. 0 = Use Port Level Certificate Files (default) 1 = Use Supplicant Certificate Files */ /* Reserved field*/ /* Reserved field */ /* Reserved field */

unsigned char ucCertificateUseMode;

unsigned short uiIgnoreEAPIDRequest;

unsigned short uiIgnoreEAPAuthMessage; unsigned char ucReserved[234];

}NSDOT1XSupplicantConfig;

SmartLibrary Command Reference: Volume 2 | 567

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_CONFIG_INFO
Retrieve the configuration of one or more supplicants. Use DOT1X_RETRIEVE_ALL as the iType3 (count) argument to retrieve the configurations of all the supplicants on the port. HTGetStructure(NS_DOT1X_SUPPLICANT_CONFIG_INFO, <index>, <count>, 0, (void*) pNSDOT1XSupplicantConfig, sizeof(NSDOT1XSupplicantConfig), iHub, iSlot, iPort); HTGetStructure $NS_DOT1X_SUPPLICANT_CONFIG_INFO \ <index> <count> 0 \ myNSDOT1XSupplicantConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDOT1XSupplicantConfig

} NSDOT1XSupplicantConfig;

Note: If two or more supplicants are configured with one call to NS_DOT1X_SUPPLICANT_CONFIG, the supplicants will have the same configuration, including source MAC address/ID/password. To change these fields, you have to use other modification messages (NS_DOT1X_SUPPLICANT_MODIFY, NS_DOT1X_SUPPLICANT_FILL). Use DOT1X_ALL as iType3 (Count) to retrieve configuration of all the supplicants on the port. The maximum number of supplicants per port is 256, starting with an index of 0. The supplicant will be created if it does not exist. The existing configuration will be overwritten and the supplicant will first log off and re-authenticate if it is in an authenticated or authenticating session state. All information except the index number will be duplicated when multiple supplicants are configured and need a modification message to change individual parameters such as ID and MAC address. ucAuthenticationMode:

If ucAuthenticationMode is set to DOT1X_AUTHENTICATION_MODE_ACTIVE, supplicants will send EAPOL-Start packets, and therefore will be the initiator for EAPOL packet exchanges. There will be setup rate control in this mode, using values from NS_DOT1X_SUPPLICANT_PORT_CONFIG. For DOT1X_AUTHENTICATION _MODE_PASSIVE, no EAPOL-Start packet is sent from the supplicant. In this case the authenticator is the initiator of EAPOL packets. There is no setup rate control in passive mode. The supplicant will respond as fast as it can. The supplicant process will be active for both active and passive modes.

uiAuthenticationTime: This is the time period a supplicant waits for a response from the authenticator before timing out. uiHeldTime: This is the time period during which a supplicant will not attempt to acquire an authenticator, after authentication failure.

Continues >

568 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDOT1XSupplicantConfig { unsigned long ulIndex; /* starting index number of supplicants, range of possible values is 0 - 255 */ unsigned long ulCount; /* Number of supplicants to configure with consecutive indexes, maximum is 256 */ /* Unique source MAC address of supplicant */ /* Optional, in most cases, this should not be defined (all zeros). The authenticator MAC address is learned during protocol exchanges. If configured, it forces supplicant to send its packets to this destination MAC address */ /* If set, supplicant sends out EAPOL-start message when session authentication is attempted. Otherwise, it waits for the authenticator (DUT) to send an ID Request. Default is 1 (set) */ /* EAP-MD5, EAP-TLS ,EAP-PEAP possible values are DOT1X_EAP_TYPE_EAPMD5 (default), DOT1X_EAP_TYPE_EAPTLS DOT1X_EAP_TYPE_EAPPEAP DOT1X_EAP_TYPE_TTLS*/

unsigned char ucSourceMAC[6];

unsigned char ucAuthenticatorMAC[6];

unsigned char ucEnableSendEAPStart;

unsigned char ucAuthenticationType;

unsigned short uiMaxStart;

/* Maximum successive EAPOL-start packets, default is 3 */ /* Start Period, time when EAPOL start packet is to be transmitted, default is 30 s */ /* Authentication period, range is 1 to 255 seconds, default is 30 s */

unsigned short uiStartTime;

unsigned short uiAuthenticationTime;

unsigned short uiHeldTime;

/* Time to hold after a failure: 1 to 255 seconds, default is 60 s*/ /* Number of times to retry authentication after failure, default is 0,maximum 65535 */ /* Supplicant ID, This is the ID used in EAPOL-response/Identity and used by authentication server for EAP */

unsigned short uiRetryCount;

unsigned char ucSupplicantID[256];

Continues >

SmartLibrary Command Reference: Volume 2 | 569

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned char ucUserPassword[16];

/* This is used for MD5 or MSCHAPV2 and corresponds to the password used in authentication server database. It is also used as password for phase two EAP exchanges */

unsigned char ucUserName[256];

/* This is the user name used in MD5 and PEAP phase two protocol such as MSCHAPV2 */ /* DOT1X_USER_MODE_NORMAL (default) or DOT1X_USER_MODE_FORCE_FAILURE */

unsigned char ucUserMode;

unsigned char ucEnableAuthWithoutResponse; /* If set, supplicant becomes authenticated when there is no response to maxStart number of START packet */ /* VLAN Configuration */ unsigned char ucVLANEnable; /*1 - enable,0 - disabled specifies whether or not this supplicant has an associated VLAN tag*/ unsigned char ucPRI; /* user priority 0-7 (3 bits) */ unsigned char ucCFI; /* 1 = RIF present, 0 = RIF absent */ unsigned short uiVID; /* VLAN ID (12 bits) */ unsigned char ucKeyPassword[16] /*Key password*/ /* Use Port level certificate or Supplicant Level certificate. 0 = Use Port Level Certificate Files (default) 1 = Use Supplicant Certificate Files */ /* Reserved field */ /* Reserved field */ /* Reserved field */

unsigned char ucCertificateUseMode;

unsigned short uiIgnoreEAPIDRequest; unsigned short uiIgnoreEAPAuthMessage; unsigned char ucReserved[234]; }NSDOT1XSupplicantConfig;

570 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_CONTROL
Perform an action on one or more 802.1x supplicants. HTSetStructure(NS_DOT1X_SUPPLICANT_CONTROL , 0, 0, 0, (void*) pNSDOT1XSupplicantControl, sizeof(NSDOT1XSupplicantControl), iHub, iSlot, iPort); HTSetStructure $NS_DOT1X_SUPPLICANT_CONTROL myNSDOT1XSupplicantControl \ 0 \ $iHub $iSlot $iPort 0 0 0 \

Tcl Usage

Related Structure

NSDOT1XSupplicantControl

typedef struct tagNSDOT1XSupplicantControl { unsigned long ulIndex; /* Starting index number of supplicant */ unsigned long ulCount; /* The number of consecutive supplicant to control */ unsigned long ulAction; /* Action on the supplicant: Start/Stop/ClearStats possible values are, DOT1X_SUPPLICANT_START, DOT1X_SUPPLICANT_STOP, DOT1X_SUPPLICANT_CLEAR_SUPPLICANT_STATS, DOT1X_SUPPLICANT_CLEAR_STATS, DOT1X_SUPPLICANT_DELETE, DOT1X_SUPPLICANT_RETRY, DOT1X_SUPPLICANT_REAUTHENTICATE DOT1X_SUPPLICANT_CLEAR_SESSION_STATS */ unsigned char ucReserved[64]; } NSDOT1XSupplicantControl;

Continues >

SmartLibrary Command Reference: Volume 2 | 571

Chapter 10: Universal (NS) NS iType1 Commands and Structures

To control all supplicants on the port, set ulCount to DOT1X_RETRIEVE_ALL. ulAction options:

DOT1X_SUPPLICANT_START Start one or more supplicants. The actual starting rate of supplicants depends on the rate control setting in NSDOT1XSupplicantPortConfig. Only a supplicant in idle or disconnected session state will be started. DOT1X_SUPPLICANT_STOP Stop one or more supplicants. The actual stopping rate of supplicants depends on the rate control setting. DOT1X_SUPPLICANT_CLEAR_SUPPLICANT_STATS Clear the statistics counter of the supplicants and reset the failure code. DOT1X_SUPPLICANT_CLEAR_STATS Clear the statistics counter of the supplicants and reset the failure code. DOT1X_SUPPLICANT_DELETE Delete one or more supplicant entities on the module. The supplicant will first log off if it is in authenticated session state. Otherwise, it will simply be removed and destroyed, including its statistics. DOT1X_SUPPLICANT_RETRY Retry one or more failed supplicants. In the case of retrying all supplicants, only supplicants with failed status in disconnected session state will be retried. DOT1X_SUPPLICANT_REAUTHENTICATE This does not stop supplicant authentication. It will however send an EAPOL START packet to the authenticator to start the authentication again. During this time, the supplicant is maintained as authenticated. This option is only available when a supplicant is in AUTHENTICATED state. No logoff will be sent first. DOT1X_SUPPLICANT_CLEAR_SESSION_STATS Clears statistics for the following fields in NSDOT1XSupplicantSessionStatsInfo; SessionRetrievedTime, SessionUpdateTime, u64SetupTime, u64SetupTime, ulAuthenticationAttempted, ulAuthenticationSuccessful, ulAuthenticationFailed, and ulAuthenticationRetries.

572 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_COPY
Copy the configuration of one 802.1x supplicant to other supplicants. HTSetStructure(NS_DOT1X_SUPPLICANT_COPY, 0, 0, 0, (void*) pNSDOT1XSupplicantCopy, sizeof(NSDOT1XSupplicantCopy), iHub, iSlot, iPort); HTSetStructure $NS_DOT1X_SUPPLICANT_COPY myNSDOT1XSupplicantCopy \ 0 \ $iHub $iSlot $iPort 0 0 0 \

Tcl Usage

Related Structure

NSDOT1XSupplicantCopy

typedef struct tagNSDOT1XSupplicantCopy { unsigned long ulBaseIndex; /* index of supplicant to copy from */ unsigned long ulDestinationIndex; /* destination index of supplicant to copy to */ unsigned long ulCount; /* number of supplicant to copy to beginning with destination index */ unsigned char ucReserved[24]; } NSDOT1XSupplicantCopy; Note: If the supplicant referred to by ulBaseIndex does not exist, the command returns an error.

SmartLibrary Command Reference: Volume 2 | 573

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_FILL
Increment a single configuration parameter for one or more 802.1x supplicants. HTSetStructure(NS_DOT1X_SUPPLICANT_FILL , 0, 0, 0, (void*) pNSDOT1XSupplicantFill, sizeof(NSDOT1XSupplicantFill), iHub, iSlot, iPort); HTSetStructure $NS_DOT1X_SUPPLICANT_FILL myNSDOT1XSupplicantFill \ 0 \ $iHub $iSlot $iPort 0 0 0 \

Tcl Usage

Related Structure

NSDOT1XSupplicantFill

The NSDOT1XSupplicantFill structure is used to modify a parameter field of a given number of supplicants that already exist, using a source supplicant instance as a base, a starting destination instance, and count, whose contents are to be modified, based on the parameter-id, followed by a delta value which will be used as the successive incremental value. uiField possible values:

DOT1X_SUPPLICANT_ID DOT1X_SUPPLICANT_USER_PASSWORD DOT1X_SUPPLICANT_SRC_MAC

5 (256 bytes) 6 (16 bytes) 10 (6 bytes)

DOT1X_SUPPLICANT_VLAN_CONFIGURATION 14 (2 bytes) All fields in VLAN (PRI,CFI,VLAN ID) [ 3 bits Priority] [1 bit CFI] [12 bits VLAN ID] DOT1X_SUPPLICANT_KEY_PASSWORD 16 (16 bytes)

There are two different configuration mechanisms for Source mac fields and Supplicant ID/User Password, VLAN configuration, and Supplicant Key fields. For Source MAC field and VLAN configuration, delta values are from the ucDelta field. For SUPPLICANT ID/User and Supplicant Key Password, the increment can be made in two places using the ucMode1 and ucMode2 fields with the corresponding ucOffset, ucStepValue, ucWidth, uiStartValue, and uiMaxValue fields. The ucMode1 and ucMode2 fields (used with the Supplicant ID and User Password fields) have the following options:

DOT1X_SUPPLICANT_FILL_LEFT There will be no leading or trailing zeroes. DOT1X_SUPPLICANT_FILL_RIGHT The length of the field will always be fixed. For example, a value of 4 is 004 in this mode using a width of 3. DOT1X_SUPPLICANT_FILL_OFF Use this to turn off incrementation.

The Destination Supplicant will have the inital Starting Values at the offsets specified by uiStartValue1 and uiStartValue2. While the value of uiStartValue1 is maintained for ucMode1 (ucOffset1), the value of ucStartValue2 for ucMode2 will be incremented by ucStepValue2 until uiMaxValue2 is reached. When uiMaxValue2 is reached, uiStartValue1 will be incremented until uiMaxValue1 is reached. Incrementation will be altenatively done on ucOffset1 and ucOffset2 until both uiMaxValue1 and uiMaxValue2 are reached.

Continues >

574 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Example 1 Source MAC address): Configuration: ulBaseIndex = 10 (base supplicant) ulDestinationndex = 5 (destination supplicant) ulCount = 3 (total number of supplicants to modify) uiField = DOT1X_SUPPLICANT_SRC_MAC (ucSourceMAC[6] - Unique source MAC address of supplicant) ucDelta[] = [0] [0] [0] [0] [0] [2] Result:
Before Index 0 1 2 3 4 5 6 7 8 9 10 ucSourceMAC 11.11.11.11.11.11 1.1.1.1.1.1 2.2.2.2.2.2 3.3.3.3.3.3 4.4.4.4.4.4 5.5.5.5.5.5 6.6.6.6.6.6 7.7.7.7.7.7 8.8.8.8.8.8 9.9.9.9.9.9 10.10.10.10.10.10 After Index 0 1 2 3 4 5 6 7 8 9 10 ucSourceMAC 11.11.11.11.11.11 1.1.1.1.1.1 2.2.2.2.2.2 3.3.3.3.3.3 4.4.4.4.4.4 10.10.10.10.10.12 10.10.10.10.10.14 10.10.10.10.10.16 8.8.8.8.8.8 9.9.9.9.9.9 10.10.10.10.10.10

<- first modified supplicant <- second modified supplicant <- third modified supplicant

<- Base supplicant

Example 2 (Supplicant ID) Configuration: ulBaseIndex = 0 ulDestinationIndex = 1 ucMode1 = DOT1X_SUPPLICANT_FILL_RIGHT ucOffset1 = 4 ucStepValue1 = 2 ucWidth1 = 3 uiStartValue1 = 1 uiMaxValue2 = 5 ucMode2 = DOT1X_SUPPLICANT_FILL_LEFT ucOffset2 = 12 ucStepValue2 = 1 ucWidth2 = N/A uiStartValue2 = 3 uiMaxValue2 = 4 Results: Index Supplicant ID 1 test001@spirent3.com 2 test001@spirent4.com 3 test003@spirent3.com 4 test003@spirent4.com 5 test005@spirent3.com 6 test005@spirent4.com

Continues >

SmartLibrary Command Reference: Volume 2 | 575

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDOT1XSupplicantFill { unsigned long ulBaseIndex; /* Index of supplicant whose value is to be used for the desired parameter to be used as an initial value for the fill. */ unsigned long ulDestinationIndex; /* supplicant index of the first supplicant whose parameter is to be filled. */ unsigned long ulCount; /* number of supplicants to be modified */ unsigned short uiField; /* Field ID which is to be modified. Possible values are: DOT1X_SUPPLICANT_ID (256 bytes) DOT1X_SUPPLICANT_USER_PASSWORD (16 bytes) DOT1X_SUPPLICANT_SRC_MAC (6 bytes) DOT1X_SUPPLICANT_VLAN_CONFIGURATION (2 bytes) DOT1X_SUPPLICANT_KEY_PASSWORD (16 bytes) */ unsigned char ucDelta[MAX_SUPPLICANT_DELTA]; /* delta values */ /* The following are only applicable to Authentication ID and Password Parameters. One or two ASCII strings can be inserted in the ID or password fields */ unsigned char ucMode1; /* possible values are DOT1X_SUPPLICANT_FILL_OFF, DOT1X_SUPPLICANT_FILL_LEFT and DOT1X_SUPPLICANT_FILL_RIGHT */ /* offset to first fill pattern */ /* Stepping value size for first pattern */ /* Width of first fill pattern */ /* Starting Value for first pattern*/ /* maximum value of first fill pattern */ /* possible values are DOT1X_SUPPLICANT_FILL_OFF, DOT1X_SUPPLICANT_FILL_LEFT and DOT1X_SUPPLICANT_FILL_RIGHT */ /* offset to second fill pattern */ /* Stepping value size for second pattern*/ /* Width of second fill pattern */ /* Starting Value of second fill pattern */ /* maximum value f second fill pattern */

unsigned unsigned unsigned unsigned unsigned unsigned

char ucOffset1; char ucStepValue1; char ucWidth1; short uiStartValue1; short uiMaxValue1; char ucMode2;

unsigned char ucOffset2; unsigned char ucStepValue2; unsigned char ucWidth2; unsigned short uiStartValue2; unsigned short uiMaxValue2; unsigned char ucReserved[24]; } NSDOT1XSupplicantFill;

576 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_MODIFY
Modify a single configuration parameter for one or more 802.1x supplicants. HTSetStructure(NS_DOT1X_SUPPLICANT_MODIFY , 0, 0, 0, (void*) pNSDOT1XSupplicantModify, sizeof(NSDOT1XSupplicantModify), iHub, iSlot, iPort); HTSetStructure $NS_DOT1X_SUPPLICANT_MODIFY myNSDOT1XSupplicantModify \ 0 \ $iHub $iSlot $iPort 0 0 0 \

Tcl Usage

Related Structure

NSDOT1XSupplicantModify
Continues >

SmartLibrary Command Reference: Volume 2 | 577

Chapter 10: Universal (NS) NS iType1 Commands and Structures

NSDOT1XSuppplicantModify Description: Modify one parameter for one or multiple supplicants. uiField possible values:

DOT1X_SUPPLICANT_MAX_START DOT1X_SUPPLICANT_START_TIME DOT1X_SUPPLICANT_AUTHENTICATION_TIME DOT1X_SUPPLICANT_HELD_TIME DOT1X_SUPPLICANT_ID DOT1X_SUPPLICANT_USER_PASSWORD DOT1X_SUPPLICANT_AUTHENTICATION_TYPE DOT1X_SUPPLICANT_SUPPLICANT_SEND_EAP_START DOT1X_SUPPLICANT_RETRY_COUNT DOT1X_SUPPLICANT_SRC_MAC DOT1X_SUPPLICANT_USER_NAME DOT1X_SUPPLICANT_VLAN_ENABLE

(2 bytes) (2 bytes) (2 bytes) (4 bytes) (length specified by uiFieldDataLength, max length 256 bytes) (length specified by uiFieldDataLength, max length 16 bytes) (1 byte) (1 byte) (2 bytes) (6 bytes) (length specified by uiFieldDataLength, max length 256 bytes) (1 byte)

DOT1X_SUPPLICANT_VLAN_CONFIGURATION (2 bytes) All fields in VLAN (PRI,CFI,VLAN ID) [3 bits Priority] [1 bit CFI] [12 bits VLAN ID] DOT1X_SUPPLICANT_CERTIFICATE_USEMODE DOT1X_SUPPLICANT_KEY_PASSWORD (1 byte) (length specified by uiFieldDataLength, max length 16 bytes)

Example 1: ulIndex = 2 (starting supplicant index) ulCount = 5 (total number of supplicant to modify) uiField = DOT1X_SUPPLICANT_MAX_START (uiMaxStart - Maximum successive EAPOL-start packets) ucData [0] [5] [0] [7] [0] [9] [0] [2] [0] [3] [0] [8] [0] [4] (pattern definitions) (Total fields changed 5) Before After Index uiMaxStart - Value Index uiMaxStart - Value 0 1 0 1 1 1 1 1 2 1 2 5 3 1 3 7 4 1 4 9 5 1 5 2 6 1 6 3 7 1 7 1 8 1 8 1 9 1 9 1 10 1 10 1 Continues >

578 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Example 2: ulIndex = 0 (start here) ulCount = 3 (total number of supplicant to modify) uiField = DOT1X_SUPPLICANT_SRC_MAC (ucSourceMAC[6] - Unique source MAC address of supplicant) ucData [9] [7] [9] [2 [3] [8] [7] [5] [6] [4] [1] [9] [8] [7] [8] [9] [3] [5] [4] [6] [9] [1] (pattern definitions) Before After Index ucSourceMAC[6] - Value Index ucSourceMAC[6] - Value 0 11.11.11.11.11.11 0 9.7.9.2.3.8 1 1.1.1.1.1.1 1 7.5.6.4.1.9 2 2.2.2.2.2.2 2 8.7.8.9.3.5 3 3.3.3.3.3.3 3 3.3.3.3.3.3 4 4.4.4.4.4.4 4 4.4.4.4.4.4 5 5.5.5.5.5.5 5 5.5.5.5.5.5 6 6.6.6.6.6.6 6 6.6.6.6.6.6 7 7.7.7.7.7.7 7 7.7.7.7.7.7 8 8.8.8.8.8.8 8 8.8.8.8.8.8 9 9.9.9.9.9.9 9 9.9.9.9.9.9 10 10.10.10.10.10.10 10 10.10.10.10.10.10 Example 3: There is a gap in the configured supplicant ulIndex = 0 (start here) ulCount = 3 (total number of supplicants to modify) uiField = DOT1X_SUPPLICANT_SRC_MAC (ucSourceMAC[6] - source MAC address of supplicant) ucData [9] [7] [9] [2 [3] [8] [7] [5] [6] [4] [1] [9] [8] [7] [8] [9] [3] [5] [4] [6] [9] [1] (pattern definitions) If a supplicant of index 1 does not exist in the configured supplicants, only supplicants in the range (supplicant 0 and supplicant 2) are modified, as shown below: Before After Index ucSourceMAC[6] - Value Index ucSourceMAC[6] - Value 0 11.11.11.11.11.11 0 9.7.9.2.3.8 2 2.2.2.2.2.2 2 7.5.6.4.1.9 3 3.3.3.3.3.3 3 3.3.3.3.3.3 4 4.4.4.4.4.4 4 4.4.4.4.4.4 5 5.5.5.5.5.5 5 5.5.5.5.5.5 6 6.6.6.6.6.6 6 6.6.6.6.6.6 7 7.7.7.7.7.7 7 7.7.7.7.7.7

Continues >

SmartLibrary Command Reference: Volume 2 | 579

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Example 4: There is no supplicant of index ulIndex ulIndex = 0 (start here) ulCount = 3 (total number of supplicant to modify) uiField = DOT1X_SUPPLICANT_SRC_MAC (ucSourceMAC[6] - source MAC address of supplicant) ucData [9] [7] [9] [2 [3] [8] [7] [5] [6] [4] [1] [9] [8] [7] [8] [9] [3] [5] [4] [6] [9] [1] (pattern definitions) Index ucSourceMAC[6] -Value 1 1.1.1.1.1.1 2 2.2.2.2.2.2 3 3.3.3.3.3.3 4 4.4.4.4.4.4 5 5.5.5.5.5.5 6 6.6.6.6.6.6 7 7.7.7.7.7.7 In Example 4 above, if the supplicant of index 0 does not exist, no modification is made and an error is returned. Example 5: Example for Supplicant User Name (similarly to Supplicant ID, User Password, Supplicant Key Password which uses uiFieldDataLength) ulIndex = 0 (start here) ulCount = 3 (total number of supplicant to modify) uiField = DOT1X_SUPPLICANT_USER_NAME (ucUserName- user name of supplicant) uiFieldDataLength = 11 ucData [M] [y] [U] [s] [e] [r] [N] [a] [m] [e] [1] [M] [y] [U] [s] [e] [r] [N] [a] [m] [e] [2] [M] [y] [U] [s] [e] [r] [N] [a] [m] [e] [3] [M] [y] [U] [s] [e] [r] [N] [a] [m] [e] [4] (pattern definitions) Before After Index ucUserName[256] -Value Index ucUserName[256] -Value 1 OldUserName1 MyUserName1 2 OldUserName2 MyUserName2 3 OldUserName3 MyUserName3 4 OldUserName4 OldUserName4 5 OldUserName5 OldUserName5 6 OldUserName6 OldUserName6 7 OldUserName7 OldUserName7

580 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDOT1XSupplicantModify { unsigned long ulIndex; /* starting index of supplicant to modify */ unsigned long ulCount; /* number of supplicant to modify beginning with start index */ unsigned short uiField; /* field ID which is to be modified, values are defined below: DOT1X_SUPPLICANT_MAX_START (2 bytes) DOT1X_SUPPLICANT_START_TIME (2 bytes) DOT1X_SUPPLICANT_AUTHENTICATION_TIME (2 bytes) DOT1X_SUPPLICANT_HELD_TIME (2 byte)s DOT1X_SUPPLICANT_ID (length specified by uiFieldDataLength) DOT1X_SUPPLICANT_USER_PASSWORD (length specified by uiFieldDataLength) DOT1X_SUPPLICANT_AUTHENTICATION_TYPE (1 byte) DOT1X_SUPPLICANT_SEND_EAP_START (1 byte) DOT1X_SUPPLICANT_RETRY_COUNT (2 bytes) DOT1X_SUPPLICANT_SRC_MAC (6 bytes) DOT1X_SUPPLICANT_USER_NAME (length specified by uiFieldDataLength) DOT1X_SUPPLICANT_VLAN_ENABLE (1 byte) DOT1X_SUPPLICANT_VLAN_CONFIGURATION (2 bytes) All fields in VLAN (PRI,CFI,VLAN ID) [3 bits Priority] [1 bit CFI] [12 bits VLAN ID] DOT1X_SUPPLICANT_CERTIFICATE_USEMODE (1 byte) DOT1X_SUPPLICANT_KEY_PASSWORD (length specified by uiFieldDataLength) */ unsigned short uiFieldDataLength; /* number of bytes to be used from ucData for each Supplicant. It's only applicable to Supplicant ID, User Password, User Name, and Supplicant Key Password fields */ unsigned char ucData[MAX_MOD_SUPPLICANT_ARRAY]; /* values to be used to modify the field specified in uiField */ unsigned char ucReserved[24]; /* Reserved */ } NSDOT1XSupplicantModify;

SmartLibrary Command Reference: Volume 2 | 581

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_PORT_CONFIG
Port configuration for 802.1x supplicants. HTSetStructure(NS_DOT1X_SUPPLICANT_PORT_CONFIG, 0, 0, 0, (void*) pNSDOT1XSupplicantPortConfig, sizeof(NSDOT1XSupplicantPortConfig), iHub, iSlot, iPort); HTSetStructure $NS_DOT1X_SUPPLICANT_PORT_CONFIG 0 0 0 \ myNSDOT1XSupplicantPortConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
ucSessionControlMode:

NSDOT1XSupplicantPortConfig

The default mode is DOT1X_SESSION_CONTROL_EVEN_BURST. In this mode sessions will be started every Session Setup Delay time (ulSessionSetupDelay). If there are ulSessionMaxPending number of pending sessions, no more sessions will be started until after the next delay. Teardown of sessions will be done the same way except that ulSessionMaxPending will not apply, because the teardown of session is a one-way handshaking protocol exchange. The other mode is Varied Burst Mode (DOT1X_SESSION_CONTROL_VARIED_BURST). In this mode, the number of sessions to start in each time slot is configured and hence can create an uneven profile. In that case, session burst size (ulSessionBurstSize) is not applicable. ucPortAuthenticationMode: MAC-based authentication (DOT1X_MAC_BASED_AUTHENTICATION_MODE) allows multiple supplicants with unique MAC addresses to be authenticated independently. Port-based authentication (DOT1X_PORT_BASED_AUTHENTICATION_MODE) allows only the supplicant with index 0 to be authenticated. Also, group MAC addresses are not allowed as destination MAC address for incoming 802.1x packets. ucTTLSPhase2Type DOT1X_TTLS_PHASE2_UNDEFINED DOT1X_TTLS_PHASE2_PAP DOT1X_TTLS_PHASE2_CHAP DOT1X_TTLS_PHASE2_MSCHAP DOT1X_TTLS_PHASE2_MSCHAPV2

0 1 2 3 4

Continues >

582 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDOT1XSupplicantPortConfig { unsigned char ucSessionControlMode; /* possible values are DOT1X_SESSION_CONTROL_EVEN_BURST (default) or DOT1X_SESSION_CONTROL_VARIED_BURST */ unsigned char uiSessionBurstNumSlots; /* number of slots to be used in ucSessionControlSlots, default is 1 */ unsigned short uiSessionMaxPending; /* Maximum number of supplicants in pending state allowed. No more session will be started unless the number drops, 1 - 256 default is 100 */ /* time in milliseconds that sessions are started, 1 ms - 65536 ms , default and minimum is 20 ms */ /* time in milliseconds that sessions are terminated, 1 ms - 65536 ms, default and minimum is 20 ms */ /* Number of supplicants started or terminated back-to-back, 1 - 256 default is 1 */

unsigned long ulSessionSetupDelay;

unsigned long ulSessionTearDownDelay;

unsigned long ulSessionBurstSize;

unsigned short uiSessionBurstSlots[100]; /* each slot is the number of supplicants to be started in each time interval, 1-256 per slot, default is 1 for each slot */ unsigned long ulAuthenticationType; /* List of EAP type supported (one or more) DOT1X_EAP_TYPE_EAPMD5 DOT1X_EAP_TYPE_EAPTLS DOT1X_EAP_TYPE_EAPPEAP DOT1X_EAP_TYPE_TTLS */ unsigned char ucAuthenticationMode; /* Specifies if port-based authentication or MAC -based authentication is used DOT1X_PORT_MODE_MULTI_AUTHENTICATION (default) Allows multiple supplicants with unique MAC addresses to be authenticated independently. MAC-based authentication will be used. Group MAC address is not allowed as destination MAC address for incoming 802.1x packets

Continues >

SmartLibrary Command Reference: Volume 2 | 583

Chapter 10: Universal (NS) NS iType1 Commands and Structures

DOT1X_PORT_MODE_SINGLE_HOST, DOT1X_PORT_MODE_MULTI_HOST Allows only the supplicant with index 0 to be authenticated. Port-based authentication will be used */ unsigned char ucEnableMulticastDestinationMac; /* If set, multicast destination address(01:80:C2:00:00:03)is used for all outgoing frames. Otherwise unique authenticator MAC address is used once if its known. Default is 0 (not set) */ unsigned char ucEnableCNCheck[32]; /* Verify that the server certificate has this value in it's CN field. Default is NULL */

unsigned char ucEnableCNExact;

/* If set, use exact CN match. Default 0 (not set) */ /* Fragment size of TLS packets. Ranges from 500-1400. Default is 1380 */ /* If set, enable TLS session resumption. Default 0 (not set) */

unsigned short uiFragmentSize;

unsigned char ucEnableSessionResume;

unsigned char ucPEAPPhase2Type;

/* Phase 2 EAP type for EAP-PEAP: MSCHAPV2. Default is DOT1X_EAP_TYPE_PHASE2_MSCHAPV2 */ /* Phase 2 EAP type for EAP-TTLS: DOT1X_TTLS_PHASE2_UNDEFINED, DOT1X_TTLS_PHASE2_PAP, DOT1X_TTLS_PHASE2_CHAP, DOT1X_TTLS_PHASE2_MSCHAP, DOT1X_TTLS_PHASE2_MSCHAPV2 */ /* /* /* /* /* /* Default is PAP,

unsigned char ucTTLSPhase2Type;

unsigned unsigned unsigned unsigned unsigned unsigned

char char char char char char

ucUserCertificateFileName[32]; ucUserKeyFileName[32]; ucKeyPassword[16]; ucRootCertificateFileName[32]; ucRandomFileName[32]; ucReserved[255];

User certificate file name */ User certificate file name */ Key password */ Root certificate file name */ Name of random file */ Reserved */

}NSDOT1XSupplicantPortConfig; /* Possible values for ucSessionControlMode */

Continues >

584 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

#define #define #define #define #define #define #define #define #define #define #define #define #define #define

DOT1X_SESSION_CONTROL_EVEN_BURST 1 DOT1X_SESSION_CONTROL_VARIED_BURST 2/* Possible values for ucPortMod*/ DOT1X_PORT_MODE_MULTI_AUTHENTICATION 1 DOT1X_PORT_MODE_SINGLE_HOST 2 DOT1X_PORT_MODE_MULTI_HOST3/* List of supported EAP types for port */ DOT1X_EAP_TYPE_EAPMD5 0x00000001 DOT1X_EAP_TYPE_EAPTLS 0x00000002 DOT1X_EAP_TYPE_EAPPEAP 0x00000004 DOT1X_EAP_TYPE_TTLS 0x00000010 DOT1X_EAP_TYPE_MSCHAPV2 0x00000008 /* Reserved */ DOT1X_EAP_TYPE_TTLS 0x00000010 /* Reserved */ DOT1X_EAP_TYPE_SIM 0x00000020 /* Reserved */ DOT1X_EAP_TYPE_OTP 0x00000040 /* Reserved */ DOT1X_EAP_TYPE_LEAP 0x00000080 /* Reserved */

/* Define constants for ucPEAPPhase2Type field */ #define DOT1X_EAP_TYPE_PHASE2_MSCHAPV2 0x00000001 /* Define constants for ucTTLSPhase2Type field */ #define DOT1X_TTLS_PHASE2_UNDEFINED 0 #define DOT1X_TTLS_PHASE2_PAP 1 #define DOT1X_TTLS_PHASE2_CHAP 2 #define DOT1X_TTLS_PHASE2_MSCHAP 3 #define DOT1X_TTLS_PHASE2_MSCHAPV2 4

SmartLibrary Command Reference: Volume 2 | 585

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_PORT_CONFIG_INFO
Retrieve port configuration for 802.1x supplicants. HTGetStructure(NS_DOT1X_SUPPLICANT_PORT_CONFIG_INFO, 0, 0, 0, (void*) pNSDOT1XSupplicantPortConfig, sizeof(NSDOT1XSupplicantPortConfig), iHub, iSlot, iPort); HTGetStructure $NS_DOT1X_SUPPLICANT_PORT_CONFIG_INFO 0 0 0 \ myNSDOT1XSupplicantPortConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
ucSessionControlMode:

NSDOT1XSupplicantPortConfig

The default mode is DOT1X_SESSION_CONTROL_EVEN_BURST. In this mode sessions will be started every Session Setup Delay time (ulSessionSetupDelay). If there are ulSessionMaxPending number of pending sessions, no more sessions will be started until after the next delay. Teardown of sessions will be done the same way except that ulSessionMaxPending will not apply, because the teardown of session is a one-way handshaking protocol exchange. The other mode is Varied Burst Mode (DOT1X_SESSION_CONTROL_VARIED_BURST). In this mode, the number of sessions to start in each time slot is configured and hence can create an uneven profile. In that case, session burst size (ulSessionBurstSize) is not applicable. ucPortAuthenticationMode: MAC-based authentication (DOT1X_MAC_BASED_AUTHENTICATION_MODE) allows multiple supplicants with unique MAC addresses to be authenticated independently. Port-based authentication (DOT1X_PORT_BASED_AUTHENTICATION_MODE) allows only the supplicant with index 0 to be authenticated. Also, group MAC addresses are not allowed as destination MAC address for incoming 802.1x packets. ucTTLSPhase2Type DOT1X_TTLS_PHASE2_UNDEFINED DOT1X_TTLS_PHASE2_PAP DOT1X_TTLS_PHASE2_CHAP DOT1X_TTLS_PHASE2_MSCHAP DOT1X_TTLS_PHASE2_MSCHAPV2

0 1 2 3 4

Continues >

586 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDOT1XSupplicantPortConfig { unsigned char ucSessionControlMode; /* possible values are DOT1X_SESSION_CONTROL_EVEN_BURST (default) or DOT1X_SESSION_CONTROL_VARIED_BURST */ unsigned char ucSessionBurstNumSlots; /* number of slots to be used in ucSessionControlSlots, default is 1 */ unsigned short uiSessionMaxPending; /* Maximum number of supplicants in pending state allowed. No more session will be started unless the number drops, 1 - 256 default is 100 */ /* time in milliseconds that sessions are started, 1 ms - 65536 ms , default and minimum is 20 ms */ /* time in milliseconds that sessions are terminated, 1 ms - 65536 ms, default and minimum is 20 ms */ /* Number of supplicants started or terminated back-to-back, 1 - 256 default is 1 */

unsigned long ulSessionSetupDelay;

unsigned long ulSessionTearDownDelay;

unsigned long ulSessionBurstSize;

unsigned short uiSessionBurstSlots[100]; /* each slot is the number of supplicants to be started in each time interval, 1-256 per slot, default is 1 for each slot */ unsigned long ulAuthenticationType; /* List of EAP type supported (one or more) DOT1X_EAP_TYPE_EAPMD5 DOT1X_EAP_TYPE_EAPTLS DOT1X_EAP_TYPE_EAPPEAP DOT1X_EAP_TYPE_TTLS */ unsigned char ucAuthenticationMode; /* Specifies if port-based authentication or MAC -based authentication is used DOT1X_PORT_MODE_MULTI_AUTHENTICATION (default) Allows multiple supplicants with unique MAC addresses to be authenticated independently. MAC-based authentication will be used. Group MAC address is not allowed as destination MAC address for incoming 802.1x packets

Continues >

SmartLibrary Command Reference: Volume 2 | 587

Chapter 10: Universal (NS) NS iType1 Commands and Structures

DOT1X_PORT_MODE_SINGLE_HOST, DOT1X_PORT_MODE_MULTI_HOST Allows only the supplicant with index 0 to be authenticated. Port-based authentication will be used */ unsigned char ucEnableMulticastDestinationMac; /* If set, multicast destination address(01:80:C2:00:00:03)is used for all outgoing frames. Otherwise unique authenticator MAC address is used once if its known. Default is 0 (not set) */ unsigned char ucEnableCNCheck[32]; /* Verify that the server certificate has this value in it's CN field. Default is NULL */

unsigned char ucEnableCNExact;

/* If set, use exact CN match. Default 0 (not set) */ /* Fragment size of TLS packets. Ranges from 500-1400. Default is 1380 */ /* If set, enable TLS session resumption. Default 0 (not set) */

unsigned short uiFragmentSize;

unsigned char ucEnableSessionResume;

unsigned char ucPEAPPhase2Type;

/* Phase 2 EAP type for EAP-PEAP: MSCHAPV2. Default is DOT1X_EAP_TYPE_PHASE2_MSCHAPV2*/ /* Phase 2 EAP type for EAP-TTLS: DOT1X_TTLS_PHASE2_UNDEFINED, DOT1X_TTLS_PHASE2_PAP, DOT1X_TTLS_PHASE2_CHAP, DOT1X_TTLS_PHASE2_MSCHAP, DOT1X_TTLS_PHASE2_MSCHAPV2 */ Default is PAP,

unsigned char ucTTLSPhase2Type;

unsigned char ucUserCertificateFileName[32]; unsigned char ucUserKeyFileName[32]; unsigned char ucKeyPassword[16]; unsigned char ucRootCertificateFileName[32]; unsigned char ucRandomFileName[32]; unsigned char ucReserved[255]; }NSDOT1XSupplicantPortConfig;

/* User certificate file name */ /* User certificate file name */ /* Key password */ /* Root certificate file name */ /* Name of random file */ /* Reserved */

Continues >

588 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* Possible values for ucSessionControlMode */ #define #define #define #define #define #define #define #define #define #define #define #define #define #define DOT1X_SESSION_CONTROL_EVEN_BURST 1 DOT1X_SESSION_CONTROL_VARIED_BURST 2/* Possible values for ucPortMod*/ DOT1X_PORT_MODE_MULTI_AUTHENTICATION 1 DOT1X_PORT_MODE_SINGLE_HOST 2 DOT1X_PORT_MODE_MULTI_HOST3/* List of supported EAP types for port */ DOT1X_EAP_TYPE_EAPMD5 0x00000001 DOT1X_EAP_TYPE_EAPTLS 0x00000002 DOT1X_EAP_TYPE_EAPPEAP 0x00000004 DOT1X_EAP_TYPE_TTLS 0x00000010 DOT1X_EAP_TYPE_MSCHAPV2 DOT1X_EAP_TYPE_TTLS DOT1X_EAP_TYPE_SIM DOT1X_EAP_TYPE_OTP DOT1X_EAP_TYPE_LEAP 0x00000008 0x00000010 0x00000020 0x00000040 0x00000080 /* /* /* /* /* Reserved Reserved Reserved Reserved Reserved */ */ */ */ */

/* Define constants for ucPEAPPhase2Type field */ #define DOT1X_EAP_TYPE_PHASE2_MSCHAPV2 0x00000001 /* Define constants for ucTTLSPhase2Type field */ #define DOT1X_TTLS_PHASE2_UNDEFINED 0 #define DOT1X_TTLS_PHASE2_PAP 1 #define DOT1X_TTLS_PHASE2_CHAP 2 #define DOT1X_TTLS_PHASE2_MSCHAP 3 #define DOT1X_TTLS_PHASE2_MSCHAPV2 4

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_RESET
Delete all 802.1x supplicants and clear all supplicant and session statistics on the port. HTSetCommand(NS_DOT1X_SUPPLICANT_RESET, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_DOT1X_SUPPLICANT_RESET 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

none

SmartLibrary Command Reference: Volume 2 | 589

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_SESSION_STATS_INFO
Retrieve global supplicant statistics for a port. HTGetStructure(NS_DOT1X_SUPPLICANT_SESSION_STATS_INFO , 0, 0, 0, (void*) pNSDOT1XSupplicantSessionStatsInfo, sizeof(NSDOT1XSupplicantSessionStatsInfo), iHub, iSlot, iPort); HTGetStructure $NS_DOT1X_SUPPLICANT_SESSION_STATS_INFO myNSDOT1XSupplicantSessionStatsInfo \ 0 \ $iHub $iSlot $iPort 0 0 0 \

Tcl Usage

Related Structure

NSDOT1XSupplicantSessionStatsInfo

typedef struct tagNSDOT1XSupplicantSessionStatsInfo { NSSetupTime SessionRetrievedTime; /* time of day statistics was collected */ NSSetupTime SessionUpdateTime; /* time of day statistics was last updated */ U64 u64SetupTime; /* The aggregate time to complete successfully each of the supplicants. It does not count any failed attempts, in seconds */ unsigned long ulSetupRate; /* This is the number of supplicants authenticated per second. */ unsigned long ulAuthenticationAttempted; /* Total number of times sessions are initiated (go into active queues) including any retries */ unsigned long ulAuthenticationSuccessful; /* Total number of times sessions are sucessful established */ unsigned long ulAuthenticationFailed; /* Total number of times sessions have failed, including multiple retries */ unsigned long ulAuthenticationRetries; /* Total number of times supplicants are retried */

Continues >

590 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* Number of supplicant being retried */ /* Failed - all retries exhausted - in IDLE state Supplicant not considered failed once is restarted by the user */ unsigned long ulConfigured; /* Number of supplicants configured by the user */ unsigned long ulAuthenticating; /* authenticating supplicant */ unsigned long ulAuthenticated; /* Number of supplicants currently authenticated */ unsigned long ulIdle; /* Number of supplicants configured, but not in action */ unsigned long ulPending; /* Number of supplicants started or being retried, but in Pending state */ unsigned long ulTerminatedPending; /* Number of supplicants stopped by user, but in pending state */ NSSetupTime AuthenticationStartTime; /* time of day when first START packet is sent after statistics is cleared */ NSSetupTime LastSuccessTime; /* time of day when last SUCCESS packet is received */ U64 u64MinSetupTime; /* Min. authentication time, in microsecond */ U64 u64MaxSetupTime; /* Max. authentication time, in microsecond */ unsigned long ulReAuthenticationSuccessful; /* Total number of successful re-authentication from authenticator */ unsigned long ulReAuthenticationFailed; /* Total number of failed re-authentication from authenticator */ unsigned long ulReAuthenticationAttempted; /* Total number of re-authentication attempts from authenticator */ unsigned long ulFirstAttempted; /* Total number of supplicant 1st attempts */ unsigned long ulPassiveAttempted; /* Total number of times passive authentication are tried */ unsigned long ulRetriedSuccessful; /* Number of supplicant retries successful */ unsigned long ulRetriedFailed; /* Number of supplicant retries failed */ unsigned long ulFirstAttemptSuccessful; /* Number of successful supplicants 1st attempts*/ unsigned long ulFirstAttemptFailed; /* Number of failed supplicants 1st attempts */ unsigned long ulUserRetried; /* Number of user retries */ unsigned long ulUserRetriedSuccessful; /* Number of user retry successful */ unsigned long ulUserRetriedFailed; /* Number of user retry failed */ } NSDOT1XSupplicantSessionStatsInfo;

unsigned long ulRetried; unsigned long ulFailed;

Embedded Structure

U64

SmartLibrary Command Reference: Volume 2 | 591

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_DOT1X_SUPPLICANT_STATS_INFO
Retrieve statistics from one or more 802.1x supplicants. HTGetStructure(NS_DOT1X_SUPPLICANT_STATS_INFO, <index>, <count>, 0, (void*) pNSDOT1XSupplicantStatsInfo, sizeof(NSDOT1XSupplicantStatsInfo), iHub, iSlot, iPort); HTGetStructure $NS_DOT1X_SUPPLICANT_STATS_INFO <index> <count> 0 \ myNSDOT1XSupplicantStatsInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDOT1XSupplicantStatsInfo
Continues >

592 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSDOT1XSupplicantStatsInfo { unsigned long ulIndex; /* index number of supplicant */ unsigned long ulTxEAPOLStartFrames; /* The number of EAPOL Start frames that have been transmitted by this Supplicant */ unsigned long ulTxEAPOLLogOffFrames; /* The number of EAPOL Logoff frames that have been transmitted by this Supplicant */ unsigned long ulTxEAPOLResponseIDFrames; /* The number of EAPOL Resp/Id frames that have been transmitted by this Supplicant */ unsigned long ulTxEAPOLResponseFrames; /* The number of valid EAPOL Response frames (other than Resp/Id frames) that hve been transmitted by this Supplicant */ unsigned long ulTxEAPOLKeyFrames; /* The number of EAPOL-Key frames that have been sent by this Supplicant */ unsigned long ulTxEAPOLFrames; /* The number of EAPOL frames of any type that have been transmitted by this Supplicant */ unsigned long ulRxEAPOLFrames; /* The number of EAPOL frames of any type that have been received by this Supplicant */ unsigned long ulRxEAPOLRequestIDFrames; /* The number of EAPOL Request frames that have been received by this supplicant */ unsigned long ulRxEAPOLRequestFrames; /* number of EAPOL request frames received */ unsigned long ulRxEAPOLInvalidFrames; /* number of invalid EAPOL frames received */ unsigned long ulRxEAPOLLengthErrorFrames; /* The number of EAPOL frames that have been received by this Supplicant in which the Packet Body Length field is invalid */ unsigned long ulRxEAPOLKeyFrames; /* number of EAPOL key frames received */ unsigned long ulRxEAPOLSuccessFrames; /* number of EAPOL success frames received */ unsigned long ulRxEAPOLFailureFrames; /* number of EAPOL failure frames received */ unsigned long ulRxEAPOLAlertFrames; unsigned long ulEAPOLFrameVersion; /* protocol version number carried in the most recently received EAPOL frame */ unsigned char ucLastFrameMACAddress[6]; /* source MAC address carried in the most recently received frame */ unsigned char ucReserved[128]; /* Reserved */ } NSDOT1XSupplicantStatsInfo; Use DOT1X_ALL as iType3 <count> to retrieve statistics of all the supplicants on the port. All Tx Statistics are to be considered as attempted.

SmartLibrary Command Reference: Volume 2 | 593

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_DOT1X_SUPPLICANT_STATUS_INFO
Retrieve status information for one or more supplicants, including the following: 802.1x supplicant state, supplicant session state, failure code, session setup time, and number of retries. Use DOT1X_ALL as <count> (iType3) to retrieve status information for all supplicants on the port.

C Usage

HTGetStructure(NS_DOT1X_SUPPLICANT_STATUS_INFO, <index>, <count>, 0, (void*) pNSDOT1XSupplicantStatusInfo, sizeof(NSDOT1XSupplicantStatusInfo), iHub, iSlot, iPort); HTGetStructure $NS_DOT1X_SUPPLICANT_STATUS_INFO \ <index> <count> \ 0 \ myNSDOT1XSupplicantStatusInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSDOT1XSupplicantStatusInfo

typedef struct tagNSDOT1XSupplicantStatusInfo { unsigned long ulIndex; /* Index number of supplicant */ unsigned char ucSessionState; /* Supplicant session state possible values are: DOT1X_SUPPLICANT_SESSION_IDLE, DOT1X_SUPPLICANT_SESSION_PENDING_TO_START, DOT1X_SUPPLICANT_SESSION_AUTHENTICATING, DOT1X_SUPPLICANT_SESSION_AUTHENTICATED, DOT1X_SUPPLICANT_SESSION_PENDING_TO_TERMINATE DOT1X_SUPPLICANT_SESSION_DISCONNECTED */

Continues >

594 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned char ucSupplicantState; /* Supplicant state machine state possible values are: DOT1X_SUPPLICANT_LOG_OFF, DOT1X_SUPPLICANT_DISCONNECTED, DOT1X_SUPPLICANT_CONNECTING, DOT1X_SUPPLICANT_ACQUIRED, DOT1X_SUPPLICANT_AUTHENTICATING, DOT1X_SUPPLICANT_HELD, DOT1X_SUPPLICANT_AUTHENTICATED */ unsigned char ucFailureCode; /* Failure code, possible values are: DOT1X_SUPPLICANT_FAILURE_NONE DOT1X_SUPPLICANT_FAILURE_UNKNOWN DOT1X_SUPPLICANT_FAILURE_EAP_ID_REJECTED DOT1X_SUPPLICANT_FAILURE_EAP_RESPONSE_REJECTED DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE */ unsigned long ulRetries; /* Number of retries attempted */ NSSetupTime LastSetupTime; /* The last attemped Session setup time */ unsigned char ucReserved[64]; } NSDOT1XSupplicantStatusInfo; /* ucSessionState constants */ #define DOT1X_SUPPLICANT_SESSION_IDLE #define DOT1X_SUPPLICANT_SESSION_PENDING_TO_START #define DOT1X_SUPPLICANT_SESSION_AUTHENTICATING #define DOT1X_SUPPLICANT_SESSION_AUTHENTICATED #define DOT1X_SUPPLICANT_SESSION_PENDING_TO_TERMINATE #define DOT1X_SUPPLICANT_SESSION_DISCONNECTED /* SupplicantState constants */ #define DOT1X_SUPPLICANT_LOG_OFF #define DOT1X_SUPPLICANT_DISCONNECTED #define DOT1X_SUPPLICANT_CONNECTING #define DOT1X_SUPPLICANT_ACQUIRED #define DOT1X_SUPPLICANT_AUTHENTICATING #define DOT1X_SUPPLICANT_HELD #define DOT1X_SUPPLICANT_AUTHENTICATED

1 2 3 4 5 6

1 2 3 4 5 6 7

Continues >

SmartLibrary Command Reference: Volume 2 | 595

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* ucSessionState constants */ #define DOT1X_SUPPLICANT_SESSION_IDLE #define DOT1X_SUPPLICANT_SESSION_PENDING_TO_START #define DOT1X_SUPPLICANT_SESSION_AUTHENTICATING #define DOT1X_SUPPLICANT_SESSION_AUTHENTICATED #define DOT1X_SUPPLICANT_SESSION_PENDING_TO_TERMINATE #define DOT1X_SUPPLICANT_SESSION_DISCONNECTED /* SupplicantState constants */ #define DOT1X_SUPPLICANT_LOG_OFF #define DOT1X_SUPPLICANT_DISCONNECTED #define DOT1X_SUPPLICANT_CONNECTING #define DOT1X_SUPPLICANT_ACQUIRED #define DOT1X_SUPPLICANT_AUTHENTICATING #define DOT1X_SUPPLICANT_HELD #define DOT1X_SUPPLICANT_AUTHENTICATED

1 2 3 4 5 6

1 2 3 4 5 6 7

/* FailureCode constants */ #define DOT1X_SUPPLICANT_FAILURE_NONE 0 /* No failure */ #define DOT1X_SUPPLICANT_FAILURE_UNKNOWN 1 /* Unknown failure code */#define DOT1X_SUPPLICANT_FAILURE_EAP_ID_REJECTED 2 /* In ACQUIRED state, a FAILURE packet is received instead of an EAP Request (non ID) packet. This could be a mismatched ID */ #define DOT1X_SUPPLICANT_FAILURE_EAP_RESPONSE_REJECTED 3 /* In AUTHENTICATING state, a FAILURE packet is received instead of a EAPRequest packet or SUCCESS packet. This could be a mismatched ID or password */ #define DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE 4 /* MaxStart EAPOL start has been sent; session is forced to successful */ /* FailureCode constants (currently not supported) */ #define DOT1X_SUPPLICANT_FAILURE_EAP_NOT_SUPPORTED 5 /* EAP method not supported */ #define DOT1X_SUPPLICANT_FAILURE_USER_LOGOFF 6 /* User logoff after authentiacted */ #define DOT1X_SUPPLICANT_FAILURE_AUTH_LOGOFF 7 /* Logoff or failure received after authenticated from authenticator */ #define DOT1X_SUPPLICANT_FAILURE_AUTH_PERIOD_TIMEOUT 8 /* AuthPeriod time out - send EAPOL start again */

Continues >

596 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Description of ucSessionState States

DOT1X_SUPPLICANT_SESSION_IDLE This is the initial state of supplicants. After a call to NS_DOT1X_SUPPLICANT_CONFIG, the supplicant enters this state. Successful log-off or stopping of a supplicant (NS_DOT1X_SUPPLICANT_CONTROL with DOT1X_SUPPLICANT_STOP as the value for ulAction) transitions the supplicant to this state. DOT1X_SUPPLICANT_SESSION_PENDING_TO_START After a call to NS_DOT1X_SUPPLICANT_CONTROL with DOT1X_SUPPLICANT_START as the value for ulAction, the supplicant transitions to this state. Supplicants transition from this state to the DOT1X_SUPPLICANT_SESSION_AUTHENTICATING state based on configurations in NS_DOT1X_SUPPLICANT_PORT_CONFIG. DOT1X_SUPPLICANT_SESSION_AUTHENTICATING This state contains supplicants in DOT1X_SUPPLICANT_CONNECTING, DOT1X_SUPPLICANT_AUTHENTICATING or DOT1X_SUPPLICANT_ACQUIRED states. The supplicant transitions to DOT1X_SUPPLICANT_SESSION_AUTHENTICATED when it is authenticated. DOT1X_SUPPLICANT_SESSION_AUTHENTICATED Supplicants that are authenticated are in this state. DOT1X_SUPPLICANT_SESSION_PENDING_TO_TERMINATE A supplicant transitions to this state when it logs off or when a call is made to NS_DOT1X_SUPPLICANT_CONTROL with DOT1X_SUPPLICANT_STOP as the value for ulAction. DOT1X_SUPPLICANT_SESSION_DISCONNECTED A supplicant enters this state when authentication fails.

Continues >

SmartLibrary Command Reference: Volume 2 | 597

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Description of ucSupplicantState States

DOT1X_SUPPLICANT_CONNECTING In this state, the port has become operable and the supplicant is attempting to acquire an Authenticator. If an EAP-Request/Identity frame is received, the supplicant transitions to DOT1X_SUPPLICANT_ACQUIRED state. DOT1X_SUPPLICANT_LOG_OFF This state is entered if there is an explicit request to log off. An EAPOL-Logoff packet is transmitted to the Authenticator and a transition is made to DOT1X_SUPPLICANT_DISCONNECTED state. DOT1X_SUPPLICANT_DISCONNECTED This state is entered from any other state when the MAC service associated with the port is inoperable, or when the system is initialized or reinitialized. Its also entered from DOT1X_SUPPLICANT_LOG_OFF when EAPOL-Logoff packets are sent. DOT1X_SUPPLICANT_ACQUIRED In this state, the supplicant sends an EAP-Response/Identity frame. If it doesnt receive a response from Authenticator, it transitions back to the DOT1X_SUPPLICANT_CONNECTING state to reacquire the Authenticator. The supplicant transitions to DOT1X_SUPPLICANT_AUTHENTICATING state when it receives an EAP-Request Frame (other than a Request/Identity frame). DOT1X_SUPPLICANT_AUTHENTICATING In this state the supplicant is authenticating to the Authenticator. On receiving an EAP-Failure frame, the supplicant transitions to the DOT1X_SUPPLICANT_HELD state. On receiving an EAP-Success frame, the supplicant transitions to the DOT1X_SUPPLICANT_AUTHENTICATED state. On receiving an EAP-Request/Identity frame, the supplicant transitions to DOT1X_SUPPLICANT_ACQUIRED. DOT1X_SUPPLICANT_HELD This state is entered from any other state following an authentication failure. This state provides a delay before the supplicant attempts to acquire an Authenticator. DOT1X_SUPPLICANT_FAILURE_NONE No failure. DOT1X_SUPPLICANT_FAILURE_UNKNOWN Unknown failure code. DOT1X_SUPPLICANT_FAILURE_EAP_ID_REJECTED In ACQUIRED state, a FAILURE packet is received instead of an EAP Request (non ID) packet. This could be a mismatched ID. DOT1X_SUPPLICANT_FAILURE_EAP_RESPONSE_REJECTED In AUTHENTICATING state, a FAILURE packet is received instead of a EAP Request packet or SUCCESS packet. This could be a mismatched ID or password. DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE MaxStart EAPOL start has been sent, session is forced to successful.

Description of ucFailureCode options:

598 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_DOT1X_SUPPLICANT_STATUS_SEARCH_INFO
Retrieve a particular field in the NSDOT1XSupplicantStatusInfo structure that falls within the range specified by the u64SearchRangeLow and u64SearchRangeHigh values. It uses uiSearchField as a basis for the search and returns the values of uiReturnField using the u64Data array. It returns the number of supplicants matching the search criteria using ulReturnCount. HTGetStructure(NS_DOT1X_SUPPLICANT_STATUS_SEARCH_INFO , 0, 0, 0, (void*) pNSDOT1XSupplicantStatusSearchInfo, sizeof(NSDOT1XSupplicantStatusSearchInfo), iHub, iSlot, iPort); HTGetStructure $NS_DOT1X_SUPPLICANT_STATUS_SEARCH_INFO myNSDOT1XSupplicantStatusSearchInfo \ 0 \ $iHub $iSlot $iPort 0 0 0 \

C Usage

Tcl Usage

Related Structure

NSDOT1XSupplicantStatusSearchInfo

typedef struct tagNSDOT1XSupplicantStatusSearchInfo { /* Inputs */ unsigned long ulIndex; /* starting index of supplicant to start from */ unsigned long ulCount; /* number of supplicants to search starting from ulIndex */ unsigned short uiSearchField; /* search parameter: DOT1X_SUPPLICANT_STATUS_INDEX (4 bytes) DOT1X_SUPPLICANT_STATUS_SUPPICANT_STATE(1 byte) DOT1X_SUPPLICANT_STATUS_FAILURE_CODE (1 byte) DOT1X_SUPPLICANT_STATUS_SETUP_TIME (8 bytes) unsigned short uiReturnField; /* returned parameter: DOT1X_SUPPLICANT_STATUS_INDEX (4 bytes) DOT1X_SUPPLICANT_STATUS_SUPPICANT_STATE(1 byte) DOT1X_SUPPLICANT_STATUS_FAILURE_CODE (1 byte) DOT1X_SUPPLICANT_STATUS_SETUP_TIME (8 bytes) DOT1X_SUPPLICANT_STATUS_COUNT_ONLY */ U64 u64SearchRangeLow; /* search criteria - low limit */ U64 u64SearchRangeHigh; /* search criteria - high limit */ /* Outputs */ unsigned long ulReturnCount;

/* number of supplicants which match the search criteria */ U64 u64Data[MAX_SEARCH_SUPPLICANT_ARRAY]; unsigned char ucReserved[24]; } NSDOT1XSupplicantStatusSearchInfo;

Continues >

SmartLibrary Command Reference: Volume 2 | 599

Chapter 10: Universal (NS) NS iType1 Commands and Structures

SupplicantState constants:

DOT1X_SUPPLICANT_LOG_OFF DOT1X_SUPPLICANT_DISCONNECTED DOT1X_SUPPLICANT_CONNECTING DOT1X_SUPPLICANT_ACQUIRED DOT1X_SUPPLICANT_AUTHENTICATING DOT1X_SUPPLICANT_HELD DOT1X_SUPPLICANT_AUTHENTICATED DOT1X_SUPPLICANT_FAILURE_NONE DOT1X_SUPPLICANT_FAILURE_UNKNOWN

1 2 3 4 5 6 7 0 1 2 3

FailureCode constants:

DOT1X_SUPPLICANT_FAILURE_EAP_ID_REJECTED DOT1X_SUPPLICANT_FAILURE_EAP_RESPONSE_REJECTED

DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE 4 DOT1X_SUPPLICANT_STATUS_INDEX DOT1X_SUPPLICANT_STATUS_FAILURE_CODE DOT1X_SUPPLICANT_STATUS_SETUP_TIME DOT1X_SUPPLICANT_STATUS_COUNT 0 (4 bytes) 2 (1 byte) 3 (8 bytes) 0xFFFF (for uiReturnField only, used when retrieving only the matching count using ulReturnCount)
FailureCode
DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE(4) DOT1X_SUPPLICANT_FAILURE_UNKNOWN(1) DOT1X_SUPPLICANT_FAILURE_EAP_ID_REJECTED(2) DOT1X_SUPPLICANT_FAILURE_EAP_RESPONSE_REJECTED(3) DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE(4) DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE(4) DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE(4) DOT1X_SUPPLICANT_FAILURE_EAP_ID_REJECTED(2) DOT1X_SUPPLICANT_FAILURE_EAP_RESPONSE_REJECTED(3) DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE(4) DOT1X_SUPPLICANT_SUCCESS_EAPOL_START_NO_RESPONSE(4)

Possible values for uiReturnField and uiSearchField: DOT1X_SUPPLICANT_STATUS_SUPPICANT_STATE1 (1 byte)

Example 1:
Index
0 1 2 3 4 5 6 7 8 9 10

SupplicantState

SetupTime
15 sec 10 ms 10 sec 20 ms 03 sec 05 ms 05 sec 02 ms 25 sec 18 ms 10 sec 50 ms 20 sec 35 ms 10 sec 19 ms 08 sec 20 ms 50 sec 30 ms 02 sec 45 ms

DOT1X_SUPPLICANT_HELD(6) DOT1X_SUPPLICANT_LOG_OFF(1) DOT1X_SUPPLICANT_DISCONNECTED(2) DOT1X_SUPPLICANT_CONNECTING(3) DOT1X_SUPPLICANT_ACQUIRED(4) DOT1X_SUPPLICANT_AUTHENTICATING(5) DOT1X_SUPPLICANT_HELD(6) DOT1X_SUPPLICANT_AUTHENTICATED(7) DOT1X_SUPPLICANT_CONNECTING(3) DOT1X_SUPPLICANT_ACQUIRED(4) DOT1X_SUPPLICANT_AUTHENTICATING(5)

Continues >

600 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Input: ulIndex = 0 (starting index) ulCount = 9 (total number of supplicant to search) uiSearchField = DOT1X_SUPPLICANT_STATUS_SUPPICANT_STATE uiReturnField = DOT1X_SUPPLICANT_STATUS_INDEX u64SearchRangeLow.low = 1 u64SearchRangeHigh.low = 5 Output: ulReturnCount = u64Data[0].high u64Data[0].low u64Data[1].high u64Data[1].low u64Data[2].high u64Data[2].low u64Data[3].high u64Data[3].low u64Data[4].high u64Data[4].low u64Data[5].high u64Data[5].low 6 (number of matched supplicants) = 00 = 01 = 00 = 02 = 00 = 03 = 00 = 04 = 00 = 05 = 00 = 08

Example 2: ulIndex = 0 (starting index) ulCount = 9 (total number of supplicants to search) uiSearchField = DOT1X_SUPPLICANT_STATUS_FAILURE_CODE uiReturnField = DOT1X_SUPPLICANT_STATUS_SETUP_TIME u64SearchRangeLow.low = 2 u64SearchRangeHigh.low = 3 Output: ulReturnCount = u64Data[0].low u64Data[0].high u64Data[1].low u64Data[1].high u64Data[2].low u64Data[2].high u64Data[3].low u64Data[3].low 4 (number of matched supplicant) = 03 = 05 = 05 = 02 = 10 = 19 = 08 = 20

Embedded Structure

U64

SmartLibrary Command Reference: Volume 2 | 601

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_HIST_ACTIVE_TEST_INFO
Get the number of histogram records and the active histogram. HTGetStructure(NS_HIST_ACTIVE_TEST_INFO, 0, 0, 0, (void*) pLayer3HistActiveTest, sizeof(Layer3HistActiveTest), iHub, iSlot, iPort); HTGetStructure $NS_HIST_ACTIVE_TEST_INFO 0 0 0 \ myLayer3HistActiveTest \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

Layer3HistActiveTest

Used to retrieve the total number of records generated by the active histogram on the specified port. It also reports which histogram is active. Histogram records cease to be generated when: * Information is retrieved from the port using NS_HIST_ACTIVE_TEST_INFO. * Frames with signatures are no longer received. * Histogram records are retrieved from the port. Supported return values for ulTest are the following: L3_HIST_TEST_RAW_TAGS (5) L3_HIST_TEST_V2_LATENCY_PER_STREAM (7) L3_HIST_TEST_LATENCY_DISTRIBUTION(4) L3_HIST_TEST_SEQUENCE(1) L3_HIST_TEST_V2_LATENCY(6) typedef struct tagLayer3HistActiveTest { unsigned long ulTest; unsigned long ulRecords; } Layer3HistActiveTest;

Comments

For related commands and instructions on histogram results, refer to the SmartLibrary Overview and Procedures.

iType1 Description

NS_HIST_COMBO_PER_STREAM
Set up combination histogram tracking: latency distribution, latency per stream, and sequence tracking. Refer to Card Support for Latency Buckets on page 893 for information on the number of latency ranges (buckets) supported by different modules for the SmartBits 600x/6000x.

Continues >

602 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

C Usage

HTSetStructure(NS_HIST_COMBO_PER_STREAM, 0, 0, 0, (void*) pNSHistLatencyDistPerStream, sizeof(NSHistLatencyDistPerStream), iHub, iSlot, iPort); HTSetStructure $NS_HIST_COMBO_PER_STREAM 0 0 0 \ myNSHistLatencyDistPerStream \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistLatencyDistPerStream

typedef struct tagNSHistLatencyDistPerStream { unsigned long ulInterval[16]; /* In units of 100 nanoseconds */ unsigned char ucReserved[16]; /* Reserved, not used at this time */ } NSHistLatencyDistPerStream;

iType1 Description C Usage

NS_HIST_COMBO_PER_STREAM_INFO
Retrieve combination histogram tracking records. Latency values are shown for both in-sequence and out-of-sequence frames. HTGetStructure(NS_HIST_COMBO_PER_STREAM_INFO, <index>, 0, 0, (void*) pNSHistComboPerStreamInfo, sizeof(NSHistComboPerStreamInfo), iHub, iSlot, iPort); HTGetStructure $NS_HIST_COMBO_PER_STREAM_INFO <index> 0 0 \ myNSHistComboPerStreamInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistComboPerStreamInfo

typedef struct tagNSHistComboPerStreamInfo { unsigned long ulStreamID; /* A unique Stream Identifier /* Latency Per Stream info. */ U64 u64Total; /* sum of latencies for this Stream unsigned long ulMinLatency; /* min frame latency for this Stream unsigned long ulMaxLatency; /* max frame latency for this Stream /* Sequenc Tracking info. */

*/ */ */ */

Continues >

SmartLibrary Command Reference: Volume 2 | 603

Chapter 10: Universal (NS) NS iType1 Commands and Structures

u64TotalFrames; /* total frames rcvd for this Stream */ /* (u64Sequenced+u64Lost) */ U64 u64InSequence; /* no. frames rcvd in sequence */ U64 u64Reserved; U64 u64OutOfSequence; /* no. frames that broke the */ /* sequence and were either never */ /* rcvd, or not received before */ /* another out-of-sequence frame */ /* was noted. */ /* Latency Distribution info. */ U64 u64Frames[16]; /* Contains the number of frames */ /* with the specified latency range, */ /* for 16 different ranges . */ unsigned char ucReserved[128]; /* Reserved, not used at this time */ } NSHistComboPerStreamInfo;

U64

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

Comments

The Timestamp-Initialization Sequence must be used whenever the test involves latency-related measurements and a group. The timestamps on all ports in the group
must be simultaneously initialized. This process is described in the Timestamp-Initialization Sequence section located in SmartLibrary Command Reference Volume 1: Chapter 3, Original Functions and Structures.

iType1 Description C Usage

NS_HIST_ENHANCED_LATENCY_OPTION
Configure a port to keep track of a specifed latency type when running latency histogram tests. HTSetStructure(NS_HIST_ENHANCED_LATENCY_OPTION, 0, 0, 0, (void*) pNSHistEnhancedLatencyOption, sizeof(NSHistEnhancedLatencyOption), iHub, iSlot, iPort); HTSetStructure $ NS_HIST_ENHANCED_LATENCY_OPTION 0 0 0 myNSHistEnhancedLatencyOption 0 $iHub $iSlot $iPort

Tcl Usage Related Structure

NSHistEnhancedLatencyOption
Continues >

604 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* Latency (Rx Engine) Modes */ #define NS_HIST_EN_MIN_LATENCY #define NS_HIST_EN_TOTAL_LATENCY #define NS_HIST_EN_STREAMID_IN_STATS #define NS_HIST_EN_ENHANCED_RUNTIME

0x00000001 0x00000002 0x00000003 0x00000004 /* This mode is only supported on LAN XD TeraMetrics, XLW-3720/21 and XFP-3730/31A test modules */

/*Timestamp modes */ #define NS_HIST_EN_LAST_TIMESTAMP #define NS_HIST_EN_FIRST_TIMESTAMP

0x00000010 0x00000020

/*First TimeStamp */ /* Last TimeStamp */

/* Latency units ( Ignored on all modules except FBC-360x) */ #define NS_HIST_EN_ SCALE_1_MILLISECOND 0x00000100 /* Unit of 1 milliseconds */ #define NS_HIST_EN_ SCALE_100_NANOSECOND 0x00000200 /* Unit of 100 nano Seconds*/ typedef struct tagNSHistEnhancedLatencyOption { unsigned long ulOption; /* possible values, NS_HIST_EN_MIN_LATENCY NS_HIST_EN_TOTAL_LATENCY NS_HIST_EN_STREAMID_IN_STATS NS_HIST_EN_ENHANCED_RUNTIME - This mode is only supported on LAN XD TeraMetrics, XLW-3720/21 and XFP-3730/31A test modules. NS_HIST_EN_LAST_TIMESTAMP NS_HIST_EN_FIRST_TIMESTAMP NS_HIST_EN_SCALE_1_MILLISECOND NS_HIST_EN_SCALE_100_NANOSECOND */ unsigned char ucReserved[128]; } NSHistEnhancedLatencyOption; /* Reserved*/

Continues >

SmartLibrary Command Reference: Volume 2 | 605

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Comments

This message supersedes NS_HIST_LATENCY_OPTION/NS_HIST_LATENCY_OPTION_INFO. The different modes can be OR together for ulOption field.

The default mode for TereMetrics XD, XFP and XLW test modules is NS_HIST_EN_ENHANCED_RUNTIME, so there is no need to set this mode on these cards. In this mode all of these counters are available simultaneously:

Total Latency Frame Count (In Sequence + Out-of-Sequence)

Latency Buckets (16 Buckets) Time Stamp In Sequence Out-of-Sequence Min Latency Max Latency (First or Last, switchable during runtime)

This command works on LAN XD TeraMetrics, XLW-3720/21, XFP-3730/31A, LAN33xx, and POS-3504/05/10/11/18/19 test modules with TeraMetrics firmware greater than 5.50.Use this message to configure First or Last TimeStamp Latency counters is to be retrieved during for Histogram tests.

Retrieve multicast counters with the following existing SmartLibrary messages: NS_HIST_MULTICAST_LATENCY_PER_STREAM and NS_HIST_MULTICAST_LATENCY_PER_STREAM_INFO.

iType1 Description C Usage

NS_HIST_ENHANCED_LATENCY_OPTION_INFO
Retrieve Histogram Lantency settings. HTGetStructure(NS_HIST_ENHANCED_LATENCY_OPTION_INFO, 0, 0, 0, (void*) pNSHistEnhancedLatencyOption,sizeof(NSHistEnhancedLatencyOpti on), iHub, iSlot, iPort); HTGetStructure $ NS_HIST_ENHANCED_LATENCY_OPTION_INFO 0 0 0 myNSHistEnhancedLatencyOption 0 $iHub $iSlot $iPort

Tcl Usage Related Structure

NSHistEnhancedLatencyOption
Continues >

606 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSHistEnhancedLatencyOption { unsigned long ulOption; /* possible values, NS_HIST_EN_MIN_LATENCY NS_HIST_EN_TOTAL_LATENCY NS_HIST_EN_STREAMID_IN_STATS NS_HIST_EN_ENHANCED_RUNTIME - This mode is only supported on LAN XD TeraMetrics, XLW-3720/21 and XFP-3730/31A test modules. NS_HIST_EN_LAST_TIMESTAMP NS_HIST_EN_FIRST_TIMESTAMP NS_HIST_EN_SCALE_1_MILLISECOND NS_HIST_EN_SCALE_100_NANOSECOND */ unsigned char ucReserved[128]; } NSHistEnhancedLatencyOption; /* Reserved*/

typedef struct tagNSHistEnhancedLatencyOption { unsigned long ulOption; /* possible values, NS_HIST_EN_MIN_LATENCY NS_HIST_EN_TOTAL_LATENCY NS_HIST_EN_STREAMID_IN_STATS NS_HIST_EN_ENHANCED_RUNTIME - This mode is only supported on LAN XD TeraMetrics, XLW-3720/21 and XFP-3730/31A test modules. NS_HIST_EN_LAST_TIMESTAMP NS_HIST_EN_FIRST_TIMESTAMP NS_HIST_EN_SCALE_1_MILLISECOND NS_HIST_EN_SCALE_100_NANOSECOND */ unsigned char ucReserved[128]; } NSHistEnhancedLatencyOption; /* Reserved*/

Continues >

SmartLibrary Command Reference: Volume 2 | 607

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Comments

This message supersedes NS_HIST_LATENCY_OPTION/NS_HIST_LATENCY_OPTION_INFO. The different modes can be OR together for ulOption field.

The default mode for TereMetrics XD, XFP and XLW test modules is NS_HIST_EN_ENHANCED_RUNTIME, so there is no need to set this mode on these cards. In this mode all of these counters are available simultaneously:

Total Latency Frame Count (In Sequence + Out-of-Sequence)

Latency Buckets (16 Buckets) Time Stamp In Sequence Out-of-Sequence Min Latency Max Latency (First or Last, switchable during runtime)

This command works on LAN XD TeraMetrics, XLW-3720/21, XFP-3730/31A, LAN33xx, and POS-3504/05/10/11/18/19 test modules with TeraMetrics firmware greater than 5.50.Use this message to configure First or Last TimeStamp Latency counters is to be retrieved during for Histogram tests.

Retrieve multicast counters with the following existing SmartLibrary messages: NS_HIST_MULTICAST_LATENCY_PER_STREAM and NS_HIST_MULTICAST_LATENCY_PER_STREAM_INFO.

iType1 Description

NS_HIST_LATENCY_DIST_PER_STREAM
Set up Latency Distribution per stream histogram tracking. Refer to Card Support for Latency Buckets on page 893 for information on the number of latency ranges (buckets) supported by different modules for the SmartBits 600x/6000x. HTSetStructure(NS_HIST_LATENCY_DIST_PER_STREAM, <index>, 0, 0, (void*) pNSHistLatencyDistPerStream, sizeof(NSHistLatencyDistPerStream), iHub, iSlot, iPort); HTSetStructure $NS_HIST_LATENCY_DIST_PER_STREAM <index> 0 0 \ myNSHistLatencyDistPerStream \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

NSHistLatencyDistPerStream

608 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSHistLatencyDistPerStream { unsigned long ulInterval[16]; /* In units of 100 nanoseconds */ unsigned char ucReserved[16]; /* Reserved, not used at this time */ } NSHistLatencyDistPerStream;

Comments

The Timestamp-Initialization Sequence must be used whenever the test involves latency-related measurements and a group. The timestamps on all ports in the group
must be simultaneously initialized. This process is described in the Timestamp-Initialization Sequence section located in SmartLibrary Command Reference Volume 1: Chapter 3, Original Functions and Structures.

SmartLibrary Command Reference: Volume 2 | 609

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_HIST_LATENCY_DIST_PER_STREAM_INFO
Retrieve Latency Distribution per stream histogram records. HTGetStructure(NS_HIST_LATENCY_DIST_PER_STREAM_INFO, <index>, 0, 0, (void*) pNSHistLatencyDistPerStreamInfo, sizeof(NSHistLatencyDistPerStreamInfo), iHub, iSlot, iPort); HTGetStructure $NS_HIST_LATENCY_DIST_PER_STREAM_INFO <index> 0 0 \ myNSHistLatencyDistPerStreamInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistLatencyDistPerStreamInfo

typedef struct tagNSHistLatencyDistPerStreamInfo { unsigned long ulStream;/* a unique Stream identifier */ U64 u64Frames[16];/* Contains the number of frames */ /* with the specified latency range, */ /* for 16 different ranges. */ unsigned char ucReserved[128];/* Reserved, not used at this time */ } NSHistLatencyDistPerStreamInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

Comments

The Timestamp-Initialization Sequence must be used whenever the test involves latency-related measurements and a group. The timestamps on all ports in the group
must be simultaneously initialized. This process is described in the Timestamp-Initialization Sequence section located in SmartLibrary Command Reference Volume 1: Chapter 3, Original Functions and Structures.

610 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_HIST_LATENCY_OPTION
Configure a port to keep track of either the mininum or total latency when running the latency histogram tests. This command currently applies to TeraMetrics modules only. Limitations: When tracking total latency (NS_TRACK_TOTAL_LAT) for the jumbo histogram test (NS_HIST_COMBO_PER_STREAM or L3_HIST_V2_LATENCY_PER_STREAM), the port does not keep track of the number of frames received in sequence (u64InSequence or ulSequenced). The NS_TRACK_STREAM_ID option mode provides the ability to retrieve histogram test results without stopping the test on the port. This mode is applicable only for LAN TeraMetrics modules. In addition, this mode is applicable only when running the jumbo histogram test (NS_HIST_COMBO_PER_STREAM or L3_HIST_V2_LATENCY_PER_STREAM). For this mode, the port does not keep track of the minimum latency (ulMinLatency), maximum latency (ulMaxLatency), in sequence (u64InSequence), and out of sequence (u64OutOfSequence) histogram results.

C Usage

HTSetStructure(NS_HIST_LATENCY_OPTION, 0, 0, 0, (void*) pNSHistLatencyOption, sizeof(NSHistLatencyOption), iHub, iSlot, iPort); HTSetStructure $NS_HIST_LATENCY_OPTION 0 0 0 \ myNSHistLatencyOption \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistLatencyOption

typedef struct tagNSHistLatencyOption { unsigned short uiOption; /* NS_TRACK_MIN_LAT, NS_TRACK_TOTAL_LAT or NS_TRACK_STREAM_ID */ unsigned char ucLatencyScale; /* Set the latency interval scale that will be used for the latency over time histogram tests(NS_HIST_LATENCY_OVER_TIME and L3_HIST_V2_LATENCY). Possible values are: NS_LAT_SCALE_1_MILLISECOND NS_LAT_SCALE_100_NANOSECOND This field is currently only applicable for FBC-360x modules. */ /* Reserved*/

unsigned char ucReserved[9]; } NSHistLatencyOption;

SmartLibrary Command Reference: Volume 2 | 611

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_HIST_LATENCY_OPTION_INFO
Retrieve histogram-related options. This command currently applies to TeraMetrics modules only. Limitations: When tracking total latency (NS_TRACK_TOTAL_LAT) for the jumbo histogram test (NS_HIST_COMBO_PER_STREAM or L3_HIST_V2_LATENCY_PER_STREAM), the port does not keep track of the number of frames received in sequence (u64InSequence or ulSequenced). The NS_TRACK_STREAM_ID option mode provides the ability to retrieve histogram test results without stopping the test on the port. This mode is applicable only for LAN TeraMetrics modules. In addition, this mode is applicable only when running the jumbo histogram test (NS_HIST_COMBO_PER_STREAM or L3_HIST_V2_LATENCY_PER_STREAM). For this mode, the port does not keep track of the minimum latency (ulMinLatency), maximum latency (ulMaxLatency), in sequence (u64InSequence), and out of sequence (u64OutOfSequence) histogram results.

C Usage

HTGetStructure(NS_HIST_LATENCY_OPTION_INFO, 0, 0, 0, (void*) pNSHistLatencyOption, sizeof(NSHistLatencyOption), iHub, iSlot, iPort); HTGetStructure $NS_HIST_LATENCY_OPTION_INFO 0 0 0 \ myNSHistLatencyOption \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistLatencyOption

typedef struct tagNSHistLatencyOption { unsigned short uiOption; /* NS_TRACK_MIN_LAT, NS_TRACK_TOTAL_LAT or NS_TRACK_STREAM_ID */ unsigned char ucLatencyScale; /* Set the latency interval scale that will be used for the latency over time histogram tests(NS_HIST_LATENCY_OVER_TIME and L3_HIST_V2_LATENCY). Possible values are: NS_LAT_SCALE_1_MILLISECOND NS_LAT_SCALE_100_NANOSECOND This field is currently only applicable for FBC-360x modules. */ /* Reserved*/

unsigned char ucReserved[9]; } NSHistLatencyOption;

612 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_HIST_LATENCY_OVER_TIME
Set up latency over time histogram tracking. HTSetStructure(NS_HIST_LATENCY_OVER_TIME, <index>, 0, 0, (void*) pNSHistLatencyOverTime, sizeof(NSHistLatencyOverTime), iHub, iSlot, iPort); HTSetStructure $NS_HIST_LATENCY_OVER_TIME <index> 0 0 \ myNSHistLatencyOverTime \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistLatencyOverTime

typedef struct tagNSHistLatencyOverTime { unsigned long ulInterval; /* In units of millisecond */ unsigned char ucReserved[16]; /* Reserved, not used at this time */ } NSHistLatencyOverTime;

SmartLibrary Command Reference: Volume 2 | 613

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_HIST_LATENCY_OVER_TIME_INFO
Retrieve latency over time histogram records. HTGetStructure(NS_HIST_LATENCY_OVER_TIME_INFO, <index>, 0, 0, (void*) pNSHistLatencyOverTimeInfo, sizeof(NSHistLatencyOverTimeInfo), iHub, iSlot, iPort); HTGetStructure $NS_HIST_LATENCY_OVER_TIME_INFO <index> 0 0 \ myNSHistLatencyOverTimeInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistLatencyOverTimeInfo

typedef struct tagNSHistLatencyOverTimeInfo { unsigned long ulMinLatency; /* Minimum frame latency in units of 100 nanoseconds */ unsigned long ulMaxLatency; /* Maximum frame latency in units of 100 nanoseconds */ U64 u64Total; /* Sum of all latencies in units of 100 nanoseconds */ U64 u64Frames; /* Frames with signature fields (tags), */ /* received in this interval.(seq+lost) */ unsigned char ucReserved[128];/* Reserved, not used at this time */ } NSHistLatencyOverTimeInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

Comments

The Timestamp-Initialization Sequence must be used whenever the test involves latency-related measurements and a group. The timestamps on all ports in the group
must be simultaneously initialized. This process is described in the Timestamp-Initialization Sequence section located in SmartLibrary Command Reference Volume 1: Chapter 3, Original Functions and Structures.

614 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_HIST_MULTICAST_LATENCY_PER_STREAM
Specify and activate MulticastIP Latency Distribution histogram with first and last Receive timestamp. HTSetStructure(NS_HIST_MULTICAST_LATENCY_PER_STREAM, 0, 0, 0, pNSHistLatencyDistPerStream, iHub, iSlot, iPort); HTSetStructure $NS_HIST_MULTICAST_LATENCY_PER_STREAM 0 0 0 \ myNSHistLatencyDistPerStream \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistLatencyDistPerStream

typedef struct tagNSHistLatencyDistPerStream { unsigned long ulInterval[16]; /* In units of 100 nanoseconds */ unsigned char ucReserved[16]; /* Reserved, not used at this time */ } NSHistLatencyDistPerStream;

iType1 Description C Usage

NS_HIST_MULTICAST_LATENCY_PER_STREAM_INFO
Get MulticastIP Latency Distribution histogram information. HTGetStructure(NS_HIST_MULTICAST_LATENCY_PER_STREAM_INFO, <index>, 0, 0, (void*) pNSHistMulticastLatencyPerStreamInfo, sizeof(NSHistMulticastLatencyPerStreamInfo), iHub, iSlot, iPort); HTGetStructure $NS_HIST_MULTICAST_LATENCY_PER_STREAM_INFO <index> 0 0 \ myNSHistMulticastLatencyPerStreamInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistMulticastLatencyPerStreamInfo
Continues >

SmartLibrary Command Reference: Volume 2 | 615

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSHistMulticastLatencyPerStreamInfo { unsigned long ulStreamID; /* A unique Stream Identifier /* /* /* /* Latency Per Stream info. sum of latencies for this Stream min frame latency for this Stream max frame latency for this Stream

*/ */ */ */ */

U64 unsigned long unsigned long

u64Total; ulMinLatency; ulMaxLatency;

U64 U64 U64

u64TotalFrames; u64FirstRxTime; u64LastRxTime;

/* Sequence Tracking info. */ /* total frames rcvd for this Stream */ /* (u64Sequenced+u64Lost) */ /* first timestamp received for the group stream */ /* last timestamp received for the group stream */ Latency Distribution info. */ Contains the number of frames */ with the specified latency range, */ for 16 different user-specified time ranges */ Reserved, not used at this time */

U64

unsigned char

/* /* /* /* ucReserved[184]; /* u64Frames[16];

} NSHistMulticastLatencyPerStreamInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

iType1 Description C Usage

NS_HIST_RAW_SIGNATURE
Set up raw Signature histogram tracking. HTSetCommand(NS_HIST_RAW_SIGNATURE, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_HIST_RAW_SIGNATURE 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

616 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_HIST_RAW_SIGNATURE_INFO
Retrieve up raw Signature histogram information. HTGetStructure(NS_HIST_RAW_SIGNATURE_INFO, <index>, 0, 0, (void*) pNSHistRawSignatureInfo, sizeof(NSHistRawSignatureInfo), iHub, iSlot, iPort); HTGetStructure $NS_HIST_RAW_SIGNATURE_INFO <index> 0 0 \ myNSHistRawSignatureInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistRawSignatureInfo

typedef struct tagNSHistRawSignatureInfo { unsigned long ulStream;/* a unique Stream identifier */ unsigned long ulSequence;/* frame serial number */ unsigned long ulTransmitTime;/* timestamp of when this frame */ /* left its SmartBits port */ unsigned long ulReceiveTime;/* timestamp of when this frame was */ /* received by this SmartBits port */ unsigned char ucReserved[128];/* Reserved, not used at this time */ } NSHistRawSignatureInfo;

iType1 Description C Usage

NS_HIST_SEQUENCE_PER_STREAM
Set up Sequence histogram tracking. HTSetCommand(NS_HIST_SEQUENCE_PER_STREAM, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_HIST_SEQUENCE_PER_STREAM 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

SmartLibrary Command Reference: Volume 2 | 617

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_HIST_SEQUENCE_PER_STREAM_INFO
Retrieve Sequence histogram records. HTGetStructure(NS_HIST_SEQUENCE_PER_STREAM_INFO, <index>, 0, 0, (void*) pNSHistSequencePerStreamInfo, sizeof(NSHistSequencePerStreamInfo), iHub, iSlot, iPort); HTGetStructure $NS_HIST_SEQUENCE_PER_STREAM_INFO <index> 0 0 \ myNSHistSequencePerStreamInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHistSequencePerStreamInfo

typedef struct tagNSHistSequencePerStreamInfo { unsigned long ulStream; /* Stream identifier for this record */ U64 u64TotalFrames; /* no. of frames rcvd for this Stream */ /* (u64Sequenced+u64Lost) */ U64 u64InSequence; /* no. of frames received in sequence */ U64 u64OutOfSequence; /* no. of frames that broke the */ /* sequence and were either never */ /* received, or not received before */ /* another out-of-sequence frame was. */ unsigned long ulReserved; /* reserved for no of frames duplicated*/ unsigned char ucReserved[128]; /* Reserved, not used at this time */ } NSHistSequencePerStreamInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

618 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

NS_HIST_START
Clear Histogram records/Histogram remains in Receive state. HTSetCommand(NS_HIST_START, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_HIST_START 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage

NS_HW_CONFIG
Configure the port. HTSetStructure(NS_HW_CONFIG, 0, 0, 0, (void*) pNSHWConfig, sizeof(NSHWConfig), iHub, iSlot, iPort); HTSetStructure $NS_HW_CONFIG 0 0 0 \ myNSHWConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHWConfig

typedef struct tagNSHWConfig { unsigned char ucTimestampClockSource;

unsigned char ucLaserMode;

/* TimeStamp Clock Source TIMESTAMP_CLOCK_SOURCE_10_MHZ (default), TIMESTAMP_CLOCK_SOURCE_40_MHZ */ /* Laser Mode LASER_ENABLE (default), LASER_DISABLE */

unsigned char ucReserved[20]; }NSHWConfig;

SmartLibrary Command Reference: Volume 2 | 619

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_HW_CONFIG_INFO
Retrieve the port configuration. HTGetStructure(NS_HW_CONFIG_INFO, 0, 0, 0, (void*) pNSHWConfig, sizeof(NSHWConfig), iHub, iSlot, iPort); HTGetStructure $NS_HW_CONFIG_INFO 0 0 0 \ myNSHWConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSHWConfig

typedef struct tagNSHWConfig { unsigned char ucTimestampClockSource;

unsigned char ucLaserMode;

/* TimeStamp Clock Source TIMESTAMP_CLOCK_SOURCE_10_MHZ (default), TIMESTAMP_CLOCK_SOURCE_40_MHZ */ /* Laser Mode LASER_ENABLE (default), LASER_DISABLE */

unsigned char ucReserved[20]; }NSHWConfig;

iType1 Description Tcl Usage Related Structure

NS_IGMP_CLEAR_COUNTERS
Clear IGMP port counters and group statistics. Clears NS_IGMPV3_STATS_INFO and NS_IGMP_COUNTER_counters. HTSetCommand $NS_IGMP_CLEAR_COUNTERS 0 0 0 \\ 0 \$iHub $iSlot $iPort

None

620 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMP_CONFIG
Configure and initialize the IGMP protocol stack. HTSetStructure(NS_IGMP_CONFIG, 0, 0, 0, (void*) pNSIGMPConfig, sizeof(NSIGMPConfig), iHub, iSlot, iPort); HTSetStructure $NS_IGMP_CONFIG 0 0 0 \ myNSIGMPConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPConfig

This structure is to initialize and configure the IGMP protocol stack on the card. The maximum number of groups allowed per port depends on the card being used, as follows: - ML-7710/7711/7711S, ML-5710A, and LAN-3100A, 3101A/B, 3102A cards: 1002 - TeraMetrics-based modules: 20,000 - LAN-3201B/C: 2048 - WN-3441A, WN-3442A, WN-3445A: 2048 typedef struct tagNSIGMPConfig { unsigned char ucVersion;/* 1 = IGMP v1, 2 = IGMP v2 */ unsigned char ucOptions;/* Init options for this port */ /* This is a 8 bit field where 0 turns off all options */ /* Fields available include: */ /* IGMP_INIT_ALWAYS_SEND_V2_LEAVE_REQUEST = force leave */ /* requests on IGMP v2 configured ports */ unsigned char ucReserved[2];/* Reserved */ } NSIGMPConfig;

SmartLibrary Command Reference: Volume 2 | 621

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMP_COUNTER_INFO
Retrieve IGMP counters. HTGetStructure(NS_IGMP_COUNTER_INFO, 0, 0, 0, (void*) pNSIGMPCounterInfo, sizeof(NSIGMPCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_IGMP_COUNTER_INFO 0 0 0 \ myNSIGMPCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPCounterInfo

This structure is used to retrieve IGMP counter information. typedef struct tagNSIGMPCounterInfo { unsigned long ulTxFrames; /* Number of transmitted frames */ unsigned long ulTxJoinGroups; /* Number of groups joined */ unsigned long ulTxLeaveGroups; /* Number of groups that had a leave */ unsigned long ulRxFrames; /* Number of received frames */ unsigned long ulRxUnknownType; /* Number of unknown type frames */ unsigned long ulRxIPChecksumErrors; /* Number of received IP Check sum errors / unsigned long ulRxIGMPChecksumErrors;/* Number of received IGMP Check sum errors */ unsigned long ulRxIGMPLengthErrors; /* Number of received IGMP frames with an error in the length of the received packet */ unsigned long ulRxWrongVersionQueries;/* Number of queries done on the membership for a specific group with a wrong version */ unsigned char ucReserved[96]; /* Reserved, currently unused */ } NSIGMPCounterInfo;

622 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMP_JOIN
Join multicast group. HTSetStructure(NS_IGMP_JOIN, 0, 0, 0, (void*) pNSIGMPAddress, sizeof(NSIGMPAddress), iHub, iSlot, iPort); HTSetStructure $NS_IGMP_JOIN 0 0 0 \ myNSIGMPAddress \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPAddress

This structure is to specify an address to join or leave a multicast group. typedef struct tagNSIGMPAddress { unsigned char ucIPAddress[4]; /* The IP address of the multicast group */ unsigned long ulLineNo; /* WAN cards only - T1/E1 line to do join */ unsigned long ulChannelNo; /* WAN cards only - Channel number within the T1/E1 line */ unsigned long ulDLCI; /* WAN cards only- Local DLCI number */ unsigned char ucReserved[16]; } NSIGMPAddress;

SmartLibrary Command Reference: Volume 2 | 623

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_IGMP_GROUP_COUNT_INFO
This command returns the number of IGMP multicast groups on a port. A multicast configuration with the same multicast address but different multicast interface configuration is considered to be in separate multicast groups. A multicast group is a distinct combination of multicast interface and multicast address configuration. HTGetStructure(NS_IGMP_GROUP_COUNT_INFO, 0, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTGetStructure $NS_IGMP_GROUP_COUNT_INFO 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

ULong

624 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMP_JOIN_VLAN
Join a multicast group with VLAN tags. HTSetStructure(NS_IGMP_JOIN_VLAN, 0, 0, 0, (void*) pNSIGMPAddressVLAN, sizeof(NSIGMPAddressVLAN), iHub, iSlot, iPort); HTSetStructure $NS_IGMP_JOIN_VLAN 0 0 0 \ myNSIGMPAddressVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPAddressVLAN

This structure is to specify an address to join or leave a multicast group with VLAN tags. typedef struct tagNSIGMPAddressVLAN { unsigned char ucIPAddress[4]; /* The IP address of the multicast group */ unsigned short uiTPID; /* VLAN type (2 bytes), for now always assumes 0x8100 */ unsigned char ucPRI; /* user priority 0-7 (3 bits), use ETH_VLAN_PRI_XXX definitions */ unsigned char ucCFI; /* 1 = RIF present, 0 = RIF absent (1 bit), use ETH_VLAN_CFI_XXX definitions */ unsigned short uiVID; /* VLAN ID (12 bits) */ unsigned char ucReserved[8]; /* Reserved */ } NSIGMPAddressVLAN;

SmartLibrary Command Reference: Volume 2 | 625

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMP_LEAVE
Leave multicast group. HTSetStructure(NS_IGMP_LEAVE, 0, 0, 0, (void*) pNSIGMPAddress, sizeof(NSIGMPAddress), iHub, iSlot, iPort); HTSetStructure $NS_IGMP_LEAVE 0 0 0 \ myNSIGMPAddress \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPAddress

This structure is to specify an address to join or leave a multicast group. typedef struct tagNSIGMPAddress { unsigned char ucIPAddress[4]; /* The IP address of the multicast group */ unsigned long ulLineNo; /* WAN cards only - T1/E1 line to do join */ unsigned long ulChannelNo; /* WAN cards only - Channel number within the T1/E1 line */ unsigned long ulDLCI; /* WAN cards only- Local DLCI number */ unsigned char ucReserved[16]; } NSIGMPAddress;

626 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMP_LEAVE_VLAN
Leave multicast group with VLAN tag. HTSetStructure(NS_IGMP_LEAVE_VLAN, 0, 0, 0, (void*) pNSIGMPAddressVLAN, sizeof(NSIGMPAddressVLAN), iHub, iSlot, iPort); HTSetStructure $NS_IGMP_LEAVE_VLAN 0 0 0 \ myNSIGMPAddressVLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPAddressVLAN

This structure is to specify an address to join or leave a multicast group. typedef struct tagNSIGMPAddressVLAN { unsigned char ucIPAddress[4]; /* The IP address of the multicast group */ unsigned short uiTPID; /* VLAN type (2 bytes), for now always assumes 0x8100 */ unsigned char ucPRI; /* user priority 0-7 (3 bits), use ETH_VLAN_PRI_XXX definitions */ unsigned char ucCFI; /* 1 = RIF present, 0 = RIF absent (1 bit), use ETH_VLAN_CFI_XXX definitions */ unsigned short uiVID; /* VLAN ID (12 bits) */ unsigned char ucReserved[4]; /* Reserved */ } NSIGMPAddressVLAN;

iType1 Description C Usage

NS_IGMP_RESET
Reset IGMP protocol stack. HTSetCommand(NS_IGMP_RESET, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_IGMP_RESET 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

SmartLibrary Command Reference: Volume 2 | 627

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMP_TIMESTAMP_INFO
Retrieve the join and leave timestamps for one or more multicast groups. An array of NSIGMPTimestampInfo structures is required to retrieve information for multiple groups. HTGetStructure(NS_IGMP_TIMESTAMP_INFO, 0, 0, 0, (void*) pNSIGMPTimestampInfo, sizeof(NSIGMPTimestampInfo), iHub, iSlot, iPort); HTGetStructure $NS_IGMP_TIMESTAMP_INFO 0 0 0 \ myNSIGMPTimestampInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPTimestampInfo

This structure is used to retrieve the IGMP join and leave timestamps for a multicast group. typedef struct tagNSIGMPTimestampInfo { unsigned char ucIPAddress[4]; /* The IP address of the multicast group */ unsigned long ulLineNo; /* WAN cards only - T1/E1 line to do join */ unsigned long ulChannelNo; /* WAN cards only - Channel number within the T1/E1 line */ unsigned long ulDLCI; /* WAN cards only - Local DLCI number */ unsigned long ulJoinTime; /* Join timestamp */ unsigned long ulLeaveTime; /* Leave timestamp */ unsigned char ucReserved[16]; } NSIGMPTimestampInfo;

628 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMPV2_ALL_INFO
Retrieve Join and Leave timestamps for all IGMPv1 and IGMPv2 multicast groups. HTGetStructure(NS_IGMPV2_ALL_INFO, 0, 0, 0, (void*) pNSIGMPv2Info, sizeof(NSIGMPv2Info), iHub, iSlot, iPort); HTGetStructure $NS_IGMPV2_ALL_INFO 0 0 0 \ myNSIGMPv2Info \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv2Info

Retrieve Join and Leave timestamps for all specified IGMP v1 or IGMPv2 multicast group. typedef struct tagNSIGMPv2Info { unsigned char ucGroupIPAddress[4];/*Input/Output, The IP address of the multicast group */ unsigned char ucVLANEnable;/* Input/Output, 1-enable,0-disabled specifies whether or not this multicast group has an associated VLAN tag */ unsigned char ucPRI;/* Input/Output, VLAN priority 0-7 */ unsigned char ucCFI;/* Input/Output, VLAN CFI, 1 = RIF present, 0 = RIF absent */ unsigned short uiVID;/* Input/Output, VLAN ID */ unsigned char ucPPPMode;/* Input/Output , PPP Mode possible values are PPP_USE_NONE, PPP_USE_PPP_SESSION_ID. This field applies only to Terametric modules. */ unsigned short uiPPPInstance;/* Input/Output, PPP instance */ unsigned short uiVCIndex;/* Input/Output ,Virtual channel index for ATM cards */ unsigned char ucMACAddress[6];/* Output, source MAC address */ unsigned char ucIPAddress[4];/* Output, source IP address */ unsigned long ulJoinTimestamp;/* Output, Join TimeStamp */ unsigned long ulLeaveTimestamp;/* Output, Leave TimeStamp */ unsigned char ucReserved[50]; }NSIGMPv2Info;

SmartLibrary Command Reference: Volume 2 | 629

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMPV2_INFO
Retrieve Join and Leave timestamps for a specific multicast group (v1, v2). HTGetStructure(NS_IGMPV2_INFO, 0, 0, 0, (void*) pNSIGMPv2Info, sizeof(NSIGMPv2Info), iHub, iSlot, iPort); HTGetStructure $NS_IGMPV2_INFO 0 0 0 \ myNSIGMPv2Info \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv2Info

Retrieve Join and Leave timestamps for a specific IGMPv1 or IGMPv2 multicast group. typedef struct tagNSIGMPv2Info { unsigned char ucGroupIPAddress[4];/*Input/Output, The IP address of the multicast group */ unsigned char ucVLANEnable;/* Input/Output, 1-enable,0-disabled specifies whether or not this multicast group has an associated VLAN tag */ unsigned char ucPRI;/* Input/Output, VLAN priority 0-7 */ unsigned char ucCFI;/* Input/Output, VLAN CFI, 1 = RIF present, 0 = RIF absent */ unsigned short uiVID;/* Input/Output, VLAN ID */ unsigned char ucPPPMode;/* Input/Output , PPP Mode possible values are PPP_USE_NONE, PPP_USE_PPP_SESSION_ID. This field applies only to Terametric modules. */ unsigned short uiPPPInstance;/* Input/Output, PPP instance */ unsigned short uiVCIndex;/* Input/Output ,Virtual channel index for ATM cards */ unsigned char ucMACAddress[6];/* Output, source MAC address */ unsigned char ucIPAddress[4];/* Output, source IP address */ unsigned long ulJoinTimestamp;/* Output, Join TimeStamp */ unsigned long ulLeaveTimestamp;/* Output, Leave TimeStamp */ unsigned char ucReserved[50]; }NSIGMPv2Info;

630 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMPV2_JOIN
Join one or more multicast groups for IGMPv1 or IGMPv2. HTSetStructure(NS_IGMPV2_JOIN, 0, 0, 0, (void*) pNSIGMPv2GroupID, sizeof(NSIGMPv2GroupID), iHub, iSlot, iPort); HTSetStructure $NS_IGMPV2_JOIN 0 0 0 \ myNSIGMPv2GroupID \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv2GroupID

This command allows multiple structures to enable configuration of multiple multicast addresses for TeraMetrics modules. The following fields uiVID, uiPPPInstance, and ucIPAddress defines an "interface," which is the virtual host in the sense of IGMP. Each interface can be considered as the independent host on the same network. So users can join/leave against each interface and each interface will respond to queries from DUT independently. If ucPPPMode is enabled the capture frame will be: |-------------------------------------------------------------------------------------------------------------------| |Dst MAC | Src MAC | 0x8864 | 0x11 | 0x00 | Session_ID | PPPOE Length | 0x0021 | IP | IGMP | |--------------------------------------------------------------------------------------------------------------------| If PPPOE is combined with VLAN, the frame will look like the following. |--------------------------------------------------------------------------------------------------------------------------------------------| |Dst MAC | Src MAC | 0x8100 | VLAN-ID | 0x8864 | 0x11 | 0x00 | Session_ID | PPPOE Length | 0x0021 | IP | IGMP| |--------------------------------------------------------------------------------------------------------------------------------------------| This command allows multiple(s) structures to enable configuration of multiple multicast addresses for TeraMetrics modules.

Continues >

SmartLibrary Command Reference: Volume 2 | 631

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIGMPv2GroupID { unsigned char ucGroupIPAddress[4];/*The IP address of the multicast group */ unsigned char ucVLANEnable;/*1-enable,0-disabled specifies whether or not this multicast group has an associated VLAN tag */ unsigned char ucPRI;/* VLAN priority 0-7 */ unsigned char ucCFI;/* VLAN CFI, 1 = RIF present, 0 = RIF absent */ unsigned short uiVID; /* VLAN ID */ unsigned char ucPPPMode;/* PPP_USE_NONE, PPP_USE_PPP_SESSION_ID. This field applies only to TeraMetrics modules. */ unsigned short uiPPPInstance;/* PPP session index. Currently this is valid if PPP_USE_PPP_SESSION_ID are on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual IGMP over PPPOE packet. So user can issue IGMP over PPPOE packet without PPP session in this case. */ unsigned short uiVCIndex;/* Virtual channel index for ATM cards */ unsigned char ucMACAddress[6];/*source MAC Address of IGMP Packet, If it is 0, port MAC address will be used as source MAC address of IGMP packet */ unsigned char ucIPAddress[4];/* source IP Address of IGMP Packet, If it is 0, port address will be used as source IP address of IGMP packet. */ unsigned char ucReserved[50]; }NSIGMPv2GroupID; #define PPP_USE_NONE #define PPP_USE_PPPOE /* No PPP frame */ /* Reserved - Use PPPOE frame. If this flag is on, IGMP frames will have 8 bytes PPPOE header between IP header and Layer2 header. */ #define PPP_USE_PPP 0x02 /* Reserved - Not supported currently */ #define PPP_USE_PPP_SESSION_ID 0x04 /* Use PPPOE frame. If this flag is on, IGMP frames will have 8 bytes PPPOE header between IP header and Layer2 header.The difference from USE_PPPOE is that with this flag, igmp stack doesn't consult ppp stack to get PPPOE session id but use the given ppp_index as PPPOE session id 0x00 0x01

632 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMPV2_LEAVE
Leave a multicast group for IGMPv1 or IGMPv2. HTSetStructure(NS_IGMPV2_LEAVE, 0, 0, 0, (void*) pNSIGMPv2GroupID, sizeof(NSIGMPv2GroupID), iHub, iSlot, iPort); HTSetStructure $NS_IGMPV2_LEAVE 0 0 0 \ myNSIGMPv2GroupID \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv2GroupID

The fields uiVID, uiPPPInstance and ucIPAddress define an interface, which is the virtual host in the sense of IGMP. Each interface can be considered as the independent host in same network. The user can join/leave against each interface and each interface will respond to queries from DUT independently. typedef struct tagNSIGMPv2GroupID { unsigned char ucGroupIPAddress[4]; /*The IP address of the multicast group*/ unsigned char ucVLANEnable; /*1-enable,0-disabled specifies whether or not this multicast group has an associated VLAN tag */ unsigned char ucPRI;/* VLAN priority 0-7 */ unsigned char ucCFI;/* VLAN CFI, 1 = RIF present, 0 = RIF absent */ unsigned short uiVID;/* VLAN ID */ unsigned char ucPPPMode;/* PPP_USE_NONE, PPP_USE_PPP_SESSION_ID. This field applies only to TeraMetrics modules. */ unsigned short uiPPPInstance;/* PPP session index. Currently this is valid if PPP_USE_PPP_SESSION_ID are on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual IGMP over PPPOE packet. So user can issue IGMP over PPPOE packet without PPP session in this case. */ unsigned short uiVCIndex;/* Virtual channel index for ATM cards*/ unsigned char ucMACAddress[6];/*source MAC Address of IGMP Packet, If it is 0, port MAC address will be used as source MAC address of IGMP packet */ unsigned char ucIPAddress[4];/* source IP Address of IGMP Packet, If it is 0, port address will be used as source IP address of IGMP packet. */ unsigned char ucReserved[50]; }NSIGMPv2GroupID;

SmartLibrary Command Reference: Volume 2 | 633

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMPV3_ALL_GROUP_INFO
Retrieve the Join and Leave timestamps for all multicast groups. HTGetStructure(NS_IGMPV3_ALL_GROUP_INFO, 0, 0, 0, (void*) pNSIGMPv3GroupInfo, sizeof(NSIGMPv3GroupInfo), iHub, iSlot, iPort); HTGetStructure $NS_IGMPV3_ALL_GROUP_INFO 0 0 0 \ myNSIGMPv3GroupInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv3GroupInfo

Retrieve the join and leave timestamp for multicast groups and interfaces. The following fields are used as input when this structure is used with NS_IGMPV3_GROUP_INFO. The Inputs are used to identify the Multicast group. ucGroupIPAddress, ucVLANEnable, ucPRI, ucCFI, uiVID, ucIPAddress and ucMACAddress. The leave and join timestamps for the group are returned. Timestamps are per multicast group, in units of 0.1 microseconds. Timestamp values initially start from 0 when the chassis is turned on. The timestamp counter overflows after 430 seconds. JoinTimeStamps and LeaveTimeStamps will change for any of these two events.

An event is considered Join for IGMPv3 when the mode is INCLUDE with a non-empty source list or EXCLUDE with an empty source list. An event is considered Leave for IGMPv3 when the mode is EXCLUDE with a non-empty source list or INCLUDE with an empty source list.

Comments for ulLastStateTimestamp In IGMP, all membership reports sent out from a port are called state change reports. Whenever the host wants to change the current state of membership on a specific group, such as a different source list, the host should send out a state change report. Therefore, the new state change timestamp of the group should change with each report of that group sent out. However, there are two special cases. If it is the first report to the group, the IGMP stack treats it as a join report and saves the timestamp to ulJoinTimestamp. If the report is trying to INCLUDE NULL, the IGMP stack treats it as leave report and saves the timestamp to ulLeaveTimestamp. In these two cases, ulLastStateTimestamp is not updated. Example Join t1 State change t2 State change t3 State change t4 Leave t5 => ulJoinTimestamp = t1, ulLastStateTimestamp = t4, and ulLeaveTimestamp = t5

Continues >

634 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIGMPv3GroupInfo { unsigned char ucGroupIPAddress[4];/* Input - group address */ unsigned char ucVLANEnable;/* Input - 1 - enable, 0 - disabled specifies whether or not this multicast group has an associated VLAN tag */ unsigned char ucPRI;/* Input - user priority 0-7 (3 bits) */ unsigned char ucCFI;/* Input - 1 = RIF present, 0 = RIF absent */ unsigned short uiVID;/* Input - VLAN ID (12 bits) */ unsigned char ucIPAddress[4];/* Input - source IP for interface */ unsigned char ucMACAddress[6];/* Input - MAC address for interface */ unsigned char ucPPPMode;/* PPP Mode possible values are PPP_USE_NONE (default) and PPP_USE_PPP_SESSION_ID. This field applies only to Terametric modules. */ unsigned short uiPPPInstance;/* starting PPP index. This field applies only to Terametric modules. */ unsigned long ulJoinTimestamp;/* Join Time Stamp */ unsigned long ulLeaveTimestamp;/* Leave Time Stamp */ unsigned long ulLastStateTimestamp; /* Timestamp for the last state change. This excludes the initial join report and the leave report. The timestamp for these 2 events are available in the previous 2 fields. */ unsigned char ucReserved[21]; /* Reserved */ } NSIGMPv3GroupInfo;

SmartLibrary Command Reference: Volume 2 | 635

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMPV3_CONFIG
Initialize and configure the IGMP stack. HTSetStructure(NS_IGMPV3_CONFIG, 0, 0, 0, (void*) pNSIGMPv3Config, sizeof(NSIGMPv3Config), iHub, iSlot, iPort); HTSetStructure $NS_IGMPV3_CONFIG 0 0 0 \ myNSIGMPv3Config \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv3Config

Initialize and configure the IGMP stack. Robustness Variable, parameter helps ensure IGMPv3's robustness against packet loss. It allows tuning for the expected packet loss on a network. This variable determines the number of times a State-Change Record or an Unsolicited Membership Report is transmitted. Valid values are [0,7]. If zero is specified then the default of 2 will be used. It can also be used for IGMPv1 or v2 when the "force unsolicited join" is enabled (on TeraMetrics cards), otherwise this parameter will be ignored if the operational mode or the host compatibility mode is IGMPv1 or v2. Unsolicited Report Interval parameter determines the maximum interval between repetitions of a host's unsolicited report of membership in a group. Valid values are [0,....255] seconds. The default value is one second. The default will be used if zero is specified. It can also be used for IGMPv1 or v2 when the "force unsolicited join" is enabled (on TeraMetrics cards), otherwise this parameter will be ignored if the operational mode or the host compatibility mode is IGMPv1 or v2.

Continues >

636 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

ulInitialReportGap: The time interval between the first reports of different groups generated as a result. It is applicable to IGMPv1, IGMPv2 and IGMPv3. For IGMPv1 and IGMPv2 All the initial report gap is controlled by stack initial report gap NSIGMPv3Config(ulInitialReportGap) For IGMPv3 1. The initial report gap is controlled by the stack initial report gap NSIGMPv3Config(ulInitialReportGap) 2. Within the groups configured by one single structure, with NS_IGMPV3_GROUP_CONFIG, the initial report gap is controlled by NSIGMPv3GroupConfig(ulInitialReportGap). However, if NSIGMPv3GroupConfig(ulInitialReportGap) = 0, the initial report gap = NSIGMPv3Config(ulInitialReportGap). 3. If the NSIGMPv3GroupConfig(ulInitialReportGap) > 0, the initial report gap between the groups configured by different structure is still controlled by NSIGMPv3Config(ulInitialReportGap). Therefore, NSIGMPv3Config(ulInitialReportGap) seems like an inter burst gap. Example: There are 3 structures sent by NS_IGMPV3_GROUP_CONFIG, and in each structure including 3 groups. NSIGMPv3Config(ulInitialReportGap) = IRPs NSIGMPv3GroupConfig(0.ulInitialReportGap) = IRP0 > 0 NSIGMPv3GroupConfig(1.ulInitialReportGap) = IRP1 = 0 NSIGMPv3GroupConfig(2.ulInitialReportGap) = IRP2 > 0 The behavior will be IRP0 IRP0 Struct 0 |-------->|-------->| IRPs IRPs IRPs (because IRP1 = 0) Struct 1 Struct 2 ----->|----->|----->| IRPs IRP2 IRP2 ----->|------->|------->|

Note: The Unsolicited IGMP Join Reports is supported on TeraMetrics LAN and POS modules.

Continues >

SmartLibrary Command Reference: Volume 2 | 637

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIGMPv3Config { unsigned char ucVersion; /* IGMP_V1, IGMP_V2, IGMP_V3 In the IGMPv1 mode, the implementation will ignore any IGMPv2 and IGMPv3 specific packets. You are not allowed switch to other two versions. In the IGMPv2 mode, the implementation will ignore any IGMPv3 specific packets.In this mode you will be capable of inter-operating with IGMPv1.In the IGMPv3 mode, it will be capable of inter-operating with both IGMPv1 and IGMPv2. */ unsigned char ucOptions; /* possible bit values, IGMPV3_FORCE_IGMPV2_LEAVES (Not Supported on LAN-3101. This is specific to IGMPv2. It determines if the implementation will send an IGMPv2 Leave Message regardless of whether it was the last host to report membership or if an IGMPv1 query is detected). IGMPV3_SUPPRESS_IGMPV3_RECORDS (determines if the implementation will allow a pending IGMPv3 Membership Record to be suppressed by either an IGMPv1 or an IGMPv2 Membership Report. If set IMPV3 Membership Record is suppressed if an IGMPv1/v2 Membership Report is received for the same group) IGMP_FORCE_RESPONSE All joined interfaces must respond to queries, IGMP v1/v2 (for only TM cards ) IGMPV1_V2_FORCE_UNSOLICITED_JOIN_REPORTS For IGMPv1/v2, force to send repeated unsolicited IGMP join reports,depending on robustness variable and unsolicited report interval. This option is only applicable to IGMPv1/v2 (IGMPv3 already has it by default). This is only for TM cards */

Continues >

638 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned short uiMaxNumGroups;

/* The maximum number of groups- always required input. The maximum value for the TeraMetrics family of modules is 20000. */ /* The maximum number of source IP address lists per group. The maximum value for the TeraMetrics family of modules is 10. For the LAN-3101A/B modules, the max is 2. */ /* The maximum number of source IP addresses per address list. The maximum value is 100. */

unsigned char ucMaxAddressBlock;

unsigned short uiMaxIPPerBlock;

unsigned char ucRobustnessVariable; /* IGMPv3, or IGMPv1/v2 when force unsolicited join reports is enabled (on TeraMetrics cards), it is the number of times to repeat transmission report. Range is 0-7. If zero is entered the default value 2 is used. unsigned char ucUnsolicitedReportInterval; /* IGMPv3, or IGMPv1/v2 when force unsolicited join reports is enabled (on TeraMetrics cards), it is the time interval in seconds between the repeated transmission of reports of reports. Default: 10 seconds*/ unsigned long ulInitialReportGap; /*Initial report gap in microseconds. Only supported by TeraMetrics Cards. */ /* Reserved */

unsigned char ucReserved[46]; }NSIGMPv3Config; #define IGMPV3_FORCE_IGMPV2_LEAVES #define IGMPV3_SUPPRESS_IGMPV3_RECORDS #define IGMP_FORCE_RESPONSE #define

#define #define #define

0x80 0x40 0x20 /*for all joined interfaces to respond to queries, IGMP v1/v2 */ IGMPV1_V2_FORCE_UNSOLICITED_JOIN_REPORTS 0x10 /*To send multiple unsolicited IGMP joins for IGMPv1/v2, depending on robustness variable and unsolicited report interval. This option is only applicable to the IGMPv1/v2 (IGMPv3 already has this feature by default). This is only for TM TM cards. */ IGMP_V1 0x01 IGMP_V2 0x02 IGMP_V3 0x03

SmartLibrary Command Reference: Volume 2 | 639

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMPV3_GROUP_CONFIG
Sets the interface for one or more multicast groups. HTSetStructure(NS_IGMPV3_GROUP_CONFIG, 0, 0, 0, (void*) pNSIGMPv3GroupConfig, sizeof(NSIGMPv3GroupConfig), iHub, iSlot, iPort); HTSetStructure $NS_IGMPV3_GROUP_CONFIG 0 0 0 \ myNSIGMPv3GroupConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv3GroupConfig

Sets the Interface for one or more groups. The command enables you to configure a large number of interfaces with a number of multicast groups in each interface at one time. In each interface, the IP address and MAC address fields are used as the source IP and source MAC address for IGMP packets. To use the port level IP and MAC addresses, these fields should be filled with zeroes. Users may change Source IP or VLAN for different interfaces. But if MAC address is changed for different interfaces, Source IP must be changed for each different MAC address. Valid values for uiNumInterface is from 1 to 1024. Valid values for uiNumGroup is from 1 to 1024. The total multiplication of the number of interfaces(uiNumInterface) and number of multicast groups(uiNumGroup) in each interface can't be over 1024. This command allows multiple structures, to enable configuration of multiple multicast addresses for Terametric cards. If ucPPPMode is enabled the capture frame will be:
|-----------------------------------------------------------------------| |Dst MAC|Src MAC|0x8864|0x11|0x00|Session_ID|PPPOE Length|0x0021|IP|IGMP| |-----------------------------------------------------------------------|

If PPPOE is combined with VLAN, the frame will look like the following.
|--------------------------------------------------------------------------------------| |Dst MAC|Src MAC|0x8100|VLAN-ID|0x8864|0x11|0x00|Session_ID|PPPOE Length|0x0021|IP|IGMP| |--------------------------------------------------------------------------------------|

This command allows multiple(s) structures to enable configuration of multiple multicast addresses for TeraMetrics modules.

Continues >

640 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIGMPv3GroupConfig { /* interface parameters */ unsigned char ucIPAddress[4]; unsigned char ucMACAddress[6]; unsigned char ucVLANEnable;

/* source IP, interface address */ /* MAC address , interface addresss */ /*1-enable,0-disabled specifies whether or not this multicast group has an associated VLAN tag */

/* VLAN data for interface */ unsigned char ucPRI; unsigned char ucCFI; unsigned short uiVID; unsigned unsigned unsigned */ unsigned

/* user priority 0-7 (3 bits) */ /* 1 = RIF present, 0 = RIF absent /* VLAN ID (12 bits) */

*/

short uiNumInterface; /* number of interfaces to create*/ short uiIPAddressStepCount; /* delta value to change interface */ short uiMACStepCount; /* delta value to change interface MAC address short uiVIDStepCount; /* delta value to change interface VLAN ID */

/* multicast group parameters */ unsigned char ucGroupIPAddress[4]; unsigned short uiNumGroup;

/* group address */

/* number of multicast groups to create per interface*/ unsigned short uiGroupIPStepCount; /* delta value to change ucGroupIPAddress */ unsigned long ulInitialReportGap; /* time interval to generate reports in microseconds */ /* possible values are IGMPV3_EXCLUDE_FILTER_MODE(suppress listed IP's And IGMPV3_INCLUDE_FILTER_MODE (allow listed IP's) */ /* PPP_USE_NONE(default), PPP_USE_PPP_SESSION_ID Only for Terametric cards*/ /* starting PPP index Only for Terametric cards PPP session index. Currently this is valid if PPP_USE_PPP_SESSION_ID is on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual IGMP over PPPOE packet. So user can issue IGMP over PPPOE packet without PPP session in this case. */

unsigned short uiFilterMode;

unsigned char ucPPPMode;

unsigned short uiPPPInstance;

Continues >

SmartLibrary Command Reference: Volume 2 | 641

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned short uiPPPInstanceStepCount; /*ppp index change step, if this is 0 only one PPP instance will apply to the groups. Only applicable for the TeraMetrics family of modules */ unsigned short uiVCIndex; /* Only applicable for the ATM TeraMetrics family of modules */ /* The number of source IP address lists to include for the groups. For the LAN-3101A/B modules, the maximum number of lists that can be included is 2. For the TeraMetrics family of modules, the max is 10. */

unsigned char ucNumAddressBlock;

unsigned char ucReserved[43]; /* Reserved */ IGMPGroupAddressBlock IPAddressBlock[100]; /* The source IP address lists that an interface wishes to listen to for the groups. The IP address lists will be included in the join/leave reports for the groups.*/ } NSIGMPv3GroupConfig;

Embedded Structure

IGMPGroupAddressBlock

typedef struct tagIGMPGroupAddressBlock { unsigned char ucStartIPAddress[4];

/* starting address for the IP address list */ unsigned char ucUpperIPAddressBoundary[4]; /* upper limit for the IP address list (only applicable for the LAN-3101A/B modules). */ unsigned short uiIPChangeStep; /* delta value to increase ucStartIPAddress */ unsigned short uiNumIP; /* number of IP addresses in the list.The maximum value is set by the "uiMaxIPPerBlock" field for the NS_IGMPV3_CONFIG command. */ unsigned char ucReserved[30]; /* reserved */ }IGMPGroupAddressBlock;

iType1 Description C Usage

NS_IGMPV3_GROUP_INFO
Retrieve the Join and Leave timestamp for a specific multicast group and interface. HTGetStructure(NS_IGMPV3_GROUP_INFO, 0, 0, 0, (void*) pNSIGMPv3GroupInfo, sizeof(NSIGMPv3GroupInfo), iHub, iSlot, iPort);

Continues >

642 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Tcl Usage

HTGetStructure $NS_IGMPV3_GROUP_INFO 0 0 0 \ myNSIGMPv3GroupInfo \ 0 \ $iHub $iSlot $iPort

Related Structure

NSIGMPv3GroupInfo

Retrieve the join and leave timestamps for multicast groups and interfaces. The following fields are used as input when this structure is used with NS_IGMPV3_GROUP_INFO. The Inputs are used to identify the Multicast group. ucGroupIPAddress, ucVLANEnable, ucPRI, ucCFI, uiVID, ucIPAddress and ucMACAddress. The leave and join timestamps for the group are returned. Timestamps are per multicast group, in units of 0.1 microseconds. Timestamp values initially start from 0 when the chassis is turned on. The timestamp counter overflows after 430 seconds. JoinTimeStamps and LeaveTimeStamps will change for any of these two events.

An event is considered Join for IGMPv3 when the mode is INCLUDE with a non-empty source list or EXCLUDE with an empty source list. An event is considered Leave for IGMPv3 when the mode is EXCLUDE with a non-empty source list or INCLUDE with an empty source list.

Comments for ulLastStateTimestamp In IGMP, all membership reports sent out from a port are called state change reports. Whenever the host wants to change the current state of membership on a specific group, such as a different source list, the host should send out a state change report. Therefore, the new state change timestamp of the group should change with each report of that group sent out. However, there are two special cases. If it is the first report to the group, the IGMP stack treats it as a join report and saves the timestamp to ulJoinTimestamp. If the report is trying to INCLUDE NULL, the IGMP stack treats it as leave report and saves the timestamp to ulLeaveTimestamp. In these two cases, ulLastStateTimestamp is not updated. Example Join t1 State change t2 State change t3 State change t4 Leave t5 => ulJoinTimestamp = t1, ulLastStateTimestamp = t4, and ulLeaveTimestamp = t5

Continues >

SmartLibrary Command Reference: Volume 2 | 643

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIGMPv3GroupInfo { unsigned char ucGroupIPAddress[4];/* Input - group address */ unsigned char ucVLANEnable;/* Input - 1 - enable, 0 - disabled specifies whether or not this multicast group has an associated VLAN tag */ unsigned char ucPRI;/* Input - user priority 0-7 (3 bits) */ unsigned char ucCFI;/* Input - 1 = RIF present, 0 = RIF absent */ unsigned short uiVID;/* Input - VLAN ID (12 bits) */ unsigned char ucIPAddress[4];/* Input - source IP for interface */ unsigned char ucMACAddress[6];/* Input - MAC address for interface */ unsigned char ucPPPMode;/* PPP Mode possible values are PPP_USE_NONE (default) and PPP_USE_PPP_SESSION_ID. This field applies only to Terametric modules. */ unsigned short uiPPPInstance;/* starting PPP index. This field applies only to Terametric modules. */ unsigned long ulJoinTimestamp;/* Join Time Stamp */ unsigned long ulLeaveTimestamp;/* Leave Time Stamp */ unsigned long ulLastStateTimestamp; /* Timestamp for the last state change. This excludes the initial join report and the leave report. The timestamp for these 2 events are available in the previous 2 fields. */ unsigned char ucReserved[21]; /* Reserved */ } NSIGMPv3GroupInfo;

iType1 Description C Usage

NS_IGMPV3_GROUP_MOD
Modify an existing multicast group, or add a new multicast group if the multicast group or interface is new. HTSetStructure(NS_IGMPV3_GROUP_MOD, 0, 0, 0, (void*) pNSIGMPv3GroupMod, sizeof(NSIGMPv3GroupMod), iHub, iSlot, iPort); HTSetStructure $NS_IGMPV3_GROUP_MOD 0 0 0 \ myNSIGMPv3GroupMod \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv3GroupMod
Continues >

644 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Modify existing multicast group or add a new multicast group if multicast group or interface is new. This command allows users to make a single state change in an existing multicast group, or add a new multicast group if the multicast group or interface identity is new. The message structure is made to only allow one block change at a time for a specific multicast group, which can be identified by the interface and multicast group information within the structure. It also serves as a simple method to add a new multicast group into the host if the multicast group and/or interface identity does not exist. This message can also serve as a filter mode change. In such a case, the new IP block address will be treated as a new source list and the old address list in stack will be properly reported and cleared. If the filter mode stays unchanged and source IP list block is a new block, the new address block will be added only if the total number of IP blocks is still within the maximum allowable limit. This command only modifies uiFilterMode and IPAddressBlockChange, the other fields are used to identify the multicast group typedef struct tagNSIGMPv3GroupMod { unsigned char ucGroupIPAddress[4];/* group address */ unsigned char ucVLANEnable;/* 1 - enable, 0 - disabled specifies whether or not this multicast group has an associated VLAN tag */ unsigned char ucPRI;/* user priority 0-7 */ unsigned char ucCFI;/* 1 = RIF present, 0 = RIF absent */ unsigned short uiVID;/* VLAN ID */ unsigned char ucIPAddress[4];/* source IP for interface */ unsigned char ucMACAddress[6];/* MAC address for interface */ unsigned short uiFilterMode;/* possible values are IGMPV3_EXCLUDE_FILTER_MODE (suppress listed IP's And IGMPV3_INCLUDE_FILTER_MODE (allow listed IP's) */ unsigned char ucPPPMode;/* PPP_USE_NONE (default), PPP_USE_PPP_SESSION_ID. This field applies only to Terametric modules. */ unsigned short uiPPPInstance;/* starting PPP index - Terametric cards PPP session index. Currently this is valid if PPP_USE_PPP_SESSION_ID is on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual IGMP over PPPOE packet. So user can issue IGMP over PPPOE packet without PPP session in this case. */ unsigned short uiVCIndex;/* VC index , for ATM cards*/ IGMPGroupAddressBlock IPAddressBlockChange; unsigned char ucReserved[45]; }NSIGMPv3GroupMod;

Continues >

SmartLibrary Command Reference: Volume 2 | 645

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Embedded Structure

IGMPGroupAddressBlock

typedef struct tagIGMPGroupAddressBlock { unsigned char ucStartIPAddress[4]; /* starting address for the IP address list */ unsigned char ucUpperIPAddressBoundary[4]; /* upper limit for the IP address list (only applicable for the LAN-3101A/B modules). */ unsigned short uiIPChangeStep; /* delta value to increase ucStartIPAddress */ unsigned short uiNumIP; /* number of IP addresses in the list. The maximum value is set by the "uiMaxIPPerBlock" field for the NS_IGMPV3_CONFIG command. */ unsigned char ucReserved[30]; /* reserved */ } IGMPGroupAddressBlock;

iType1 Description C Usage

NS_IGMPV3_LEAVE_ALL
Leave all multicast groups. HTSetCommand(NS_IGMPV3_LEAVE_ALL, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_IGMPV3_LEAVE_ALL 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

646 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMPV3_STATS_INFO
Collect data for IGMPv3 only. This command also contains query and membership report of both Version 1 and Version 2. HTGetStructure(NS_IGMPV3_STATS_INFO, 0, 0, 0, (void*) pNSIGMPv3StatsInfo, sizeof(NSIGMPv3StatsInfo), iHub, iSlot, iPort); HTGetStructure $NS_IGMPV3_STATS_INFO 0 0 0 \ myNSIGMPv3StatsInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPv3StatsInfo

Retrieve the join and leave timestamps for a specific multicast group and interface. Message to collect data that are in IGMPv3 only. This message also contains query and membership report of both Version 1 and Version 2.The following fields are used as inputs, to identify the Multicast group: ucGroupIPAddress ucVLANEnable ucPRI ucCFI uiVID ucIPAddress ucMACAddress

Continues >

SmartLibrary Command Reference: Volume 2 | 647

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIGMPv3StatsInfo { unsigned char ucGroupIPAddress[4];/* Input - group address */ unsigned char ucVLANEnable;/* Input - 1 - enable, 0 - disabled specifies whether or not this multicast group has an associated VLAN tag */ unsigned char ucPRI;/* Input - user priority 0-7 (3 bits) */ unsigned char ucCFI;/* Input - 1 = RIF present, 0 = RIF absent */ unsigned short uiVID;/* Input - VLAN ID (12 bits) */ unsigned char ucIPAddress[4];/* Input - source IP for interface */ unsigned char ucMACAddress[6];/* Input - MAC address for interface */ unsigned char ucPPPMode;/*Input - PPP_USE_NONE (default), PPP_USE_PPP_SESSION_ID. This field applies only to Terametric modules. */ unsigned short uiPPPInstance;/* Input - starting PPP index - Terametric cards PPP session index. Currently this is valid if PPP_USE_PPP_SESSION_ID is on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual IGMP over PPPOE packet. So user can issue IGMP over PPPOE packet without PPP session in this case. */ unsigned long ulV3GroupQueryReceived;/*received number of V3 query messages, for both group-specific, group-and-source-specific and general queries */ unsigned long ulV2QueryReceived;/* V2 query reports received */ unsigned long ulV1QueryReceived;/* V1 query reports received */ unsigned long ulV2ReportReceived;/*received number of version 2 report messages when default mode is version 3*/ unsigned long ulV1ReportReceived;/*received number of version 1 report messages when default mode is version 3*/ unsigned long ulTotalV3ReportSent;/* total number of version 3 reports sent out */ unsigned long ulIsIncludeSent;/* total number of Is Included group record messages sent out */ unsigned long ulIsExcludeSent;/* total number of Is Excluded group record messages sent out */ unsigned long ulToIncludeSent;/* total number of To Included group record messages sent out */ unsigned long ulToExcludeSent;/* total number of To Excluded group record messages sent out */ unsigned long ulAllowSent;/* total number of Allow group record messages sent out */ unsigned long ulBlockSent;/* total number of Block group record messages sent out */ unsigned char ucReserved[47]; }NSIGMPv3StatsInfo;

648 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IGMP_VLAN_TIMESTAMP_INFO
Get multicast VLAN tagged group Join and Leave timestamps. HTGetStructure(NS_IGMP_VLAN_TIMESTAMP_INFO, 0, 0, 0, (void*) pNSIGMPVLANTimestampInfo, sizeof(NSIGMPVLANTimestampInfo), iHub, iSlot, iPort); HTGetStructure $NS_IGMP_VLAN_TIMESTAMP_INFO 0 0 0 \ myNSIGMPVLANTimestampInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIGMPVLANTimestampInfo

This structure is used to retrieve IGMP join and leave timestamps relative to a specific multicast VLAN tagged group on a particular SmartCard. typedef struct tagNSIGMPVLANTimestampInfo { unsigned char ucIPAddress[4]; /* The IP address of the multicast group */ unsigned long ulVLANId; /* VLAN ID of the multicast group */ unsigned long ulJoinTime; /* Join timestamp */ unsigned long ulLeaveTime; /* Leave timestamp */ unsigned char ucReserved[16]; /* Reserved */ } NSIGMPVLANTimestampInfo;

iType1 Description C Usage

NS_IP_OPTION_CONFIG
Set up IP options for Record Route, Loose Source and Record Route, and Strict Source and Record Route. HTSetStructure(NS_IP_OPTION_CONFIG, <index>, 0, 0, (void*) pNSIPOption , sizeof(NSIPOption ), iHub, iSlot, iPort); HTSetStructure $NS_IP_OPTION_CONFIG <index> 0 0 \ myNSIPOption \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPOption
Continues >

SmartLibrary Command Reference: Volume 2 | 649

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Currently, only POS and LAN TeraMetrics modules are capable of defining IP options within IPv4 frames. IPv4 frames with IP options defined using NS_IP_OPTION_CONFIG can be captured only on POS-35xx cards using the capture filter, CAPTURE_EVENTS_IP_OPTION, LAN TeraMetrics modules currently are unable to capture these frames. This command is used to configure IP Options for Record Route, Loose Source and Record Route, and Strict Source and Record Route. When used with MPLS, the configurations should be in this order: 1. Define Streams (L3_DEFINE_XX STREAM) 2. Define MPLS (L3_DEFINE_MPLS, L3_MOD_MPLS) 3. Define IP Options iType2 is used as the stream index. typedef struct tagNSIPOption { unsigned char ucCode;

unsigned short uiLength; unsigned short uiPointer; unsigned short uiDataLength; unsigned char ucData[124]; unsigned char ucReserved[50]; }NSIPOption;

/* Type of IP Option, IP_OPTION_RECORD_ROUTE IP_OPTION_LOOSE_SOURCE_RECORD_ROUTE IP_OPTION_STRICT_SOURCE_RECORD_ROUTE */ /* Option Length,includes the option type code, length octet, pointer octet and route data*/ /* Pointer offset into Route data, bytes */ /* number of bytes to use from ucData */ /* Contains route data, for Record Route, LSRR and SSRR it may contain IP address */

650 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description Tcl Usage

NS_IPV4_PROTOCOL_HEADER_INFO
Retrieve IPv4 Protocol information for a stream HTGetStructure $NS_IPV4_PROTOCOL_HEADER_INFO <index> 0 0 \ myNSIPv4Header\ 0 \ $iHub $iSlot $iPort

Related Structure

NSIPv4Header

/* Retrieve IPv4 Protocol information for a stream. Applicable to both old and new stream commands. Stream index for which information is desired, should be passed as iType2. This command is supported on all TeraMetrics LAN and POS test modules. */typedef struct tagNSIPv4Header { unsigned char ucTypeOfService; unsigned char ucTimeToLive; unsigned short uiInitialSequenceNumber; unsigned char ucDestinationIP[4]; unsigned char ucSourceIP[4]; unsigned char ucNetmask[4]; unsigned char ucGateway[4]; unsigned char ucProtocol; unsigned short uiFragmentOffset; unsigned char ucFlags; unsigned char ucReserved[16]; } NSIPv4Header;

SmartLibrary Command Reference: Volume 2 | 651

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_CONFIG
Configure the IPv6 protocol stack. HTSetStructure(NS_IPV6_CONFIG, 0, 0, 0, (void*) pNSIPv6Config, sizeof(NSIPv6Config), iHub, iSlot, iPort); HTSetStructure $NS_IPV6_CONFIG 0 0 0 \ myNSIPv6Config \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6Config

This structure is used to configure and query the IPv6 Protocol Stack. Valid values for uiRouterSolicitationInterval are from 10 to 30,000 milliseconds. Valid values for ucMaxRouterSolicitations are from 1 to 10 router solicitations. Valid values for uiVLANRouterSolicitationGap are from 10 to 30,000 milliseconds. Valid values for ucMaxDADNeighborSolicitations are from 0 to 10 Neighbor Solicitations. Valid values for uiDADNeighborSolicitationsGap are from 10 to 30,000 milliseconds. Valid values for ulRetransmissionTime are from 10 to 30,000 milliseconds. DAD is an abbreviation for Duplicate Address Detection. ucSAAInterfaceIDGenMode: - USE_EUI_64: will form a EUI-64 based interface identifier from the 48-bit source MAC of an IPv6 protocol stream. - USE_STREAM_ID: if specified, the interface ID will be [32-bit zero][4-bit hub][4-bit slot][8-bit port][16-bit stream index] - USE_RANDOM: if specified, the interface ID will be [32-bit pseudo random value][4-bit hub][4-bit slot][8-bit port] [16-bit stream index] ucSAAInterfaceIDBitValue: - UL_COMPLEMENT: will complement the value of the universal/local bit when forming the EUI-64 based interface identifier - UL_SET_TO_ZERO: will always set the universal/local bit to zero - UL_SET_TO_ONE: will set the universal/local bit to one - UL_UNMODIFIED: will not alter the value of the universal/local bit ucSourceAddressSelectByDestination: If set to TRUE, it will attempt to choose a source address that matches the scope of the destination address. If set to FALSE, the address scope preferences defined in the preference fields will be used. If an appropriate address cannot be selected, the preference fields will also be used.

Continues >

652 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

ucNextHopDeterminationMode: For mode NEXT_HOP_SIMPLE_MODE: - If the defaut router address is specified in the protocol stream configuration, the Next Hop is the specific router. - If the default router address is not specified, the Next Hop is the destination. For mode NEXT_HOP_RFC_COMPLIANT_MODE: With prefix and router discovery, it will determine if the destination of a protocol stream is on-link using the obtained prefix information from Router Advertisement. typedef struct tagNSIPv6Config { /* Interface ID generation */ unsigned char ucSAAInterfaceIDGenMode; /* Specifies the method to generate the IPv6 interface identifier for use in Stateless Address Auto-configuration. This field is not applicable to POS. Values: USE_EUI_64 USE_STREAM_ID USE_RANDOM Default value: USE_EUI_64 */ unsigned char ucSAAInterfaceIDBitValue;/* The value of the universal/local bit in the IPv6 interface identifier. This is only applicable if the USE_EUI_64 option is selected for ucSAAInterfaceIdentifier. This field is not applicable to POS. Values: UL_COMPLEMENT UL_SET_TO_ZERO UL_SET_TO_ONE UL_UNMODIFIED Default value: UL_COMPLEMENT */ /* Router Discovery */ unsigned char ucNextHopDeterminationMode; /* Specifiy the mode to use the Next Hop Determination Possible values are: NEXT_HOP_SIMPLE_MODE NEXT_HOP_RFC_COMPLIANT_MODE Default value: NEXT_HOP_SIMPLE_MODE */

Continues >

SmartLibrary Command Reference: Volume 2 | 653

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned char

ucVLANRouterSolicitationEnable; /* Enables or disables transmission of a router solicitation per unique VLAN as determined by the VLAN ID from the protocol stream configuration. Default value: 1 */ ucSendNeighborAdvertisementEnable; /* Enables or disables transmission of a Neighbor Advertisement for a protocol stream when it receives a Neighbor Advertisement in response to a Neighbor Solicitation that it has sent. Default value: 0 */

unsigned char

unsigned short uiRouterSolicitationInterval; /* Specifies in milliseconds the minimum time interval between transmissions of Router Solicitations. This specifies also the time after the transmission of the last Router Solicitation that the implementation will wait for a Router Advertisement. Default value: 4,000 milliseconds Valid values: 10 to 30,000 milliseconds. Resolution is 10 miliseconds. If a specified value is not an integer multiple of 10 miliseconds, the number will be rounded down to closest integer multiple. */ unsigned char ucMaxRouterSolicitations; /* Specifies the maximum number of router solicitations. Default: 3 router solicitations Valid values: 1 to 10 router solicitations.*/

Continues >

654 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned short uiVLANRouterSolicitationGap; /* Specifies in milliseconds the minimum time interval between transmissions of Router Solicitations with different VLAN tags. This value is only used if the ucVLANRouterSolicitationEnable field is set to 1. Default value: 10 milliseconds Valid values: 10 to 30,000 milliseconds Resolution is 10 miliseconds. */ unsigned char ucEnableSourceStreamAddressSelection; /* Specifies whether to perform source stream address selection when Stateless Address Autoconfiguration is used. If set to 0, the source IPv6 address specifies in the protocol stream configuration will be used for frame generated by the protocol streams. Default value: 1 */

/* Stateless Address Autoconfiguration */ unsigned char ucMaxDADNeighborSolicitations; /* Specifies the maximum Neighbor Solicitations transmitted for Duplicate Address Detection (DAD) for each tentative address. A value of zero disables DAD.This field is not applicable to POS. Default Value: 1 as specified by RFC 2462 Valid values: 0 to 10 Neighbor Solicitations. */ unsigned char ucVerifyLinkLocalEnable;/* Specifies whether or not to only verify the link local addresses Default value: 0 */

Continues >

SmartLibrary Command Reference: Volume 2 | 655

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned short uiDADNeighborSolicitationsGap; /* Specifies in milliseconds the minimum interval between transmissions of Neighbor Solicitations for different tentative addresses. This field is not applicable to POS. Default value: 10 milliseconds Valid values: 10 to 30,000 milliseconds. Resolution is 10 miliseconds. */ unsigned long ulRetransmissionTime; /* Specifies in milliseconds the interval between retransmissions of Neighbor Solicitations for a tentative address. Default value:1000 milliseconds Valid values: 10 to 30,000 milliseconds. Resolution is 10 miliseconds. */ /* Source address selection */ unsigned char ucSourceAddressFirstChoice; /* These fields allow specification of the preference for address selection. Values: SOURCE_ADDRESS_LINK_LOCAL_UNICAST SOURCE_ADDRESS_SITE_LOCAL_UNICAST SOURCE_ADDRESS_GLOBAL_UNICAST Default values: ucSourceAddressFirstChoice: SOURCE_ADDRESS_GLOBAL_UNICAST ucSourceAddressSecondChoice: SOURCE_ADDRESS_SITE_LOCAL_UNICAST ucSourceAddressThirdChoice: SOURCE_ADDRESS_LINK_LOCAL_UNICAST */ ucSourceAddressSecondChoice; /* See ucSourceAddressFirstChoice*/ ucSourceAddressThirdChoice; /* See ucSourceAddressFirstChoice*/

unsigned char unsigned char

Continues >

656 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned char

ucSourceAddressSelectByDestination; /* The field indicates whether or not to attempt to select a source address based on the scope of the destination address. Default value: 0 */ */

unsigned char } NSIPv6Config;

ucReserved[64];

/* Reserved for future use

iType1 Description C Usage

NS_IPV6_CONFIG_INFO
Query the IPv6 protocol stack. HTGetStructure(NS_IPV6_CONFIG, 0, 0, 0, (void*) pNSIPv6Config, sizeof(NSIPv6Config), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_CONFIG 0 0 0 \ myNSIPv6Config \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6Config
Continues >

SmartLibrary Command Reference: Volume 2 | 657

Chapter 10: Universal (NS) NS iType1 Commands and Structures

This structure is used to configure and query the IPv6 Protocol Stack. Valid values for uiRouterSolicitationInterval are from 10 to 30,000 milliseconds. Valid values for ucMaxRouterSolicitations are from 1 to 10 router solicitations. Valid values for uiVLANRouterSolicitationGap are from 10 to 30,000 milliseconds. Valid values for ucMaxDADNeighborSolicitations are from 0 to 10 Neighbor Solicitations. Valid values for uiDADNeighborSolicitationsGap are from 10 to 30,000 milliseconds. Valid values for ulRetransmissionTime are from 10 to 30,000 milliseconds. DAD is an abbreviation for Duplicate Address Detection. ucSAAInterfaceIDGenMode: - USE_EUI_64: will form a EUI-64 based interface identifier from the 48-bit source MAC of an IPv6 protocol stream. - USE_STREAM_ID: if specified, the interface ID will be [32-bit zero][4-bit hub][4-bit slot][8-bit port][16-bit stream index] - USE_RANDOM: if specified, the interface ID will be [32-bit pseudo random value][4-bit hub][4-bit slot][8-bit port] [16-bit stream index] ucSAAInterfaceIDBitValue: - UL_COMPLEMENT: will complement the value of the universal/local bit when forming the EUI-64 based interface identifier - UL_SET_TO_ZERO: will always set the universal/local bit to zero - UL_SET_TO_ONE: will set the universal/local bit to one - UL_UNMODIFIED: will not alter the value of the universal/local bit ucSourceAddressSelectByDestination: If set to TRUE, it will attempt to choose a source address that matches the scope of the destination address. If set to FALSE, the address scope preferences defined in the preference fields will be used. If an appropriate address cannot be selected, the preference fields will also be used. ucNextHopDeterminationMode: For mode NEXT_HOP_SIMPLE_MODE: - If the defaut router address is specified in the protocol stream configuration, the Next Hop is the specific router. - If the default router address is not specified, the Next Hop is the destination. For mode NEXT_HOP_RFC_COMPLIANT_MODE: With prefix and router discovery, it will determine if the destination of a protocol stream is on-link using the obtained prefix information from Router Advertisement.

Continues >

658 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6Config { /* Interface ID generation */ unsigned char ucSAAInterfaceIDGenMode; /* Specifies the method to generate the IPv6 interface identifier for use inStateless Address Auto-configuration. This field is not applicable to POS.Values: USE_EUI_64 USE_STREAM_ID USE_RANDOM Default value: USE_EUI_64 */ unsigned char ucSAAInterfaceIDBitValue;/* The value of the universal/local bit in the IPv6 interface identifier. This is only applicable if the USE_EUI_64 option is selected for ucSAAInterfaceIdentifier. This field is not applicable to POS.Values: UL_COMPLEMENT UL_SET_TO_ZERO UL_SET_TO_ONE UL_UNMODIFIED Default value: UL_COMPLEMENT */ /* Router Discovery */ unsigned char ucNextHopDeterminationMode; /* Specifiy the mode to use the Next Hop Determination Possible values are: NEXT_HOP_SIMPLE_MODE NEXT_HOP_RFC_COMPLIANT_MODE Default value: NEXT_HOP_SIMPLE_MODE */ unsigned char ucVLANRouterSolicitationEnable; /* Enables or disables transmission of a router solicitation per unique VLAN as determined by the VLAN ID from the protocol stream configuration. Default value: 1 */

Continues >

SmartLibrary Command Reference: Volume 2 | 659

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned char

ucSendNeighborAdvertisementEnable; /* Enables or disables transmission of a Neighbor Advertisement for a protocol stream when it receives a Neighbor Advertisement in response to a Neighbor Solicitation that it has sent. Default value: 0 */

unsigned short uiRouterSolicitationInterval; /* Specifies in milliseconds the minimum time interval between transmissions of Router Solicitations. This specifies also the time after the transmission of the last Router Solicitation that the implementation will wait for a Router Advertisement. Default value: 4,000 milliseconds Valid values: 10 to 30,000 milliseconds. Resolution is 10 miliseconds. If a specified value is not an integer multiple of 10 miliseconds, the number will be rounded down to closest integer multiple */ unsigned char ucMaxRouterSolicitations; /* Specifies the maximum number of router solicitations Default: 3 router solicitations Valid values: 1 to 10 router solicitations. */ unsigned short uiVLANRouterSolicitationGap;/* Specifies in milliseconds the minimum time interval between transmissions of Router Solicitations with different VLAN tags. his value is only used if the ucVLANRouterSolicitationEnable field is set to 1. Default value: 10 milliseconds Valid values: 10 to 30,000 milliseconds Resolution is 10 miliseconds. */ unsigned char ucEnableSourceStreamAddressSelection; /* Specifies whether to perform source stream address selection when Stateless Address Autoconfiguration is used. If set to 0, the source IPv6 address specifies in the protocol stream configuration will be used for frame generated by the protocol streams. Default value: 1 */

Continues >

660 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* Stateless Address Autoconfiguration */ unsigned char ucMaxDADNeighborSolicitations; /* Specifies the maximum Neighbor Solicitations transmitted for Duplicate Address Detection (DAD) for each tentative address. A value of zero disables DAD. This field is not applicableto POS. Default Value: 1 as specified by RFC 2462 Valid values: 0 to 10 Neighbor Solicitations. */ unsigned char ucVerifyLinkLocalEnable;/* Specifies whether or not to only verify the link local addresses. Default value: 0 */

unsigned short uiDADNeighborSolicitationsGap; /* Specifies in milliseconds the minimum interval between transmissions of Neighbor Solicitations for different tentative addresses.This field is not applicable to POS. Default value: 10 milliseconds Valid values: 10 to 30,000 milliseconds. Resolution is 10 miliseconds. */ unsigned long ulRetransmissionTime; /* Specifies in milliseconds the interval between retransmissions of Neighbor Solicitations for a tentative address. Default value:1000 milliseconds Valid values: 10 to 30,000 milliseconds. Resolution is 10 miliseconds. */

Continues >

SmartLibrary Command Reference: Volume 2 | 661

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* Source address selection */ unsigned char ucSourceAddressFirstChoice; /*These fields allow specification of the preference for address selection. Values: SOURCE_ADDRESS_LINK_LOCAL_UNICAST SOURCE_ADDRESS_SITE_LOCAL_UNICAST SOURCE_ADDRESS_GLOBAL_UNICAST Default values: ucSourceAddressFirstChoice: SOURCE_ADDRESS_GLOBAL_UNICAST ucSourceAddressSecondChoice: SOURCE_ADDRESS_SITE_LOCAL_UNICAST ucSourceAddressThirdChoice: SOURCE_ADDRESS_LINK_LOCAL_UNICAST */ ucSourceAddressSecondChoice; /* See ucSourceAddressFirstChoice*/ ucSourceAddressThirdChoice; /* See ucSourceAddressFirstChoice*/ ucSourceAddressSelectByDestination; /* The field indicates whether or not to attempt to select a source address based on the scope of the destination address. Default value: 0 unsigned char } NSIPv6Config; ucReserved[64]; /* Reserved for future use */ */

unsigned char unsigned char

unsigned char

662 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_CONTROL
Control the IPv6 stack for protocol streams. HTSetStructure(NS_IPV6_CONTROL, 0, 0, 0, (void*) pNSIPv6Control, sizeof(NSIPv6Control), iHub, iSlot, iPort); HTSetStructure $NS_IPV6_CONTROL 0 0 0 \ myNSIPv6Control \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6Control

Controls the IPv6 stack for protocol streams with respect to Router Discovery, Prefix Discovery, Next-Hop Determination and Address Autoconfiguration Description of ucAction values: 1. ENABLE_ROUTER_DISCOVERY: This action enables processing of Router Advertisements and initiates the transmission of Router Solicitations. This also clears any stored prefix information. 2. DISABLE_ROUTER_DISCOVERY: This action disables processing of Router Advertisements and halts impending retransmission of Router Solicitations. 3. START_ADDRESS_AUTOCONFIGURATION: This action initiates stateless address autoconfiguration for the specified streams. If a stream is not IPv6, it is skipped but is included in the stream_count. DAD will be initiated for the tentative address, if enabled. This also clears any configured addresses for protocol streams. 4. STOP_ADDRESS_AUTOCONFIGURATION: This action halts any pending retransmission of Neighbor Solicitations for DAD and the formation of tentative address for protocol streams. If any addresses have been configured for the stream, they will remain configured. However, source address selection will not be performed. 5. START_NEXT_HOP_DETERMINATION: This action initiates on-link/off-link processing and the selection of the next-hop for the destinations of IPv6 protocol streams. This also clears the stored results of next-hop determination. 6. STOP_NEXT_HOP_DETERMINATION: This action halts the execution of Next-Hop Determination. 7. CLEAR_STACK_ERRORS: This action clears the error fields in the stack status. It will clear only the following errors in the structure NSIPv6StatusInfo: ucNeighborSolicitationError, ucNeighborAdvertisementError, ucRouterAdvertisementError, ucGeneralError. It will not clear the following errors in the same structure: uiGenericStackError, uCRouterDiscoveryError, uiAddressAutoConfigurationError, uiNextHopError 8. RESET_STACK: This action resets the stack configuration to the default values and clears any stored results for Router Discovery, Next-Hop Determination, and Stateless Address Autoconfiguration. It will also halt any active tasks and clear any pending commands.

Continues >

SmartLibrary Command Reference: Volume 2 | 663

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6Control { unsigned long ulAction;

unsigned char } NSIPv6Control;

ucReserved[32];

/* Specifies the action to take upon reception of this message. ENABLE_ROUTER_DISCOVERY DISABLE_ROUTER_DISCOVERY START_ADDRESS_AUTOCONFIGURATION STOP_ADDRESS_AUTOCONFIGURATION START_NEXT_HOP_DETERMINATION STOP_NEXT_HOP_DETERMINATION CLEAR_STACK_ERRORS RESET_STACK */ /* Reserved for future use */

664 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_COUNTER_INFO
Retrieve IPv6 related counters. HTGetStructure(NS_IPV6_COUNTER_INFO, 0, 0, 0, (void*) pNSIPv6CounterInfo, sizeof(NSIPv6CounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_COUNTER_INFO 0 0 0 \ myNSIPv6CounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6CounterInfo

typedef struct tagNSIPv6CounterInfo { U64u64RxIPv6Frames;/* Number of IPv6 frames received */ U64u64RxPayloadChecksumError;/* Number of payload checksum errors received (For now only ICMPv6 checksums) */ U64u64NeighborSolicitationSent;/* Number of neighbor solicitations sent */ U64u64NeighborSolicitationRecv;/* Number of neighbor solicitations received */ U64u64NeighborAdvertisementSent;/* Number of neighbor advertisements sent */ U64u64NeighborAdvertisementRecv;/* Number of neighbor advertisements received */ U64u64RouterSolicitationSent;/* Currently reserved */ U64u64RouterAdvertisementRecv;/* Currently reserved */ U64u64PingRequestSent;/* Number of Ping requests sent */ U64u64PingRequestRecv;/* Number of Ping requests received */ U64u64PingReplySent;/* Number of Ping replies sent */ U64u64PingReplyRecv;/* Number of Ping replies received */ U64u64Reserved[20];/* Reserved */ } NSIPv6CounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

SmartLibrary Command Reference: Volume 2 | 665

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO
Retrieve the number of Next-Hop Determination on a per-port. HTGetStructure(NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO, 0, 0, 0, (void*) pNSIPv6NextHopResultCountInfo, sizeof(NSIPv6NextHopResultCountInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO 0 0 0 \ myNSIPv6NextHopResultCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6NextHopResultCountInfo

Retrieve the number of next-hop determination per port. typedef struct tagNSIPv6NextHopResultCountInfo { unsigned long ulCount;/* The number of next-hop determination per port */ unsigned char ucReserved[16];/* Reserved for future use +*/ } NSIPv6NextHopResultCountInfo;

iType1 Description C Usage

NS_IPV6_NEXT_HOP_RESULTS_INFO
Retrieve the results of IPv6 Next-Hop Determination on a per-stream basis. HTGetStructure(NS_IPV6_NEXT_HOP_RESULTS_INFO, <index>, <count>, 0, (void*) pNSIPv6NextHopResultInfo, sizeof(NSIPv6NextHopResultInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_NEXT_HOP_RESULTS_INFO <index> <count> 0 \ myNSIPv6NextHopResultInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6NextHopResultInfo

To retrieve the results of IPv6 Next-Hop Determination on a per-stream basis. Use iType2 for the start stream index and iType3 for the number of protocol stream to retrieve next-hop results. Use NS_IPV6_NEXT_HOP_RESULTS_COUNT_INFO message to query number of next-hop determination stored and pass the array of this structure to query the next hop result information.

Continues >

666 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6NextHopResultInfo { unsigned long ulStreamIndex;/* Output - the stream associated with this next hop result */ unsigned char ucNextHopAddress[16];/* Output - the IPv6 address of the next hop */ unsigned char ucReserved[16];/* Reserved for future use */ } NSIPv6NextHopResultInfo;

iType1 Description Tcl Usage

NS_IPV6_PROTOCOL_HEADER_INFO
Retrieve IPv6 Protocol information for a stream. HTGetStructure $ NS_IPV6_PROTOCOL_HEADER_INFO <index> 0 0 \ myNSIPv6Header s \ 0 \ $iHub $iSlot $iPort

Related Structure

NSIPv6Header

/*Retrieve IPv6 Protocol information for a stream. Applicable to both old and new stream commands. Stream index for which information is desired, should be passed as iType2. This command is supported on all TeraMetrics LAN and POS test modules.*/ typedef struct tagNSIPv6Header { unsigned char ucTrafficClass; unsigned char ucNextHeader; unsigned char ucHopLimit; unsigned long ulFlowLabel; unsigned char ucSourceIP[16]; unsigned char ucDestinationIP[16]; unsigned char ucRouterIP[16]; unsigned char ucPayloadLengthError; unsigned char ucReserved[16]; } NSIPv6Header

SmartLibrary Command Reference: Volume 2 | 667

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_RATE_INFO
Retrieve IPv6 related rate counters. HTGetStructure(NS_IPV6_RATE_INFO, 0, 0, 0, (void*) pNSIPv6RateInfo, sizeof(NSIPv6RateInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_RATE_INFO 0 0 0 \ myNSIPv6RateInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6RateInfo

typedef struct tagNSIPv6RateInfo { unsigned long ulRxIPv6FramesRate;/* Number of IPv6 frames received per second */ unsigned long ulRxPayloadChecksumErrorRate; /* Number of payload checksum errors received per second (For now only ICMPv6 checksums) */ unsigned long ulNeighborSolicitationSentRate; /* Number of neighbor solicitations sent per second */ unsigned long ulNeighborSolicitationRecvRate; /* Number of neighbor solicitations received per second */ unsigned long ulNeighborAdvertisementSentRate; /* Number of neighbor advertisements sent per second */ unsigned long ulNeighborAdvertisementRecvRate; /* Number of neighbor advertisements received per second */ unsigned long ulRouterSolicitationSentRate; /* Currently reserved */ unsigned long ulRouterAdvertisementRecvRate; /* Currently reserved */ unsigned long ulPingReqSentRate;/* Number of Ping requests sent per second */ unsigned long ulPingReqRecvRate;/* Number of Ping requests received per second */ unsigned long ulPingRepSentRate;/* Number of Ping replies sent per second */ unsigned long ulPingRepRecvRate;/* Number of Ping replies received per second */ unsigned long ulReserved[20];/* Reserved */ } NSIPv6RateInfo;

668 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO
Retrieve the number of router discovery information obtained from received router advertisements. HTGetStructure(NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO, 0, 0, 0, (void*) pNSIPv6RouterDiscoveryCountInfo, sizeof(NSIPv6RouterDiscoveryCountInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO 0 0 0 \ myNSIPv6RouterDiscoveryCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6RouterDiscoveryCountInfo

Retrieve the number of router discovery information obtained from received router advertisements typedef struct tagNSIPv6RouterDiscoveryCountInfo { unsigned long ulCount;/* The number of router discovery information */ unsigned char ucReserved[16];/* Reserved for future use */ } NSIPv6RouterDiscoveryCountInfo;

iType1 Description C Usage

NS_IPV6_ROUTER_DISCOVERY_INFO
Retrieve information obtained from Router Advertisements excluding prefix information. HTGetStructure(NS_IPV6_ROUTER_DISCOVERY_INFO, 0, 0, 0, (void*) pNSIPv6RouterDiscoveryInfo, sizeof(NSIPv6RouterDiscoveryInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_ROUTER_DISCOVERY_INFO 0 0 0 \ myNSIPv6RouterDiscoveryInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6RouterDiscoveryInfo
Continues >

SmartLibrary Command Reference: Volume 2 | 669

Chapter 10: Universal (NS) NS iType1 Commands and Structures

This message retrieves information obtained from Router Advertisements excluding prefix information. Use NS_IPV6_ROUTER_DISCOVERY_COUNT_INFO message to query number of router discovery stored and pass the array of this structure to query the router discovery information. If no Router Advertisement was received, all fields will be set to zero. If the MTU option is not present, the mtu field will be set to zero. If any field is unspecified by the router, that field will be set to zero. typedef struct tagNSIPv6RouterDiscoveryInfo { unsigned char ucRouterIPAddress[16];/* The IP address of the router from the router advertisement. */ unsigned char ucCurrentHopLimit;/* The current hop limit value specified in the router advertisement. */ unsigned char ucFlags;/* The values of the "managed address configuration" flag and the other stateful configuration flag. Possible values are: MANAGED_ADDRESS_CONFIGURATION OTHER_STATEFUL_CONFIGURATION This field is a bit field. */ unsigned short uiRouterLifetime;/* The value of the router lifetime field from the router advertisement in seconds. */ unsigned char ucEnableVlan;/* Indicates if there is a VLAN ID is Associated with. Valid values: 0 or 1 */ unsigned char ucVLANPri;/* VLAN Priority. If there is no associated VLAN ID this will be set to 0 */ unsigned char ucVLANCfi;/* VLAN CFI bit. If there is no associated VLAN ID this will be set to 0 */ unsigned short uiVlanID;/* The associated 12-bit VLAN ID for this router. If there is no associated VLAN ID, this will be set to 0x00 */ unsigned long ulReachableTime;/* The value of the reachable time field from the router advertisement in milliseconds. */ unsigned long ulRetransmissionTime;/* The value of the retransmission time field from the router advertisement in milliseconds. */ unsigned long ulMTU;/* The value of the Maximum Transmission Unit in the MTU option, if present, in the Router Advertisement in bytes. */ unsigned long ulRouterIndex;/* Use this value with NS_IPV6_ROUTER_PREFIX_INFO(iType2) to retrieve prefix information for this router. Valid values: 0x0001 to 0xFFFF */ unsigned short uiPrefixCount;/* This value indicates the number of prefix information that is available for the router. Use this value as the size of the array of prefix structures to pass to NS_IPV6_ROUTER_PREFIX_INFO. */ unsigned char ucReserved[16];/* Reserved for future use */ } NSIPv6RouterDiscoveryInfo;

670 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_ROUTER_PREFIX_COUNT_INFO
Retrieve the number of prefix information obtained from received router advertisements. HTGetStructure(NS_IPV6_ROUTER_PREFIX_COUNT_INFO, 0, 0, 0, (void*) pNSIPv6RouterPrefixCountInfo, sizeof(NSIPv6RouterPrefixCountInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_ROUTER_PREFIX_COUNT_INFO 0 0 0 \ myNSIPv6RouterPrefixCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6RouterPrefixCountInfo

This structure retrieves the number of prefix information per port obtained from received router advertisements typedef struct tagNSIPv6RouterPrefixCountInfo { unsigned long ulCount; /* The number of prefix information per port obtained from received router advertisements. */ unsigned char ucReserved[16]; /* Reserved for future use */ } NSIPv6RouterPrefixCountInfo;

SmartLibrary Command Reference: Volume 2 | 671

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_ROUTER_PREFIX_INFO
Retrieve the prefix information obtained from received Router Advertisements HTGetStructure(NS_IPV6_ROUTER_PREFIX_INFO, <x>, <c>, 0, (void*) pNSIPv6RouterPrefixInfo, sizeof(NSIPv6RouterPrefixInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_ROUTER_PREFIX_INFO <x> <c> 0 \ myNSIPv6RouterPrefixInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6RouterPrefixInfo

This message retrieves prefix information obtained from received Router Advertisements. Use iType2 for the Router Index and iType3 for the number of prefix retrieved. This command can be sent with an array of structures. Use uiPrefixCount of the structure NSIPv6RouterDiscoveryInfo for iType3. Note for ulRouterIndex: Valid values for uiVlanId is from 0x0000 to 0x0FFF, and 0xFFFF. Valid values for ucPrefixLength is from 0 to 128. Valid values for ulLifetime is as defined in RFC 2461. Valid values for ulPreferredLifetime is as defined in RFC 2461. typedef struct tagNSIPv6RouterPrefixInfo { unsigned long ulRouterIndex;/* Output. The router index of the router to which this prefix is associated. Possible values are: 0x0000 to 0xFFFF */ unsigned short uiVlanID;/* Specifies the associated 12-bit VLAN ID for this prefix. If there is no associated VLAN ID, this will be set to 0xFFFF */ unsigned char ucPrefixLength;/* The number of leading bits in the prefix that are valid */ unsigned char ucFlags;/* The values of the on-link flag and autonomous address-configuration flag. Possible values are: ON_LINK AUTONOMOUS_ADDRESS_CONFIG */ unsigned long ulLifetime;/* The valid lifetime field. */ ulPreferredLifetime; /* The preferred lifetime field. */ ucPrefix[16];/* The prefix in hexadecimal. Any bits beyond the prefix length will be set to zero. */ unsigned char ucReserved[64];/* Reserved for future use */ } NSIPv6RouterPrefixInfo; unsigned long unsigned char

672 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_STATELESS_ADDRESS_COUNT_INFO
Retrieve number configured address currently stored. HTGetStructure(NS_IPV6_STATELESS_ADDRESS_COUNT_INFO, 0, 0, 0, (void*) pNSIPv6StatelessAddressCountInfo, sizeof(NSIPv6StatelessAddressCountInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_STATELESS_ADDRESS_COUNT_INFO 0 0 0 \ myNSIPv6StatelessAddressCountInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6StatelessAddressCountInfo

typedef struct tagNSIPv6StatelessAddressCountInfo { unsigned long ulCount;/* The number of configured address currently stored */ unsigned char ucReserved[16];/* Reserved for future use */ } NSIPv6StatelessAddressCountInfo;

SmartLibrary Command Reference: Volume 2 | 673

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_STATELESS_ADDRESS_INFO
Retrieve the configured addresses for protocol streams. HTGetStructure(NS_IPV6_STATELESS_ADDRESS_INFO, 0, 0, 0, (void*) pNSIPv6StatelessAddressInfo, sizeof(NSIPv6StatelessAddressInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_STATELESS_ADDRESS_INFO 0 0 0 \ myNSIPv6StatelessAddressInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6StatelessAddressInfo

Retrieves the configured addresses for protocol streams. DAD is an abbreviation for Duplicate Address Detection. Use ulCount of NSIPv6STatlessAddressCountInfo as input for uiStreamCount of this structure. Description of ucStatus values: 1. STREAM_SOURCE_ADDRESS: This indicates that this address was chosen to be the source IPv6 address for frames generated by the protocol stream. 2. DAD_FAILED: This bit indicates that Duplicate Address Detection for this address failed and this protocol stream will not respond to Neighbor Solicitations targeting this address. 3. DAD_SUCCESSFUL: This bit indicates that Duplicate Address Detection for this address succeeded and the protocol stream will respond to Neighbor Solicitations targeting this address. If DAD is disabled, this bit will be set and the protocol stream will respond to Neighbor Solicitations targeting this address. typedef struct tagNSIPv6StatelessAddressInfo { unsigned short uiStreamIndex;/* Input - indicates the start stream associated with this address */ unsigned short uiStreamCount;/* Input - the number of stream to retrieved configured address information. */ unsigned char ucRequestedStatus;/* Input - indicates the status of this address to be retrieved. It is bit-wise AND operation between the status of the address and this status. Possible combination of these values are: STREAM_SOURCE_ADDRESS DAD_FAILED DAD_SUCCESSFUL */ unsigned short uiCount;/* Output - the number of configured address structures are in this response. */ unsigned char ucReserved;/* Reserved */ NSIPv6StatelessAddressEntry StatelessAddress[512]; } NSIPv6StatelessAddressInfo;

Continues >

674 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Embedded Structure

NSIPv6StatelessAddressEntry

typedef struct tagNSIPv6StatelessAddressEntry { unsigned short uiStreamIndex; /* Output - the stream associated with this address */ unsigned char ucStatus; /* Output - the status of this address STREAM_SOURCE_ADDRESS DAD_FAILED DAD_SUCCESSFUL */ unsigned char ucIPV6Address[16];/* Output - the configured IPv6 address*/ unsigned char ucReserved; /* Reserved for future use */ } NSIPv6StatelessAddressEntry;

iType1 Description C Usage

NS_IPV6_STATUS_INFO
Retrieve the status of the IPv6 stack. HTGetStructure(NS_IPV6_STATUS_INFO, 0, 0, 0, (void*) pNSIPv6StatusInfo, sizeof(NSIPv6StatusInfo), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_STATUS_INFO 0 0 0 \ myNSIPv6StatusInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6StatusInfo
Continues >

SmartLibrary Command Reference: Volume 2 | 675

Chapter 10: Universal (NS) NS iType1 Commands and Structures

This command retrieves the status of the IPv6 stack. Description of ulStatus values: 1. ROUTER_DISCOVERY_RUNNING: This bit indicates that the implementation is in the process of transmitting Router Solicitations and waiting for a Router Advertisement. 2. ROUTER_DISCOVERY_COMPLETED: This bit indicates that the implementation either has received a Router Advertisement, or has not received a Router Advertisment and there are no more retransmissions of Router Solicitations. 3. ROUTER_DISCOVERY_QUEUED: This bit indicates that a command to enable Router Discovery was received but its execution is pending the completion of a current task. 4. ROUTER_DISCOVERY_ENABLED: This bit indicates that a router discovery is enabled. 5. ADDRESS_AUTOCONFIG_RUNNING: This bit indicates that the implementation is in the process of forming and assigning addresses to the protocol streams and is performing DAD, if enabled. 6. ADDRESS_AUTOCONFIG_COMPLETED: This bit indicates that DAD, if enabled, has been completed for all tentative address and any unique tentative addresses have been assigned to the protocol stream. It also indicates that source address selection has been performed. 7. ADDRESS_AUTOCONFIG_QUEUED: This bit indicates that a command to start Stateless Address Autoconfiguration was received but its execution is pending the completion of a current task. 8. NEXT_HOP_RUNNING: This bit indicates that the implementation is in the process of performing Next-Hop Determination, if enabled. 9. NEXT_HOP_COMPLETED: This bit indicates that Next-Hop Determination, if enabled, has been completed for all protocol streams. 10. NEXT_HOP_QUEUED: This bit indicates that a command to start Next-Hop Determination was received but its execution is pending the completion of a current task. 11. SOURCE_ADDRESS_SELECT_FAILED: This bit indicates that the source address for at least an IPv6 protocol stream could not be selected. 12. SOURCE_ADDRESS_SELECT_PASSED: This bit indicates that the source address for all IPv6 protocol streams has been performed successfully. All expected times are in units of milliseconds. For all expected time fields, a value of 0xFFFFFFFF indicates that the expected execution time has not been calculated yet. This may occur if the card receives a command to retrieve the status before it has been able to obtain all information needed to calculate the expected time. The expected time fields are set to zero upon completion of the associated task. For the following fields: ucNeighborSolicitationError,ucNeighborAdvertisementError, ucRouterAdvertisementError, ucGeneralError --once an error is detected, the appropriate field is set until cleared by CLEAR_STACK_ERRORS or RESET_STACK action by NS_IPV6_CONTROL command. The following fields: uiGenericStackError, uiRouterDiscoveryError, uiAddressAutoConfigurationError, and uiNextHopError are only cleared by --are cleared only by RESET_STACK action by NS_IPV6_CONTROL command.

Continues >

676 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6StatusInfo { U64 u64Status; /* This field indicates the status of the stack. This is a bit field for lower 32 bits. Valid values: ROUTER_DISCOVERY_RUNNING ROUTER_DISCOVERY_COMPLETED ROUTER_DISCOVERY_QUEUED ROUTER_DISCOVERY_ENABLED ADDRESS_AUTOCONFIG_RUNNING ADDRESS_AUTOCONFIG_COMPLETED ADDRESS_AUTOCONFIG_QUEUED NEXT_HOP_RUNNING NEXT_HOP_COMPLETED NEXT_HOP_QUEUED SOURCE_ADDRESS_SELECT_FAILED SOURCE_ADDRESS_SELECT_PASSED */ ulRouterDiscoveryExpectedTime; /* This indicates the expected execution time for Router Discovery. Applications can use this to determine when to poll again for the status of Router Discovery. */ ulAddressAutoConfigExpectedTime; /* This indicates the expected execution time for Address Autoconfiguration. Applications can use this to determine when to poll again for the status of Address Autoconfiguration. */ ulNextHopExpectedTime; /* This indicates the expected execution time for Next-Hop Determination. Applications can use this to determine when to poll again for the status of Next-Hop Determination. */ ucNeighborSolicitationError; /* This indicates detected errors in Neighbor Solicitation packets. Valid values: INVALID_ICMP_LENGTH INVALID_DESTINATION_ADDRESS INVALID_SOURCE_LINK_LAYER_OPTION TARGET_IS_MULTICAST_ADDRESS */

unsigned long

unsigned long

unsigned long

unsigned char

Continues >

SmartLibrary Command Reference: Volume 2 | 677

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned char

ucNeighborAdvertisementError; /* This indicates detected errors in Neighbor Adverstisement packets. Valid values: INVALID_ICMP_LENGTH INVALID_SOLICITED_FLAG TARGET_IS_MULTICAST_ADDRESS*/

unsigned char

ucRouterAdvertisementError; /* This indictes detected errors in Router Advertisement packets. Valid values: INVALID_ICMP_LENGTH INVALID_SOURCE_ADDRESS

*/

unsigned char

ucGeneralError;

/* This indicates detected errors in Neighbor Discovery packets. Valid values: MULTICAST_SOURCE_ADDRESS INVALID_IP_HOP_LIMIT INVALID_ICMP_CODE OPTION_LENGTH_IS_ZERO

*/

unsigned short uiGenericStackError; /* This indicates generic stack error. That is not related to router discovery, stateless address autoconfiguration and next-hop determination. */ unsigned short uiRouterDiscoveryError; /* This indicates error during router discovery */ unsigned short uiAddressAutoConfigurationError; /* This indicates error during stateless address autoconfiguration */ unsigned short uiNextHopError; /* This indicates error during stateless address autoconfiguration */ /* Reserved for future use */

unsigned char ucReserved[64]; } NSIPv6StatusInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64

678 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_STREAM_INFO
Read back IPv6 stream data. Use iType2 as the index to the stream to retrieve information for. HTGetStructure(NS_IPV6_STREAM_INFO, <index>, 0, 0, (void*) pStreamIPv6, sizeof(StreamIPv6), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_STREAM_INFO <index> 0 0 \ myStreamIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPv6

This structure contains values for IPv6 compliant Streams. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. typedef struct tagStreamIPv6 { unsigned char ucActive; unsigned char ucProtocolType; unsigned char ucRandomLength; /* 1=Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_IPV6 */ /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ /* 1 = Random Data, 0 = use the cards background pattern */ /* frame length not counting CRC */

unsigned char unsigned short

ucRandomData; uiFrameLength;

/***************************************************************** * The VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short unsigned char unsigned char uiVFD1Offset; ucVFD1Range; ucVFD1Pattern; /* /* /* /* /* in bits in bits HVFD_ENABLED, HVFD_STATIC, HVFD_INCR, HVFD_DECR, HVFD_RANDOM, HVFD_NONE */ */ */ */ */

Continues >

SmartLibrary Command Reference: Volume 2 | 679

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned long

unsigned unsigned unsigned unsigned

char short char char

unsigned long

unsigned char

ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6];/*the initial VFD byte pattern*/ uiVFD2Offset; /* in bits */ ucVFD2Range;/* in bits */ ucVFD2Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6];/*the initial VFD byte pattern*/

unsigned short uiVFD3Offset;/* in bytes */ unsigned short uiVFD3Range;/* in bytes */ unsigned char ucVFD3Enable;/* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ ucTagField;/* 0 = off, 1 = insert Signature */ /* field into each frame */ unsigned char DestinationMAC[6];/* Destination MAC address */ unsigned char SourceMAC[6];/* Source MAC address */ unsigned char ucTrafficClass;/* Packet priority */ unsigned char ucNextHeader;/* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit;/* number of "hops" until frame */ /* will be dropped */ unsigned long ulFlowLabel; /* label packets to request special handling */ unsigned char SourceIP[16];/* Source IPv6 address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16];/* Destination IPv6 address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16];/* Similar to gateway address */ unsigned char ucPayloadLengthError;/* 0 - disable, 1 - enable, generate frame length error */ } StreamIPv6; unsigned char

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

680 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_IPV6_STREAM_VLAN_INFO
Readback IPv6 stream VLAN data. HTGetStructure(NS_IPV6_STREAM_VLAN_INFO, <index>, 0, 0, (void*) pStreamIPv6VLAN, sizeof(StreamIPv6VLAN), iHub, iSlot, iPort); HTGetStructure $NS_IPV6_STREAM_VLAN_INFO <index> 0 0 \ myStreamIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamIPv6VLAN

This structure contains values for IPv6 compliant Streams that use VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards currently have neighbor discovery capability. typedef struct tagStreamIPv6VLAN { unsigned char ucActive; /* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType;/* Use STREAM_PROTOCOL_IPV6_VLAN */ unsigned char /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* Frame length not counting CRC */ /***************************************************************** * * * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */ unsigned char ucVFD1Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ucRandomLength;

Continues >

SmartLibrary Command Reference: Volume 2 | 681

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned long

ulVFD1PatternCount;/* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range;/* in bits */ unsigned char ucVFD2Pattern;/* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount;/* from 0 (off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6];/*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range;/* in bytes */ unsigned char ucVFD3Enable;/* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ ucTagField;/* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6];/* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass;/* Packet priority */ unsigned char ucNextHeader;/* identifies the type header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16];/* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError;/* 0 - disable, 1 - enable, generates error in frame length */ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /* VLAN identifier */ } StreamIPv6VLAN; unsigned char

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

682 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage Tcl Usage Related Structure


#define #define #define #define

NS_LINK_FAULT_CONFIG
Configure/Clear Remote and Local Faults, or reset link fault signaling counters, for XFP test modules. HTSetStructure(NS_LINK_FAULT_CONFIG, 0, 0, 0, (void*) pNSLinkFaultConfig,sizeof(NSLinkFaultConfig), iHub, iSlot, iPort); HTSetStructure $NS_LINK_FAULT_CONFIG 0 0 0 my NSLinkFaultConfig 0 $iHub $iSlot $iPort

NSLinkFaultConfig
0 1 2 3

NS_LINK_FAULT_CLEAR NS_LINK_FAULT_LOCAL NS_LINK_FAULT_REMOTE NS_LINK_FAULT_COUNTER_RESET

typedef Struct tagNSLinkFaultConfig { unsigned char ucType /* Type of fault, Local, Remote or Reset the fault. Possible values are: NS_LINK_FAULT_CLEAR, NS_LINK_FAULT_LOCAL, NS_LINK_FAULT_REMOTE NS_LINK_FAULT_COUNTER_RESET */ unsigned char ucDurationType; /* 1 = Timed Fault Generation , 0 = Continous Fault Generation */ unsigned long ulDuration; /* Fault Generation Time in milliseconds */ unsigned char ucReserved[120]; } NSLinkFaultConfig;

Comment

This command is supported only on XFP test modules.

SmartLibrary Command Reference: Volume 2 | 683

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage Tcl Usage Related Structure

NS_LINK_FAULT_INFO
Retrieve the type of fault present on the port. HTGetStructure(NS_LINK_FAULT_INFO, 0, 0, 0, (void*) pNSLinkFaultInfo,sizeof(NSLinkFaultInfo), iHub, iSlot, iPort); HTGetStructure $NS_LINK_FAULT_INFO 0 0 0 my NSLinkFaultInfo 0 $iHub $iSlot $iPort

NSLinkFaultInfo
0 1 2

#define NS_LINK_FAULT_CLEAR #define NS_LINK_FAULT_LOCAL #define NS_LINK_FAULT_REMOTE

typedef Struct tagNSLinkFaultInfo { unsigned char ucType /* Type of fault, Local, Remote or Reset the fault. Possible values are: NS_LINK_FAULT_CLEAR, NS_LINK_FAULT_LOCAL, NS_LINK_FAULT_REMOTE */ unsigned char ucReserved[120]; } NSLinkFaultInfo;

Comment

This command is supported only on XFP test modules.

684 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description:

NS_MLD_ALL_GROUP_INFO
Retrieve information on all multicast groups HTGetStructure(NS_MLD_ALL_GROUP_INFO, 0, 0, 0, (void*) pNSMLDGroupInfo, sizeof(NSMLDGroupInfo), iHub, iSlot, iPort); HTGetStructure $NS_MLD_ALL_GROUP_INFO 0 0 0 \ myNSMLDGroupInfo \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage Related Structure:

NSMLDGroupInfo

typedef struct tagNSMLDGroupInfo { /* inputs */ unsigned char ucGroupIPAddress[16]; /* address of the multicast group */ unsigned char ucIPAddress[16]; /* interface address */ unsigned char ucMACAddress[6]; /* interface MAC address */ unsigned char ucVLANEnable; /* 1-enable,0-disabled */ unsigned char ucPRI; /* user priority 0-7 */ unsigned char ucCFI; /* 1 = RIF present, 0 = RIF absent */ unsigned short uiVID; /* VLAN ID */ unsigned char ucPPPMode; /* PPP_USE_NONE(default), PPP_USE_PPP_SESSION_ID */ unsigned short uiPPPInstance; /* starting PPP index. Currently this is valid if PPP_USE_PPP_SESSION_ID is on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual MLD over PPPOE packet. So user can issue MLD over PPPOE packet without PPP session */ /* outputs */ unsigned long ulJoinTimestamp; /* Join Time Stamp */ unsigned long ulLeaveTimestamp; /* Leave Time Stamp */ unsigned long ulLastStateTimestamp; /* Timestamp for the last state change. This excludes the initial join report and the leave report. The timestamp for these 2 events is available in the previous 2 fields. */ unsigned char ucReserved[46]; } NSMLDGroupInfo;

Continues >

SmartLibrary Command Reference: Volume 2 | 685

Chapter 10: Universal (NS) NS iType1 Commands and Structures

NSMLDGroupInfo Description The NSMLDGroupInfo structure retrieves join and leave timestamps for multicast groups and interfaces (MLDv1 and MLDv2). No inputs are needed when NSMLDGroupInfo is used with NS_MLD_ALL_GROUP_INFO, because information for all groups is returned. When used with NS_MLD_GROUP_INFO, the following fields of NSMLDGroupInfo are used as inputs:

ucGroupIPAddress ucVLANEnable ucPRI ucCFI uiVID ucIPAddress ucMACAddress

These inputs are used to identify the multicast group. The leave and join timestamps for the group are returned. Timestamps are per multicast group, and they are in units of 0.1 microseconds. Timestamp values initially start from 0 when the SmartBits chassis is turned on. The timestamp counter overflows after 430 seconds. The join and leave timestamps change for any of these two events:

An event is considered JOIN for MLDv2 when the mode is INCLUDE with a non-empty source list, or EXCLUDE with an empty source list. An event is considered LEAVE for MLDv2 when the mode is EXCLUDE with a non-empty source list, or INCLUDE with an empty source list.

ulLastStateTimestamp Description In MLDv2, all membership reports sent out from a port are called state change reports. Whenever the host wants to change the current state of membership in a specific group, such as a different source list, the host should send out a state change report. Therefore, the new state change timestamp of the group should change with each report of that group sent out. However, there are two special cases. If it is the first report of the group, the MLD stack treats it as a join report and saves the timestamp to ulJoinTimestamp. If the report is trying to INCLUDE NULL, the MLD stack treats it as a leave report and saves the timestamp to ulLeaveTimestamp. In these two cases, ulLastStateTimestamp would not be updated. Example Join t1 state change t2 state change t3 state change t4 leave t5 --> ulJoinTimestamp = t1, ulLastStateTimestamp = t4, and ulLeaveTimestamp = t5

686 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description Tcl Usage Related Structure

NS_MLD_CLEAR_COUNTERS
Clear MLD port counters and group statistics. Clears NS_MLDV2STATS_INFO and NS_MLD_COUNTER_INFO. HTSetCommand $NS_MLD_CLEAR_COUNTERS 0 0 0 \ \ 0 \$iHub $iSlot $iPort

None

iType1 Description C Usage

NS_MLD_CONFIG
Initialize and configure the MLD stack. HTSetStructure(NS_MLD_CONFIG, 0, 0, 0, (void*) pNSMLDConfig, sizeof(NSMLDConfig), iHub, iSlot, iPort); HTSetStructure $ NS_MLD_CONFIG 0 0 0 my NSMLDConfig 0 $iHub $iSlot $iPort

Tcl Usage Related Structure

NSMLDConfig

/* NSMLDConfig Description: Initialize and configure the MLD stack. ulInitialReportGap The time interval between the first reports of different groups generated as a result of the configuration of a block of host/groups. If applicable to both MLDv1 and MLDv2. For MLDv1 All the initial report gap is controlled by stack initial report gap <NSMLDConfig(ulInitialReportGap)>

Continues >

SmartLibrary Command Reference: Volume 2 | 687

Chapter 10: Universal (NS) NS iType1 Commands and Structures

For MLDv2 1. Basically the initial report gap is controlled by stack initial report gap NSMLDConfig(ulInitialReportGap) 2. The groups configured by one single structure, with NS_MLDV2_GROUP_CONFIG, the initial report gap is controlled by NSMLDv2GroupConfig(ulInitialReportGap). However, if NSMLDv2GroupConfig(ulInitialReportGap) = 0, the initial report gap = NSMLDConfig(ulInitialReportGap). 3. When the NSMLDv2GroupConfig(ulInitialReportGap) > 0, the initial report gap between the groups configured by different structure with NS_MLDV2_GROUP_CONFIG is still controlled by NSMLDConfig(ulInitialReportGap). Therefore, NSMLDConfig(ulInitialReportGap) seems like inter burst gap. Example: There are 3 structures sent by NS_MLDV2_GROUP_CONFIG, and in each structure including 3 groups. NSMLDConfig(ulInitialReportGap) = IRPs NSMLDv2GroupConfig(0.ulInitialReportGap) = IRP0 > 0 NSMLDv2GroupConfig(1.ulInitialReportGap) = IRP1 = 0 NSMLDv2GroupConfig(2.ulInitialReportGap) = IRP2 > 0 The behavior will be IRP0 IRP0 Struct 0 |-------->|-------->| IRPs IRPs IRPs (because IRP1 = 0) Struct 1 Struct 2 ----->|----->|----->| IRPs IRP2 IRP2 ----->|------->|------->|

Continues >

688 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSMLDConfig { unsigned char ucVersion; unsigned char ucOptions;

unsigned short unsigned char unsigned short unsigned char

unsigned char

unsigned long

unsigned char }NSMLDConfig; #define #define #define #define #define #define

/* MLD_V1 or MLD_V2 */ /* possible bit values MLD_FORCE_LEAVE_RECORDS, MLDV2_SUPPRESS_RECORDS,MLD_FORCE_RESPONSE, MLD_FORCE_UNSOLICITED_LISTEN_REPORTS MLD_FORCE_RESPONSE*/ uiMaxNumGroups; /* maximum number of Multicast groups */ ucMaxAddressBlock; /* maximum number of address blocks for only MLDv2, limit is 10 */ uiMaxIPPerBlock; /* maximum IP per block for only MLDv2, limit is 100 */ ucRobustnessVariable; /* number of times to repeat transmission report for MLDv2, or MLDv1 when the force unsolicited listen reports is enabled. Range 0-7. If zero is entered, default value 2 will be used. */ ucUnsolicitedReportInterval; /* maximum range of the random interval between generation of reports within a specific group, for MLDv2, or MLDv1 when the force unsolicited listen is enabled, default is 10 seconds */ ulInitialReportGap; /* Applicable to MLDv1/v2. It is the time interval to generate the first reports of different groups in microseconds as a result of the configuration of block of host/groups. Supported by TeraMetrics Cards */ ucReserved[46]; /* Reserved */

0x00 0x01 0x80 0x40 0x20 0x10 /* for all joined interfaces to respond to queries, MLDv1 */ #define MLDV1_FORCE_UNSOLICITED_LISTEN_REPORTS 0x08 /* Enable force to listen for MLDv1 only*/

MLD_V1 MLD_V2 MLD_FORCE_LEAVE_RECORDS MLDV2_SUPPRESS_RECORDS MLDV2_IGNORE_V1_MESSAGE MLD_FORCE_RESPONSE

SmartLibrary Command Reference: Volume 2 | 689

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MLD_COUNTER_INFO
Retrieve MLD counter information. HTGetStructure(NS_MLD_COUNTER_INFO, 0, 0, 0, (void*) pNSMLDCounterInfo, sizeof(NSMLDCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_MLD_COUNTER_INFO 0 0 0 \ myNSMLDCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSMLDCounterInfo

For MLDv1 and MLDv2. This structure is used to retrieve MLD counter information. typedef struct tagNSMLDCounterInfo { unsigned long ulTxFrames; /* MLD Transmitted frames */ unsigned long ulRxFrames; /* MLD Received Frames */ unsigned long ulTxStartListenGroups; /* Number of Groups that had a Start Listen */ unsigned long ulTxStopListenGroups; /* Number of Groups that had a Stop Listen */ unsigned long ulRxUnknownType; /* Number of unknown type frames */ unsigned long ulRxICMPV6ChecksumErrors; /* Number of Received ICMPV6 Checksum Errors */ unsigned long ulRxLengthErrors; /* Number of received frames with an error in the length of the received packet*/ /* Number of queries done on the membership for a specific group with a wrong version */

unsigned long

ulRxWrongVersionQueries;

unsigned char ucReserved[50]; } NSMLDCounterInfo;

690 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_MLD_GROUP_COUNT_INFO
This command returns the number of MLD multicast groups on a port. A multicast configuration with the same multicast address but different multicast interface configuration is considered to be in separate multicast groups. A multicast group is a distinct combination of multicast interface and multicast address configuration. HTGetStructure(NS_MLD_GROUP_COUNT_INFO, 0, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTGetStructure $NS_MLD_GROUP_COUNT_INFO 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

ULong

SmartLibrary Command Reference: Volume 2 | 691

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description: C Usage

NS_MLD_GROUP_INFO
Retrieve group information for a specfic multicast group. HTGetStructure(NS_MLD_GROUP_INFO, 0, 0, 0, (void*) pNSMLDGroupInfo, sizeof(NSMLDGroupInfo), iHub, iSlot, iPort); HTGetStructure $NS_MLD_GROUP_INFO 0 0 0 \ myNSMLDGroupInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure:

NSMLDGroupInfo

typedef struct tagNSMLDGroupInfo { /* inputs */ unsigned char ucGroupIPAddress[16]; /* address of the multicast group */ unsigned char ucIPAddress[16]; /* interface address */ unsigned char ucMACAddress[6]; /* interface MAC address */ unsigned char ucVLANEnable; /* 1-enable,0-disabled */ unsigned char ucPRI; /* user priority 0-7 */ unsigned char ucCFI; /* 1 = RIF present, 0 = RIF absent */ unsigned short uiVID; /* VLAN ID */ unsigned char ucPPPMode; /* PPP_USE_NONE(default), PPP_USE_PPP_SESSION_ID */ unsigned short uiPPPInstance; /* starting PPP index. Currently this is valid if PPP_USE_PPP_SESSION_ID is on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual MLD over PPPOE packet. So user can issue MLD over PPPOE packet without PPP session */ /* outputs */ unsigned long ulJoinTimestamp; /* Join Time Stamp */ unsigned long ulLeaveTimestamp; /* Leave Time Stamp */ unsigned long ulLastStateTimestamp; /* Timestamp for the last state change. This excludes the initial join report and the leave report. The timestamp for these 2 events is available in the previous 2 fields. */ unsigned char ucReserved[46]; } NSMLDGroupInfo;

Continues >

692 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

NSMLDGroupInfo Description The NSMLDGroupInfo structure retrieves join and leave timestamps for multicast groups and interfaces (MLDv1 and MLDv2). No inputs are need when NSMLDGroupInfo is used with NS_MLD_ALL_GROUP_INFO, because information for all groups is returned. When used with NS_MLD_GROUP_INFO the following fields of NSMLDGroupInfo are used as inputs:

ucGroupIPAddress ucVLANEnable ucPRI ucCFI uiVID ucIPAddress ucMACAddress

These inputs are used to identify the multicast group. The leave and join timestamps for the group are returned. Timestamps are per multicast group, and they are in units of 0.1 microseconds. Timestamp values initially start from 0 when the SmartBits chassis is turned on. The timestamp counter overflows after 430 seconds. The join and leave timestamps change for any of these two events:

An event is considered JOIN for MLDv2 when the mode is INCLUDE with a non-empty source list, or EXCLUDE with an empty source list. An event is considered LEAVE for MLDv2 when the mode is EXCLUDE with a non-empty source list, or INCLUDE with an empty source list.

Comments for ulLastStateTimestamp In MLDv2, all membership reports sent out from a port are called state change reports. Whenever the host wants to change the current state of membership in a specific group, such as a different source list, the host should send out a state change report. Therefore, the new state change timestamp of the group should change with each report of that group sent out. However, there are two special cases. If it is the first report of the group, the MLD stack treats it as a join report and saves the timestamp to ulJoinTimestamp. If the report is trying to INCLUDE NULL, the MLD stack treats it as a leave report and saves the timestamp to ulLeaveTimestamp. In these two cases, ulLastStateTimestamp would not be updated. Example Join t1 state change t2 state change t3 state change t4 leave t5 --> ulJoinTimestamp = t1, ulLastStateTimestamp = t4, and ulLeaveTimestamp = t5

SmartLibrary Command Reference: Volume 2 | 693

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MLD_RESET
Reset the MLD stack. HTSetCommand(NS_MLD_RESET, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_MLD_RESET 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

iType1 Description: C Usage Tcl Usage

NS_MLD_STOP_LISTEN
Stop listening for all groups, MLDv1 and MLDv2. HTSetCommand(NS_MLD_STOP_LISTEN, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_MLD_STOP_LISTEN 0 0 0 \ "" \ $iHub $iSlot $iPort

694 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MLD_TIMESTAMP_INFO
Retrieve join and leave timestamps for all multicast groups. HTGetStructure(NS_MLD_TIMESTAMP_INFO, 0, 0, 0, (void*) pNSMLDTimestampInfo, sizeof(NSMLDTimestampInfo), iHub, iSlot, iPort); HTGetStructure $NS_MLD_TIMESTAMP_INFO 0 0 0 \ myNSMLDTimestampInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSMLDTimestampInfo

typedef struct tagNSMLDTimestampInfo { unsigned char ucGroupIPAddress[16];/*The address of the multicast group*/ unsigned char ucVLANEnable;/*1-enable,0-disabled */ unsigned char ucPRI;/* user priority 0-7 */ unsigned char ucCFI;/* 1 = RIF present, 0 = RIF absent */ unsigned short uiVID;/* VLAN ID */ unsigned char ucPPPMode;/* PPP_USE_NONE (default), PPP_USE_PPP_SESSION_ID. */ unsigned short uiPPPInstance;/* starting PPP index. Only for Terametric cards. PPP session index. Currently this is valid if PPP_USE_PPP_SESSION_ID are on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual MLD over PPPOE packet. So user can issue MLD over PPPOE packet without PPP session in this case. */ unsigned short uiVCIndex;/* Reserved, Virtual channel index for ATM cards */ unsigned char ucMACAddress[6];/* source MAC Address of IGMP Packet, If it is 0's, port MAC address will be used as source MAC address of IGMP packet */ unsigned char ucIPAddress[16];/* source Address of IGMP Packet, If it is 0's, port address will be used as source IP address of IGMP packet. */ unsigned long ulJoinTimestamp;/* Join timestamp */ unsigned long ulLeaveTimestamp; /* Leave timestamp */ unsigned long ulLastStateTimestamp; /* Timestamp for the last state change. This excludes the initial join report and the leave report. The timestamp for these 2 events are available in the previous 2 fields. */ unsigned char ucReserved[20]; } NSMLDTimestampInfo;

Continues >

SmartLibrary Command Reference: Volume 2 | 695

Chapter 10: Universal (NS) NS iType1 Commands and Structures

The NSMLDTimestampInfo structure retrieves join and leave timestamps for all multicast groups. Applicable to MLDv1 and MLDv2. No Inputs are needed. Comments for ulLastStateTimestamp In MLDv2, all the membership reports sent out from a port are called state change reports. Whenever the host wants to change the current state of membership on a specific group, such as different source list, the host should send out a state change report. Therefore, the new state change timestamp of the group should change with each report of that group sent out. However, there are two special cases. If it is the first report to the group, the MLD stack will treat it as a join report and save the timestamp to ulJoinTimestamp. If the report is trying to INCLUDE NULL, the MLD stack will treat it as leave report and save the timestamp to ulLeaveTimestamp. In these two cases, ulLastStateTimestamp would not be updated. Example Join t1 state change t2 state change t3 state change t4 leave t5 -> ulJoinTimestamp = t1, ulLastStateTimestamp = t4, and ulLeaveTimestamp = t5

iType1 Description Tcl Usage

NS_MLDV1_LISTEN
This structure is used to specify a Multicast address to Start or Stop Listening. HTSetStructure $ NS_MLDV1_LISTEN 0 0 0 my NSMLDv1Listen 0 $iHub $iSlot $iPort

Related Structure

NSMLDv1Listen

This command allows multiples structures to enable configuration of multiple multicast addresses.

Continues >

696 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSMLDv1Listen { unsigned char ucAction;/* MLDV1_START_LISTEN, MLDV1_STOP_LISTEN specify if Group should start or stop listening */ unsigned char ucGroupIPAddress[16]; /*The address of the multicast group*/ unsigned char ucVLANEnable; /*1-enable,0-disabled */ unsigned unsigned unsigned unsigned char ucPRI; char ucCFI; short uiVID; char ucPPPMode; /* user priority 0-7 */ /* 1 = RIF present, 0 = RIF absent */ /* VLAN ID */ /* PPP_USE_NONE (default), PPP_USE_PPP_SESSION_ID. This field applies only to TeraMetric modules. */ /* starting PPP index. Only for TeraMetric cards. PPP session index. Currently this is valid if PPP_USE_PPP_SESSION_ID are on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual MLD over PPPOE packet. So user can issue MLD over PPPOE packet without PPP session in this case. */ /* Reserved, Virtual channel index for ATM cards */ /* source MAC Address of IGMP Packet, If it is 0's, port MAC address will be used as source MAC address of IGMP packet */ /* source Address of IGMP Packet, If it is 0's, port address will be used as source IP address of IGMP packet. */

unsigned short uiPPPInstance;

unsigned short uiVCIndex; unsigned char ucMACAddress[6];

unsigned char ucIPAddress[16];

unsigned char ucReserved[50]; }NSMLDv1Listen; #define MLDV1_START_LISTEN #define MLDV1_STOP_LISTEN 0x01 0x02

SmartLibrary Command Reference: Volume 2 | 697

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description: C Usage

NS_MLDV2_GROUP_CONFIG
Configures an Interface for one or more multicast groups HTSetStructure(NS_MLDV2_GROUP_CONFIG, 0, 0, 0, (void*) pNSMLDv2GroupConfig, sizeof(NSMLDv2GroupConfig), iHub, iSlot, iPort); HTSetStructure $NS_MLDV2_GROUP_CONFIG 0 0 0 \ myNSMLDv2GroupConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage Related Structure:

NSMLDv2GroupConfig

The message allows users to configure a large number of interfaces with a number of multicast groups in each interface at one time. Valid values for uiNumInterface is from 1 to 1024. Valid values for uiNumGroup is from 1 to 1024. The total multiplication of the number of interfaces(uiNumInterface) and number of multicast groups(uiNumGroup) in each interface can't be over 1024. This command allows multiple structures to enable configuration of multiple multicast addresses.

Continues >

698 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSMLDv2GroupConfig { /* group configuration */ unsigned char ucGroupIPAddress[16]; /* address of the multicast group */ unsigned short uiFilterMode; /* possible values are MLDV2_EXCLUDE_FILTER_MODE, suppress listed IP's and MLDV2_INCLUDE_FILTER_MODE, allow listed IP's */ unsigned long ulInitialReportGap; /* time interval to generate reports in microseconds, default is 10 millisecond */ unsigned short uiNumGroup; /* number of multicast groups to create per interface*/

unsigned short uiGroupIPStepCount; /* delta value to change ucGroupIPAddress */ unsigned short uiGroupIPAddressOffset; /* the offset of Group IPv6 address to be increased. Range is (0 - 12) and no carry over beyond 4 byte range */ /* interface configuration */ unsigned char ucIPAddress[16]; unsigned char ucMACAddress[6]; unsigned char ucVLANEnable; unsigned short uiNumInterface; unsigned unsigned unsigned unsigned short short short short

/* /* /* /*

interface address */ interface MAC address */ 1-enable,0-disabled */ number of interfaces to create*/

uiIPAddressStepCount; /* delta value to change interface */ uiMACStepCount; /* delta value to change interface MAC address */ uiVIDStepCount; /* delta value to change interface VLAN ID */ uiIPAddressOffset; /* The offset of interface IPv6 address to be increased. Range is (0 - 12) and no carry over beyond 4 byte range */

/* VLAN configurations for interface */ unsigned char ucPRI; /* user priority 0-7 */ unsigned char ucCFI; /* 1 = RIF present, 0 = RIF absent */ unsigned short uiVID; /* VLAN ID */ unsigned char ucPPPMode; /* PPP_USE_NONE(default) , PPP_USE_PPP_SESSION_ID */ unsigned short uiPPPInstance; /* starting PPP index. Currently this is valid if PPP_USE_PPP_SESSION_ID is on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are Considered as 'session id' in actual MLD over PPPOE packet. So user can issue MLD Over PPPOE packet without PPP session */ unsigned short uiPPPInstanceStepCount; /* ppp index change step, if this is 0 only one PPP instance will apply to the groups */ /* number of address blocks to include, maximum 10 */

unsigned char ucNumAddressBlock; unsigned char ucReserved[50]; MLDGroupAddressBlock IPAddressBlock[100]; /*IPv6 address blocks maximum 10 */ } NSMLDv2GroupConfig;

Continues >

SmartLibrary Command Reference: Volume 2 | 699

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Embedded Structure: MLDGroupAddressBlock


typedef struct tagMLDGroupAddressBlock { unsigned char ucStartIPAddress[16]; /* starting address for IP address block */ unsigned char ucUpperIPAddressBoundary[16]; /* upper limit for IP address block */ unsigned short uiIPChangeStep; /* delta value to increase ucStartIPAddress */ unsigned short uiIPAddressOffSet; /* offset into address, Range is (0 - 12) and no carry over beyond 4 byte range */ unsigned short uiNumIP; /* number of IP address in block, 1 - 100 */ unsigned char ucReserved[30]; }MLDGroupAddressBlock;

iType1 Description: C Usage

NS_MLDV2_GROUP_MOD
Modify existing multicast group or add a new multicast group if multicast group or interface is new. HTSetStructure(NS_MLDV2_GROUP_MOD, 0, 0, 0, (void*) pNSMLDv2GroupMod, sizeof(NSMLDv2GroupMod), iHub, iSlot, iPort); HTSetStructure $NS_MLDV2_GROUP_MOD 0 0 0 \ myNSMLDv2GroupMod \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure:

NSMLDv2GroupMod

This command allows users to make a single state change in an existing multicast group, or add a new multicast group if the multicast group or interface identity is new. The message structure is made to only allow one block change at a time for a specific multicast group, which can be identified by the interface and multicast group information within the structure. It also serves as a simple method to add a new multicast group into the host if the multicast group and/or interface identity does not exist. This message can also serve as a filter mode change. In such a case, the new IPv6 block address will be treated as a new source list and the old address list in stack will be properly reported and cleared. If the filter mode stays unchanged and source IP list block is a new block, the new address block will be added only if the total number of IP blocks is still within the maximum allowable limit. This command only modifies uiFilterMode and IPAddressBlock, the other fields are used to identify the multicast group.

Continues >

700 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSMLDv2GroupMod { /* interface configuration */ unsigned char ucIPAddress[16]; unsigned char ucMACAddress[6]; unsigned char ucVLANEnable;

/* interface address */ /* interface MAC address */ /* 1-enable,0-disabled */

/* group configuration */ unsigned char ucGroupIPAddress[16]; /* address of the multicast group */ unsigned short uiFilterMode; /* possible values are MLDV2_EXCLUDE_FILTER_MODE, suppress listed IP's and MLDV2_INCLUDE_FILTER_MODE, allow listed IP's */ /* VLAN configurations for interface */ unsigned char ucPRI; /* user priority 0-7 */ unsigned char ucCFI; /* 1 = RIF present, 0 = RIF absent */ unsigned short uiVID; /* VLAN ID */ unsigned char ucPPPMode; unsigned short uiPPPInstance; /* PPP_USE_NONE(default), PPP_USE_PPP_SESSION_ID */ /* starting PPP index. Currently this is valid if PPP_USE_PPP_SESSION_ID is on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual MLD over PPPOE packet. So user can issue MLD Over PPPOE packet without PPP session */

unsigned char ucReserved[50]; MLDGroupAddressBlock IPAddressBlock; /* IPv6 address blocks maximum 10 */ } NSMLDv2GroupMod;

Embedded Structure: MLDGroupAddressBlock


typedef struct tagMLDGroupAddressBlock { unsigned char ucStartIPAddress[16]; unsigned char ucUpperIPAddressBoundary[16]; unsigned short uiIPChangeStep; unsigned short uiIPAddressOffSet;

/* /* /* /*

unsigned short uiNumIP; unsigned char ucReserved[30]; }MLDGroupAddressBlock;

starting address for IP address block */ upper limit for IP address block */ delta value to increase ucStartIPAddress */ offset into address, Range is (0 - 12) and no carry over beyond 4 byte range*/ /* number of IP address in block, 1 - 100 */

SmartLibrary Command Reference: Volume 2 | 701

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description: C Usage

NS_MLDV2_LISTENER_REPORT_CONFIG
Configures the Type and the Destination Address fields for Multicast Listener Report
HTSetStructure(NS_MLDV2_LISTENER_REPORT_CONFIG, 0, 0, 0, (void*) pNSMLDv2ListenerReportConfig, sizeof(NSMLDv2ListenerReportConfig), iHub, iSlot, iPort); HTSetStructure $NS_MLDV2_LISTENER_REPORT_CONFIG 0 0 0 \ myNSMLDv2ListenerReportConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure:

NSMLDv2ListenerReportConfig

Configures the Type (ICMPv6 header) and the Destination Address field (Destination IP in IPv6 header, address where reports are sent to. All MLDv2-capable multicast routers listen to this address) in Version 2 Multicast Listener Report. Currently the value for Version 2 Multicast Listener Report is not yet available so users can set it with this command. If this command is not used, the default value for Type field is 206
typedef struct tagNSMLDv2ListenerReportConfig { unsigned char ucType; /* value to use in Type field */ unsigned char ucDestinationIP[16]; /* address of destination IP , address where reports are sent to*/ unsigned char ucReserved[20]; } NSMLDv2ListenerReportConfig;

iType1 Description: C Usage

NS_MLDV2_STATS_INFO
Retrieve report counters for a specific multicast group. HTGetStructure(NS_MLDV2_STATS_INFO, 0, 0, 0, (void*) pNSMLDv2StatsInfo, sizeof(NSMLDv2StatsInfo), iHub, iSlot, iPort); HTGetStructure $NS_MLDV2_STATS_INFO 0 0 0 \ myNSMLDv2StatsInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure:

NSMLDv2StatsInfo
Continues >

702 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Retrieve report counters for a specific multicast group. Applicable only to MLDv2. The following fields are used as inputs:

ucGroupIPAddress ucVLANEnable ucPRI ucCFI uiVID ucIPAddress and ucMACAddress.

typedef struct tagNSMLDv2StatsInfo { /* group configuration */ unsigned char ucGroupIPAddress[16]; /* Input - address of the multicast group */ /* interface configuration */ unsigned char ucIPAddress[16]; unsigned char ucMACAddress[6]; unsigned char ucVLANEnable;

/* Input - interface address */ /* Input - interface MAC address */ /* Input - 1-enable,0-disabled */

/* VLAN configurations for interface */ unsigned char ucPRI; /* Input - user priority 0-7 */ unsigned char ucCFI; /* Input - 1 = RIF present, 0 = RIF absent */ unsigned short uiVID; /* Input - VLAN ID */ unsigned char ucPPPMode; unsigned short uiPPPInstance; /* PPP_USE_NONE(default) , PPP_USE_PPP_SESSION_ID */ /* starting PPP index. Currently this is valid if PPP_USE_PPP_SESSION_ID is on. PPP_USE_PPP_SESSION_ID - The least significant two bytes of this value are considered as 'session id' in actual MLD over PPPOE packet. So user can issue MLD over PPPOE packet without PPP session */

/* output unsigned unsigned unsigned unsigned

fields */ long ulV2QueryReceived; long ulV1QueryReceived; long ulV1ReportReceived; long ulTotalV2ReportSent;

/* /* /* /*

v2 query reports received */ v1 queries received */ v1 query reports received */ total number of version 2 reports sent out */ group record group record group record group record record messages record messages

unsigned long ulIsIncludeSent; unsigned long ulIsExcludeSent; unsigned long ulToIncludeSent; unsigned long ulToExcludeSent; unsigned long ulAllowSent; unsigned long ulBlockSent; unsigned char ucReserved[50]; } NSMLDv2StatsInfo;

/* total number of Is Included messages sent out */ /* total number of Is Excluded messages sent out */ /* total number of To Included messages sent out */ /* total number of To Excluded messages sent out */ /* total number of Allow group sent out */ /* total number of Block group sent out */

SmartLibrary Command Reference: Volume 2 | 703

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MOD_IPV6_EXT_AUTHENTICATION
Modify one stream at a given index with IPv6 Authentication Extension headers. HTSetStructure(NS_MOD_IPV6_EXT_AUTHENTICATION, <index>, 0, 0, (void*) pNSIPv6ExtAuthentication, sizeof(NSIPv6ExtAuthentication), iHub, iSlot, iPort); HTSetStructure $NS_MOD_IPV6_EXT_AUTHENTICATION <index> 0 0 \ myNSIPv6ExtAuthentication \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtAuthentication

This command provides the ability to define IPv6 Authentication Extension headers for existing (already defined) IPv6 Streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The IP Authentication Header (AH) is used to provide connectionless integrity and data origin authentication for IP datagrams, and to provide protection against replays. The protocol immediately preceding the AH header will contain the value 51 in its Protocol (IPv4) or Next Header (IPv6, Extension) field. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics). For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6). Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

Continues >

704 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6ExtAuthentication { unsigned char ucNextHeader; /* Identifies the type of header immediately following the Authentication header */ unsigned char ucHeaderExtensionLength;/*Length of AH in 4-byte units, including all fields */ unsigned long ulSPI; /* Security Parameters index, an arbitrary value that, in combination with the destination IP address and security protocol (AH), uniquely identifies the security association for this packet */ unsigned long ulSeqNumber; /* Monotonically increasing counter value (sequence number). In the current implementation, the field does not increment with each packet; it is a static value configured by user. Or user may enable a VFD field to do the incrementation. */

unsigned char ucAuthenticationDataLength;/* Length of Authenication Data field */ unsigned char ucAuthenticationData[255];/* Contains the Integrity Check Value (ICV) for this packet */ unsigned char ucReserved[20]; }NSIPv6ExtAuthentication;

SmartLibrary Command Reference: Volume 2 | 705

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MOD_IPV6_EXT_DESTINATION
Modify one stream at a given index with IPv6 Destination Extension headers. HTSetStructure(NS_MOD_IPV6_EXT_DESTINATION, <index>, 0, 0, (void*) pNSIPv6ExtDestination, sizeof(NSIPv6ExtDestination), iHub, iSlot, iPort); HTSetStructure $NS_MOD_IPV6_EXT_DESTINATION <index> 0 0 \ myNSIPv6ExtDestination \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtDestination

This command provides the ability to define IPv6 Destination Extension headers for existing (already defined) IPv6 Streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The Destination Options header is used to carry optional information that need be examined only by a packet's destination node(s). The Destination Options header is identified by a Next Header value of 60 in the immediately preceding header. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics). For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6). Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

typedef struct tagNSIPv6ExtDestination { unsigned char ucNextHeader;

/* Identifies the type of header immediately following the Destination header */ unsigned char ucHeaderExtensionLength;/* Length of the Destination header in 8-byte units, including all fields */ unsigned char ucOptionDataLength; unsigned char ucOptionData[255]; /* Length of the Option Data field of to be used, in bytes */ /* Option-Type-specific data*/

unsigned char ucReserved[20]; }NSIPv6ExtDestination;

706 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MOD_IPV6_EXT_ESP
Modify one stream at a given index with IPv6 Encapsulated Security Payload(ESP) Extension headers. HTSetStructure(NS_MOD_IPV6_EXT_ESP, <index>, 0, 0, (void*) pNSIPv6ExtESP, sizeof(NSIPv6ExtESP), iHub, iSlot, iPort); HTSetStructure $NS_MOD_IPV6_EXT_ESP <index> 0 0 \ myNSIPv6ExtESP \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtESP

If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. This command provides the ability to define IPv6 Encapsulated security payload(ESP) Extension headers for existing (already defined) IPv6 Streams. The Encapsulating Security Payload (ESP) header is designed to provide a mix of security services in and IPv6. ESP may be applied alone, in combination with the IP Authentication Header (AH), or in a nested fashion, e.g., through the use of tunnel mode. The protocol header immediately preceding the ESP header will contain the value 50. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics). For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6). Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

Continues >

SmartLibrary Command Reference: Volume 2 | 707

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6ExtESP { unsigned char ucNextHeader; unsigned long ulSPI;

unsigned long ulSeqNumber;

/* Identifies the type of header immediately following the ESP header */ /* Security Parameters index, an arbitrary value that, in combination with the destination IP address and security protocol (ESP), uniquely identifies the security association for this packet */ /* Monotonically increasing counter value (sequence number). In the current implementation, the field does not increment with each packet; it is a static value configured by user. Or user may enable a VFD field to do the incrementation. */ /* The sender MAY add 0-255 bytes of padding. Inclusion of the Padding field in an ESP packet is optional, Note: for TeraMetrics LAN maximum accepted length is 74 bytes and for POS TM is 84 bytes */ /* Length in bytes of ucPadding */

unsigned char ucPadding[255];

unsigned char ucPaddingLength; unsigned char ucPayloadData[255];

/* A variable-length field containing data described by the Next Header field. The Payload Data field is mandatory and is an integral number of bytes in length */ unsigned char ucPayloadDataLength; /* Length of Payload Data field */ unsigned char ucAuthenticationData[255];/*contains the Integrity Check Value (ICV) for this packet */ unsigned char ucAuthenticationDataLength;/* Length of Authenication Data field */ unsigned char ucReserved[20]; }NSIPv6ExtESP;

708 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MOD_IPV6_EXT_FRAGMENT
Modify one stream at a given index with IPv6 Fragment Extension headers. HTSetStructure(NS_MOD_IPV6_EXT_FRAGMENT, <index>, 0, 0, (void*) pNSIPv6ExtFragment, sizeof(NSIPv6ExtFragment), iHub, iSlot, iPort); HTSetStructure $NS_MOD_IPV6_EXT_FRAGMENT <index> 0 0 \ myNSIPv6ExtFragment \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtFragment

This command provides the ability to define IPv6 Fragment Extension headers for existing (already defined) IPv6 Streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The Fragment header is used by an IPv6 source to send a packet larger than would fit in the path MTU to its destination. The Fragment header is identified by a Next Header value of 44 in the immediately preceding header. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics). For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6). Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

typedef struct tagNSIPv6ExtFragment { unsigned char ucNextHeader; unsigned short uiFragmentOffset;

/* Identifies the type of header immediately following the Fragment header */ /* The offset, in 8-byte units, of the data following this header is relative to the start of the Fragment-able Part of the original packet. */ /* 1 = more fragments; 0 = last fragment */ /* Unique Identification for packet that need to be fragmented*/

unsigned char ucMFlag; unsigned long ulIdentification; unsigned char ucReserved[20]; }NSIPv6ExtFragment;

SmartLibrary Command Reference: Volume 2 | 709

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MOD_IPV6_EXT_HOP_BY_HOP
Modify one stream at a given index with IPv6 Hop-by-Hop Extension headers. HTSetStructure(NS_MOD_IPV6_EXT_HOP_BY_HOP, <index>, 0, 0, (void*) pNSIPv6ExtHopByHop, sizeof(NSIPv6ExtHopByHop), iHub, iSlot, iPort); HTSetStructure $NS_MOD_IPV6_EXT_HOP_BY_HOP <index> 0 0 \ myNSIPv6ExtHopByHop \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtHopByHop

This command provides the ability to define IPv6 Hop-By-Hop Extension headers for existing (already defined) IPv6 streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The Hop-by-Hop Options header is used to carry optional information that must be examined by every node along the packet's delivery path. The Hop-by-Hop Options header is identified by Next Header value of 0 in the IPv6 header. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics) For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6) Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

typedef struct tagNSIPv6ExtHopByHop { unsigned char ucNextHeader; unsigned char

/* Identifies the type of header immediately following the Hop-by-Hop Options header */ ucHeaderExtensionLength;/* Length of the Hop-by-Hop Options header in 8-byte units, including all fields */ /* Length of the Option Data field of to be used, bytes */ /* Option-Type-specific data */

/* Options */ unsigned char ucOptionDataLength; unsigned char ucOptionData[255]; unsigned char ucReserved[20]; }NSIPv6ExtHopByHop;

710 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MOD_IPV6_EXT_ROUTING
Modify one stream at a given index with IPv6 Routing Extension header. HTSetStructure(NS_MOD_IPV6_EXT_ROUTING, <index>, 0, 0, (void*) pNSIPv6ExtRouting, sizeof(NSIPv6ExtRouting), iHub, iSlot, iPort); HTSetStructure $NS_MOD_IPV6_EXT_ROUTING <index> 0 0 \ myNSIPv6ExtRouting \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6ExtRouting

This command provides the ability to define IPv6 Routing(Type 0) Extension headers for existing (already defined) IPv6 Streams. If the specified stream has an existing IPv6 Extension header, the new one will be appended to it. The Routing header is used by an IPv6 source to list one or more intermediate nodes to be "visited" on the way to a packet's destination. For TeraMetrics LAN modules, maximum accepted total length for any IPv6 header is 74 bytes (non-VLAN). For POS TeraMetrics modules, it is 84 bytes. Maximum length of payload in TeraMetric modules is 128, so the maximum for Extension header is 128 - 12 (MAC) - 2 (Protocol) - 40 (IPv6) = 74 (LAN TeraMetrics) For POS TeraMetrics modules: 128 - 4 (HDLC) - 40 (IPv6) Possible ucNextHeader values: - IPV6_EXT_HOP_BY_HOP - IPV6_EXT_FRAGMENT - IPV6_EXT_AUTHENTICATION - IPV6_EXT_ROUTING_TYPE_0 - IPV6_EXT_DESTINATION 0 44 51 43 60

- IPV6_EXT_ENCAPULATING_SECURITY 50

Continues >

SmartLibrary Command Reference: Volume 2 | 711

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSIPv6ExtRouting { unsigned char ucNextHeader;

/* Identifies the type of header immediately following the Routing header */ unsigned char ucHeaderExtensionLength;/* Length of the Routing header In 8-byte units, including all fields */ unsigned char ucSegmentsLeft; /* Number of route segments remaining, i.e., number of explicitly listed intermediate nodes still to be visited before reaching the final destination */ NSIPv6Address IPAddress[20]; /* The maximum accepted number of addresses for TeraMetrics LAN cards and for TeraMetrics POS cards is 4 */ /* Number of addresses to use in IP Address */

unsigned char ucNumAddress; unsigned char ucReserved[20]; }NSIPv6ExtRouting;

Embedded Structure

NSIPv6Address

typedef struct tagNSIPv6Address { unsigned char ucIPAddress[16]; } NSIPv6Address;

712 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_MOD_IPV6_OVER_IPV4_TUNNELING
Modify IPv4 protocol part of an existing IPv6-over-IPv4 Tunneled stream at a specified index. If the stream at the specified index is not tunneled, it will be tunneled. HTSetStructure(NS_MOD_IPV6_OVER_IPV4_TUNNELING, <index>, 0, 0, (void*) pNSIPv6OverIPv4Tunneling, sizeof(NSIPv6OverIPv4Tunneling), iHub, iSlot, iPort); HTSetStructure $NS_MOD_IPV6_OVER_IPV4_TUNNELING <index> 0 0 \ myNSIPv6OverIPv4Tunneling \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSIPv6OverIPv4Tunneling

Tunneling is used to tunnel IPv6 datagrams over regions of IPv4 routing topology by encapsulating them within IPv4 packets. This structure holds IPv4 information to be used to encapsulate existing IPv6 streams. IPv6 streams should be defined first. If L3_DEFINE_XX_STREAM or L3_MOD_XX_STREAM is called on streams with IPv6-over-IPv4 tunneling, the streams will will be replaced. L3_DEFINE_MULTI_XX_STREAMS cannot be used on IPv6-over-IPv4 streams. Use NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING. ucIgnoreTunneling field is applicable only when NS_DEFINE_IPV6_OVER_IPV4_TUNNELING is used. Behavior For NS_DEFINE_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations: Non-IPv6 stream - Stream will be left untouched with no error returned. IPv6 stream - Stream will become tunneled. Tunneled stream - IPv4 part of tunneled stream will be replaced with new IPv4 configuration. Mixture of non-IPv6 and IPv6 streams - Non-IPv6 streams will be left untouched, IPv6 streams will be tunneled. Mixture of non-IPv6 and tunneled streams - Non-IPv6 streams will be left untouched, IPv4 portion of tunneled stream will be replaced. Mixture of IPv6 and tunneled streams - IPv6 streams will be tunneled, IPv4 portion of tunneled stream will be replaced. Mixture of non-IPv6, IPv6, and tunneled streams - Non-IPv6 streams will be left untouched, IPv6 streams will become tunneled, and IPv4 portion of tunneled stream will be replaced.

Continues >

SmartLibrary Command Reference: Volume 2 | 713

Chapter 10: Universal (NS) NS iType1 Commands and Structures

For NS_DEFINE_MULTI_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations (delta values are only applicable to IPv4 portion of the tunneled stream if command is successful): Base streams: Non-IPv6 streams - An error will be returned. IPv6 streams - An error will be returned. Tunneled streams - IPv4 portion of tunneled stream wil be copied. Destination streams: Non-IPv6 stream - Stream will be left untouched with no error returned. IPv6 stream - Stream will become tunneled. Mixture of non-IPv6 and IPv6 streams - Non-IPv6 streams will be left untouched, IPv6 streams will be tunneled. Mixture of non-IPv6 and tunneled streams - Non-IPv6 streams will be left untouched, IPv4 portion of tunneled stream will be replaced. For NS_MOD_IPV6_OVER_IPV4_TUNNELING on streams with the following configurations: Non-IPv6 streams - An error will be returned. IPv6 stream - Stream will become tunneled. Tunneled stream - IPv4 part of tunneled stream will be replaced with new IPv4 configuration. typedef struct tagNSIPv6OverIPv4Tunneling { unsigned char ucIgnoreTunneling; /* specifies if tunneling should be enabled, 0 - (default) enable Tunneling, 1 - disable tunneling */ unsigned char ucTypeOfService; /* Used to indicate the quality of the service desired */ unsigned char ucTimeToLive; /* number of "hops" until frame */ /* will be dropped */ unsigned short uiInitialSequenceNumber;/* Initial sequence number */ unsigned char ucDestinationIP[4]; /* Dest IP addr(e.g. 192.100.5.3) */ unsigned char ucSourceIP[4]; /* Src IP addr (e.g. 192.100.5.4) */ unsigned char ucNetmask[4]; /* Network Mask (e.g. 255.255.0.0) */ unsigned char ucGateway[4]; /* Gateway addr (e.g. 192.100.1.1) */ unsigned char ucReserved[64]; }NSIPv6OverIPv4Tunneling;

714 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_MULTICAST_KEEP_ALIVE_CONFIG
To start or stop sending multicast "keep-alive" UDPpackets periodically to multicast group addresses, to extend the PIM-SM timers to prevent the multicast router entry from being deleted. This is a port based command, it will control the multicast "keep-alive" packet sending for the streams which have the flag "ucMulticastKeepAliveEnable" enabled in stream extension. HTSetStructure(NS_MULTICAST_KEEP_ALIVE_CONFIG, 0, 0, 0, (void*) pNSMulticastKeepAliveConfig, sizeof(NSMulticastKeepAliveConfig), iHub, iSlot, iPort); HTSetStructure $NS_MULTICAST_KEEP_ALIVE_CONFIG 0 0 0 \ myNSMulticastKeepAliveConfig \ 0 \ $iHub $iSlot $iPort

C Usage

Tcl Usage

Related Structure

NSMulticastKeepAliveConfig

Configuration procedures for Multicast Keep Alive: 1. Configure the streams (except StreamSmartBits/SmartBits128) using the L3 stream command or the NS new stream command. Note: Only one single VLAN is supported. (Optional) Configure VFD using the L3 VFD command or the NS new stream command, VFD. 2. Enable Multicast Keep Alive in the L3 stream extension or NS new stream command, NSTxConfig. 3. Start transmitting the Multicast Keep Alive packets using NSMulticastKeepAliveConfig with NS_MULTICAST_KEEP_ALIVE_START. 4. Stop transmitting the Multicast Keep Alive packets using NSMulticastKeepAliveConfig with NS_MULTICAST_KEEP_ALIVE_STOP. By default, Multicast Keep Alive should be disabled to avoid wasting resources and get unexpected packets. NOTES for Multicast Keep Alive: 1. Any type of streams (except StreamSmartBits/SmartBits128) can be configured with the Multicast Keep Alive enabled. The transmitted packets will always be UDP packets, and the frame length is always 100. 2. The fields of Ethernet/IPv4/IPv6 header are from the stream configuration. 3. If UDP streams are configured, the UDP header is from the stream configuration. If non-UDP streams are configured, the default value, 1055/537 is used for the Src/Dest UDP port. UDP length is fixed since the frame length is always 100. 4. The regular stream transmission parameter (Tx mode, burst count, gap) is not applicable to Multicast Keep Alive. The transmission is completely controlled by NS_MULTICAST_KEEP_ALIVE_CONFIG. 5. Netcom signature fields are not in the packets. 6. The field, "uiBlockCount" in NSVFD, cannot be set for Multicast Keep Alive. It is always a fixed value of 1t. 7. Since MLD/IGMP and stream configuration are separate processes, the user must configure the streams with an appropriate group address of IGMP/MLD to use Multicast Keep Alive.

Continues >

SmartLibrary Command Reference: Volume 2 | 715

Chapter 10: Universal (NS) NS iType1 Commands and Structures

8. The default keep alive time is 30 seconds. The minimum value is one second and the maximum value is 65,355 seconds. If the minimum value is used, the card will not yield an evenly distributed configuration. Instead it will attempt to burst all the packets after one second. 9. For a large number of keep alive packets (> 3000), the packets will be evenly distributed rather than burst after each time interval. For example if a stream is configured with 100,000, using VFD and a time interval of 30 seconds, the card will send approximately 3,333 packets after one second. Note: Multicast Keep Alive does not work with IPX Streams. typedef struct tagNSMulticastKeepAliveConfig { unsigned short uiAction; /* Start or stop sending the multicast "keep-alive" UDP packet, possible values NS_MULTICAST_KEEP_ALIVE_START NS_MULTICAST_KEEP_ALIVE_STOP */ unsigned short uiTimeInterval; /* Time interval to send the multicast "keep-alive"UDP packet, in the unit of seconds, valid range 1-65565,default 30. Applicable when ucAction is Start. If zero is entered, it will use the default 30 */ unsigned char ucReserved[64]; }NSMulticastKeepAliveConfig; #define #define NS_MULTICAST_KEEP_ALIVE_START NS_MULTICAST_KEEP_ALIVE_STOP 0x01 0x02

716 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description:

NS_MULTI_COUNTER_INFO
Retrieve all counters supported by TeraMetrics cards. This command replaces the following iType1 commands:


C Usage

NS_PROTOCOL_COUNTER_INFO NS_PROTOCOL_RATE_INFO NS_COUNTER_INFO NS_RATE_INFO

HTGetStructure(NS_MULTI_COUNTER_INFO, 0, 0, 0, (void*) pNSMultiCounterInfo, sizeof(NSMultiCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_MULTI_COUNTER_INFO 0 0 0 \ myNSMultiCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure:

NSMultiCounterInfo

typedef struct tagNSMultiCounterInfo { unsigned long ulMode; /* retrieve Events, Rates, or both Rates and Events */ unsigned long ulCounterType; /* Determines what type of counters to retrieve. Can use 'OR' to obtain two or more counters */ U64 u64Events[300]; /* Events */ U64 u64Rates[300]; /* Rates */ unsigned char ucReserved[64]; } NSMultiCounterInfo;

Continues >

SmartLibrary Command Reference: Volume 2 | 717

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Possible values for the ulMode member:

NS_EVENTS_MODE NS_RATES_MODE NS_MULTI_L2_COUNTERS NS_MULTI_IPV4_COUNTERS NS_MULTI_IPV6_COUNTERS NS_MULTI_ERROR_COUNTERS NS_MULTI_MPLS_COUNTERS NS_MULTI_ETH_COUNTERS NS_MULTI_IPV4_PING_COUNTERS NS_MULTI_IPV4_ARP_COUNTERS NS_MULTI_IPV6_NEIGHBOR_SOLICITATION_ COUNTERS NS_MULTI_IPV6_PING_COUNTERS NS_MULTI_VLAN_PRIORITY_COUNTER NS_MULTI_HW_RATE_COUNTERS NS_MULTI_LINK_FAULT_SIGNALING_COUNTER S

Tx Stack (NS_MULTI_TX_STACK) Rx Stack (NS_MULTI_RX_STACK) Rx Dropped Frames (NS_MULTI_RX_DROPPED_FRAMES)

Possible values for the ulCounterType member:

NS_MULTI_LINK_FAULT_SIGNALING_COUNTE RS

Local Link Fault Signaling Start counter, available in only events mode(NS_EVENTS_MODE) (NS_MULTI_LFS_LOCAL_START) Local Link Fault Signaling Continue counter, available in only events mode(NS_EVENTS_MODE) (NS_MULTI_LFS_LOCAL_CONTINUE ) Remote Link Fault Signaling Start counter, available in only events mode(NS_EVENTS_MODE)) (NS_MULTI_LFS_REMOTE_START) Remote Link Fault Signaling Continue counter, available in only events mode(NS_EVENTS_MODE) (NS_MULTI_LFS_REMOTE_CONTINUE). Tx IPv4 (NS_MULTI_TX_IPV4_FRAMES) Rx IPv4 (NS_MULTI_RX_IPV4_FRAMES) ICMPv4 Unreachable Frames (NS_MULTI_IPV4_ICMP_UNREACHABLE_RX) Tx IPv6 (NS_MULTI_TX_IPV6_FRAMES) Rx IPv6 (NS_MULTI_RX_IPV6_FRAMES) ICMPv6 Unreachable Frames (NS_MULTI_IPV6_ICMP_UNREACHABLE_RX) Rx CRC Error (NS_MULTI_RX_CRC_ERROR) Rx Data Integrity Error (NS_MULTI_RX_DATA_INTEGRITY_ERROR) IPv4 Checksum Error (NS_MULTI_IPV4_CHECKSUM_ERROR) IPV6 Rx Payload Checksum Error
(NS_MULTI_IPV6_PAYLOAD_CHECKSUM_ERROR)

NS_MULTI_IPV4_COUNTERS

Counters are grouped as follows (constants in parentheses are indexes for referencing the counters): Note: The following counters and constants have various SmartBits hardware compatibilities. For more information, see Card Support for the NSMultiCounterInfo Structure on page 895. NS_MULTI_L2_COUNTERS

NS_MULTI_IPV6_COUNTERS

Tx Frames (NS_MULTI_TX_FRAMES) Tx Signature Frames (NS_MULTI_TX_SIGNATURE_FRAMES) Tx Bytes (NS_MULTI_TX_BYTES) Tx Trigger (NS_MULTI_TX_TRIGGER) Tx Latency (NS_MULTI_TX_LATENCY) Tx Timestamp (NS_MULTI_TX_TIMESTAMP) Rx Timestamp (NS_MULTI_RX_TIMESTAMP) Rx Frame (NS_MULTI_RX_FRAMES) Rx Signature Frame (NS_MULTI_RX_SIGNATURE_FRAMES) Rx Bytes (NS_MULTI_RX_BYTES) Rx Trigger (NS_MULTI_RX_TRIGGER) Rx Latency (NS_MULTI_RX_LATENCY)

NS_MULTI_ERROR_COUNTERS

(only ICMPv6 Informational messages supported) Alignment Error (NS_MULTI_ALIGNMENT_ERROR) Rx MPLS (NS_MULTI_RX_MPLS_FRAMES) Tx MPLS (NS_MULTI_TX_MPLS_FRAMES) (not supported)

NS_MULTI_MPLS_COUNTERS

Continues >

718 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

NS_MULTI_IPV4_ARP_COUNTERS

NS_MULTI_VLAN_PRIORITY_COUNTERS

ARP Replies Received (NS_MULTI_ARP_REPLIES_RX) ARP Replies Sent (NS_MULTI_ARP_REPLIES_TX) ARP Requests Sent (NS_MULTI_ARP_REQUESTS_TX) Ping Replies Received (NS_MULTI_IPV4_PING_REPLIES_RX) Ping Replies Sent (NS_MULTI_IPV4_PING_REPLIES_TX) Ping Requests Sent (NS_MULTI_IPV4_PING_REQUESTS_TX) Ping Requests Received (NS_MULTI_IPV4_PING_REQUESTS_RX)

Applicable to XLW, XFP, and LAN XD TeraMetrics modules. Received VLAN tagged frames indexed by 3-bit user priority field within the VLAN tag. For multiple VLAN tags, only the first tag after the MAC address header is considered.

NS_MULTI_IPV4_PING_COUNTERS

VLAN PRI 0 Received NS_MULTI_VLAN_PRI_0_RX VLAN PRI 1 Received NS_MULTI_VLAN_PRI_1_RX VLAN PRI 2 Received NS_MULTI_VLAN_PRI_2_RX VLAN PRI 3 Received NS_MULTI_VLAN_PRI_3_RX VLAN PRI 4 Received NS_MULTI_VLAN_PRI_4_RX VLAN PRI 5 Received NS_MULTI_VLAN_PRI_5_RX VLAN PRI 6 Received NS_MULTI_VLAN_PRI_6_RX VLAN PRI 7 Received NS_MULTI_VLAN_PRI_7_RX

NS_MULTI_IPV6_NEIGHBOR_SOLICITATION_ COUNTERS

Neighbor Solicitation Sent (NS_MULTI_NEIGHBOR_SOLICITATION_TX) Neighbor Solicitation Received (NS_MULTI_NEIGHBOR_SOLICITATION_RX) Neighbor Advertisement Sent (NS_MULTI_NEIGHBOR_ADVERT_TX) Neighbor Advertisement Received (NS_MULTI_NEIGHBOR_ADVERT_RX) IPv6 Ping Replies Received (NS_MULTI_IPV6_PING_REPLIES_RX) IPv6 Ping Replies Sent (NS_MULTI_IPV6_PING_REPLIES_TX) IPv6 Ping Requests Sent (NS_MULTI_IPV6_PING_REQUESTS_TX) IPv6 Ping Requests Received (NS_MULTI_IPV6_PING_REQUESTS_RX)

NS_MULTI_HW_RATE_COUNTERS

NS_MULTI_IPV6_PING_COUNTERS

Rate counters Received from the HW. Applicable to XFP 3730/31 and XLW 3720/21 test modules. For NS_RATES_MODE only, This value is updated every second. Tx Frames sent in the previous second (NS_MULTI_HW_TX_FRAMES). Rx Frames received in the previous second (NS_MULTI_HW_RX_FRAMES)..

Continues >

SmartLibrary Command Reference: Volume 2 | 719

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Tcl Example 1: Getting Error Counters The ulMode member is set to NS_EVENTS_MODE and the ulCounterType member is set to NS_MULTI_ERROR_COUNTERS. struct_new multi_counter NSMultiCounterInfo set multi_counter(ulMode) $::NS_EVENTS_MODE set multi_counter(ulCounterType) $::NS_MULTI_ERROR_COUNTERS Tcl Example 2: Getting Error and IPv4 Counters/Rates The ulMode member is set to NS_EVENTS_MODE | NS_RATES_MODE and the ulCounterType member is set to NS_MULTI_ERROR_COUNTERS | NS_MULTI_TX_IPV4_FRAMES. struct_new multi_counter NSMultiCounterInfo set multi_counter(ulMode) [expr $::NS_EVENTS_MODE | NS_RATES_MODE] set multi_counter(ulCounterType) [expr $::NS_MULTI_ERROR_COUNTERS | \ $::NS_MULTI_TX_IPV4_FRAMES]

Embedded Structure:

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

720 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_OAM_CONFIG
Configure the OAM setting. HTSetStructure(NS_OAM_CONFIG, 0, 0, 0, (void*) pNSOAMConfig, sizeof(NSOAMConfig), iHub, iSlot, iPort); HTSetStructure $NS_OAM_CONFIG 0 0 0 \ myNSOAMConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSOAMConfig

This command currently only applies for the LAN-3710AS, LAN-3710AL and LAN-3710AE cards. typedef struct tagNSOAMConfig { unsigned long ulTotalPatterns; unsigned char ucCRC8ErrorEnable; unsigned char ucOAMEnable;

unsigned char ucReserved[58]; } NSOAMConfig;

/* Total number of OAM patterns (max=128, 6 bytes per pattern) */ /* Enable generating CRC8 error for each OAM pattern */ /* This mode needs to be enabled in order for the port to transmit and receive frames. This includes capturing and gathering statistics(counters) for OAM frames. 1=enabled, 0=disabled (default) */ /* reserved */

SmartLibrary Command Reference: Volume 2 | 721

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_OAM_COUNTER_INFO
Retrieve OAM counter information. HTGetStructure(NS_OAM_COUNTER_INFO, 0, 0, 0, (void*) pNSOAMCounterInfo, sizeof(NSOAMCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_OAM_COUNTER_INFO 0 0 0 \ myNSOAMCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSOAMCounterInfo

This command currently only applies for the LAN-3710AS, LAN-3710AL and LAN-3710AE cards. typedef struct tagNS0AMCounterInfo { U64 u64TxFrames;/*Total count of number of transmitted none-OAM Frames excluding error frames.*/ U64 u64TxOAMFrames;/*Total count of number of transmitted OAM frames excluding transmitted OAM "idle" frames and error frames. */ U64 u64TxOAMIdleFrames;/*Total count of number of transmitted OAM "idle" frames excluding error frames.*/ U64 u64RxFrames;/*Total count of number of received none-OAM Frames excluding error frames.*/ U64 u64RxOAMFrames;/*Total count of number of received OAM frames excluding received OAM "idle" frames and error frames. */ U64 u64RxOAMIdleFrames;/*Total count of number of received OAM "idle" frames excluding error frames. */ U64 u64RxCRC8Errors;/*Total count of number of received OAM frames which contain CRC8 errors. */ } NSOAMCounterInfo;

722 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_OAM_PATTERN
Set the OAM pattern. Currently the maximum pattern size is 768 bytes (128 unique OAM patterns * 6 bytes per pattern). HTSetStructure(NS_OAM_PATTERN, 0, 0, 0, (void*) pUChar, sizeof(UChar), iHub, iSlot, iPort); HTSetStructure $NS_OAM_PATTERN 0 0 0 \ myUChar \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

UChar

iType1 Description C Usage

NS_OAM_RATE_INFO
Retrieve OAM rate information. HTGetStructure(NS_OAM_RATE_INFO, 0, 0, 0, (void*) pNSOAMRateInfo, sizeof(NSOAMRateInfo), iHub, iSlot, iPort); HTGetStructure $NS_OAM_RATE_INFO 0 0 0 \ myNSOAMRateInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSOAMRateInfo

This command currently only applies for the LAN-3710AS, LAN-3710AL and LAN-3710AE cards.

Continues >

SmartLibrary Command Reference: Volume 2 | 723

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSOAMRateInfo { unsigned long ulTxFrames;/*Last recorded rate of transmitted none-OAM frames excluding error frames. */ unsigned long ulTxOAMFrames;/*Last recorded rate of transmitted OAM frames excluding transmitted OAM "idle" frames and error frames. */ unsigned long ulTxOAMIdleFrames;/*Last recorded rate of transmitted OAM "idle" frames excluding error frames. */ unsigned long ulRxFrames;/*Last recorded rate of received none-OAM frames excluding error frames. */ unsigned long ulRxOAMFrames;/*Last recorded rate of received OAM frames excluding received OAM "idle" frames and error frames. */ unsigned long ulRxOAMIdleFrames;/*Last recorded rate of received OAM "idle" frames excluding error frames. */ unsigned long ulRxCRC8Errors;/*Last recorded rate of received OAM frames which contain CRC8 errors. */ } NSOAMRateInfo;

724 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_PER_STREAM_COUNTER_INFO
Get per-stream counter information. Note that index (iType2) is the first stream and count (iType3) is the total number of streams to get counters for. HTGetStructure(NS_PER_STREAM_COUNTER_INFO, <index>, <count>, 0, (void*) pNSPerStreamCounterInfo, sizeof(NSPerStreamCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_PER_STREAM_COUNTER_INFO <index> <count> 0 \ myNSPerStreamCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
Retrieve counters per stream.

NSPerStreamCounterInfo

The rate per stream (transmit) on TeraMetrics cards can be calculated with this command using values obtained from u64TxTimeStamp and u64TxFrames at different time intervals. Rate per Stream(TX) = CurrentFrameCount PreviousFrameCount -------------------------------------CurrentTimeStamp PreviousTimeStamp

The maximum number of stream supported by this command is 1000 streams. The time interval for u64TxTimeStamp is 100 nanoseconds. Inconsistent results occur if random frame lengths are enabled. typedef struct tagNSPerStreamCounterInfo { U64 u64TxTimeStamp;/* TimeStamp when Tx Frames was collected */ U64 u64TxFrames;/* Number of transmitted frames */ unsigned char ucReserved[128];/* Reserved */ } NSPerStreamCounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

SmartLibrary Command Reference: Volume 2 | 725

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_PHY_CONFIG
Configures the Layer 2 protocol mode of operation. HTSetStructure(NS_PHY_CONFIG, 0, 0, 0, (void*) pNSPhyConfig, sizeof(NSPhyConfig), iHub, iSlot, iPort); HTSetStructure $NS_PHY_CONFIG 0 0 0 \ myNSPhyConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSPhyConfig

This structure is used to configure or query the Layer 2 protocol mode of operation for Dual Media (LAN-332xA) modules. typedef struct tagNSPhyConfig { unsigned long ulMediaMode;/* Currently only support this mode below + MEDIA_USER_EXPLICIT_MODE (default) */ ucActiveMedia;/* To determine which medium (copper or fiber). There are two modes: + FIBER_MODE (default) + COPPER_MODE */ unsigned char ucReserved[59];/* Reserved */ } NSPhyConfig; unsigned char

726 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_PHY_CONFIG_INFO
Retrieve the Layer 2 protocol mode of operation. HTGetStructure(NS_PHY_CONFIG_INFO, 0, 0, 0, (void*) pNSPhyConfig, sizeof(NSPhyConfig), iHub, iSlot, iPort); HTGetStructure $NS_PHY_CONFIG_INFO 0 0 0 \ myNSPhyConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSPhyConfig

This structure is used to configure or query the Layer 2 protocol mode of operation for Dual Media (LAN-332xA) modules. typedef struct tagNSPhyConfig { unsigned long ulMediaMode;/* Currently only support this mode below + MEDIA_USER_EXPLICIT_MODE (default) */ unsigned char ucActiveMedia;/* To determine which medium (copper or fiber). There are two modes: + FIBER_MODE (default) + COPPER_MODE */ unsigned char ucReserved[59];/* Reserved */ } NSPhyConfig;

SmartLibrary Command Reference: Volume 2 | 727

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_PHY_DEFAULT_CONFIG
Set phy default setting on the TM XD LAN port. HTSetStructure(NS_PHY_DEFAULT_CONFIG, 0, 0, 0, (void*) pNSPhyDefaultConfig, sizeof(NSPhyDefaultConfig), iHub, iSlot, iPort); HTSetStructure $NS_PHY_DEFAULT_CONFIG 0 0 0 \ myNSPhyDefaultConfig \0 \ $iHub $iSlot $iPort

Tcl Usage Related Structure

NSPhyDefaultConfig

This structure is used to configure PHY default settings (media mode, auto-negotiation, speed, duplex, etc) for TM XD LAN port at boot time, which includesHTSlotReboot or power cycle the chassis. It is also used to read back the port PHYdefault settings. The following configurations are supported for this release: DualMediaMode = {copper,fiber} AutoNegotiate = {enable.disable} CopperSpeed = {10,100,1000} FiberSpeed = {1000} CopperDuplex = {half,full} Currently uiLinkConfiguration can only be used to control/query the default setting for the duplex mode, uiLinkConfigurationMask should be set 0x0060 to make the change. Set uiLinkConfigurationMask field to 0 if NO change is being made for duplex mode. The value 0xFFFF will always be returned for uiLinkConfigurationMask in the query/readback. For other fields, if no change being made, it is required to use NS_FIELD_UNCHANGED(0xFFFF). And if want to restore the original card default value, use NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE(0xFFFE). Note: This command is only supported by TeraMetrics XD Cards

Continues >

728 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSPhyDefaultConfig{ unsigned short uiActiveMedia; /* possible values are FIBER_MODE COPPER_MODE NS_FIELD_UNCHANGED (used if NO change being made) NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value) /* possible values are 0 disable 1 enable NS_FIELD_UNCHANGED (used if NO change being made) NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value) /* possible values are 0 disable 1 enable NS_FIELD_UNCHANGED (used if NO change being made) NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value)

*/ unsigned short uiAutoNegotiationEnable;

*/ unsigned short uiAutoNegotiationRestart;

*/ unsigned short uiSpeed; /* possible values are NS_PHY_DEFAULT_SPEED_10MHZ NS_PHY_DEFAULT_SPEED_100MHZ NS_PHY_DEFAULT_SPEED_1GHZ NS_PHY_DEFAULT_SPEED_10GHZ NS_FIELD_UNCHANGED (used if NO change being made) NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value) */ unsigned short uiLinkConfigurationMask; /* Use 0x0060 to make change in link configuration (duplex). Use 0 if don't want to change the link configuration (duplex)0xFFFF is always returned in the query/readback. */ unsigned short uiLinkConfiguration; /* possible values are NS_PHY_DEFAULT_FULL_DUPLEX NS_PHY_DEFAULT_HALF_DUPLEX Use the above value foruiLinkConfiguration(duplex), and use 0x0060 for uiLinkConfigurationMask to make changein link configuration (duplex).Set link config mask to 0 if no change being made for the link configuration (duplex). And to restore the original card default uiLinkConfiguration(deplex), use NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value)

Continues >

SmartLibrary Command Reference: Volume 2 | 729

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned char ucReserved[256]; }NSPhyDefaultConfig; /* constants to set for field which is NOT being changed */#define NS_FIELD_UNCHANGED 0xFFFF /* constants to set for field to restore original card default value */ #define NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE 0xFFFE /* uiSpeed */ #define NS_PHY_DEFAULT_SPEED_10MHZ #define NS_PHY_DEFAULT_SPEED_100MHZ #define NS_PHY_DEFAULT_SPEED_1GHZ /* uiLinkConfiguration */ #define NS_PHY_DEFAULT_FULL_DUPLEX #define NS_PHY_DEFAULT_HALF_DUPLEX

10 100 1000

0x0020 0x0040

iType1 Description C Usage

NS_PHY_DEFAULT_CONFIG_INFO
Read back Phy default settings for TM LAN port HTGetStructure(NS_PHY_DEFAULT_CONFIG_INFO, 0, 0, 0, (void*) pNSPhyDefaultConfig, size of(NSPhyDefaultConfig), iHub, iSlot, iPort); HTGetStructure $NS_PHY_DEFAULT_CONFIG_INFO 0 0 0 \ myNSPhyDefaultConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSPhyDefaultConfig

This structure is used to configure PHY default settings (media mode, auto-negotiation, speed, duplex, etc) for TM XD LAN port at boot time, which includesHTSlotReboot or power cycle the chassis. It is also used to read back the port PHYdefault settings. The following configurations are supported for this release: DualMediaMode = {copper,fiber} AutoNegotiate = {enable.disable} CopperSpeed = {10,100,1000} FiberSpeed = {1000} CopperDuplex = {half,full}

Continues >

730 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Currently uiLinkConfiguration can only be used to control/query the default setting for the duplex mode, uiLinkConfigurationMask should be set 0x0060 to make the change. Set uiLinkConfigurationMask field to 0 if NO change is being made for duplex mode. The value 0xFFFF will always be returned for uiLinkConfigurationMask in the query/readback.For other fields, if no change being made, it is required to use NS_FIELD_UNCHANGED(0xFFFF). And if you want to restore the original card default value, use NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE 0xFFFE). Note: This command is only supported by TeraMetrics XD Cards. typedef struct tagNSPhyDefaultConfig{ unsigned short uiActiveMedia; /* possible values are FIBER_MODE COPPER_MODE NS_FIELD_UNCHANGED (used if NO change being made) NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value) /* possible values are 0 disable 1 enable NS_FIELD_UNCHANGED (used if NO change being made) NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value) /* possible values are 0 disable 1 enable NS_FIELD_UNCHANGED (used if NO change being made) NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value)

*/ unsigned short uiAutoNegotiationEnable;

*/ unsigned short uiAutoNegotiationRestart;

*/ unsigned short uiSpeed; /* possible values are NS_PHY_DEFAULT_SPEED_10MHZ NS_PHY_DEFAULT_SPEED_100MHZ NS_PHY_DEFAULT_SPEED_1GHZ NS_PHY_DEFAULT_SPEED_10GHZ NS_FIELD_UNCHANGED (used if NO change being made) NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value) */ unsigned short uiLinkConfigurationMask; /* Use 0x0060 to make change in link configuration (duplex). Use 0 if don't want to change the link configuration (duplex)0xFFFF is always returned in the query/readback. */

Continues >

SmartLibrary Command Reference: Volume 2 | 731

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned short uiLinkConfiguration; /* possible values are NS_PHY_DEFAULT_FULL_DUPLEX NS_PHY_DEFAULT_HALF_DUPLEX Use the above value foruiLinkConfiguration(duplex), and use 0x0060 for uiLinkConfigurationMask to make changein link configuration (duplex).Set link config mask to 0 if no change being made for the link configuration (duplex). And to restore the original card default uiLinkConfiguration(deplex), use NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE (used to restore original card default value) unsigned char ucReserved[256]; }NSPhyDefaultConfig; /* constants to set for field which is NOT being changed */#define NS_FIELD_UNCHANGED 0xFFFF /* constants to set for field to restore original card default value */ #define NS_PHY_DEFAULT_RESTORE_ORIGINAL_VALUE 0xFFFE /* uiSpeed */ #define NS_PHY_DEFAULT_SPEED_10MHZ #define NS_PHY_DEFAULT_SPEED_100MHZ #define NS_PHY_DEFAULT_SPEED_1GHZ /* uiLinkConfiguration */ #define NS_PHY_DEFAULT_FULL_DUPLEX #define NS_PHY_DEFAULT_HALF_DUPLEX

10 100 1000

0x0020 0x0040

732 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage Tcl Usage Related Structure


ucARPUniqueMACPattern:

NS_PORT_CONFIG
Configure port settings. This command is applicable for all TeraMetrics modules (LAN, POS and ATM). HTSetStructure(NS_PORT_CONFIG, 0, 0, 0, (void*) pPortConfig, size of(NSPortConfig), iHub, iSlot, iPort); HTSetStructure $NS_PORT_CONFIG 0 0 0 myPortConfig 0 $iHub $iSlot $iPort

NSPortConfig

To configure Reply to Unique MAC address use L3_CTRL_ARP_RESPONSES_WITH_UNIQUE_MAC in control field of L3_TX_ADDRESS and NS_PORT_ADDRESS, or L3_CTRL_IPV6_ND_RESPONSES_WITH_UNIQUE_MAC in ulControl field of L3_TX_IPV6_ADDRESS command. Supported on LAN-3306A, LAN-3320A/21A, LAN-3324A/25A, LAN-3327A, XLW-3720A/21A and XFP-3730A/31A test modules. typedef struct tagNSPortConfig { unsigned char ucEnableFullCustomStreamID; /* Allow usage of the upper nibble of the stream id by disabling the firmware from automatically overwriting this nibble with protocol values. The stream id can be customized for each stream by using the ucEnableCustomStreamID and ulCustomStreamID fields for the L3_DEFINE_STREAM_EXTENSION and L3_MOD_STREAM_EXTENSION message functions. Note that this field is only applicable for the TeraMetrics family of modules. */ unsigned char ucARPUniqueMACPattern[2]; /* 2 byte Pattern to be used as the MSB in response to ARP request, when Reply to Unique MAC address is enabled. Reply to Unique MAC address is enabled with L3_TX_ADDRESS, NS_PORT_ADDRESS or L3_TX_IPV6_ADDRESS.

*/ unsigned charucReserved[129]; } NSPortConfig;

/* reserved */

SmartLibrary Command Reference: Volume 2 | 733

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage Tcl Usage Related Structure


ucARPUniqueMACPattern:

NS_PORT_CONFIG_INFO
Configure port settings. This command is applicable for all TeraMetrics modules (LAN, POS and ATM). HTSetStructure(NS_PORT_CONFIG, 0, 0, 0, (void*) pPortConfig, size of(NSPortConfig), iHub, iSlot, iPort); HTSetStructure $NS_PORT_CONFIG 0 0 0 myPortConfig 0 $iHub $iSlot $iPort

NSPortConfig

To configure Reply to Unique MAC address use L3_CTRL_ARP_RESPONSES_WITH_UNIQUE_MAC in control field of L3_TX_ADDRESS and NS_PORT_ADDRESS, or L3_CTRL_IPV6_ND_RESPONSES_WITH_UNIQUE_MAC in ulControl field of L3_TX_IPV6_ADDRESS command. Supported on LAN-3306A, LAN-3320A/21A, LAN-3324A/25A, LAN-3327A, XLW-3720A/21A and XFP-3730A/31A test modules. typedef struct tagNSPortConfig { unsigned char ucEnableFullCustomStreamID; /* Allow usage of the upper nibble of the stream id by disabling the firmware from automatically overwriting this nibble with protocol values. The stream id can be customized for each stream by using the ucEnableCustomStreamID and ulCustomStreamID fields for the L3_DEFINE_STREAM_EXTENSION and L3_MOD_STREAM_EXTENSION message functions. Note that this field is only applicable for the TeraMetrics family of modules. */ unsigned char ucARPUniqueMACPattern[2]; /* 2 byte Pattern to be used as the MSB in response to ARP request, when Reply to Unique MAC address is enabled. Reply to Unique MAC address is enabled with L3_TX_ADDRESS, NS_PORT_ADDRESS or L3_TX_IPV6_ADDRESS.

*/ unsigned char ucReserved[129]; } NSPortConfig;

/* reserved */

734 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_PORT_TRANSMIT
Set up transmit parameters. HTSetStructure(NS_PORT_TRANSMIT, 0, 0, 0, (void*) pNSPortTransmit, sizeof(NSPortTransmit), iHub, iSlot, iPort); HTSetStructure $NS_PORT_TRANSMIT 0 0 0 \ myNSPortTransmit \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSPortTransmit

/*NOTE: ucJumboFrameCountEnable field in NS_PORT_TRANSMIT only works for LAN-3710AL/AE/AS cards. uiGapScale: Input for NS_PORT_TRANSMIT. Output for NS_PORT_TRANSMIT_INFO. Notice that besides NS_PORT_TRANSMIT, the gap scale can also be set in HTGapAndScale or HTBurstGapAndScale. Always the last configured gap scale takes the precedence. Using SCHEDULE_MODE_ADVANCED in ucScheduleMode field ensures a smoother transmission of packets between streams. The default mode for ucScheduleMode field is SCHEDULE_MODE_FRAME_RATE. SCHEDULE_MODE_ADVANCED functionality is supported LAN-XD, POS-3504A/05A, POS-3510A/11A, POS-3518A/19A, XLW, and XFP test modules.

Continues >

SmartLibrary Command Reference: Volume 2 | 735

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSPortTransmit { unsigned char ucTransmitMode;/* CONTINUOUS_PACKET_MODE, SINGLE_BURST_MODE, MULTI_BURST_MODE, CONTINUOUS_BURST_MODE, or ECHO_MODE. */ unsigned char ucScheduleMode;/* SCHEDULE_MODE_GAP,SCHEDULE_MODE_FRAME_RATE (default) or SCHEDULE_MODE_ADVANCED. If gap mode, use ulInterFrameGap the gap. If rate mode, use the ulFrameRate field of L3StreamExtension to set the per-stream frame rate. */ unsigned long ulInterFrameGap; /* Gap between each frame in units specified by uiGapScale, by default in units of bits */ unsigned long ulInterBurstGap; /* Gap between each burst of frames, in units specified by uiGapScale, by default units of bits */ unsigned short uiGapScale; /* For ethernet cards, units for gap values ulInterFrameGap, ulInterBurstGap,ulMinRandomGap, and ulMaxRandomGap). Can be 0 for bit times, else PICO_SCALE, NANO_SCALE, MICRO_SCALE, or MILLI_SCALE. Used as input for NS_PORT_TRANSMIT, output for NS_PORT_TRANSMIT_INFO. */ unsigned long ulBurstCount; /* If ucTransmitMode is SINGLE_BURST_MODE or MULTI_BURST_MODE, number of frames per burst. Otherwise, unused. */ unsigned long ulMultiBurstCount; /* If ucTransmitMode is MULTI_BURST_MODE, number of bursts. Otherwise, unused. */ unsigned char ucRandomGapEnable; /* Enable random gap. */ unsigned long ulRandomSeed; /* If random gap or random frame length is enabled, seed for generating random values.*/ unsigned long ulMinRandomGap; /* If random gap is enabled, minimum gap that will be used, in units specified by uiGapScale,by defaultin units of bits */ unsigned long ulMaxRandomGap; /* If random gap is enabled, maximum gap that will be used, in units specified by uiGapScale, by default in units of bits */

Continues >

736 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned long ulMinRandomLength;

unsigned long

unsigned char

unsigned char

unsigned short

unsigned short

unsigned char

unsigned char

/* If random length is enabled in the ucRandomLength field of the stream structure, minimum frame length that will be used. */ ulMaxRandomLength; /* If random length is enabled in the ucRandomLength field of the stream structure, maximum frame length that will be used. */ ucJumboFrameCountEnable; /* Applies only to LAN-3710A. If the jumbo frame count is enabled, then it follows the statements below. For non-vlan frame, if the frame length is from 1518 to 9018, then counter will count jumbo frames. For non-vlan frame, if the frame size is greater than 9018, then the counter will count oversize frame. For vlan frame, if the frame length is from 1522 to 9022, then counter will count jumbo frames. For vlan frame, if the frame length is greater 9022, then counter will count oversize frames. If the jumbo frame is unenabled, the counter will treat any frame as a regular frame regardless the frame size */ ucIncrementEnable; /* Applies only to LAN-3710A. Enable the increment length. If flag is enable, then frame length increases only by 1 */ uiMinIncrementLength;/* Applies only to LAN-3710A. If increment frame length is enable, minimum length will be used. */ uiMaxIncrementLength;/* Applies only to LAN-3710A. If increment frame length is enable, maximun length will be used. */ ucEnableExtendedPayload; /* 1 = Enable 128 byte header for streams. This will clear all previously configured 64-byte header streams. 0 = Disable 128-byte header for streams. */ ucReserved[57]; /* reserved */

} NSPortTransmit;

SmartLibrary Command Reference: Volume 2 | 737

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_PORT_TRANSMIT_INFO
Get transmit parameters. HTGetStructure(NS_PORT_TRANSMIT_INFO, 0, 0, 0, (void*) pNSPortTransmit, sizeof(NSPortTransmit), iHub, iSlot, iPort); HTGetStructure $NS_PORT_TRANSMIT_INFO 0 0 0 \ myNSPortTransmit \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSPortTransmit

uiGapScale: Input for NS_PORT_TRANSMIT. Output for NS_PORT_TRANSMIT_INFO. Notice that besides NS_PORT_TRANSMIT, the gap scale can also be set in HTGapAndScale or HTBurstGapAndScale. Always the last configured gap scale takes the precedence.*/ Using SCHEDULE_MODE_ADVANCED in ucScheduleMode field ensures a smoother transmission of packets between streams. The default mode for ucScheduleMode field is SCHEDULE_MODE_FRAME_RATE. SCHEDULE_MODE_ADVANCED functionality is supported LAN-XD, POS-3504A/05A, POS-3510A/11A, POS-3518A/19A, XLW, and XFP test modules. typedef struct tagNSPortTransmit { unsigned char ucTransmitMode;/* CONTINUOUS_PACKET_MODE, SINGLE_BURST_MODE, MULTI_BURST_MODE, CONTINUOUS_BURST_MODE, or ECHO_MODE. */ unsigned char ucScheduleMode;/* SCHEDULE_MODE_GAP,SCHEDULE_MODE_FRAME_RATE (default) or SCHEDULE_MODE_ADVANCED. If gap mode, use ulInterFrameGap the gap. If rate mode, use the ulFrameRate field of L3StreamExtension to set the per-stream frame rate. */ unsigned long ulInterFrameGap; /* Gap between each frame in units specified by uiGapScale, by default in units of bits */ unsigned long ulInterBurstGap; /* Gap between each burst of frames, in units specified by uiGapScale, by default units of bits */ unsigned short uiGapScale; /* For ethernet cards, units for gap values ulInterFrameGap, ulInterBurstGap,ulMinRandomGap, and ulMaxRandomGap). Can be 0 for bit times, else PICO_SCALE, NANO_SCALE, MICRO_SCALE, or MILLI_SCALE. Used as input for NS_PORT_TRANSMIT, output for NS_PORT_TRANSMIT_INFO. */

Continues >

738 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned long

unsigned long unsigned char unsigned long unsigned long

unsigned long

unsigned long

unsigned long

unsigned char

unsigned char

unsigned short

unsigned short

unsigned char

unsigned char

/* If ucTransmitMode is SINGLE_BURST_MODE or MULTI_BURST_MODE, number of frames per burst. Otherwise, unused. */ ulMultiBurstCount; /* If ucTransmitMode is MULTI_BURST_MODE, number of bursts. Otherwise, unused. */ ucRandomGapEnable; /* Enable random gap. */ ulRandomSeed; /* If random gap or random frame length is enabled, seed for generating random values.*/ ulMinRandomGap; /* If random gap is enabled, minimum gap that will be used, in units specified by uiGapScale,by defaultin units of bits */ ulMaxRandomGap; /* If random gap is enabled, maximum gap that will be used, in units specified by uiGapScale, by default in units of bits */ ulMinRandomLength; /* If random length is enabled in the ucRandomLength field of the stream structure, minimum frame length that will be used. */ ulMaxRandomLength; /* If random length is enabled in the ucRandomLength field of the stream structure, maximum frame length that will be used. */ ucJumboFrameCountEnable; /* Applies only to LAN-3710A. If the jumbo frame count is enabled, then it follows the statements below. For non-vlan frame, if the frame length is from 1518 to 9018, then counter will count jumbo frames. For non-vlan frame, if the frame size is greater than 9018, then the counter will count oversize frame. For vlan frame, if the frame length is from 1522 to 9022, then counter will count jumbo frames. For vlan frame, if the frame length is greater 9022, then counter will count oversize frames. If the jumbo frame is unenabled, the counter will treat any frame as a regular frame regardless the frame size */ ucIncrementEnable; /* Applies only to LAN-3710A. Enable the increment length. If flag is enable, then frame length increases only by 1 */ uiMinIncrementLength;/* Applies only to LAN-3710A. If increment frame length is enable, minimum length will be used. */ uiMaxIncrementLength;/* Applies only to LAN-3710A. If increment frame length is enable, maximun length will be used. */ ucEnableExtendedPayload; /* 1 = Enable 128 byte header for streams. This will clear all previously configured 64-byte header streams. 0 = Disable 128-byte header for streams. */ ucReserved[57]; /* reserved */

ulBurstCount;

SmartLibrary Command Reference: Volume 2 | 739

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_PROTOCOL_COUNTER_INFO
Get counters for a port from the card protocol stack. Note: The recommended command to use instead of this one is NS_MULTI_COUNTER_INFO. HTGetStructure(NS_PROTOCOL_COUNTER_INFO, 0, 0, 0, (void*) pNSProtocolCounterInfo, sizeof(NSProtocolCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_PROTOCOL_COUNTER_INFO 0 0 0 \ myNSProtocolCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSProtocolCounterInfo

This structure reports counters tracked for a port by the card protocol stack. The counters include frames with and without a Signature field. The structure will either report the number of frames of each type when used with NS_PROTOCOL_COUNTER_INFO or the rate per second of frames of each type when used with NS_PROTOCOL_RATE_INFO. To calculate rates at your own sampling frequency, repeatedly call NS_PROTOCOL_COUNTER_INFO. Dividing the difference in a counter value by the difference in the u64Timestamp value will provide a rate for that interval. typedef struct tagNSProtocolCounterInfo { U64 u64Timestamp;/* in 100ns, used to calculate rates at a custom frequency */ U64 u64TxStack;/* frames transmitted from firmware stack */ U64 u64RxStack;/* received frames forwarded to firmware stack */ U64 u64RxDropped;/* frames dropped trying to forward */ U64 u64TxIPv4;/* IPv4 rate/number of frames transmitted */ U64 u64RxIPv4;/* IPv4 rate/number of frames received */ U64 u64TxIPv6;/* IPv6 rate/number of frames transmitted */ U64 u64RxIPv6;/* IPv6 rate/number of frames received */ U64 u64RxDataIntegrityError;/* Spirent data integrity error frames received */ U64 u64RxMPLS; /* MPLS frames received, LAN TM cards */ U64 u64TxMPLS; /* Reserved - MPLS frames transmitted */ U64 u64RxMPLSSignature; /* Rx MPLS frames only with signature, for 3310 and 3311 cards only */ U64 u64TxMPLSSignature; /* Reserved - Tx MPLS frames only with signature */ unsigned char ucReserved[104]; }NSProtocolCounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

740 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description Tcl Usage

NS_PROTOCOL_HEADER_INFO
Note: Retrieve Protocol header information for a stream. HTGetStructure $ NS_PROTOCOL_HEADER_INFO <index> 0 0 \ myNSProtocolHeaderInfo \ 0 \ $iHub $iSlot $iPort

Related Structure

NSProtocolHeaderInfo

/*Retrieve Protocol header information for a stream. Applicable to both old and new stream commands. Stream index for which information is desired, should be passed as iType2. This command is supported on all TeraMetrics LAN and POS test modules. Note: For old stream commands VLAN is part of the Ethernet header. The following header values are used for uiHeader field: NS_ETHERNET_HEADER 1 NS_VLAN_HEADER 2 NS_IPV4_HEADER 3 NS_IPV4_OPTION_HEADER 4 NS_IPV6_HEADER 5 NS_TCP_HEADER 6 NS_UDP_HEADER 7 NS_CUSTOM_HEADER 8 NS_ICMP_HEADER 9 NS_MPLS_HEADE 10 NS_IPV6_EXTENSION_HEADER 11 NS_IPX_HEADER 17 NS_PPP_HEADER 19 NS_GRE_HEADER 20 */ typedef struct tagNSProtocolHeaderInfo { unsigned short uiHeaderCount; /* The number of protocol headers in the stream's protocol stack. */ unsigned short uiHeader[NS_PROTOCOL_HEADER_MAX];/* Contains information about the protocol type for the different headers that make up the stream's protocol stack. "uiHeader[0]" is the protocol type for the first header in the stack. */ unsigned char ucReserved[32]; /* Reserved */ }NSProtocolHeaderInfo;.

SmartLibrary Command Reference: Volume 2 | 741

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_PROTOCOL_RATE_INFO
Get rates for a port from the card protocol stack, in frames per second. HTGetStructure(NS_PROTOCOL_RATE_INFO, 0, 0, 0, (void*) pNSProtocolCounterInfo, sizeof(NSProtocolCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_PROTOCOL_RATE_INFO 0 0 0 \ myNSProtocolCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSProtocolCounterInfo

This structure reports counters tracked for a port by the card protocol stack. The counters include frames with and without a signature field. The structure will either report the number of frames of each type when used with NS_PROTOCOL_COUNTER_INFO or the rate per second of frames of each type when used with NS_PROTOCOL_RATE_INFO. To calculate rates at your own sampling frequency, repeatedly call NS_PROTOCOL_COUNTER_INFO. Dividing the difference in a counter value by the difference in the u64Timestamp value will provide a rate for that interval. typedef struct tagNSProtocolCounterInfo { U64 u64Timestamp;/* in 100ns, used to calculate rates at a custom frequency */ U64 u64TxStack;/* frames transmitted from protocol stack */ U64 u64RxStack;/* received frames forwarded to protocol stack */ U64 u64RxDropped;/* frames dropped trying to forward */ U64 u64TxIPv4;/* IPv4 rate/number of frames transmitted */ U64 u64RxIPv4;/* IPv4 rate/number of frames received */ U64 u64TxIPv6;/* IPv6 rate/number of frames transmitted */ U64 u64RxIPv6;/* IPv6 rate/number of frames received */ U64 u64RxDataIntegrityError;/* Spirent data integrity error frames received */ U64 u64RxMPLS; /* MPLS frames received, LAN TM cards */ U64 u64TxMPLS; /* Reserved - MPLS frames transmitted */ U64 u64RxMPLSSignature; /* Rx MPLS frames only with signature, for 3310 and 3311 cards only */ U64 u64TxMPLSSignature; /* Reserved - Tx MPLS frames only with signature */ unsigned char ucReserved[104]; }NSProtocolCounterInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

742 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_RATE_INFO
Get rates for a port from the modules protocol stack, in frames per second. HTGetStructure(NS_RATE_INFO, 0, 0, 0, (void*) pNSRateInfo, sizeof(NSRateInfo), iHub, iSlot, iPort); HTGetStructure $NS_RATE_INFO 0 0 0 \ myNSRateInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSRateInfo

Retrieve rates for Terametric cards. typedef struct tagNSRateInfo { unsigned long ulTxFrames;/* rate of frames transmitted */ unsigned long ulRxFrames;/* rate of frames received */ unsigned long ulTxBytes;/* rate of bytes transmitted */ unsigned long ulRxBytes;/* rate of bytes received */ unsigned long ulUndersize;/* rate of undersize error frames detected (received) */ unsigned long ulOversize;/* rate of oversize error frames detected (received) */ unsigned long ulAlignError;/* rate of alignment error frames detected (received) */ unsigned long ulCRCError;/* rate of CRC error frames received */ unsigned long ulTxTriggers;/* rate of trigger frames received */ unsigned long ulRxTriggers;/* rate of trigger frames received */ unsigned long ulCollisions;/* rate of collisions */ unsigned long ulRxJumboFrames;/* rate of jumbo frames received */ unsigned long ulTxSignature;/* Tx Signature frames */ unsigned long ulRxSignature;/* Rx Signature frames */ unsigned long ulRxIPChecksumErrors;/* Rx IP Checksum errors */ unsigned char ucReserved[300]; }NSRateInfo;

SmartLibrary Command Reference: Volume 2 | 743

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_READ_MDIO_INFO
Read an MDIO Register. HTGetStructure(NS_READ_MDIO_INFO, 0, 0, 0, (void*) pNSMDIORegister, sizeof(NSMDIORegister), iHub, iSlot, iPort); HTGetStructure $NS_READ_MDIO_INFO 0 0 0 \ myNSMDIORegister \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSMDIORegister

This structure reads the register address and number and values. typedef struct tagNSMDIORegister { unsigned short uiAddress; /* specific address */ unsigned short uiRegister; /* specific register */ unsigned short uiValue; /* bit values to write to address/register */ }NSMDIORegister;

iType1 Description C Usage

NS_REAL_TIME_TRACKING_RX_CONFIG
Configure Real Time Tracking on receive side to track and start real-time tracking. HTSetStructure(NS_REAL_TIME_TRACKING_RX_CONFIG, 0, 0, 0, (void*) pNSRealTimeTrackingConfig, sizeof(NSRealTimeTrackingConfig), iHub, iSlot, iPort); HTSetStructure $NS_REAL_TIME_TRACKING_RX_CONFIG 0 0 0 \ myNSRealTimeTrackingConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSRealTimeTrackingConfig

typedef struct tagNSRealTimeTrackingConfig { unsigned long ulNumStreams;/* number of streams to configure */ unsigned long ulStreamIndex[64];/* stream IDs to track*/ unsigned char ucReserved[20]; }NSRealTimeTrackingConfig;

744 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_REAL_TIME_TRACKING_RX_COUNTERS
Get real-time tracking data on receive side. HTGetStructure(NS_REAL_TIME_TRACKING_RX_COUNTERS, 0, 0, 0, (void*) pNSRealTimeTrackingCounters, sizeof(NSRealTimeTrackingCounters), iHub, iSlot, iPort); HTGetStructure $NS_REAL_TIME_TRACKING_RX_COUNTERS 0 0 0 \ myNSRealTimeTrackingCounters \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSRealTimeTrackingCounters

typedef struct tagNSRealTimeTrackingCounters { unsigned long ulNumStreams; U64 u64CurrentTickCount; /* Current Time in seconds */ U64 u64ElapsedTickCount; /* Elapsed Time in seconds, from when real time tracking was started or when the last counters was received */ RealTimeCounters Counters[64]; unsigned char ucReserved[50]; }NSRealTimeTrackingCounters;

Embedded Structure

RealTimeCounters
/* stream Index */ /* number of Frames received */ /* number of Bytes received */ /* latency per stream, for transmit side its always 0, use for only receive side */ /* the number frames per stream since NS_REAL_TIME_TRACKING_TX_CONFIG was called */

typedef struct tagRealTimeCounters { unsigned long ulStreamIndex; U64 u64NumFrames; U64 u64NumBytes; U64 u64LatencyPerStream; unsigned long ulFramesPerStream; unsigned char ucReserved[50]; }RealTimeCounters;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

SmartLibrary Command Reference: Volume 2 | 745

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage Tcl Usage

NS_REAL_TIME_TRACKING_RX_STOP
Stop real-time tracking on receive side. HTSetCommand(NS_REAL_TIME_TRACKING_RX_STOP, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_REAL_TIME_TRACKING_RX_STOP 0 0 0 \ "" \ $iHub $iSlot $iPort

iType1 Description C Usage

NS_REAL_TIME_TRACKING_TX_CONFIG
Configure Real Time Tracking on transmit side to track and start real-time tracking. HTSetStructure(NS_REAL_TIME_TRACKING_TX_CONFIG, 0, 0, 0, (void*) pNSRealTimeTrackingConfig, sizeof(NSRealTimeTrackingConfig), iHub, iSlot, iPort); HTSetStructure $NS_REAL_TIME_TRACKING_TX_CONFIG 0 0 0 \ myNSRealTimeTrackingConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSRealTimeTrackingConfig

typedef struct tagNSRealTimeTrackingConfig { unsigned long ulNumStreams;/* number of streams to configure */ unsigned long ulStreamIndex[64];/* stream IDs to track*/ unsigned char ucReserved[20]; }NSRealTimeTrackingConfig;

iType1 Description C Usage

NS_REAL_TIME_TRACKING_TX_COUNTERS
Get real-time tracking data on transmit side. HTGetStructure(NS_REAL_TIME_TRACKING_TX_COUNTERS, 0, 0, 0, (void*) pNSRealTimeTrackingCounters, sizeof(NSRealTimeTrackingCounters), iHub, iSlot, iPort); HTGetStructure $NS_REAL_TIME_TRACKING_TX_COUNTERS 0 0 0 \ myNSRealTimeTrackingCounters \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Continues >

Related Structure

NSRealTimeTrackingCounters

746 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSRealTimeTrackingCounters { unsigned long ulNumStreams; U64 u64CurrentTickCount; /* Current Time in seconds */ U64 u64ElapsedTickCount; /* Elapsed Time in seconds, from when real time tracking was started or when the last counters was received */ RealTimeCounters Counters[64]; unsigned char ucReserved[50]; }NSRealTimeTrackingCounters;

Embedded Structure

RealTimeCounters
/* stream Index */ /* number of Frames received */ /* number of Bytes received */ /* latency per stream, for transmit side its always 0, use for only receive side */ /* the number frames per stream since NS_REAL_TIME_TRACKING_TX_CONFIG was called */

typedef struct tagRealTimeCounters { unsigned long ulStreamIndex; U64 u64NumFrames; U64 u64NumBytes; U64 u64LatencyPerStream; unsigned long ulFramesPerStream; unsigned char ucReserved[50]; }RealTimeCounters;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

iType1 Description C Usage Tcl Usage

NS_REAL_TIME_TRACKING_TX_STOP
Stop real-time tracking on transmit side. HTSetCommand(NS_REAL_TIME_TRACKING_TX_STOP, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_REAL_TIME_TRACKING_TX_STOP 0 0 0 \ "" \ $iHub $iSlot $iPort

SmartLibrary Command Reference: Volume 2 | 747

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_RESOLVE_ARPS
Resolve ARPs for streams on one port. This command applies to all Layer 3 Ethernet cards. HTSetStructure(NS_RESOLVE_ARPS, 0, 0, 0, (void*) pNSResolveArps, sizeof(NSResolveArps), iHub, iSlot, iPort); HTSetStructure $NS_RESOLVE_ARPS 0 0 0 \ myNSResolveArps \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSResolveArps

typedef struct tagNSResolveArps { unsigned long ulTimeout;/* number of seconds to wait before giving up */ /* set to 0 to use the default timeout value */ unsigned long ulStatus;/* output */ /* NS_ARP_TIMEOUT - ARP was not resolved before timeout */ /* NS_ARP_COMPLETE - ARP is resolved */ } NSResolveArps;

iType1 Description C Usage

NS_RUNTIME_HIST_STATS_CONFIG
This command is used to specify the stream ID's to be tracked for Run-Time stats HTSetStructure(NS_RUNTIME_HIST_STATS_CONFIG, 0, 0, 0, (void*) pNSRunTimeHistStatsConfig, sizeof(NSRunTimeHistStatsConfig), iHub, iSlot, iPort); HTSetStructure $NS_RUNTIME_HIST_STATS_CONFIG 0 0 0 \ myNSRunTimeHistStatsConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Continues >

748 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

Related Structure

NSRunTimeHistStatsConfig

Run-Time stats feature provides a mechanism whereby users can request fresh statistics on a subset of received streams (for now 64 streams are supported). Histogram updates takes place in cycles at a fixed refresh rate. This feature gives users a way to see very fresh statistics on a limited number of streams. Set the latency option to NS_TRACK_STREAM_ID in NS_HIST_LATENCY_OPTION. If NS_ALTERNATE_KEY_HASH_CONFIG is used to set hashing mode to contiguous, it should be done as a first step and can't be changed when the test is started. A stream is identified and distinguished by a unique 32-bit StreamID. A stream is said to be "learned" by a port if at least one frame from that stream has arrived on the port. Each histogram on a receive port corresponds to one unique "learned" StreamID. uiMode possible values: RUNTIME_MODE_NORMAL RUNTIME_MODE_DETAIL RUNTIME_MODE_OFF typedef struct tagNSRunTimeHistStatsConfig { unsigned short uiMode; /* Input - possible values are: RUNTIME_MODE_NORMAL- In this mode only the number of user specifiedStreamID's learned will be returned in ulLearnedCount. RUNTIME_MODE_DETAIL - In this mode, the number of learned streams will be returned in the ulLearnedCount field. This number will always be less than or equal to ulStreamCount. If ulLearnedCount is less than ulStreamCount, then all of the learned StreamID's themselves will be returned in the ulLearnedStreamIDs array. RUNTIME_MODE_OFF - In this mode run time stats is disabled and all other fields are ignored.*/ unsigned long ulStreamCount /* Input - number of streams ID's being specified */ unsigned long ulStreamsIDs[512] /* Input - stream ID's to be tracked, maximum is 64. Valid only when uiMode is RUNTIME_MODE_DETAIL and the resulted ulLearnedCount is less than ulStreamCount*/ unsigned long ulLearnedStreamCount; /* Output, number of learned streams*/ unsigned long ulLearnedStreamIDs[512]; /* Output - learned stream IDs, max is 64. Valid only when uiMode is RUNTIME_MODE_DETAIL and the resulted ulLearnedCount is less than ulStreamCount */ unsigned char ucReserved[512];/* Reserved */ }NSRunTimeHistStatsConfig; #define RUNTIME_MODE_NORMAL #define RUNTIME_MODE_DETAIL #define RUNTIME_MODE_OFF 0 1 3

SmartLibrary Command Reference: Volume 2 | 749

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_SIGNATURE_DETECT_MODE
Set the mode for detection of signature fields which are not right-aligned in incoming IP frames. This command allows detection of the signature field on IP frames of 40 bytes. HTSetStructure(NS_SIGNATURE_DETECT_MODE, 0, 0, 0, (void*) pNSSignatureDetectMode, sizeof(NSSignatureDetectMode), iHub, iSlot, iPort); HTSetStructure $NS_SIGNATURE_DETECT_MODE 0 0 0 \ myNSSignatureDetectMode \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSSignatureDetectMode

This message provides support for signature detection when the Signature field is not right-aligned in incoming IP frames. This is necessary when a POS card generates a minimum sized frame with Signature field and the frame is received by an Ethernet port. In this case, the frame size has been padded to 60 bytes, and the Signature field is no longer right-aligned. This feature provides for the following

Proper detection of signature field when one or more additional protocol header and/or tags precede IP header (for example, VLAN, MPLS tags, PPP/PPPoE header). This excludes tunneling of IPV4 over IPV6. Proper detection of signature field implies correct IP length field, which than sets a requirement that IP header checksum be verified on all received frames. If the verification fails, the frame is dropped without any SmartMetrics processing.

As currently implemented, this message does not support IPV6 and IPv4 fragmentation and or tunneling of IPv6 over IPv4 (or vice-versa). Values for ucSignatureMode: SIGNATURE_NORMAL_MODE SIGNATURE_IP_LENGTH_MODE This traditional mode assumes a right-aligned signature field. This mode will locate the signature field based on IP length (not overall frame size).

typedef struct tagNSSignatureDetectMode { unsigned char ucMode; /* Enable or disable the signature field detection mode. Values: SIGNATURE_NORMAL_MODE SIGNATURE_IP_LENGTH_MODE */ unsigned char ucReserved[15]; /* Reserved for future use */ } NSSignatureDetectMode;

750 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_SIGNATURE_DETECT_MODE_INFO
Query the mode for detection of signature fields which are not right-aligned in incoming IP frames. HTSetStructure(NS_SIGNATURE_DETECT_MODE_INFO, 0, 0, 0, (void*) pNSSignatureDetectMode, sizeof(NSSignatureDetectMode), iHub, iSlot, iPort); HTSetStructure $NS_SIGNATURE_DETECT_MODE_INFO 0 0 0 \ myNSSignatureDetectMode \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSSignatureDetectMode

This message provides support for signature detection when the Signature field is not right-aligned in incoming IP frames. This is necessary when a POS card generates a minimum sized frame with Signature field and the frame is received by an Ethernet port. In this case, the frame size has been padded to 60 bytes, and the Signature field is no longer right-aligned. This feature provides for the following

Proper detection of signature field when one or more additional protocol header and/or tags precede IP header (for example, VLAN, MPLS tags, PPP/PPPoE header). This excludes tunneling of IPV4 over IPV6. Proper detection of signature field implies correct IP length field, which than sets a requirement that IP header checksum be verified on all received frames. If the verification fails, the frame is dropped without any SmartMetrics processing.

As currently implemented, this message does not support IPV6 and IPv4 fragmentation and or tunneling of IPv6 over IPv4 (or vice-versa). Values for ucSignatureMode: SIGNATURE_NORMAL_MODE SIGNATURE_IP_LENGTH_MODE This traditional mode assumes a right-aligned signature field. This mode will locate the signature field based on IP length (not overall frame size).

typedef struct tagNSSignatureDetectMode { unsigned char ucMode; /* Enable or disable the signature field detection mode. Values: SIGNATURE_NORMAL_MODE SIGNATURE_IP_LENGTH_MODE */ unsigned char ucReserved[15]; /* Reserved for future use */ } NSSignatureDetectMode;

SmartLibrary Command Reference: Volume 2 | 751

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_SONET_COUNTER_INFO
Retrieve the SONET alarms and counters. HTGetStructure(NS_SONET_COUNTER_INFO, 0, 0, 0, (void*) pNSSonetCounterInfo, sizeof(NSSonetCounterInfo), iHub, iSlot, iPort); HTGetStructure $NS_SONET_COUNTER_INFO 0 0 0 \ myNSSonetCounterInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSSonetCounterInfo
/* Bitmap - All alarms currently active. The defined alarm constants are: SONET_SECTION_LOS_ALARM SONET_SECTION_OOF_ALARM SONET_SECTION_LOF_ALARM SONET_LINE_AIS_ALARM SONET_LINE_FERF_ALARM SONET_LINE_LOP_ALARM SONET_PATH_AIS_ALARM SONET_PATH_FERF_ALARM SONET_PATH_YELLOW_ALARM SONET_LOCD_ALARM

typedef struct tagNSSonetCounterInfo { unsigned short uiAlarmCurrent;

*/ unsigned short uiAlarmHistory;

/* Bitmap - All alarms since last counter clear. The defined alarm constants are: SONET_SECTION_LOS_ALARM SONET_SECTION_OOF_ALARM SONET_SECTION_LOF_ALARM SONET_LINE_AIS_ALARM SONET_LINE_FERF_ALARM SONET_LINE_LOP_ALARM SONET_PATH_AIS_ALARM SONET_PATH_FERF_ALARM SONET_PATH_YELLOW_ALARM SONET_LOCD_ALARM */

Continues >

752 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* Error counts since last counter clear */ unsigned long ulSectionBip8;/* Number of Section Bit Interleaved Parity errors */ unsigned long ulLineBip24;/* Number of Line Bit Interleaved Parity errors */ unsigned long ulLineFebe;/* Number of Line Far End Block errors */ unsigned long ulPathBip8;/* Number of Path Bit Interleaved Parity errors */ unsigned long ulPathFebe;/* Number of Path Far End Block errors */ /* Current error rates in events per second */ unsigned short uiSectionBip8Rate;/* Section Bit Interleaved Parity error rate */ unsigned short uiLineBip24Rate;/* Line Bit Interleaved Parity error rate */ unsigned short uiLineFebeRate;/* Line Far End Block error rate */ unsigned short uiPathBip8Rate;/* Path Bit Interleaved Parity error rate */ unsigned short uiPathFebeRate; /* Path Far End Block error rate */ unsigned char ucCurrentPathSignalLabel; /* Currently applies to ATM TeraMetrics modules only. Defined constants: ATM - NS_PATH_SIGNAL_LABEL_ATM */ unsigned char ucReserved[64];/* Reserved */ } NSSonetCounterInfo;

iType1 Description C Usage

NS_STREAM_ID_TABLE_INFO
Retrieve the stream IDs currently being tracked on a port. HTGetStructure(NS_STREAM_ID_TABLE_INFO, 0, 0, 0, (void*) pNSStreamIDTableInfo, sizeof(NSStreamIDTableInfo), iHub, iSlot, iPort); HTGetStructure $NS_STREAM_ID_TABLE_INFO 0 0 0 \ myNSStreamIDTableInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSStreamIDTableInfo

typedef struct tagNSStreamIDTableInfo{ /* input */ unsigned long ulRequestIndex; /* Starting index of the first stream ID being requested */ unsigned long ulRequestCount; /* Number of stream IDs being requested */ /* output */ unsigned long ulRetrievedIndex; /* Index value for the first stream ID retrieved. If the value of ulRetrievedCount is 0, then this field returns the total number of stream IDs currently being tracked on the port. */ unsigned long ulRetrievedCount; /* Number of stream IDs retrieved */ unsigned long ulStreamID[NS_MAX_STREAM_ID_ARRAY]; /* Retrieved stream IDs */ unsigned char ucReserved[32]; } NSStreamIDTableInfo;

Continues >

SmartLibrary Command Reference: Volume 2 | 753

Chapter 10: Universal (NS) NS iType1 Commands and Structures

This command returns the stream IDs currently being tracked by a receiving port. This information will be useful when retrieving histogram test results associated with the stream IDs. The total number of stream IDs currently being tracked can be retrieved using the NS_HIST_ACTIVE_TEST_INFO message function. The maximum number of stream IDs you can return at once is 486. Note: The command is only applicable for the LAN TeraMetrics family of modules. Additionally, this command is only applicable when the jumbo histogram test is enabled and the port is configured to track stream ID related results. The jumbo histogram test is enabled using the NS_HIST_COMBO_PER_STREAM message function. To configure the port to track stream ID related results, use the NS_HIST_LATENCY_OPTION message function with the uiOption field set to NS_TRACK_STREAM_ID. The following are some examples demonstrating command behavior: Example 1 ulRequestIndex ulRequestCount # of Streams Learned ulRetrievedIndex ulRetrievedCount 0 10 500 0 10 Example 2 25 10 33 25 8 Example 3 12 10 33 12 10 Example 4 99 400 500 99 400 Example 5 33 2 33 33* 0

* If ulRequestIndex refers to an invalid entry, then ulRetrievedIndex will return the total number of stream IDs being tracked on the port. Explanation of the examples: Example 1: A total of 500 streams were learned. The user requested 10 starting at the first. They were all returned. Example 2: Only 33 streams were learned. The user requested 10 starting at index 25 (zero-based). Only 8 stream IDs were returned, corresponding to the following indexes: 25, 26, 27, 28, 29, 30, 31, 32. Example 3: Only 33 streams were learned. The user requested 10 starting at index 12. All 10 were available so they were all returned. Example 4: A total of 500 streams were learned. The user requested 400 starting at index 99. All 400 were returned. Example 5: A total of 33 streams were learned. The user requested only 2 of them starting at index 33. Since the last stream was at index 32, no streams were available starting at index 33, so no streams were returned.

754 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_STREAM_SCHEDULE
Set up the stream schedule table. HTSetStructure(NS_STREAM_SCHEDULE, 0, 0, 0, (void*) pNSStreamScheduleEntry, sizeof(NSStreamScheduleEntry), iHub, iSlot, iPort); HTSetStructure $NS_STREAM_SCHEDULE 0 0 0 \ myNSStreamScheduleEntry \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSStreamScheduleEntry

This structure sets the stream schedule table to the card. typedef struct tagNSStreamScheduleEntry { unsigned short uiStreamIndex; /*Index of the stream For 10 Gig card: from 0 to 7 inclusive */ unsigned short uiRepeatCount; /*How many times to repeat that stream For 10 Gig card: from 1 to 255 inclusive */ } NSStreamScheduleEntry;

iType1 Description C Usage

NS_STREAM_SCHEDULE_COUNT_INFO
Get the total entry of the stream schedule table. HTGetStructure(NS_STREAM_SCHEDULE_COUNT_INFO, 0, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTGetStructure $NS_STREAM_SCHEDULE_COUNT_INFO 0 0 0 \ myULong \ 0 \ $iHub $iSlot $iPor

Tcl Usage

Related Structure

ULong

SmartLibrary Command Reference: Volume 2 | 755

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_STREAM_SCHEDULE_INFO
Get the stream schedule table. HTGetStructure(NS_STREAM_SCHEDULE_INFO, 0, 0, 0, (void*) pNSStreamScheduleEntry, sizeof(NSStreamScheduleEntry), iHub, iSlot, iPort); HTGetStructure $NS_STREAM_SCHEDULE_INFO 0 0 0 \ myNSStreamScheduleEntry \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSStreamScheduleEntry

This structure gets the stream schedule table from the card. typedef struct tagNSStreamScheduleEntry { unsigned short uiStreamIndex; /*Index of the stream For 10 Gig card: from 0 to 7 inclusive */ unsigned short uiRepeatCount; /*How many times to repeat that stream For 10 Gig card: from 1 to 255 inclusive */ } NSStreamScheduleEntry;

756 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_STREAM_TYPE_INFO
Determine type of stream. HTGetStructure(NS_STREAM_TYPE_INFO, <index>, 0, 0, (void*) pULong, sizeof(ULong), iHub, iSlot, iPort); HTGetStructure $NS_STREAM_TYPE_INFO <index> 0 0 \ myULong \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

ULong

/* Possible values returned in the unsigned long: */ STREAM_PROTOCOL_SMARTBITS0/* a user defined Stream type */ STREAM_PROTOCOL_IP2/* an IP Stream type */ STREAM_PROTOCOL_IPX3/* an IPX Stream type */ STREAM_PROTOCOL_UDP4/* a UDP Stream type */ STREAM_PROTOCOL_IP_VLAN6/* an IP Stream with VLAN type */ STREAM_PROTOCOL_UDP_VLAN7/* a UDP Stream with VLAN type */ STREAM_PROTOCOL_SMART_TCP8/* a TCP Stream unique to running the SmartTCP tests */ STREAM_PROTOCOL_TCP_VLAN10/* a TCP Stream type with VLAN */ STREAM_PROTOCOL_TCP11/* a TCP Stream type */ STREAM_PROTOCOL_RTP13/* a RTP Stream type */ STREAM_PROTOCOL_RTP_VLAN14/* a RTP Stream with VLAN type */ STREAM_PROTOCOL_FC15/* a Fibre Channel stream works with FC cards only */ STREAM_PROTOCOL_IPV616/* an IPV6 Stream type */ STREAM_PROTOCOL_UDP_IPV617/* a UDP/IPV6 Stream type */ STREAM_PROTOCOL_TCP_IPV618/* a TCP/IPV6 Stream type */ STREAM_PROTOCOL_IPV6_VLAN19/* an IPV6 Stream with VLAN type */ STREAM_PROTOCOL_UDP_IPV6_VLAN20/* a UDP/IPV6 Stream with VLAN type */ STREAM_PROTOCOL_TCP_IPV6_VLAN21/* a TCP/IPV6 Stream type with VLAN */

SmartLibrary Command Reference: Volume 2 | 757

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_TCP_IPV6_STREAM_INFO
Read back TCP IPv6 stream data. HTGetStructure(NS_TCP_IPV6_STREAM_INFO, <index>, 0, 0, (void*) pStreamTCPIPv6, sizeof(StreamTCPIPv6), iHub, iSlot, iPort); HTGetStructure $NS_TCP_IPV6_STREAM_INFO <index> 0 0 \ myStreamTCPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPIPv6

This structure contains values for TCP IPv6 compliant Streams. A Netcom Systems Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). IMPORTANT: Before defining streams with this command, you must use NS_PORT_TRANSMIT(NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer stream header. When you do this, the maximum number of streams that can be defined is reduced by half: from 512 to 256. This applies to all TeraMetrics modules except the POS-3518As/AR and POS-3519As/AR. In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams will be deleted. Note: The Signature field is 18 bytes long and is laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN TeraMetrics-based cards currently have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use LLC_BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_TCP_IPV6. If the bound VC does use LLC_BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_LLC_BRIDGED.

Continues >

758 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagStreamTCPIPv6 { unsigned char ucActive; unsigned char ucProtocolType;

/* 1=Enable Stream, 0=Disable Stream */ /* use STREAM_PROTOCOL_TCP_IPV6 or STREAM_PROTOCOL_LLC_BRIDGED (ATM only) */ unsigned char ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength; /* frame length not counting CRC */ /***************************************************************** * * * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short unsigned char unsigned char uiVFD1Offset; ucVFD1Range; ucVFD1Pattern; /* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6]; /*the initial VFD byte pattern*/

unsigned long

unsigned char

unsigned short unsigned char unsigned char

uiVFD2Offset; ucVFD2Range; ucVFD2Pattern;

unsigned long

unsigned char

/* in bits */ /* in bits */ /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned short unsigned short unsigned char

uiVFD3Offset; uiVFD3Range; ucVFD3Enable;

/* in bytes /* in bytes /* HVFD_ENABLED, HVFD_NONE

*/ */ */

Continues >

SmartLibrary Command Reference: Volume 2 | 759

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/****************************************************************************/ /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6];/* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16];/* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned short SourcePort; /* Source port */ unsigned short DestPort; /* Destination port */ unsigned short Window; /* Protocol window size, in bytes */ unsigned long TCPAck; /* Acknowledgment number */ unsigned long TCPSequence; /* TCP Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; /* Reserved */ } StreamTCPIPv6; unsigned char ucTagField;

760 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_TCP_IPV6_STREAM_VLAN_INFO
Read back TCP IPv6 VLAN stream data. Use iType2 as the index to the stream to retrieve information for. HTGetStructure(NS_TCP_IPV6_STREAM_VLAN_INFO, <index>, 0, 0, (void*) pStreamTCPIPv6VLAN, sizeof(StreamTCPIPv6VLAN), iHub, iSlot, iPort); HTGetStructure $NS_TCP_IPV6_STREAM_VLAN_INFO <index> 0 0 \ myStreamTCPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamTCPIPv6VLAN

This structure contains values for TCP IPv6 compliant Streams with VLAN tagging. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT(NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256 (this applies to all TeraMetrics modules except the POS-3518A/3519A). In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. typedef struct tagStreamTCPIPv6VLAN { unsigned char ucActive;/* 1=Enable Stream, 0=Disable Stream */ unsigned char ucProtocolType;/* use STREAM_PROTOCOL_TCP_IPV6_VLAN */ unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength;/* frame length not counting CRC */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 761

Chapter 10: Universal (NS) NS iType1 Commands and Structures

ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ unsigned char ucTagField; /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short SourcePort; /* Source Port */ unsigned short DestPort; /* Destination Port */ unsigned short Window; /* Window size, in bytes*/ unsigned long TCPAck; /* Acknowledgment number */ unsigned long TCPSequence; /* Sequence number */ unsigned char Flags; /* use TCP_FLAG_XXX defines */ unsigned char extra[3]; /* Reserved */ unsigned short VLAN_Pri; /*VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /*VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /*VLAN identifier */ } StreamTCPIPv6VLAN;

unsigned long

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

762 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_TRANSMIT_PADDING_MODE
Set the mode for padding on the transmit frame. HTSetStructure(NS_TRANSMIT_PADDING_MODE, 0, 0, 0, (void*) pNSTransmitPaddingMode, sizeof(NSTransmitPaddingMode), iHub, iSlot, iPort); HTSetStructure $NS_TRANSMIT_PADDING_MODE 0 0 0 \ myNSTransmitPaddingMode \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSTransmitPaddingMode

This command provides the ability to place the signature field at the end of the IP payload and pad the rest of the frame with zeros up to the minimum legal frame length(60 bytes not including CRC). The receiving module will need to be set to IP length signature detection mode using the NS_SIGNATURE_DETECT_MODE command. This mode is required for correct detection of the signature field when transmitting from Ethernet to POS. The frame generated by an Ethernet interface has IP total length set to value that does not include the signature field, and when such frame passes through a router that converts it to POS, the router honors only the IP specified length, resulting in a truncated signature field. Using this mode will fix this issue. This command applies for the Ethernet TeraMetrics modules only. typedef struct tagNSTransmitPaddingMode { unsigned char ucEnable; /* Enable or disable the padding option on transmit frames that will satisfy the legal transmit frame. Values: TRUE = 1 FALSE = 0 (default) */ unsigned char ucReserved[15]; /* Reserved for future use */ } NSTransmitPaddingMode;

SmartLibrary Command Reference: Volume 2 | 763

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_TRANSMIT_PADDING_MODE_INFO
Query the mode for padding on the transmit frame. HTGetStructure(NS_TRANSMIT_PADDING_MODE_INFO, 0, 0, 0, (void*) pNSTransmitPaddingMode, sizeof(NSTransmitPaddingMode), iHub, iSlot, iPort); HTGetStructure $NS_TRANSMIT_PADDING_MODE_INFO 0 0 0 \ myNSTransmitPaddingMode \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSTransmitPaddingMode

This command provides the ability to place the signature field at the end of the IP payload and pad the rest of the frame with zeros up to the minimum legal frame length(60 bytes not including CRC). The receiving module will need to be set to IP length signature detection mode using the NS_SIGNATURE_DETECT_MODE command. This mode is required for correct detection of the signature field when transmitting from Ethernet to POS. The frame generated by an Ethernet interface has IP total length set to value that does not include the signature field, and when such frame passes through a router that converts it to POS, the router honors only the IP specified length, resulting in a truncated signature field. Using this mode will fix this issue. This command applies for the Ethernet TeraMetrics modules only. typedef struct tagNSTransmitPaddingMode { unsigned char ucEnable; /* Enable or disable the padding option on transmit frames that will satisfy the legal transmit frame. Values: TRUE = 1 FALSE = 0 (default) */ unsigned char ucReserved[15]; /* Reserved for future use */ } NSTransmitPaddingMode;

764 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description

NS_TRIGGER_CONFIG
Configure triggers. LAN-3201B/C modules do not support triggers in Layer 3 mode (that is, when streams are defined for a port). For AT-345x modules, the trigger pattern must be set up in the first 96 bytes (2 cells) of the frame. The ucTriggerOutMode member in the NSTrigger structure applies only to TeraMetrics LAN, TeraMetrics POS, XENPAK, and Fibre Channel modules. It is used with the external hardware trigger on these modules, which can be used to trigger oscilloscopes and logic analyzers. The ucTriggerOutMode member provides a means of linking an outgoing hardware trigger pulse to your configured bit pattern trigger logic, or to an error condition detected in a received frame. Only trigger-out capability is supported, trigger-in is not supported. The external hardware trigger is always enabled. The options for ucTriggerOutMode are:

NS_TRIGGER_OUT_TX The default. The external hardware trigger is pulsed when a transmitted frame matches the bit pattern trigger. NS_TRIGGER_OUT_RX The external hardware trigger is pulsed when a received frame matches the bit pattern trigger. NS_TRIGGER_OUT_L2_ERROR The external hardware trigger is pulsed when a frame arrives that has a layer 2 error (oversize, undersize, CRC). NS_TRIGGER_OUT_L3_ERROR The external hardware trigger is pulsed when a frame arrives that has a layer 3 error (IP header checksum, data integrity error, out-of-sequence frame).

C Usage

HTSetStructure(NS_TRIGGER_CONFIG, 0, 0, 0, (void*) pNSTrigger, sizeof(NSTrigger), iHub, iSlot, iPort); HTSetStructure $NS_TRIGGER_CONFIG 0 0 0 \ myNSTrigger \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSTrigger
Continues >

SmartLibrary Command Reference: Volume 2 | 765

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSTrigger { unsigned char ucTriggerCombo;

unsigned long ulTrigger1Offset; unsigned short uiTrigger1Range; unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned char ucTrigger1Data[6]; char ucReserved1[26]; char ucTrigger1Mask[6]; char ucReserved2[26]; long ulTrigger2Offset; short uiTrigger2Range; char char char char ucTrigger2Data[6]; ucReserved3[26]; ucTrigger2Mask[6]; ucReserved4[26];

/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /*

trigger combination use the following constants to specify combination: NS_TRIGGER_OFF (default) NS_TRIGGER1_ONLY NS_TRIGGER2_ONLY NS_TRIGGER1_OR_TRIGGER2 NS_TRIGGER1_AND_TRIGGER2 offset of trigger 1 (in bits) range of trigger 1 (in bytes) (current valid range = 1~6) trigger 1 data reserved for future use trigger 1 mask (default = 0xFF) reserved for future use offset of trigger 2 (in bits) range of trigger 2 (in bytes) (current valid range = 1~6) trigger 2 data reserved for future use trigger 2 mask (default = 0xff) reserved for future use

*/ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

/* External Trigger */ unsigned char ucTriggerOutMode;

/* /* /* /* /* /* /*

External trigger mode for LAN and POS TeraMetrics only use the following constants NS_TRIGGER_OUT_TX NS_TRIGGER_OUT_RX NS_TRIGGER_OUT_L2_ERROR NS_TRIGGER_OUT_L3_ERROR

*/ */ */ */ */ */ */

/* Card specific */ /* WAN cards */ unsigned long ulLineNum; unsigned long ulChannelNum; unsigned char ucDirection;

unsigned char ucReserved5[29]; } NSTrigger;

/* /* /* /* /* /* /* /* /*

T1/E1 line number Channel number within the T1/E1 line. Rx or Tx use the following constants to specify: NS_TRIGGER_DIR_RX NS_TRIGGER_DIR_TX reserved for future use

*/ */ */ */ */ */ */ */ */

766 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_TRIGGER_CONFIG_INFO
Retreive the trigger configuration. See NS_TRIGGER_CONFIG for more information. HTGetStructure(NS_TRIGGER_CONFIG_INFO, 0, 0, 0, (void*) pNSTrigger, sizeof(NSTrigger), iHub, iSlot, iPort); HTGetStructure $NS_TRIGGER_CONFIG_INFO 0 0 0 \ myNSTrigger \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSTrigger
Continues >

SmartLibrary Command Reference: Volume 2 | 767

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSTrigger { unsigned char ucTriggerCombo;

unsigned long ulTrigger1Offset; unsigned short uiTrigger1Range; unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned char ucTrigger1Data[6]; char ucReserved1[26]; char ucTrigger1Mask[6]; char ucReserved2[26]; long ulTrigger2Offset; short uiTrigger2Range; char char char char ucTrigger2Data[6]; ucReserved3[26]; ucTrigger2Mask[6]; ucReserved4[26];

/* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /*

trigger combination use the following constants to specify combination: NS_TRIGGER_OFF (default) NS_TRIGGER1_ONLY NS_TRIGGER2_ONLY NS_TRIGGER1_OR_TRIGGER2 NS_TRIGGER1_AND_TRIGGER2 offset of trigger 1 (in bits) range of trigger 1 (in bytes) (current valid range = 1~6) trigger 1 data reserved for future use trigger 1 mask (default = 0xFF) reserved for future use offset of trigger 2 (in bits) range of trigger 2 (in bytes) (current valid range = 1~6) trigger 2 data reserved for future use trigger 2 mask (default = 0xff) reserved for future use

*/ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

/* External Trigger */ unsigned char ucTriggerOutMode;

/* /* /* /* /* /* /*

External trigger mode for LAN and POS TeraMetrics only use the following constants NS_TRIGGER_OUT_TX NS_TRIGGER_OUT_RX NS_TRIGGER_OUT_L2_ERROR NS_TRIGGER_OUT_L3_ERROR

*/ */ */ */ */ */ */

/* Card specific */ /* WAN cards */ unsigned long ulLineNum; unsigned long ulChannelNum; unsigned char ucDirection;

unsigned char ucReserved5[29]; } NSTrigger;

/* /* /* /* /* /* /* /* /*

T1/E1 line number Channel number within the T1/E1 line. Rx or Tx use the following constants to specify: NS_TRIGGER_DIR_RX NS_TRIGGER_DIR_TX reserved for future use

*/ */ */ */ */ */ */ */ */

768 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_UDP_IPV6_STREAM_INFO
Read back TCP IPv6 stream data. Use iType2 as the index to the stream to retrieve information for. HTGetStructure(NS_UDP_IPV6_STREAM_INFO, <index>, 0, 0, (void*) pStreamUDPIPv6, sizeof(StreamUDPIPv6), iHub, iSlot, iPort); HTGetStructure $NS_UDP_IPV6_STREAM_INFO <index> 0 0 \ myStreamUDPIPv6 \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPIPv6

This structure contains values for UDP IPv6 compliant Streams with VLAN taggins. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). Note: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. Note: For ATM TeraMetrics modules, if the bound VC does not use LLC_BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_UDP_IPV6. If the bound VC does use LLC_BRIDGED encapsulation, set ucProtocolType to STREAM_PROTOCOL_LLC_BRIDGED. typedef struct tagStreamUDPIPv6 { unsigned char ucActive; unsigned char ucProtocolType; unsigned char

unsigned char unsigned short

/* 1 = Enable Stream, 0=Disable Stream*/ /* use STREAM_PROTOCOL_UDP_IPV6 or STREAM_PROTOCOL_LLC_BRIDGED (ATM only) */ ucRandomLength; /* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS TeraMetrics-based modules. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ ucRandomData; /* 1 = Random Data, 0 = use the cards background pattern */ uiFrameLength; /* frame length not counting CRC */

/***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 769

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned long

ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD2Offset; /* in bits */ unsigned char ucVFD2Range; /* in bits */ unsigned char ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ unsigned long ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ unsigned char ucVFD2StartVal[6]; /*the initial VFD byte pattern*/ unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* Identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IPv6 address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IPv6 address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generate frame length error */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field (currently not used) */ } StreamUDPIPv6; unsigned char ucTagField;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

770 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_UDP_IPV6_STREAM_VLAN_INFO
Read back TCP IPv6 VLAN stream data. Use iType2 as the index to the stream to retrieve information for. HTGetStructure(NS_UDP_IPV6_STREAM_VLAN_INFO, <index>, 0, 0, (void*) pStreamUDPIPv6VLAN, sizeof(StreamUDPIPv6VLAN), iHub, iSlot, iPort); HTGetStructure $NS_UDP_IPV6_STREAM_VLAN_INFO <index> 0 0 \ myStreamUDPIPv6VLAN \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

StreamUDPIPv6VLAN

This structure contains values for UDP IPv6 compliant Streams with VLAN taggins. A SmartBits Signature field, used for Histogram results, is inserted at the end of the payload if ucTagField is enabled (set to 1). NOTE: The Signature field is 18 bytes long, and laid into the frame just before the CRC. Use caution when defining the frame length so that the Signature does not overwrite important data. IMPORTANT! On TeraMetrics modules, before defining IPv6 streams with a header length greater than 64 bytes (that is, IPv6 TCP, IPv6 TCP VLAN, IPv6 UDP VLAN, or custom 128-byte header streams), use NS_PORT_TRANSMIT(NSPortTransmit) to set the ucEnableExtendedPayload field to 1. This enables the 128-byte header length to accommodate the longer IPv6 stream header. When you do this, the maximum number of streams that can be defined is reduced to half: from 512 to 256 (this applies to all TeraMetrics modules except the POS-3518A/3519A). In addition, any time you switch between enabling and disabling the extended payload, all currently configured streams are deleted. Use L3_START_ARPS to perform neighbor discovery for each stream. Only LAN cards have neighbor discovery capability. typedef struct tagStreamUDPIPv6 { unsigned char ucActive;/* 1=Enable Stream, 0=Disable Stream*/ unsigned char ucProtocolType;/* use STREAM_PROTOCOL_UDP_IPV6 */ unsigned char ucRandomLength;/* 1 = Enable random frame length, 0 = use uiFrameLength. Available on all LAN and POS cards. Need to set the minimum and maximum random lengths using NS_PORT_TRANSMIT when enabled. */ unsigned char ucRandomData;/* 1 = Random Data, 0 = use the cards background pattern */ unsigned short uiFrameLength;/* frame length not counting CRC */ /***************************************************************** * For ETHERNET, cards VFD1, VFD2, and VFD3 structure members * * are reserved for later use. Set to 0. * *****************************************************************/ unsigned short uiVFD1Offset; /* in bits */ unsigned char ucVFD1Range; /* in bits */

Continues >

SmartLibrary Command Reference: Volume 2 | 771

Chapter 10: Universal (NS) NS iType1 Commands and Structures

unsigned long

unsigned unsigned unsigned unsigned

char short char char

unsigned long

unsigned char

ulVFD1PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD1StartVal[6]; /*the initial VFD byte pattern*/ uiVFD2Offset; /* in bits */ ucVFD2Range; /* in bits */ ucVFD2Pattern; /* HVFD_ENABLED, HVFD_STATIC, */ /* HVFD_INCR, HVFD_DECR, */ /* HVFD_RANDOM, HVFD_NONE */ ulVFD2PatternCount; /* from 0(off) to 16,777,215 */ /* number to incr. or decr. */ /* through when using inc or */ /* dec pattern */ ucVFD2StartVal[6]; /*the initial VFD byte pattern*/

unsigned short uiVFD3Offset; /* in bytes */ unsigned short uiVFD3Range; /* in bytes */ unsigned char ucVFD3Enable; /* HVFD_ENABLED, HVFD_NONE */ /****************************************************************************/ /* 0 = off, 1 = insert Signature field into each frame */ unsigned char DestinationMAC[6]; /* Destination MAC address */ unsigned char SourceMAC[6]; /* Source MAC address */ unsigned char ucTrafficClass; /* Packet priority */ unsigned char ucNextHeader; /* identifies the header type immediately following the IPV6 header */ unsigned char ucHopLimit; /* Number of "hops" until frame will be dropped */ unsigned long ulFlowLabel; /* Label packets to request special handling */ unsigned char SourceIP[16]; /* Source IP address (e.g. 192.100.5.....4) */ unsigned char DestinationIP[16]; /* Destination IP address (e.g. 192.100.5.....4) */ unsigned char RouterIP[16]; /* Gateway address */ unsigned char ucPayloadLengthError; /* 0 - disable, 1 - enable, generates error in frame length */ unsigned short UDPSrc; /* UDP Source Port */ unsigned short UDPDest; /* UDP Dest Port */ unsigned short UDPLen; /* UDP Length field - not used */ unsigned short VLAN_Pri; /* VLAN Priority: available constants VLAN_PRI_0 VLAN_PRI_1 VLAN_PRI_2 VLAN_PRI_3 VLAN_PRI_4 VLAN_PRI_5 VLAN_PRI_6 VLAN_PRI_7 VLAN_PRI_LOWEST VLAN_PRI_HIGHEST */ unsigned short VLAN_Cfi; /* VLAN CFI bit: available constants VLAN_CFI_RIF_ABSENT VLAN_CFI_RIF_PRESENT */ unsigned short VLAN_Vid; /* VLAN identifier */ } StreamUDPIPv6VLAN; unsigned char ucTagField;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

772 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_WAIT_FOR_EVENT
Wait until all events marked by the user have been completed, or timeout has occurred. HTSetStructure(NS_WAIT_FOR_EVENT, 0, 0, 0, (void*) pNSWaitForEvent, sizeof(NSWaitForEvent), iHub, iSlot, iPort); HTSetStructure $NS_WAIT_FOR_EVENT 0 0 0 \ myNSWaitForEvent \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSWaitForEvent

This structure sets the input and returns the output for NS_WAIT_FOR_EVENT command. typedef struct tagNSWaitForEvent { unsigned long ulEventFlag;/* flag of events to wait for */ /* NS_TX_SIGNATURE_STOP - wait till stop transmitting signature frames */ /* NS_RX_SIGNATURE_STOP - wait till stop receiving signature frames */ unsigned long ulTimeout; /* number of seconds to wait before giving up */ /* set to 0 to use the default timeout value */ unsigned long ulStatus; /* output */ /* NS_WAIT_TIMEOUT - 1 or more events didn't complete */ /* NS_WAIT_COMPLETE - all events are completed */ } NSWaitForEvent;

Comment

IMPORTANT: See SmartLibrary Basics in the SmartLibrary Overview and Procedures.

SmartLibrary Command Reference: Volume 2 | 773

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_WIS_CONFIG
Configure WAN Interface Sublayer HTSetStructure(NS_WIS_CONFIG , 0, 0, 0, (void*) pNSWISConfig, sizeof(NSWISConfig), iHub, iSlot, iPort); HTSetStructure $NS_WIS_CONFIG myNSWISConfig \ 0 \ $iHub $iSlot $iPort 0 0 0 \

Tcl Usage

Related Structure

NSWISConfig

WAN Interface Sublayer setting for XLW-372xA and XFP-373xA test modules in WAN PHY mode. typedef struct tagNSWISConfig { unsigned long ulErrorInjection; /* Inject errors and alarms, NS_WIS_INJECT_FRAMING_ERRORS NS_WIS_INJECT_SECTION_BIP_ERRORS NS_WIS_INJECT_LINE_BIP_ERRORS NS_WIS_INJECT_PATH_BIP_ERRORS NS_WIS_INJECT_LINE_AIS_ALARM NS_WIS_INJECT_LINE_RDI_ALARM NS_WIS_INJECT_PATH_AIS_ALARM NS_WIS_INJECT_SECTION_LOS_ALARM */ unsigned char ucFramingMode; /* framing mode, NS_WIS_SONET_FRAMING NS_WIS_SDH_FRAMING */ unsigned char ucSectionScramble; /* 1 enable scramble, 0 disable scramble (unscramble) */ unsigned char ucPathSignalLabel; /* Path signal label NS_WIS_PATH_SIGNAL_LABEL_10G_ETHERNET_WAN */ unsigned char ucCRC32Enable; /* 1 enable CRC32, 0 enable CRC16*/ unsigned char ucTxClockSource; /* Clock Source, NS_WIS_INTERNAL_TX_CLOCK NS_WIS_LOOP_TX_CLOCK */ unsigned char ucLoopbackEnable; /* 1 enable, 0 disable */ unsigned char ucReserved[128]; }NSWISConfig;

Continues >

774 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* ulErrorInjection constants */ #define NS_WIS_INJECT_FRAMING_ERRORS #define NS_WIS_INJECT_SECTION_BIP_ERRORS #define NS_WIS_INJECT_LINE_BIP_ERRORS #define NS_WIS_INJECT_PATH_BIP_ERRORS #define NS_WIS_INJECT_LINE_AIS_ALARM #define NS_WIS_INJECT_LINE_RDI_ALARM #define NS_WIS_INJECT_PATH_AIS_ALARM #define NS_WIS_INJECT_SECTION_LOS_ALARM /* ucFramingMode constants */ #define NS_WIS_SONET_FRAMING #define NS_WIS_SDH_FRAMING /* ucTxClockSource constants */ #define NS_WIS_INTERNAL_TX_CLOCK #define NS_WIS_LOOP_TX_CLOCK

0x00000001 0x00000002 0x00000004 0x00000008 0x00000010 0x00000020 0x00000040 0x00000080

0 1

0 1

/* ucPathSignalLabel constants */ #define NS_WIS_PATH_SIGNAL_LABEL_10G_ETHERNET_WAN

0x1A

SmartLibrary Command Reference: Volume 2 | 775

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_WIS_CONFIG_INFO
Read back WAN Interface Sublayer settings. HTGetStructure(NS_WIS_CONFIG_INFO , 0, 0, 0, (void*) pNSWISConfig, sizeof(NSWISConfig), iHub, iSlot, iPort); HTGetStructure $NS_WIS_CONFIG_INFO myNSWISConfig \ 0 \ $iHub $iSlot $iPort 0 0 0 \

Tcl Usage

Related Structure

NSWISConfig

WAN Interface Sublayer setting for XLW-372xA and XFP-373xA test modules in WAN PHY mode. typedef struct tagNSWISConfig { unsigned long ulErrorInjection; /* Inject errors and alarms, NS_WIS_INJECT_FRAMING_ERRORS NS_WIS_INJECT_SECTION_BIP_ERRORS NS_WIS_INJECT_LINE_BIP_ERRORS NS_WIS_INJECT_PATH_BIP_ERRORS NS_WIS_INJECT_LINE_AIS_ALARM NS_WIS_INJECT_LINE_RDI_ALARM NS_WIS_INJECT_PATH_AIS_ALARM NS_WIS_INJECT_SECTION_LOS_ALARM */ unsigned char ucFramingMode; /* framing mode, NS_WIS_SONET_FRAMING NS_WIS_SDH_FRAMING */ unsigned char ucSectionScramble; /* 1 enable scramble, 0 disable scramble (unscramble) */ unsigned char ucPathSignalLabel; /* Path signal label NS_WIS_PATH_SIGNAL_LABEL_10G_ETHERNET_WAN */ unsigned char ucCRC32Enable; /* 1 enable CRC32, 0 enable CRC16, for only WAN PHY*/ unsigned char ucTxClockSource; /* Clock Source, NS_WIS_INTERNAL_TX_CLOCK NS_WIS_LOOP_TX_CLOCK */ unsigned char ucLoopbackEnable; /* 1 enable, 0 disable, for only WAN PHY */ unsigned char ucReserved[128]; }NSWISConfig;

Continues >

776 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/* ulErrorInjection constants */ #define NS_WIS_INJECT_FRAMING_ERRORS #define NS_WIS_INJECT_SECTION_BIP_ERRORS #define NS_WIS_INJECT_LINE_BIP_ERRORS #define NS_WIS_INJECT_PATH_BIP_ERRORS #define NS_WIS_INJECT_LINE_AIS_ALARM #define NS_WIS_INJECT_LINE_RDI_ALARM #define NS_WIS_INJECT_PATH_AIS_ALARM #define NS_WIS_INJECT_SECTION_LOS_ALARM /* ucFramingMode constants */ #define NS_WIS_SONET_FRAMING #define NS_WIS_SDH_FRAMING /* ucTxClockSource constants */ #define NS_WIS_INTERNAL_TX_CLOCK #define NS_WIS_LOOP_TX_CLOCK

0x00000001 0x00000002 0x00000004 0x00000008 0x00000010 0x00000020 0x00000040 0x00000080

0 1

0 1

/* ucPathSignalLabel constants */ #define NS_WIS_PATH_SIGNAL_LABEL_10G_ETHERNET_WAN

0x1A

SmartLibrary Command Reference: Volume 2 | 777

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_WIS_LINE_STATUS_INFO
Retrieve WAN Interface Sublayer counters (events/rates). HTGetStructure(NS_WIS_LINE_STATUS_INFO , 0, 0, 0, (void*) pNSWISLineStatusInfo, sizeof(NSWISLineStatusInfo), iHub, iSlot, iPort); HTGetStructure $NS_WIS_LINE_STATUS_INFO myNSWISLineStatusInfo \ 0 \ $iHub $iSlot $iPort 0 0 0 \

Tcl Usage

Related Structure

NSWISLineStatusInfo

WAN Interface Sublayer counters (events and rates).

NSWISLineStatusInfo Description: This structure is used to retrieve WAN Interface Sublayer counters (events and rates). Alarm Constants for uiAlarmCurrent NS_WIS_SECTION_LOS_ALARM NS_WIS_SECTION_OOF_ALARM NS_WIS_SECTION_LOF_ALARM NS_WIS_LINE_AIS_ALARM NS_WIS_LINE_FERF_ALARM NS_WIS_LINE_LOP_ALARM NS_WIS_PATH_AIS_ALARM NS_WIS_PATH_FERF_ALARM NS_WIS_PATH_YELLOW_ALARM NS_WIS_LOCD_ALARM NS_WIS_PSLM_ALARM and uiAlarmHistory Fields 0x0001 0x0002 0x0004 0x0008 0x0010 0x0020 0x0040 0x0080 0x0100 0x0200 0x0400

Continues >

778 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

typedef struct tagNSWISLineStatusInfo { unsigned short uiAlarmCurrent; /* Bitmap - All alarms currently active. The defined alarm constants are: NS_WIS_SECTION_LOS_ALARM NS_WIS_SECTION_OOF_ALARM NS_WIS_SECTION_LOF_ALARM NS_WIS_LINE_AIS_ALARM NS_WIS_LINE_FERF_ALARM NS_WIS_LINE_LOP_ALARM NS_WIS_PATH_AIS_ALARM NS_WIS_PATH_FERF_ALARM NS_WIS_PATH_YELLOW_ALARM NS_WIS_LOCD_ALARM NS_WIS_PSLM_ALARM */ unsigned short uiAlarmHistory; /* Bitmap - All alarms since last counter clear. The defined alarm constants are: NS_WIS_SECTION_LOS_ALARM NS_WIS_SECTION_OOF_ALARM NS_WIS_SECTION_LOF_ALARM NS_WIS_LINE_AIS_ALARM NS_WIS_LINE_FERF_ALARM NS_WIS_LINE_LOP_ALARM NS_WIS_PATH_AIS_ALARM NS_WIS_PATH_FERF_ALARM NS_WIS_PATH_YELLOW_ALARM NS_WIS_LOCD_ALARM NS_WIS_PSLM_ALARM */ /* Error counts since last counter clear */ U64 u64SectionBipCount; /* Number of Section Bit Interleaved Parity errors */ U64 u64LineBipCount; /* Number of Line Bit Interleaved Parity errors */ U64 u64LineFebeCount; /* Number of Line Far End Block errors */ U64 u64PathBipCount; /* Number of Path Bit Interleaved Parity errors */ U64 u64PathFebeCount; /* Number of Path Far End Block errors */ /* Current error rates in events per second */ unsigned long ulSectionBipRate; /* Section Bit Interleaved Parity error rate */ unsigned long ulLineBipRate; /* Line Bit Interleaved Parity error rate */ unsigned long ulLineFebeRate; /* Line Far End Block error rate */ unsigned long ulPathBipRate; /* Path Bit Interleaved Parity error rate */ unsigned long ulPathFebeRate; /* Path Far End Block error rate */ unsigned char ucReserved[128]; }NSWISLineStatusInfo; /* Reserved */

Continues >

SmartLibrary Command Reference: Volume 2 | 779

Chapter 10: Universal (NS) NS iType1 Commands and Structures

/*

uiAlarmCurrent and uiAlarmHistory NS_WIS_SECTION_LOS_ALARM NS_WIS_SECTION_OOF_ALARM NS_WIS_SECTION_LOF_ALARM NS_WIS_LINE_AIS_ALARM NS_WIS_LINE_FERF_ALARM NS_WIS_LINE_LOP_ALARM NS_WIS_PATH_AIS_ALARM NS_WIS_PATH_FERF_ALARM NS_WIS_PATH_YELLOW_ALARM NS_WIS_LOCD_ALARM NS_WIS_PSLM_ALARM

constants */ 0x0001 0x0002 0x0004 0x0008 0x0010 0x0020 0x0040 0x0080 0x0100 0x0200 0x0400

#define #define #define #define #define #define #define #define #define #define #define

iType1 Description C Usage Tcl Usage Related Structure

NS_WIS_LINE_STATUS_RESET
Clear WAN Interface Sublayer counters (events/rates). HTSetCommand(NS_WIS_LINE_STATUS_RESET, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $NS_WIS_LINE_STATUS_RESET 0 0 0 \ "" \ $iHub $iSlot $iPort

N/A

780 |

SmartLibrary Command Reference: Volume 2

Chapter 10: Universal (NS) NS iType1 Commands and Structures

iType1 Description C Usage

NS_WRITE_MDIO
Write to MDIO Register. HTSetStructure(NS_WRITE_MDIO, 0, 0, 0, (void*) pNSMDIORegister, sizeof(NSMDIORegister), iHub, iSlot, iPort); HTSetStructure $NS_WRITE_MDIO 0 0 0 \ myNSMDIORegister \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

NSMDIORegister

This structure sets the register address and number and the value to be written. typedef struct tagNSMDIORegister { unsigned short uiAddress;/* specific address */ unsigned short uiRegister;/* specific register */ unsigned short uiValue;/* bit values to write to address/register */ }NSMDIORegister;

SmartLibrary Command Reference: Volume 2 | 781

782 |

SmartLibrary Command Reference: Volume 2

Chapter 11

Packet Over SONET (POS)


This chapter describes the Message Function iType1 commands for Packet Over SONET (POS). These have the prefix POS.

In this chapter...

Supported Modules.....784 POS HTSetStructure Summary Table.....785 POS HTSetCommand Summary Table.....785 POS iType1 Commands and Structures.....786

SmartLibrary Command Reference: Volume 2 | 783

Chapter 11: Packet Over SONET (POS) Supported Modules

Supported Modules
The POS commands (iType1s) and their related structures support the following SmartCards and modules.
SmartBits 600x/6000x

Module
POS-3500B POS-3500Bs POS-3502A POS-3502AS POS-3504As POS-3504AR POS-3505As POS-3505AR POS-3510A POS-3510As POS-3511A POS-3511As POS-3518As POS-3518AR POS-3519As POS-3519AR

Description
POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, multi-mode, 1300nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, single mode, 1310nm, SmartMetrics POS OC-3c (STM-1c), 1-port, multi-mode, 1300nm, SmartMetrics POS OC-3c (STM-1c), 1-port, single mode, 1310nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1310nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1550nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1310nm, TeraMetrics POS OC-48c (STM-16c), 1-port, single mode, 1550nm, TeraMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode, 1300nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, single mode, 1310nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode, 1300nm, TeraMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, single mode, 1310nm, TeraMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310nm, SmartMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1550nm, SmartMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310nm, TeraMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1550nm, TeraMetrics

Note: POS configuration and control is based primarily on L3 Message Functions, along with a few POS functions. For information on the L3 functions, see Chapter 8, SmartMetrics / TeraMetrics (L3).

784 |

SmartLibrary Command Reference: Volume 2

Chapter 11: Packet Over SONET (POS) POS HTSetStructure Summary Table

POS HTSetStructure Summary Table


iType 1
POS_CONFIG See Page 786 POS_CARD_LINE_CONFIG See Page 788 POS_CARD_PORT_ENCAP See Page 790 0 0 0 POSCardPortEncapsulation Set up POS encapsulation type. 0 0 0 POSCardLineConfig Configure POS line parameters.

2
0

3
0

4
0

pData
POSConfig

Description
Configure the POS transceiver.

POS HTGetStructure Summary Table


iType 1
POS_CONFIG_INFO See Page 787 POS_CARD_LINE_CONFIG_INFO See Page 789 POS_CARD_PORT_ENCAP_INFO See Page 790 POS_READ_SPEED See Page 791 0 0 0 POSCardGetSpeedInfo Query the POS card speed. 0 0 0 POSCardPortEncapsulation Retrieve POS encapsulation type. 0 0 0 POSCardLineConfig

2
0

3
0

4
0

pData
POSConfig

Description
Get the configuration of the POS transceiver. Retrieve POS line parameters.

POS HTSetCommand Summary Table


iType 1
POS_SET_SPEED See Page 792

2
0

3
0

4
0

pData
POSCardSetSpeed

Description
Set the POS card speed.

SmartLibrary Command Reference: Volume 2 | 785

Chapter 11: Packet Over SONET (POS) POS iType1 Commands and Structures

POS iType1 Commands and Structures


iType1 C Usage

POS_CONFIG
HTSetStructure(POS_CONFIG, 0, 0, 0, (void*) pPOSConfig, sizeof(POSConfig), iHub, iSlot, iPort); HTSetStructure $POS_CONFIG 0 0 0 \ myPOSConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

POSConfig

This structure is used to configure POS transceiver. typedef struct tagPOSConfig { unsigned char ucTxClockSource;

unsigned char ucFramingMode;

unsigned char ucLoopBackMode;

/* Clock Source 0 = Internal, 1 = Loop Timed */ /* Framing Mode POS_FRAMING_MODE_SONET(default), POS_FRAMING_MODE_SDH */ /* LoopBack Mode - Only one mode can be used POS_LOOPBACK_MODE_OFF(default), POS_LOOPBACK_MODE_LOCAL_PHY, POS_LOOPBACK_MODE_REMOTE_PHY, POS_LOOPBACK_MODE_LOCAL_TRANSCEIVER, POS_LOOPBACK_MODE_REMOTE_TRANSCEIVER, POS_LOOPBACK_MODE_MONITOR_PHY */

unsigned char ucReserved[20]; }POSConfig;

786 |

SmartLibrary Command Reference: Volume 2

Chapter 11: Packet Over SONET (POS) POS iType1 Commands and Structures

iType1 C Usage

POS_CONFIG_INFO
HTGetStructure(POS_CONFIG_INFO, 0, 0, 0, (void*) pPOSConfig, sizeof(POSConfig), iHub, iSlot, iPort); HTGetStructure $POS_CONFIG_INFO 0 0 0 \ myPOSConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

POSConfig

Get the configuration of the POS transceiver. typedef struct tagPOSConfig { unsigned char ucTxClockSource;

unsigned char ucFramingMode;

unsigned char ucLoopBackMode;

/* Clock Source 0 = Internal, 1 = Loop Timed */ /* Framing Mode POS_FRAMING_MODE_SONET(default), POS_FRAMING_MODE_SDH */ /* LoopBack Mode - Only one mode can be used POS_LOOPBACK_MODE_OFF(default), POS_LOOPBACK_MODE_LOCAL_PHY, POS_LOOPBACK_MODE_REMOTE_PHY, POS_LOOPBACK_MODE_LOCAL_TRANSCEIVER, POS_LOOPBACK_MODE_REMOTE_TRANSCEIVER, POS_LOOPBACK_MODE_MONITOR_PHY */

unsigned char ucReserved[20]; }POSConfig;

SmartLibrary Command Reference: Volume 2 | 787

Chapter 11: Packet Over SONET (POS) POS iType1 Commands and Structures

iType1 C Usage

POS_CARD_LINE_CONFIG
HTSetStructure(POS_CARD_LINE_CONFIG, 0, 0, 0, (void*) pPOSCardLineConfig, sizeof(POSCardLineConfig), iHub, iSlot, iPort); HTSetStructure $POS_CARD_LINE_CONFIG 0 0 0 \ myPOSCardLineConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

POSCardLineConfig

This structure is used to set up and retrieve the POS card line configuration. typedef struct tagPOSCardLineConfig { unsigned char ucCRC32Enabled; unsigned char ucScramble; unsigned short uiSONETAlarmError;

/* 1 enable CRC32, 0 enable CRC16, */ /* 1 enable Scramble, 0 disable Scramble */ /* SONET Alarm/error bitmask SONET_FRAMING_A1A2_ERRORS SONET_SECTION_BIP8_ERRORS SONET_LINE_BIP96_ERRORS SONET_PATH_BIP8_ERRORS SONET_LINE_AIS_ALARMS SONET_LINE_RDI_ALARMS SONET_PATH_AIS_ALARMS */

} POSCardLineConfig;

788 |

SmartLibrary Command Reference: Volume 2

Chapter 11: Packet Over SONET (POS) POS iType1 Commands and Structures

iType1 C Usage

POS_CARD_LINE_CONFIG_INFO
HTGetStructure(POS_CARD_LINE_CONFIG_INFO, 0, 0, 0, (void*) pPOSCardLineConfig, sizeof(POSCardLineConfig), iHub, iSlot, iPort); HTGetStructure $POS_CARD_LINE_CONFIG_INFO 0 0 0 \ myPOSCardLineConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

POSCardLineConfig

typedef struct tagPOSCardLineConfig { unsigned char ucCRC32Enabled; unsigned char ucScramble; unsigned short uiSONETAlarmError;

/* 1 enable CRC32, 0 enable CRC16, */ /* 1 enable Scramble, 0 disable Scramble */ /* SONET Alarm/error bitmask SONET_FRAMING_A1A2_ERRORS SONET_SECTION_BIP8_ERRORS SONET_LINE_BIP96_ERRORS SONET_PATH_BIP8_ERRORS SONET_LINE_AIS_ALARMS SONET_LINE_RDI_ALARMS SONET_PATH_AIS_ALARMS */

} POSCardLineConfig;

SmartLibrary Command Reference: Volume 2 | 789

Chapter 11: Packet Over SONET (POS) POS iType1 Commands and Structures

iType1 C Usage

POS_CARD_PORT_ENCAP
HTSetStructure(POS_CARD_PORT_ENCAP, 0, 0, 0, (void*) pPOSCardPortEncapsulation, sizeof(POSCardPortEncapsulation), iHub, iSlot, iPort); HTSetStructure $POS_CARD_PORT_ENCAP 0 0 0 \ myPOSCardPortEncapsulation \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
ucEncapStyle =

POSCardPortEncapsulation
PROTOCOL_ENCAP_TYPE_STD_PPP PROTOCOL_ENCAP_TYPE_HDLC_WITH_ETHERTYPE PROTOCOL_ENCAP_TYPE_MPLS_STACK

This structure is used to set up and retrieve the POS card encapsulation type.

typedef struct tagPOSCardPortEncapsulation { unsigned char ucEncapStyle; char Pad[3]; } POSCardPortEncapsulation;

iType1 C Usage

POS_CARD_PORT_ENCAP_INFO
HTGetStructure(POS_CARD_PORT_ENCAP_INFO, 0, 0, 0, (void*) pPOSCardPortEncapsulation, sizeof(POSCardPortEncapsulation), iHub, iSlot, iPort); HTGetStructure $POS_CARD_PORT_ENCAP_INFO 0 0 0 \ myPOSCardPortEncapsulation \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
ucEncapStyle =

POSCardPortEncapsulation
PROTOCOL_ENCAP_TYPE_STD_PPP PROTOCOL_ENCAP_TYPE_HDLC_WITH_ETHERTYPE PROTOCOL_ENCAP_TYPE_MPLS_STACK

This structure is used to set up and retrieve the POS card encapsulation type.

typedef struct tagPOSCardPortEncapsulation { unsigned char ucEncapStyle; char Pad[3]; } POSCardPortEncapsulation;

790 |

SmartLibrary Command Reference: Volume 2

Chapter 11: Packet Over SONET (POS) POS iType1 Commands and Structures

iType1 Description C Usage

POS_READ_SPEED
Retrieve information about a POS cards current port speed, speed capabilities, and transceiver mode. HTGetStructure(POS_READ_SPEED, 0, 0, 0, pPOSCardGetSpeedInfo, iHub, iSlot, iPort); HTGetStructure $POS_READ_SPEED 0 0 0 \ myPOSCardGetSpeedInfo \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

POSCardGetSpeedInfo

This structure is used to get information about a POS cards current port speed, speed capabilities, and transceiver mode. Possible values for uiSpeed are: POS_SPEED_OC1 POS_SPEED_OC3 POS_SPEED_OC12 POS_SPEED_OC48 POS_SPEED_OC192 typedef struct tagPOSCardGetSpeedInfo { unsigned short uiSpeed; unsigned short uiSpeedCap; unsigned short uiTransMode; } POSCardGetSpeedInfo;

/* Current speed setting */ /* Speed capabilities of the card */ /* Card transceiver mode */

SmartLibrary Command Reference: Volume 2 | 791

Chapter 11: Packet Over SONET (POS) POS iType1 Commands and Structures

iType1 Description C Usage

POS_SET_SPEED
Set the POS card speed. HTSetCommand(POS_SET_SPEED, 0, 0, 0, pPOSCardSetSpeed, iHub, iSlot, iPort); HTSetCommand $POS_SET_SPEED 0 0 0 \ myPOSCardSetSpeed \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

POSCardSetSpeed

This structure is used to set the speed of the POS card. The default is OC12, but the user can switch to OC3. The user can also change speed using HTSetSpeed(POS_SPEED_OC3, iHub, iSlot, iPort). Possible values for uiSpeed are: POS_SPEED_OC1 POS_SPEED_OC3 POS_SPEED_OC12 POS_SPEED_OC48 POS_SPEED_OC192 typedef struct tagPOSCardSetSpeed { unsigned short uiSpeed; } POSCardSetSpeed;

792 |

SmartLibrary Command Reference: Volume 2

Chapter 12

PPP (PPP)
This chapter describes the Message Function iType1 commands for PPP. These have the prefix PPP.

In this chapter...

Supported SmartCards and Modules.....794 PPP HTSetStructure Summary Table.....795 PPP HTGetStructure Summary.....796 PPP iType1 Commands and Structures.....797

SmartLibrary Command Reference: Volume 2 | 793

Chapter 12: PPP (PPP) Supported SmartCards and Modules

Supported SmartCards and Modules


The PPP iType1 commands and their related structures support the following WAN, POS, and ATM (ATM-2 only) SmartCards and modules.
Chassis SmartCard or Module
AT-9155c/cs AT-9622/s LAN-3101A/B LAN-3102A LAN-3111A LAN-3111AS ML-5710A POS-3500B POS-3500BS POS-3502A POS-3502As POS-3504AS/AR POS-3505AS/AR POS-3510A/As POS-3511A/As POS-3518AS/AR POS-3519AS/AR WN-3405 WN-3415 WN-3420A WN-3441A WN-3442A WN-3445A

Description
ATM OC-3c (STM-1c), 1-port, multi-mode, 1300/1310nm ATM OC-12c (STM-4c), 1-port, multi-mode, 1300/1310nm 10/100Base-T Ethernet, 6-port, SmartMetrics 10/100Base-T Ethernet, 2-port, SmartMetrics 100Base-FX Ethernet, 6-port, multi-mode, 1300nm, SmartMetrics 100Base-FX Ethernet, 6-port, single mode, 1310nm, SmartMetrics 10Base-T Ethernet/USB, 2-port, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, multi-mode, 1300nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 1-port, single mode, 1310nm, SmartMetrics POS OC-3c (STM-1c), 1-port, multi-mode, 1300nm, SmartMetrics POS OC-3c (STM-1c), 1-port, single mode, 1310nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, SmartMetrics POS OC-48c (STM-16c), 1-port, single mode, 1310/1550nm, TeraMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode/ single mode, 1300/1310nm, SmartMetrics POS OC-3c/OC-12c (STM-1c/STM-4c), 2-port, multi-mode/ single mode, 1300/1310nm, TeraMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310/ 1550nm, SmartMetrics POS OC-192c (STM-64c),1-port, 2-slot, single mode, 1310/ 1550nm, TeraMetrics WAN V.35, 6/8 Mbps, Frame Relay/PPP, 1-port, SmartMetrics WAN T1/FT1, Frame Relay/PPP, 1-port, SmartMetrics WAN E1/FT1, Frame Relay/PPP, 1-port, SmartMetrics WAN T1, Frame Relay/PPP, channelized, 4-port, SmartMetrics WAN E1, Frame Relay/PPP, 1-port, SmartMetrics WAN D3, Frame Relay/PPP, 1-port, SmartMetrics

SmartBits 200/2000

SmartBits 600x/6000x

794 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP HTSetStructure Summary Table

PPP HTSetStructure Summary Table


iType 1
PPP_CONFIG See Page 797 PPP_DELETE See Page 803 PPP_PARAMS_COPY See Page 804 PPP_PARAMS_FILL See Page 804 PPP_PARAMS_MODIFY See Page 805 PPP_SET_CTRL See Page 809

2
0

3
0

4
0

pData
PPPParamCfg

Description
Set PPP configuration structure parameters.

PPPDelete

Delete one or more PPP sessions.

PPPParamsCopy

ATM only: Copy PPP parameters to a given number of streams. ATM only: Fill in PPP parameters for a given number of streams, using a delta value. ATM only: Modify the PPP parameters of a given number of streams. Set PPP control structure parameters.

PPPParamsFill

<x>

<c>

PPPParamsModify

PPPControlCfg

SmartLibrary Command Reference: Volume 2 | 795

Chapter 12: PPP (PPP) PPP HTGetStructure Summary

PPP HTGetStructure Summary


iType 1
PPP_CONFIG_INFO See Page 800 PPP_SESSION_STATS_INFO See Page 807 PPP_STATS_INFO See Page 810 PPP_STATUS_INFO See Page 812 PPP_STATUS_SEARCH_INFO See Page 815

2
0

3
0

4
0

pData
PPPParamCfg

Description
Get PPP configuration structure.

PPPSessionStatsInfo

Retrieves PPP global session statistics maintained by the stack. Get PPP counter data.

<x>

<c>

PPPStatsInfo

<x>

<c>

PPPStatusInfo

Get PPP status data.

<x>

<c>

PPPStatusSearchInfo

Return information for matching status information.

PPP HTSetCommand Summary Table


iType 1
PPP_DELETE_ALL See Page 803 PPP_STATS_RESET See Page 811

2
0

3
0

4
0

pData

Description
Delete all PPP sessions.

Reset all PPP statistics counters.

796 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

PPP iType1 Commands and Structures


iType1 Description C Usage

PPP_CONFIG
Set PPP configuration structure parameters. HTSetStructure(PPP_CONFIG, 0, 0, 0, (void*) pPPPParamCfg, sizeof(PPPParamCfg), iHub, iSlot, iPort); HTSetStructure $PPP_CONFIG 0 0 0 \ myPPPParamCfg \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPParamCfg

Retrieve PPP configuration. Use iType2 to indicate the first instance. To retrieve configurations for multiple sessions, use an array of PPPParamCfg structures. Defined values: * Current PPP negotiation options: * PPPO_MRU 0x0001 * PPPO_USECHAPAUTH 0x0010 * PPPO_USEPAPAUTH 0x0020 * PPPO_USEMAGIC 0x0080 * PPPO_USENONE 0x0000 * CHAP authentication: * PPP_CHAPMD5 0x05 * PPP_CHAPMS 0x80 * PPP Configure structure default values: * PPP_CONFIGURE_MRU 1500 * PPP_CONFIGURE_MAXFAILURE 5 * PPP_CONFIGURE_MAXCONFIGURE 10 * PPP_CONFIGURE_MAXTERMINATE 2 * PPP_CONFIGURE_MAGICNUMBER 2 * PPP_CONFIGURE_ECHOFREQ 1 (not applicable to ML-5710A and LAN-31xxA/B cards) * * PPP_CONFIGURE_ECHOERRFREQ 0 (not applicable to ML-5710A and LAN-31xxA/B cards) * PPPoE Parameters:* Mode: * PPP_OE_CLIENT 0x01 * PPP_OE_SERVER 0x02 - Not supported yet * Options: * PPP_OE_SELECT_AC_BY_SVCNAME 0x0001 * PPP_OE_SELECT_AC_BY_ACNAME 0x0002 * PPP_OE_USE_ZEROLEN_SVCNAME 0x0004 * PPP_OE_OFFER_AVAILABLE_SERVICE 0x0010 - Not supported yet * PPP_OE_USE_DOUBLE_TIMEOUT 0x100 * PPP_OE_USE_ZEROLEN_SVCNAME 0x0004 * PPP_OE_OFFER_AVAILABLE_SERVICE 0x0010 - Not supported yet * PPP_OE_USE_DOUBLE_TIMEOUT 0x10

Continues >

SmartLibrary Command Reference: Volume 2 | 797

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

typedef struct tagPPPParamCfg { unsigned long ulLineNo; unsigned long ulChannelNo; unsigned long ulpppCount;

unsigned long

ulpppInstance;

/* Input - Wan cards only - T1/E1 Line */ /* Input - Wan cards only Channel number within the T1/E1 Line */ /* Input Number of PPP Instance to configure starting from pppInstance */ /* Starting instance ID of PPP when multiple PPP instances used * range: 0-128 for PPP over FR on WAN * range: 0 for PPP over HDLC on WAN and POS * range: 0-2048 for PPP over ATM * For WN344X don't use these field */

/* LCP Configurations options to negotiate/accept */ unsigned short uipppWeWish; /* options we use in Configure-Request */ unsigned short uipppWeMust; /* options we must be acked before peer's Configure ACK */ unsigned short uipppWeCan; /* options we can ack in Configure ACK */ /* LCP parameters */ unsigned char ucpppEnablePPP; unsigned char ucpppCHAPAlgo; unsigned short uipppMRU; unsigned short uipppMaxFailure; unsigned short uipppMaxConfigure; unsigned short uipppMaxTerminate; unsigned long ulpppMagicNumber;

/* Enable LCP when link is UP and ready */ /* CHAP algorithm */ /* Max. Receive Unit - default 1500 */ /* Max. Configure NAK to send - default 5 */ /* Max. Configure Request to send without acked - default 10 */ /* times to send Terminate Request without acked - default 2 */ /* Magic Number : 0 = a random number will be genrated */

/* Authentication */ unsigned char ucpppOurID[32]; unsigned char unsigned char unsigned char ucpppOurPW[32]; ucpppPeerID[32]; ucpppPeerPW[32];

/* Login(Outgoing/as a client) ID for authentication */ /* Login(Outgoing/as a client) Password for authentication */ /* Peer(Incoming/as a server) ID for authentication */ /* Peer(Incoming/as a server) Password for authentication */

Continues >

798 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

/* IP parameters */ unsigned char ucpppIPEnable; /* Enable IP NCP - if LCP is enabled */ unsigned char ucpppNegotiateIPAddr;/* Was Reserved - used to negotiate local & peer IP Addresses */ unsigned short uipppIPCompress; /* Reserved */ unsigned char ucpppOurIPAddr[4]; /* Proposed Local IP addr */ unsigned char ucpppPeerIPAddr[4]; /* Proposed Peer IP addr */ /* IPX parameters - reserved */ unsigned long ulpppIPXNet; unsigned char ucpppIPXEnable; /* Enable IPX NCP - if LCP is enabled */ unsigned char ucpppIPXNode[6]; unsigned char ucReserved; unsigned short uipppIPXCompress; /* Reserved */ unsigned short uipppIPXRoutingProt; unsigned short uipppRestartTimer; unsigned short uipppRetryCount; unsigned char ucModFrame; PPP Restart Timer */ Number of times PPP retry LCP after failure 0=forvever */ Modify frame with dynamic data from session negotiation, where: 0x00 - indicates no modifications 0x01 - indicates modify the Local IP 0x02 - indicates modify PPPoE Session ID 0x04 - indicates modify Destination MAC address 0x08 - indicates modify Source MAC address */ /* /* * /*

unsigned char

ucReserved1;

/* PPPoE parameters */ unsigned char ucMode; unsigned char ucTimer; /* In seconds */ unsigned short uiRetry; unsigned short uiOptions; unsigned char ucSourceMAC[6]; unsigned char ucDestMAC[6]; unsigned short uiServiceNameLen; unsigned char ucServiceName[16]; unsigned short uiAcNameLen; unsigned char ucAcName[16]; } PPPParamCfg;

SmartLibrary Command Reference: Volume 2 | 799

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

iType1 Description C Usage

PPP_CONFIG_INFO
Retrieves the PPP configuration for one or more PPP sessions. To retrieve information about multiple sessions, use an array of PPPParamCfg structures. HTGetStructure(PPP_CONFIG_INFO, <index>, 0, 0, (void*) pPPPParamCfg, sizeof(PPPParamCfg), iHub, iSlot, iPort); HTGetStructure $PPP_CONFIG_INFO <index> 0 0 \ myPPPParamCfg \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPParamCfg

Retrieve PPP configuration. Use iType2 to indicate the first instance. To retrieve configurations for multiple sessions, use an array of PPPParamCfg structures. * Defined values: * Current PPP negotiation options: * PPPO_MRU 0x0001 * PPPO_USECHAPAUTH 0x0010 * PPPO_USEPAPAUTH 0x0020 * PPPO_USEMAGIC 0x0080 * PPPO_USENONE 0x0000 * CHAP authentication: * PPP_CHAPMD5 0x05 * PPP_CHAPMS 0x80 * PPP Configure structure default values: * PPP_CONFIGURE_MRU 1500 * PPP_CONFIGURE_MAXFAILURE 5 * PPP_CONFIGURE_MAXCONFIGURE 10 * PPP_CONFIGURE_MAXTERMINATE 2 * PPP_CONFIGURE_MAGICNUMBER 2 * PPP_CONFIGURE_ECHOFREQ 1 (not applicable to ML-5710A and LAN-31xxA/B cards) * * PPP_CONFIGURE_ECHOERRFREQ 0 (not applicable to ML-5710A and LAN-31xxA/B cards) * PPPoE Parameters:* Mode: * PPP_OE_CLIENT 0x01 * PPP_OE_SERVER 0x02 - Not supported yet * Options: * PPP_OE_SELECT_AC_BY_SVCNAME 0x0001 * PPP_OE_SELECT_AC_BY_ACNAME 0x0002 * PPP_OE_USE_ZEROLEN_SVCNAME 0x0004 * PPP_OE_OFFER_AVAILABLE_SERVICE 0x0010 - Not supported yet * PPP_OE_USE_DOUBLE_TIMEOUT 0x100 * PPP_OE_USE_ZEROLEN_SVCNAME 0x0004 * PPP_OE_OFFER_AVAILABLE_SERVICE 0x0010 - Not supported yet * PPP_OE_USE_DOUBLE_TIMEOUT 0x10

Continues >

800 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

typedef struct tagPPPParamCfg { unsigned long ulpppInstance;

unsigned long

ulpppCount;

/* Starting instance ID of PPP when multiple PPP instances used * range: 0-128 for PPP over FR on WAN * range: 0 for PPP over HDLC on WAN and POS * range: 0-2048 for PPP over ATM * WN3445 0 PPP over channel, else DLCI number */ /* Number of PPP Instance to configure starting from pppInstance */

/* LCP Configurations options to negotiate/accept */ unsigned short uipppWeWish; /* options we use in Configure-Request */ unsigned short uipppWeMust; /* options we must be acked before peer's Configure ACK */ unsigned short uipppWeCan; /* options we can ack in Configure ACK */ /* LCP parameters */ unsigned char ucpppEnablePPP; unsigned char ucpppCHAPAlgo; unsigned short uipppMRU; unsigned short uipppMaxFailure; unsigned short uipppMaxConfigure;

/* Enable LCP when link is UP and ready */ /* CHAP algorithm */ /* Max. Receive Unit - default 1500 */ /* Max. Configure NAK to send - default 5 */ /* Max. Configure Request to send without acked - default 10 */ unsigned short uipppMaxTerminate; /* times to send Terminate Request without acked - default 2 */ unsigned long ulpppMagicNumber; /* Magic Number : 0 = a random number will be genrated */ /* Authentication */ unsigned char ucpppOurID[32]; /* Login(Outgoing/as a client) ID for authentication */ unsigned char ucpppOurPW[32]; /* Login(Outgoing/as a client) Password for authentication */ unsigned char ucpppPeerID[32]; /* Peer(Incoming/as a server) ID for authentication */ unsigned char ucpppPeerPW[32]; /* Peer(Incoming/as a server) Password for authentication */ /* IP parameters */ unsigned char ucpppIPEnable; /* Enable IP NCP - if LCP is enabled */

Continues >

SmartLibrary Command Reference: Volume 2 | 801

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

unsigned char unsigned short unsigned char unsigned char /* IPX parameters unsigned long unsigned char unsigned char unsigned char unsigned short unsigned short unsigned short unsigned short

ucpppNegotiateIPAddr;/* Was Reserved - used to negotiate local & peer IP Addresses */ uipppIPCompress; /* Reserved */ ucpppOurIPAddr[4]; /* Proposed Local IP addr */ ucpppPeerIPAddr[4]; /* Proposed Peer IP addr */ - reserved */ ulpppIPXNet; ucpppIPXEnable; /* Enable IPX NCP - if LCP is enabled */ ucpppIPXNode[6]; ucReserved; uipppIPXCompress; /* Reserved */ uipppIPXRoutingProt;

uipppRestartTimer; /* PPP Restart Timer */ uipppRetryCount; /* Number of times PPP retry LCP after failure * 0=forvever */ unsigned char ucModFrame; /* Modify frame with dynamic data from session negotiation, where: 0x00 - indicates no modifications 0x01 - indicates modify the Local IP 0x02 - indicates modify PPPoE Session ID 0x04 - indicates modify Destination MAC address 0x08 - indicates modify Source MAC address */ unsigned char ucReserved1; /* PPPoE unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned parameters */ char ucMode; /* Use one of the values defined above */ char ucTimer; /* In seconds */ short uiRetry; short uiOptions; /* Use one of the values defined above */ char ucSourceMAC[6]; char ucDestMAC[6]; short uiServiceNameLen; char ucServiceName[16]; short uiAcNameLen; char ucAcName[16]; ulReserved[2];

unsigned long } PPPParamCfg;

802 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

iType1 Description C Usage

PPP_DELETE
Delete a PPP session. WN-344xA SmartCards only. HTSetStructure(PPP_DELETE, 0, 0, 0, (void*) pPPPDelete, sizeof(PPPDelete), iHub, iSlot, iPort); HTSetStructure $PPP_DELETE 0 0 0 \ myPPPDelete \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPDelete

typedef struct tagPPPDelete { unsigned long ulpppInstance;

unsigned long

ulpppCount;

/* Starting instance ID of PPP when multiple PPP instances used */ /* WN3445A 0 -- PPP over channel, else DLCI number */ /* Number of PPP Instances to delete starting from the initial PPP instance specified by ulLineNo and ulChannelNo (the line and channel numbers map to a PPP instance) */

} PPPDelete;

iType1 Description C Usage

PPP_DELETE_ALL
Delete all PPP sessions. WN-344xA SmartCards only. HTSetCommand(PPP_DELETE_ALL, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $PPP_DELETE_ALL 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

SmartLibrary Command Reference: Volume 2 | 803

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

iType1 Description C Usage

PPP_PARAMS_COPY
Copy PPP parameters to a given number of streams. HTSetStructure(PPP_PARAMS_COPY, 0, 0, 0, (void*) pPPPParamsCopy, sizeof(PPPParamsCopy), iHub, iSlot, iPort); HTSetStructure $PPP_PARAMS_COPY 0 0 0 \ myPPPParamsCopy \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPParamsCopy

PPPParamsCopy is used to create a number of streams with the same parameters, as specified in the Conf-Req. typedef struct tagPPPParamsCopy { unsigned short uipppSrcStrNum; unsigned short uipppDstStrNum; unsigned short uipppDstStrCount; unsigned short uiReserved; unsigned short uiReserved; } PPPParamsCopy;

/* Source stream index. */ /* Starting stream index to which the information in the source stream is to be coped.*/ /* The number of streams to be created with the source streams information.*/

iType1 Description C Usage

PPP_PARAMS_FILL
Fill in PPP parameters for a given number of streams, using a delta value. HTSetStructure(PPP_PARAMS_FILL, 0, 0, 0, (void*) pPPPParamsFill, sizeof(PPPParamsFill), iHub, iSlot, iPort); HTSetStructure $PPP_PARAMS_FILL 0 0 0 \ myPPPParamsFill \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPParamsFill

PPPParamsFill is used to modify a parameter field of a given number of streams which already exist, using a Source stream index as a base, a starting destination index, and count, whose contents are to be modified, based on the parameter-id, followed by a delta value which will be used as the successive incremental value.

Continues >

804 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

The uipppParamItemID field to be modified is specified as follows: PPP_LOCAL_IPADDR PPP_PEER_IPADDR PPP_MAGICNUMBER PPP_OE_SOURCEMAC PPP_OE_DESTMAC 13 14 22 28 29

typedef struct tagPPPParamsFill { unsigned short uipppSrcStrNum;

/* Stream index of the stream whose value for the desired param is to be used as an initial value for the fill. */ unsigned short uipppDstStrNum; /* Stream index of the first stream whose param is to be filled. */ unsigned short uipppDstStrCount; /* The number of streams which are to be filled. */ unsigned short uipppParamItemID; /* Parameter ID which is to be filled on all requested streams - look at the comment section. */ unsigned char ucpppDelta[MAX_DELTA]; /* Successive increment values. */ } PPPParamsFill;

iType1 Description C Usage

PPP_PARAMS_MODIFY
Modify PPP parameters of a given number of streams. HTSetStructure(PPP_PARAMS_MODIFY, <index>, <count>, 0, (void*) pPPPParamsModify, sizeof(PPPParamsModify), iHub, iSlot, iPort); HTSetStructure $PPP_PARAMS_MODIFY <index> <count> 0 \ myPPPParamsModify \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPParamsModify

The PPPParamsModify structure can be used to modify the parameters of any given number of streams which already exist, with an absolute value. The uipppParamItemID field to be modified is specified as follows: PPP_REQUESTED_OPTIONS 0 PPP_REQUIRED_OPTIONS 1 PPP_ACCEPTABLE_OPTIONS 2 PPP_MAX_FAILURE 3 PPP_MAX_CONFIGURE 4 PPP_MAX_TERMINATE 5

Continues >

SmartLibrary Command Reference: Volume 2 | 805

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

PPP_LOCAL_AUTH_ID PPP_LOCAL_AUTH_PW PPP_PEER_AUTH_ID PPP_PEER_AUTH_PW PPP_CHAP_ALGORITHM PPP_IP_ENABLE PPP_NEGOTIATE_IP PPP_LOCAL_IPADDR PPP_PEER_IPADDR PPP_IPX_ENABLE PPP_IPX_NET PPP_IPX_NODE PPP_IPX_COMPRESS PPP_IPX_ROUTING PPP_RESTART_TIMER PPP_MRU PPP_MAGICNUMBER PPP_OE_MOD_FRAME PPP_OE_MODE PPP_OE_RETRYTIMER PPP_OE_RETRY PPP_OE_OPTIONS PPP_OE_SOURCEMAC PPP_OE_DESTMAC PPP_OE_SERVICENAME PPP_OE_ACNAME

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

typedef struct tagPPPParamsModify { unsigned short uipppStartStrNum;

/* Stream index of the first stream to be modified. */ unsigned short uipppStrCount; /* The number of streams which are to be modified. */ unsigned short uipppParamItemID; /* Parameter ID which is to be modified on all requested streams - use one of the values defined above. */ unsigned short uipppParamCount; /* The number of elements to be specified for the pppParamItemID value. This does not include the parameter size. */ unsigned char ucpppData[MAX_ARRAY_DIM]; /* Array contains the number of bytes specified by the pppParamCount*ParamSize */ } PPPParamsModify;

806 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

iType1

PPP_SESSION_STATS_INFO
Retrieves PPP global session statistics maintained by the stack. HTGetStructure(PPP_SESSION_STATS_INFO, 0, 0, 0, (void*) pPPPSessionStatsInfo, sizeof(PPPSessionStatsInfo), iHub, iSlot, iPort); HTGetStructure $PPP_SESSION_STATS_INFO 0 0 0 \ myPPPSessionStatsInfo \ 0 \ $iHub $iSlot $iPort

Description C Usage

Tcl Usage

Related Structure

PPPSessionStatsInfo

Get PPP Global Session Statistics. PPPSessionStatsInfo records the time statistics, session pending, session successful established, LCP retries after failure, session failed -- no retry anymore, ppp_packet_sent, ppp-packet_recv. This commands provides the global session statistics maintained by the stack. typedef struct tagPPPSessionStatsInfo { U64 ullTimeofDay; /* time of day statistics is updated */ unsigned long ulTotalSessionAttempted; /* Total number of times sessions are initiated (go into active queues) including any retries */ unsigned long ulTotalSessionSuccessful;/* Total number of times sessions are sucessful established */ unsigned long ulTotalSessionFailed; /* Total number of times sessions have failed, including multiple retries */ unsigned long ulTotalSessionRetries; /* Total number of times sessions are retried */ unsigned long ulNumSessionRetries; /* Number of sessions being retried. */ unsigned long ulNumSessionFailed; /* Failed - all retries exhausted - in IDLE state. Session not considered failed once is is restarted by the user */ unsigned long ulNumSessionCfged; /* Number of sessions configured by the user */ unsigned long ulActiveSession; /* active session */ unsigned long ulOpenSession; /* Num of sessions currently UP */ unsigned long ulIdleSession; /* Num of sessions configured, but not in action */ unsigned long ulLinkdownSession; /* Num of sessions in linkdown state */

Continues >

SmartLibrary Command Reference: Volume 2 | 807

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

unsigned long unsigned long unsigned long unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned long long long long long long long long long

/* Num of sessions started or being retried, but in throttle state */ ulTerminateThrottleSession;/* Num of sessions stopped by user, but in terminate throttle state */ ulTerminatingSession; /* Num of sessions stopped by user, and terminating */ ulAvailableSession; /* Server - available sessions */ ulEchoReqSent; /* Number of echo requests sent */ ulEchoReplySent; /* Number of echo replies sent */ ulEchoReqRcvd; /* Number of echo requests received */ ulEchoReplyRcvd; /* Number of echo replies received */ ulEchoReqPerBurst; /* Number of echo request per burst */ ulpppPacktSent; /* Packets sent */ ulpppPacktRcvd; /* Packets received */ ulReserved[4];

ulThrottleSession;

} PPPSessionStatsInfo;

808 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

iType1 Description C Usage

PPP_SET_CTRL
Set PPP control structure parameters. HTSetStructure(PPP_SET_CTRL, 0, 0, 0, (void*) pPPPControlCfg, sizeof(PPPControlCfg), iHub, iSlot, iPort); HTSetStructure $PPP_SET_CTRL 0 0 0 \ myPPPControlCfg \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPControlCfg

Defined values for ucpppAction: PPP_NO_ACTION 0 PPP_OPEN_LCP 1 PPP_CLOSE_LCP 2 PPP_ECHO_START 3 PPP_ECHO_STOP 4 PPP_START 5 PPP_STOP 6 typedef struct tagPPPControlCfg { unsigned long ulLineNo; unsigned long ulChannelNo; unsigned long unsigned long /* Control of LCP, IPCP, IPXCP */

unsigned char

unsigned unsigned unsigned unsigned

char char char long

unsigned long

unsigned long unsigned long } PPPControlCfg;

/* Input - Wan cards only - T1/E1 Line */ /* Input - Wan cards only - Channel number within the T1/E1 Line */ ulpppCount; /* Input - Number of times to repeat command starting from pppInstance */ ulpppInstance; /* Starting instance ID of PPP when multiple PPP instances used *//* For WN344X cards don't use this field*/ ucpppAction; /* action to take; can be PPP_NO_ACTION, PPP_OPEN_LCP ( not applicable for the ML-5710A and LAN-31xxA/B cards ), PPP_CLOSE_LCP ( not applicable for the ML-5710A and LAN-31xxA/B cards), PPP_START, PPP_STOP, PPP_ECHO_START, or PPP_ECHO_STOP. */ ucpppLCPPassiveMode; /* Global LCP passive mode */ ucpppIPCPPassiveMode; /* Global IPCP passive mode */ ucReserved; ulpppEchoFreq; /* Echo frequency - send Echo Request every pppEchoFreq seconds */ ulpppEchoErrFreq; /* Echo error frequency - for every (pppEchoErrFreq-1) Echo Requests, insert one with error */ ulpppInterConnDelay; /* Global Inter connect delay in msec. */ ulReserved;

SmartLibrary Command Reference: Volume 2 | 809

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

iType1 Description

PPP_STATS_INFO
Retrieves PPP Status info. Note: Current ATM cards do not have sufficient memory to support this command. The command should not be used.

C Usage

HTGetStructure(PPP_STATS_INFO, <index>, <count>, 0, (void*) pPPPStatsInfo, sizeof(PPPStatsInfo), iHub, iSlot, iPort); HTGetStructure $PPP_STATS_INFO <index><count>0 \ myPPPStatsInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure
Get PPP counters.

PPPStatsInfo

typedef struct tagPPPStatsInfo { unsigned long ulpppInstance;

unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned

long long long long long long long long long long long long long long long long long long long long

/* Starting instance ID of PPP when multiple /* PPP instances used for PPP over HDLC, this /* must be set to 0 */ ulpppCount; /* Number of times to repeat */ ultimestamp; /* time of last update of statistics */ ullcpConfReqSent; /* LCP Configure Request sent */ ullcpConfAckSent; /* LCP Configure Ack sent */ ullcpConfNakSent; /* LCP Configure NAK sent */ ullcpConfRejectSent; /* LCP Configure Reject Sent */ ullcpTermReqSent; /* LCP Terminate Request Sent */ ullcpTermAckSent; /* LCP Terminate Ack sent */ ullcpProtoRejectSent;/* LCP Protocol Reject sent */ ullcpEchoReqSent; /* LCP Echo Request sent */ ullcpEchoReplySent; /* LCP Echo Reply Sent */ ullcpEchoReqErrSent; /* LCP Echo Request with error sent */ ullcpEchoReplyErrSent; /* LCP Echo Reply with Error sent - reserved */ ullcpDiscardReqSent; /* LCP Discard Request sent */ ullcpCodeRejectSent; /* LCP Code Reject sent */ ullcpResetReqSent; /* LCP Reset Request sent */ ullcpResetAckSent; /* LCP Reset ACK sent */ ullcpPAPReqSent; /* PAP Request sent */ ullcpPAPAckSent; /* PAP ACK Sent */ ullcpPAPNakSent; /* PAP NAP Sent */

Continues >

810 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

unsigned long ullcpCHAPChlMSSent; /* unsigned long ullcpCHAPChlMD5Sent; /* unsigned long ullcpCHAPRspMSSent; /* unsigned long ullcpCHAPRspMD5Sent; /* unsigned long ullcpCHAPSuccessSent;/* unsigned long ullcpCHAPFailSent; /* unsigned long ullcpConfReqRcvd; /* unsigned long ullcpConfAckRcvd; unsigned long ullcpConfNakRcvd; unsigned long ullcpConfRejectRcvd; unsigned long ullcpTermReqRcvd; unsigned long ullcpTermAckRcvd; unsigned long ullcpProtoRejectRcvd; unsigned long ullcpEchoReqRcvd; unsigned long ullcpEchoReplyRcvd; unsigned long ullcpEchoReqErrRcvd; unsigned long ullcpEchoReplyErrRcvd; unsigned long ullcpDiscardReqRcvd; unsigned long ullcpCodeRejectRcvd; unsigned long ullcpResetReqRcvd; unsigned long ullcpResetAckRcvd; unsigned long ullcpPAPReqRcvd; unsigned long ullcpPAPAckRcvd; unsigned long ullcpPAPNakRcvd; unsigned long ullcpCHAPChlMSRcvd; unsigned long ullcpCHAPChlMD5Rcvd; unsigned long ullcpCHAPRspMSRcvd; unsigned long ullcpCHAPRspMD5Rcvd; unsigned long ullcpCHAPSuccessRcvd; unsigned long ullcpCHAPFailRcvd; unsigned long ulReserved[16]; } PPPStatsInfo;

CHAP CHAP CHAP CHAP CHAP CHAP Same

Challenge with MS Algorithm sent */ Challenge with MDS Algorithm sent */ Response with MS Algorithm sent */ Response with MDS Algorithm sent */ Success sent */ Failure sent */ as above for receive */

iType1 Description C Usage

PPP_STATS_RESET
Reset PPP statistics counters. HTSetCommand(PPP_STATS_RESET, 0, 0, 0, NULL, iHub, iSlot, iPort); HTSetCommand $PPP_STATS_RESET 0 0 0 \ "" \ $iHub $iSlot $iPort

Tcl Usage

SmartLibrary Command Reference: Volume 2 | 811

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

iType1 Description C Usage

PPP_STATUS_INFO
Get PPP status data. HTGetStructure(PPP_STATUS_INFO, <index>, <count>, 0, (void*) pPPPStatusInfo, sizeof(PPPStatusInfo), iHub, iSlot, iPort); HTGetStructure $PPP_STATUS_INFO <index><count>0 \ myPPPStatusInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPStatusInfo

Get PPP Status. PPPStatusinfo records the States, failure code and the negotiated fields for each PPP session. Defined values for For WN-344X cards, <index> (iType2) and <count> (iType3) are ignored, but the ulLineNo, ulChannelNo, ulpppCount fields are used as described in the PPPStatusInfo structure below. PPP Status, LCP State: PPP_LCP_UP PPP_LCP_DOWN PPP_LCP_AUTHENTICATING PPP Status, NCP State: PPP_NCP_UP PPP_NCP_DOWN PPP Status, LCP/NCP Failure reason code: LCP_CLOSE_REASON_UNKNOWN LCP_CLOSE_AUTH_FAILURE_NO_RSP LCP_CLOSE_AUTH_FAILURE_LOCAL_REJ LCP_CLOSE_AUTH_FAILURE_PEER_REJ LCP_CONFIG_FAILURE LCP_CONFIG_TIMEOUT LCP_CONFIG_FAILURE NCP_CONFIG_TIMEOUT NO_FAILURE PPP_OE_TIMEOUT_NO_RSP PPP_OE_GEN_ERR PPP_OE_SVC_ERR PPP_OE_AC_ERR PPP_OE_NO_AC

0 1 2

0 1

0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D

Continues >

812 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

PPP Status, PPP_OE Session State: PPP_OE_INACTIVE PPP_OE_STARTED PPP_OE_PADO_SENT PPP_OE_PADR_SENT PPP_OE_SESSION_STATE PPP Status, LCP/IPCP detailed state PPP_LCP_IPCP_INIT PPP_LCP_IPCP_STARTING PPP_LCP_IPCP_CLOSED PPP_LCP_IPCP_STOPPED PPP_LCP_IPCP_CLOSING PPP_LCP_IPCP_STOPPING PPP_LCP_IPCP_REQSENT PPP_LCP_IPCP_ACKRCV PPP_LCP_IPCP_ACKSENT PPP_LCP_IPCP_OPENED

0 1 2 3 4

0 1 2 3 4 5 6 7 8 9

Continues >

SmartLibrary Command Reference: Volume 2 | 813

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

typedef struct tagPPPStatusInfo { unsigned long ulpppInstance;

/* Instance ID of PPP, not used for WN-344x cards */ unsigned long ulLineNo; /* Input - WN-344X cards only */ unsigned long ulChannelNo; /* Input - WN- 344X cards only */ unsigned long ulpppCount; /* Number of PPP Instances that have data returned. For WN-344X cards, it is used as input */ unsigned char ucppplcpState; /* LCP state */ unsigned char ucpppipcpState; /* IP NCP state */ unsigned char ucpppipxcpState; /* IPX NCP state */ unsigned char ucppplcpFailCode; /* Authentication fail reason*/ unsigned long ulpppMagicNumber; /* Negotiated Magic Number */ unsigned char ucpppOurIPAddr[4]; /* Negotiated local IP addr */ unsigned char ucpppPeerIPAddr[4]; /* Negotiated Peer IP addr */ unsigned long ulpppWeGot; /* Options we got acked */ unsigned long ulpppWeAcked; /* Options we did ack */ unsigned short uipppMRU; /* Negotiated RX Max Unit */ unsigned short uipppMTU; /* Negotiated TX Max unit */ U64 ullpppLatency; /* Total time to establish a PPP session in 100 ns*/ U64 ullpppTotalLatency; /* Total time to establish all PPP sessions in 100 ns PPPoE Status */ unsigned char ucState; /* PPPoE Session state */ unsigned char ucMode; /* Whether Client/Server? */ unsigned short uiSessionID; unsigned char ucSourceMAC[6]; unsigned char ucDestMAC[6];

/* PPP Status for TeraMetrics cards */ unsigned short uipppNumRetries; /* Number of attempts of PPP session */ unsigned char ucppplcpDetailedState;/* Detail LCP state according to RFC , see micro defined */ unsigned char ucpppipcpDetailedState; /* Detail IPCP state according to RFC, see micro defined */ unsigned long } PPPStatusInfo; ulReserved[5];

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

814 |

SmartLibrary Command Reference: Volume 2

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

iType1 Description C Usage

PPP_STATUS_SEARCH_INFO
Return information for matching status information. HTGetStructure(PPP_STATUS_SEARCH_INFO, <index>, <count>, 0, (void*) pPPPStatusSearchInfo, sizeof(PPPStatusSearchInfo), iHub, iSlot, iPort); HTGetStructure $PPP_STATUS_SEARCH_INFO <index> <count> 0 \ myPPPStatusSearchInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

PPPStatusSearchInfo

The PPP Status Search is used to retrieve a particular field in the PPP Status structure, which fall within the range specified by the ulSearchRangeLow - ulSearchRange values. It uses the ReturnItemId and uiSearchItemId, as a basis for the search and returns the values of the ReturnItemId using the ulItem array. Defined values for uiReturnItemId/uiSearchItemId: PPP_STATUS_STREAM_INDEX PPP_STATUS_LCP_STATE PPP_STATUS_IPCP_STATE PPP_STATUS_IPXCP_STATE PPP_STATUS_FAILURE_CODE PPP_STATUS_LOCAL_MAGICNUMBER PPP_STATUS_LOCAL_IPADDR PPP_STATUS_PEER_IPADDR PPP_STATUS_WEGOT_OPTIONS PPP_STATUS_WEACK_OPTIONS PPP_STATUS_MRU PPP_STATUS_MTU PPP_STATUS_LATENCY PPP_STATUS_PPPOE_STATE PPP_STATUS_PPPOE_MODE PPP_STATUS_PPPOE_SESSIONID PPP_STATUS_PPPOE_SOURCE_MAC PPP_STATUS_PPPOE_DEST_MAC 0 (4-bytes) 1 (1-byte) 2 (1-byte) 3 (1-byte) 4 (1-byte) 5 (4-bytes) 6 (4-bytes) 7 (4-bytes) 8 (4-bytes) 9 (4-bytes) 10 (2-bytes) 11 (2-bytes) 12 (8-bytes) 13 (1-byte) 14 (1-byte) 15 (2-bytes) 16 (6-bytes) 17 (6-bytes)

Continues >

SmartLibrary Command Reference: Volume 2 | 815

Chapter 12: PPP (PPP) PPP iType1 Commands and Structures

Example: PPPStatusSrchInfo.uipppStartIndex = 0; PPPStatusSrchInfo.uipppCount = 10; PPPStatusSrchInfo.uipppReturnItemId = PPP_STATUS_STREAM_INDEX; PPPStatusSrchInfo.uipppSearchItemId = PPP_STATUS_FAILURE_CODE; PPPStatusSrchInfo.ullpppSearchRangeLow = 8; PPPStatusSrchInfo.ullpppSearchRangeHigh = 8; HTGetStructure $PPP_STATUS_SEARCH_INFO 0 10 0 PPPStatusSrchInfo 0 Hub Slot Port; Results obtained: ulpppItem[0] = 0x00 ulpppItem[1] = 0x01 ulpppItem[2] = 0x02 ... typedef struct tagPPPStatusSearchInfo { unsigned short uipppStartIndex; unsigned short uipppCount; unsigned short uipppReturnItemId; unsigned short uipppSearchItemId; U64 ullpppSearchRangeLow; U64 ullpppSearchRangeHigh; unsigned short uipppReturnItemSize; unsigned short uipppReserved; U64 ullpppItem[2048]; } PPPStatusSearchInfo;

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

816 |

SmartLibrary Command Reference: Volume 2

Chapter 13

XAUI, XENPAK , and XFP


This chapter describes the Message Function iType1commands that apply to the XLW-372xA and XFP-373xA 10Gb Ethernet modules.

In this chapter...

Supported Modules.....818 XAUI / XENPAK HTSetStructure Summary Table.....818 XAUI / XENPAK /XFP HTGetStructure Summary Table.....819 XAUI iType1 Commands and Structures.....820 XENPAK and XFP iType1 Commands and Structures.....825

SmartLibrary Command Reference: Volume 2 | 817

Chapter 13: XAUI, XENPAK , and XFP Supported Modules

Supported Modules
The XAUI and XENPAK commands (iType1s) and their related structures are used with the XLW-372xA and XLW-372xA 10GBase modules.

XAUI / XENPAK HTSetStructure Summary Table


iType 1
XAUI_PRBS_CONFIG See Page 820 XENPAK_ALARM_CONFIG See Page 825 XENPAK_NVR_CONFIG See Page 827 XENPAK_PHY_CONFIG See Page 833 0 0 0 XENPAKPhyConfig 0 0 0 XENPAKNRVConfig 0 0 0 XENPAKAlarmConfig

2
0

3
0

4
0

pData
XAUIPRBSConfig

Description
Enable or disable the PRBS on channel A, B, C or D. Set specific Tx and Rx alarms, enable/disable Tx and Tx alarms and link status alarm. Write to a specific NVR (nonvolatile register) on the XLW3720A/3721A module. Set Layer 2 protocol mode of operation.

818 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XAUI / XENPAK /XFP HTGetStructure Summary Table

XAUI / XENPAK /XFP HTGetStructure Summary Table


iType 1
XAUI_PRBS_CONFIG_INFO See Page 822 XAUI_PRBS_STATUS_INFO See Page 824 XENPAK_ALARM_CONFIG_INFO See Page 825 XENPAK_ALARM_STATUS_INFO See Page 826 XENPAK_NVR_CONFIG_INFO See Page 830 XENPAK_PHY_CONFIG_INFO See Page 834 XFP_PROFILE_INFO See Page 840 0 0 0 XFPProfile 0 0 0 XENPAKPhyConfig 0 0 0 XENPAKNRVConfig 0 0 0 XENPAKAlarmStatus 0 0 0 XENPAKAlarmConfig 0 0 0 XAUIPRBSStatusInfo Read the PRBS running status and per-channel error counters. Set specific Tx and Rx alarms, enable/disable Tx and Tx alarms and link status alarm. Get the Tx, Rx, and link status alarms. Query a specific NVR (nonvolatile register) on the XLW3720A/3721A module. Query the Layer 2 protocol mode of operation for the XLW-3720A/ 3721A modules. Query the XFP profile.

2
0

3
0

4
0

pData
XAUIPRBSConfig

Description
Read the PRBS configuration.

SmartLibrary Command Reference: Volume 2 | 819

Chapter 13: XAUI, XENPAK , and XFP XAUI iType1 Commands and Structures

XAUI iType1 Commands and Structures


iType1 Description C Usage

XAUI_PRBS_CONFIG
Enable or disable the PRBS on channel A, B, C or D. HTSetStructure(XAUI_PRBS_CONFIG, 0, 0, 0, (void*) pXAUIPRBSConfig, sizeof(XAUIPRBSConfig), iHub, iSlot, iPort); HTSetStructure $XAUI_PRBS_CONFIG 0 0 0 \ myXAUIPRBSConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XAUIPRBSConfig

XAUI is an abbreviation for 10-Gigabit Attachment Unit Interface. PRBS is an abbreviation for Pseudo Random Bit Stream. XAUI interfaces will provide interconnections between switch blades and switch backplanes. The XAUI card provides 127 built-in Pseudo Random Bit Stream self test function, for 4 channels A, B, C, and D. The Pseudo Random Bit Stream data pattern represents the worst case data recovery compare to 8B/10B data pattern. Therefore, the Pseudo Random Bit Stream is used to test link and clock jitter tolerance. The command XAUI_PRBS_CONFIG is used to enable or disable the Pseudo Random Bit Stream on channel A, B, C or D. The command XAUI_PRBS_CONFIG_INFO is used to read the previously Pseudo Random Bit Stream configuration. typedef struct tagXAUIPRBSConfig { unsigned char ucPRBSEnable; U64 u64DurationCount; /* 1 = enable, 0 = disable */ /* in micro second unit. Max duration is 32,985,348,833 microseconds*/ unsigned char ucPreEmphasisEnable;/* In order to compensate for the loss of the high frequency signal component through PCB or cable, four levels of programmable pre-emphasis have been added to all serial transmit channels. This maximizes the data eye opening at the receiver inputs and enhances the bit error rate performance of the system. 1 = enable, 0 = disable */ unsigned char ucLaneSkewEnable ; /* 1 = enable, 0 = disable */ unsigned char ucReserved[21]; } XAUIPRBSConfig;

Continues >

820 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XAUI iType1 Commands and Structures

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

Comment

ucLaneSkewEnable Per IEEE802.3ae/D.5 Clause 48, the following rules should be followed: 1. The Align or ||A|| ordered-set consists of an /A/ code-group on each lane. 2. All /A/ characters must be generated simultaneously by the transmitter. 3. The maximum allowable skew on the receive side is 41UI (1 UI = 320 ps). Therefore, to create data lane skew the following events must occur: 1. The Bitblitz unit must have the XGMII IDLE pattern to XAUI /A/, /K/, /R/ and vice-versa converters disabled (character transparent mode). This is accomplished with the following settings: CONTROL REGISTER 2 XAUI_EN = 0'b TRANS_EN = 0'b AKR_EN = 0'b and CONTROL REGISTER 1 DSKW_SM_EN = 0'b IDLE_D_EN = 0'b 2. Instead of XGMII IDLE (07'h) characters, our Reconciliation Sub-Layer (RS) located in the XGMII FPGA must generate its own /A/, /K/, and /R/ characters. In this manner, by modifying the /A/ character generation on each lane we can control the lane skew distance. 3. The RS needs to count the /A/ character skew between lanes to measure DUT lane skew generation.

SmartLibrary Command Reference: Volume 2 | 821

Chapter 13: XAUI, XENPAK , and XFP XAUI iType1 Commands and Structures

iType1 Description C Usage

XAUI_PRBS_CONFIG_INFO
Read the PRBS configuration. HTGetStructure(XAUI_PRBS_CONFIG_INFO, 0, 0, 0, (void*) pXAUIPRBSConfig, sizeof(XAUIPRBSConfig), iHub, iSlot, iPort); HTGetStructure $XAUI_PRBS_CONFIG_INFO 0 0 0 \ myXAUIPRBSConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XAUIPRBSConfig

XAUI is an abbreviation for 10-Gigabit Attachment Unit Interface. PRBS is an abbreviation for Pseudo Random Bit Stream. XAUI interfaces will provide interconnections between switch blades and switch backplanes. The XAUI card provides 127 built-in Pseudo Random Bit Stream self test function, for 4 channels A, B, C, and D. The Pseudo Random Bit Stream data pattern represents the worst case data recovery compare to 8B/10B data pattern. Therefore, the Pseudo Random Bit Stream is used to test link and clock jitter tolerance. The command XAUI_PRBS_CONFIG is used to enable or disable the Pseudo Random Bit Stream on channel A, B, C or D. The command XAUI_PRBS_CONFIG_INFO is used to read the previously Pseudo Random Bit Stream configuration. typedef struct tagXAUIPRBSConfig { unsigned char ucPRBSEnable; U64 u64DurationCount;

/* 1 = enable, 0 = disable */ /* in micro second unit. Max duration is 32,985,348,833 microseconds*/ unsigned char ucPreEmphasisEnable; /* In order to compensate for the loss of the high frequency signal component through PCB or cable, four levels of programmable pre-emphasis have been added to all serial transmit channels. This maximizes the data eye opening at the receiver inputs and enhances the bit error rate performance of the system. 1 = enable, 0 = disable */ unsigned char ucLaneSkewEnable ; /* 1 = enable, 0 = disable */ unsigned char ucReserved[21]; } XAUIPRBSConfig;

Continues >

822 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XAUI iType1 Commands and Structures

Embedded Structure

U64

typedef struct tagU64 { unsigned long high; unsigned long low; } U64;

Comment

ucLaneSkewEnable Per IEEE802.3ae/D.5 Clause 48, the following rules should be followed: 1. The Align or ||A|| ordered-set consists of an /A/ code-group on each lane. 2. All /A/ characters must be generated simultaneously by the transmitter. 3. The maximum allowable skew on the receive side is 41UI (1 UI = 320 ps). Therefore, to create data lane skew the following events must occur: 1. The Bitblitz unit must have the XGMII IDLE pattern to XAUI /A/, /K/, /R/ and vice-versa converters disabled (character transparent mode). This is accomplished with the following settings: CONTROL REGISTER 2 XAUI_EN = 0'b TRANS_EN = 0'b AKR_EN = 0'b and CONTROL REGISTER 1 DSKW_SM_EN = 0'b IDLE_D_EN = 0'b 2. Instead of XGMII IDLE (07'h) characters, our Reconciliation Sub-Layer (RS) located in the XGMII FPGA must generate its own /A/, /K/, and /R/ characters. In this manner, by modifying the /A/ character generation on each lane we can control the lane skew distance. 3. The RS needs to count the /A/ character skew between lanes to measure DUT lane skew generation.

SmartLibrary Command Reference: Volume 2 | 823

Chapter 13: XAUI, XENPAK , and XFP XAUI iType1 Commands and Structures

iType1 Description C Usage

XAUI_PRBS_STATUS_INFO
Read the PRBS running status and per-channel error counters. HTGetStructure(XAUI_PRBS_STATUS_INFO, 0, 0, 0, (void*) pXAUIPRBSStatusInfo, sizeof(XAUIPRBSStatusInfo), iHub, iSlot, iPort); HTGetStructure $XAUI_PRBS_STATUS_INFO 0 0 0 \ myXAUIPRBSStatusInfo \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XAUIPRBSStatusInfo

This command is used to read the pseudo random bit stream running status and per channel error counter. When the user enables the pseudo random bit stream test, the hardware FPGA will monitor each of the XAUI transceiver PRBS status line at 30 nsec and update a 30 nsec free-running counter for each channel. The individual PRBS counter will stop immediately after that PRBS status for that channel indicates error. There are four 40 bits PRBS counters for 4 channels. The maximum PRBS test duration is 32,985,348,833 micro seconds. Define constant for field ucPRBSStatus of XAUIPRBSStatusInfo: * XAUI_PRBS_TEST_DISABLE * XAUI_PRBS_TEST_RUNNING * XAUI_PRBS_TEST_COMPLETED 0 1 2 /* - XAUI_PRBS_TEST_DISABLE - XAUI_PRBS_TEST_RUNNING - XAUI_PRBS_TEST_COMPLETED */ PRBS error counter for PRBS error counter for PRBS error counter for PRBS error counter for reserved: 0 = default channel channel channel channel */ A B C D */ */ */ */

typedef struct tagXAUIPRBSStatusInfo { unsigned char ucPRBSStatus;

unsigned long ulPRBSChannelAError; unsigned long ulPRBSChannelBError; unsigned long ulPRBSChannelCError; unsigned long ulPRBSChannelDError; unsigned char ucReserved[15]; } XAUIPRBSStatusInfo;

/* /* /* /* /*

824 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

XENPAK and XFP iType1 Commands and Structures


iType1 Description C Usage

XENPAK_ALARM_CONFIG
Set specific Tx and Rx alarms, enable/disable Tx and Tx alarms and link status alarm. Applies only to XLW-3720A/3721A modules. HTSetStructure(XENPAK_ALARM_CONFIG, 0, 0, 0, (void*) pXENPAKAlarmConfig, sizeof(XENPAKAlarmConfig), iHub, iSlot, iPort); HTSetStructure $XENPAK_ALARM_CONFIG 0 0 0 \ myXENPAKAlarmConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XENPAKAlarmConfig

typedef struct tagXENPAKAlarmConfig{ unsigned short uiTransmitAlarmControl; /* Transmit alarm control */ unsigned short uiReceiveAlarmControl; /* Receive alarm control */ unsigned short uiLinkAlarmStatusInterruptControl;/* LASI Control */ unsigned char ucReserved[122]; } XENPAKAlarmConfig;

iType1 Description C Usage

XENPAK_ALARM_CONFIG_INFO
Get the current configuration of Tx and Rx alarms and link status alarms on XLW-3720A/3721A modules. HTGetStructure(XENPAK_ALARM_CONFIG, 0, 0, 0, (void*) pXENPAKAlarmConfig, sizeof(XENPAKAlarmConfig), iHub, iSlot, iPort); HTGetStructure $XENPAK_ALARM_CONFIG 0 0 0 \ myXENPAKAlarmConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XENPAKAlarmConfig

typedef struct tagXENPAKAlarmConfig{ unsigned short uiTransmitAlarmControl; /* Transmit alarm control */ unsigned short uiReceiveAlarmControl; /* Receive alarm control */ unsigned short uiLinkAlarmStatusInterruptControl;/* LASI Control */ unsigned char ucReserved[122]; } XENPAKAlarmConfig;

SmartLibrary Command Reference: Volume 2 | 825

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

iType1 Description C Usage

XENPAK_ALARM_STATUS_INFO
Get the Tx, Rx, and link status alarms. HTGetStructure(XENPAK_ALARM_STATUS_INFO, 0, 0, 0, (void*) pXENPAKAlarmStatus, sizeof(XENPAKAlarmStatus), iHub, iSlot, iPort); HTGetStructure $XENPAK_ALARM_STATUS_INFO 0 0 0 \ myXENPAKAlarmStatus \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XENPAKAlarmStatus

The command XENPAK_PHY_CONFIG command configures (or the XENPAK_PHY_CONFIG_INFO command queries) the layer 2 protocol mode of operation for the XLW-3720A/3721A modules in LAN or WAN mode. XENPAK_PHY_MODE_POS 0 Note: Does not apply to XLW-3720A/3721A modules. XENPAK_PHY_MODE_LAN 1 XENPAK_PHY_MODE_WAN 2
typedef struct tagXENPAKAlarmStatus { unsigned short uiTransmitAlarmStatus; /* Transmit alarm status */ unsigned short uiReceiveAlarmStatus; /* Received alarm status */ unsigned short uiLinkAlarmStatusInterruptStatus; /* LASI Status */ unsigned char ucReserved[122]; } XENPAKAlarmStatus; /* LASI #define #define #define Control Register(0x09002) & Status Register(0x9005) bits XENPAK_LASI_LS_ALARM_ENABLE 0x0000 XENPAK_LASI_TX_ALARM_ENABLE 0x0001 XENPAK_LASI_RX_ALARM_ENABLE 0x0002 */

/* TX Alarm Control Register(0x09001) & Status Register(0x9004)bits */ #define XENPAK_TX_ALARM_PHY_XS_TRANSMIT_LOCAL_FAULT_ENABLE 0x0000 /* Read & Write */ #define XENPAK_TX_ALARM_PCS_TRANSMIT_LOCAL_FAULT_ENABLE 0x0003 /* Read & Write */ #define XENPAK_TX_ALARM_PMA_PMD_TRANSMITTER_LOCAL_FAULT_ENABLE 0x0004 /* Optional features that are unsupported should have their enable bit forced to zero */ #define XENPAK_TX_ALARM_TRASMITTER_FAULT_ENABLE 0x0006 /* Read & Write */ #define XENPAK_TX_ALARM_LASER_OUTPUT_POWER_FAULT_ENABLE 0x0007 /* Optional features that are unsupported should have their enable bit forced to zero */

826 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

iType1 Description C Usage

XENPAK_NVR_CONFIG
Write to a specific NVR (non-volatile register) on the XLW-3720A/3721A modules. HTSetStructure(XENPAK_NVR_CONFIG, 0, 0, 0, (void*) pXENPAKNVRConfig, sizeof(XENPAKNVRConfig), iHub, iSlot, iPort); HTSetStructure $XENPAK_NVR_CONFIG 0 0 0 \ myXENPAKNVRConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XENPAKNVRConfig

NVR is an abbreviation for Non-Volatile Register. These two commands are for XLW-3720A/3721A XENPAK modules only. The maximum number of non-volatile register entries is 512 (refer to the MSA standard version 2.1). The writable NVR offset will be 119 and max writable length is 48. For XENPAK_NVR_CONFIG: This command is used to write to a specific non-volatile register on the XLW-3720A/3721A modules. If write to the non-volatile register is not allowed, an error is returned. The command field is use to indicate to the card that this is any specific field or all fields operation. In the case of all fields operation, length field must be XENPAK_MAX_NVR_CUSTOMER_SIZE and nvr_addr offset will be at XENPAK_NVR_CUSTOMER_AREA For XENPAK_NVR_CONFIG_INFO: This command is used to query specific non-volatile register on the XLW-3720A/3721A modules. The command field is use to indicate to the card that this is any specific field or all fields operation. In the case of all fields operation, NVR offset must set to 0 and length field must set to the max number of non-volatile register entries 512.

Continues >

SmartLibrary Command Reference: Volume 2 | 827

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

Write command: * XENPAK_ANY_SPECIFIC_FIELD * XENPAK_ALL_FIELD Writable non-volatile register customer size * XENPAK_MAX_NVR_CUSTOMER_SIZE Readable non-volatile register Offset * XENPAK_NVR_VERSION_NUMBER * XENPAK_NVR_SIZE * XENPAK_NVR_MEMORY_USED * XENPAK_NVR_BASIC_FIELD_ADDRESS * XENPAK_NVR_CUSTOMER_FIELD_ADDRESS * XENPAK_NVR_VENDOR_FIELD_ADDRESS * XENPAK_NVR_EXT_VENDOR_FIELD_ADDRESS * XENPAK_NVR_TRANSCEIVER_TYPE * XENPAK_NVR_OPTICAL_CONNECTOR * XENPAK_NVR_ENCODING * XENPAK_NVR_BIT_RATE * XENPAK_NVR_PROTOCOL * XENPAK_NVR_STANDARDS_COMPLIANCE_CODES * XENPAK_NVR_FIBER_TYPE * XENPAK_NVR_WAVELENGTH_CHANNEL0 * XENPAK_NVR_WAVELENGTH_CHANNEL1 * XENPAK_NVR_WAVELENGTH_CHANNEL2 * XENPAK_NVR_WAVELENGTH_CHANNEL3 * XENPAK_NVR_PACKAGE_OUI * XENPAK_NVR_VENDOR_OUI * XENPAK_NVR_VENDOR_NAME * XENPAK_NVR_VENDOR_PART_NUMBER * XENPAK_NVR_VENDOR_REVISION * XENPAK_NVR_VENDOR_SERIAL_NUMBER * XENPAK_NVR_VENDOR_YEAR_CODE * XENPAK_NVR_VENDOR_MONTH_CODE * XENPAK_NVR_VENDOR_DAY_CODE * XENPAK_NVR_VENDOR_LOT_CODE Writable non-volatile register offset: * XENPAK_NVR_CUSTOMER_AREA

0 1

48

0 1 3 5 6 7 8 11 12 13 14 16 17 29 31 34 37 40 43 47 51 67 83 85 101 105 107 109

119

Readable non-volatile register offset of vendor specific start at the offset 167 with length 89: * XENPAK_NVR_VENDOR_SPECIFIC 167

Continues >

828 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

typedef struct tagXENPAKNVRConfig { unsigned short uiDeviceAddress; unsigned short uiMDIOAddress;

unsigned short

uiNVROffset;

/* 30 or 31 depends on the non-volatile register pointer*/ /* Reserved for now Management Data Input/Out, or MDIO, is a standard driven, dedicated-bus approach that's specific in IEEE FPC802.3 */ /* Non-volatile register offset value valid from 0 to 511. For XENPAK_NVR_CONFIG: - uiNVROffset must set in range from XENPAK_NVR_CUSTOMER_AREA to XENPAK_NVR_CUSTOMER_AREA + XENPAK_MAX_NVR_CUSTOMER_SIZE - when uiCommand is XENPAK_ALL_FIELD, the uiNVROffset set to XENPAK_NVR_CUSTOMER_AREA, and uiLength must set to XENPAK_MAX_NVR_CUSTOMER_SIZE - when uiCommand is XENPAK_ANY_SPECIFIC_FIELD, uiLength must be sastify this [offset - uiLength <= XENPAK_MAX_NVR_CUSTOMER_SIZE], and uiNVROffset = offset[0XENPAK_MAX_NVR_CUSTOMER_SIZE] + XENPAK_NVR_CUSTOMER_AREA.

For XENPAK_NVR_CONFIG_INFO: - read to some NVR fields: uiCommand is XENPAK_ANY_SPECIFIC_FIELD, the uiNVROffset could be varied from 0 to 511 and uiLength from 1 to 512 - read all NVR fields: uiCommand is XENPAK_ALL_FIELD, the uiNVROffset is default to 0 and uiLength to 512. */ unsigned short uiCommand; /* XENPAK_ANY_SPECIFIC_FIELD = 0 -- read or write to some specific fields; XENPAK_ALL_FIELD = 1 -- read or write to all fields. */ unsigned short uiLength; /* Non-volatile register adress and length total has to be less than 512. */ unsigned char ucData[512]; /* Non-volatile register data to be written */ unsigned char ucReserved[66]; /* Reserve field */ } XENPAKNVRConfig;

SmartLibrary Command Reference: Volume 2 | 829

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

iType1 Description C Usage

XENPAK_NVR_CONFIG_INFO
Query a specific NVR (non-volatile register) on the XLW-3720A/3721A module. HTGetStructure(XENPAK_NVR_CONFIG, 0, 0, 0, (void*) pXENPAKNVRConfig, sizeof(XENPAKNVRConfig), iHub, iSlot, iPort); HTSGetStructure $XENPAK_NVR_CONFIG 0 0 0 \ myXENPAKNVRConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XENPAKNVRConfig

NVR is an abbreviation for Non-Volatile Register. These two commands are for XLW-3720A/3721A XENPAK modules only. The maximum number of non-volatile register entries is 512 (refer to the MSA standard version 2.1). The writable NVR offset will be 119 and max writable length is 48. For XENPAK_NVR_CONFIG: This command is used to write to a specific non-volatile register on the XLW-3720A/3721A modules. If write to the non-volatile register is not allowed, an error is returned. The command field is use to indicate to the card that this is any specific field or all fields operation. In the case of all fields operation, length field must be XENPAK_MAX_NVR_CUSTOMER_SIZE and nvr_addr offset will be at XENPAK_NVR_CUSTOMER_AREA For XENPAK_NVR_CONFIG_INFO: This command is used to query specific non-volatile register on the XLW-3720A/3721A modules. The command field is use to indicate to the card that this is any specific field or all fields operation. In the case of all fields operation, nvr offset must set to 0 and length field must set to the max number of non-volatile register entries 512.

Continues >

830 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

Write command: * XENPAK_ANY_SPECIFIC_FIELD * XENPAK_ALL_FIELD Writable non-volatile register customer size * XENPAK_MAX_NVR_CUSTOMER_SIZE Readable non-volatile register Offset * XENPAK_NVR_VERSION_NUMBER * XENPAK_NVR_SIZE * XENPAK_NVR_MEMORY_USED * XENPAK_NVR_BASIC_FIELD_ADDRESS * XENPAK_NVR_CUSTOMER_FIELD_ADDRESS * XENPAK_NVR_VENDOR_FIELD_ADDRESS * XENPAK_NVR_EXT_VENDOR_FIELD_ADDRESS * XENPAK_NVR_TRANSCEIVER_TYPE * XENPAK_NVR_OPTICAL_CONNECTOR * XENPAK_NVR_ENCODING * XENPAK_NVR_BIT_RATE * XENPAK_NVR_PROTOCOL * XENPAK_NVR_STANDARDS_COMPLIANCE_CODES * XENPAK_NVR_FIBER_TYPE * XENPAK_NVR_WAVELENGTH_CHANNEL0 * XENPAK_NVR_WAVELENGTH_CHANNEL1 * XENPAK_NVR_WAVELENGTH_CHANNEL2 * XENPAK_NVR_WAVELENGTH_CHANNEL3 * XENPAK_NVR_PACKAGE_OUI * XENPAK_NVR_VENDOR_OUI * XENPAK_NVR_VENDOR_NAME * XENPAK_NVR_VENDOR_PART_NUMBER * XENPAK_NVR_VENDOR_REVISION * XENPAK_NVR_VENDOR_SERIAL_NUMBER * XENPAK_NVR_VENDOR_YEAR_CODE * XENPAK_NVR_VENDOR_MONTH_CODE * XENPAK_NVR_VENDOR_DAY_CODE * XENPAK_NVR_VENDOR_LOT_CODE Writable non-volatile register offset: * XENPAK_NVR_CUSTOMER_AREA

0 1

48

0 1 3 5 6 7 8 11 12 13 14 16 17 29 31 34 37 40 43 47 51 67 83 85 101 105 107 109

119

Readable non-volatile register offset of vendor specific start at the offset 167 with length 89: * XENPAK_NVR_VENDOR_SPECIFIC 167

Continues >

SmartLibrary Command Reference: Volume 2 | 831

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

typedef struct tagXENPAKNVRConfig { unsigned short uiDeviceAddress; unsigned short uiMDIOAddress;

unsigned short

uiNVROffset;

/* 30 or 31 depends on the non-volatile register pointer*/ /* Reserved for now Management Data Input/Out, or MDIO, is a standard driven, dedicated-bus approach that's specific in IEEE FPC802.3 */ /* Non-volatile register offset value valid from 0 to 511. For XENPAK_NVR_CONFIG: - uiNVROffset must set in range from XENPAK_NVR_CUSTOMER_AREA to XENPAK_NVR_CUSTOMER_AREA + XENPAK_MAX_NVR_CUSTOMER_SIZE - when uiCommand is XENPAK_ALL_FIELD, the uiNVROffset set to XENPAK_NVR_CUSTOMER_AREA, and uiLength must set to XENPAK_MAX_NVR_CUSTOMER_SIZE - when uiCommand is XENPAK_ANY_SPECIFIC_FIELD, uiLength must be sastify this [offset - uiLength <= XENPAK_MAX_NVR_CUSTOMER_SIZE], and uiNVROffset = offset[0XENPAK_MAX_NVR_CUSTOMER_SIZE] + XENPAK_NVR_CUSTOMER_AREA.

For XENPAK_NVR_CONFIG_INFO: - read to some NVR fields: uiCommand is XENPAK_ANY_SPECIFIC_FIELD, the uiNVROffset could be varied from 0 to 511 and uiLength from 1 to 512 - read all NVR fields: uiCommand is XENPAK_ALL_FIELD, the uiNVROffset is default to 0 and uiLength to 512. */ unsigned short uiCommand; /* XENPAK_ANY_SPECIFIC_FIELD = 0 -- read or write to some specific fields; XENPAK_ALL_FIELD = 1 -- read or write to all fields. */ unsigned short uiLength; /* Non-volatile register adress and length total has to be less than 512. */ unsigned char ucData[512]; /* Non-volatile register data to be written */ unsigned char ucReserved[66]; /* Reserve field */ } XENPAKNVRConfig;

832 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

iType1 Description C Usage

XENPAK_PHY_CONFIG
Set Layer 2 protocol mode of operation. HTSetStructure(XENPAK_PHY_CONFIG, 0, 0, 0, (void*) pXENPAKPhyConfig, sizeof(XENPAKPhyConfig), iHub, iSlot, iPort); HTSetStructure $XENPAK_PHY_CONFIG 0 0 0 \ myXENPAKPhyConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XENPAKPhyConfig

This command is used to switch between WAN and LAN PHY for modules that are dual PHY capable. Its also used to read the media present for XENPAK CX4 (Fiber or Copper) transceiver. XENPAK_PHY_CONFIG/XENPAK_PHY_CONFIG_INFO commands configures/queries the layer 2 protocol mode of operation for XLW-3720A/3721A and XFP 3730A/3731A test modules. Note: * PHY_MODE_LAN * PHY_MODE_WAN 1 2

typedef struct tagXENPAKPhyConfig { unsigned long ulMode; /* PHY mode, possible values are PHY_MODE_LAN PHY_MODE_WAN */ /* Output, only for XENPAK_MODULE_10GBASE_CX4 module Media Present, possible values are FIBER_MODE COPPER_MODE */ unsigned char ucReserved[123]; } XENPAKPhyConfig; unsigned char ucActiveMedia;

SmartLibrary Command Reference: Volume 2 | 833

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

iType1 Description C Usage

XENPAK_PHY_CONFIG_INFO
Query the Layer 2 protocol mode of operation for the XLW-372xA and XFP-373xA modules. HTGetStructure(XENPAK_PHY_CONFIG, 0, 0, 0, (void*) pXENPAKPhyConfig, sizeof(XENPAKPhyConfig), iHub, iSlot, iPort); HTGetStructure $XENPAK_PHY_CONFIG 0 0 0 \ myXENPAKPhyConfig \ 0 \ $iHub $iSlot $iPort

Tcl Usage

Related Structure

XENPAKPhyConfig

This command is used to switch between WAN and LAN PHY for modules that are dual PHY capable. Its also used to read the media present for XENPAK CX4 (Fiber or Copper) transceiver. XENPAK_PHY_CONFIG/XENPAK_PHY_CONFIG_INFO commands configures/queries the layer 2 protocol mode of operation for XLW-3720A/3721A and XFP 3730A/3731A test modules. Note: * PHY_MODE_LAN * PHY_MODE_WAN 1 2

typedef struct tagXENPAKPhyConfig { unsigned long ulMode; /* PHY mode, possible values are PHY_MODE_LAN PHY_MODE_WAN */ /* Output, only for XENPAK_MODULE_10GBASE_CX4 module Media Present, possible values are FIBER_MODE COPPER_MODE */ unsigned char ucReserved[123]; } XENPAKPhyConfig; unsigned char ucActiveMedia;

834 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

iType1 Description Tcl Usage Related Structure

XENPAK_PROFILE_INFO
Get the current XENPAK profile. HTGetStructure $XENPAK_PROFILE_INFO 0 0 0 myXENPAKProfile 0 $iHub $iSlot $iPort

XENPAKProfile

This command is used to query the current XENPAK profile on the card.The XENPAK profile module structure is valid only when the 'module_detected' field is set. Define constant for field ucProtocolType of XENPAKProfile * XENPAK_10GBE 0x01 * XENPAK_10GFC 0x02 * XENPAK_WIS 0x04 * XENPAK_LSS 0x08 * XENPAK_SONET_SDH 0x10 Define constant for field ucStdComplianceCode of XENPAKProfile - Byte 0: 10GbE Code * XENPAK_10GBASE_SR 0x01 * XENPAK_10GBASE_LR 0x02 * XENPAK_10GBASE_ER 0x04 * XENPAK_10GBASE_LX4 0x08 * XENPAK_10GBASE_SW 0x10 * XENPAK_10GBASE_LW 0x20 * XENPAK_10GBASE_EW 0x40 * XENPAK_10GBASE_LW4 0x80 - Byte 1: Reserved - Byte 2: SONET/SDH * XENPAK_S_64_1 0x01 * XENPAK_S_64_2A 0x02 * XENPAK_S_64_2B 0x04 * XENPAK_S_64_3A 0x08 * XENPAK_S_64_3B 0x10 * XENPAK_S_64_5A 0x20 * XENPAK_S_64_5B 0x40 - Byte 3:SONET/SDH * XENPAK_I_64_1R 0x01 * XENPAK_I_64_1 0x02 * XENPAK_I_64_2R 0x04 * XENPAK_I_64_2 0x08 * XENPAK_I_64_3 0x10 * XENPAK_I_64_5 0x20

Continues >

SmartLibrary Command Reference: Volume 2 | 835

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

- Byte 4:SONET/SDH * XENPAK_L_64_1 0x01 * XENPAK_L_64_2A 0x02 * XENPAK_L_64_2B 0x04 * XENPAK_L_64_2C 0x08 * XENPAK_L_64_3 0x10 - Byte 5:SONET/SDH * XENPAK_V_64_2A 0x01 * XENPAK_V_64_2B 0x02 * XENPAK_V_64_3 0x04 Define constant for field ucModuleDetected of XENPAKProfileWhen a Xenpak is installed, ucModuleDetected field will report the following: * XENPAK_MODULE_10GBASE_SR 0x73 * XENPAK_MODULE_10GBASE_LR 0x63 * XENPAK_MODULE_10GBASE_ER 0x53 * XENPAK_MODULE_10GBASE_LX4 0x43 * XENPAK_MODULE_10GBASE_SW 0x33 * XENPAK_MODULE_10GBASE_LW 0x23 * XENPAK_MODULE_10GBASE_EW 0x13 * XENPAK_MODULE_10GBASE_CX4 0x03 When a Spirent CX4 is installed ucModuleDetected field will report: * CX4_MODULE_10GBASE 0x05 When the XAUI Extender or an unknown device is installed, ucModuleDetected field will report: * XAUI_MODULE_10GBASE 0x01 Byte 3: Addr 134, Lower Speed Links

Continues >

836 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

**********************************************************************************/ typedef struct tagXENPAKProfile { unsigned char ucModuleDetected; /* Announces the type of Xenpak PHY active, possible values are XENPAK_MODULE_10GBASE_SR XENPAK_MODULE_10GBASE_LR XENPAK_MODULE_10GBASE_ER XENPAK_MODULE_10GBASE_LX4 XENPAK_MODULE_10GBASE_SW XENPAK_MODULE_10GBASE_LW XENPAK_MODULE_10GBASE_EW XENPAK_MODULE_10GBASE_CX4 CX4_MODULE_10GBASE XAUI_MODULE_10GBASE */ unsigned char unsigned short unsigned char ucNVRVersion; uiNVRSize; ucTransceiverType; /* Non-volatile register version */ /* Non-volatile register size in bytes */ /* Transceiver type -XENPAK_UNSPECIFIED_TYPE= 0 -XENPAK_TYPE = 1*/ /* Optical Connector type -XENPAK_UNSPECIFIED_TYPE -XENPAK_OPTICAL_SC_TYPE -XENPAK_OPTICAL_LC_TYPE -XENPAK_OPTICAL_MT_RJ_TYPE -XENPAK_OPTICAL_MU_TYPE -XENPAK_OPTICAL_FC_PC_TYPE -XENPAK_OPTICAL_PIGTAIL_TYPE*/ /* Protocol type -XENPAK_10GBE -XENPAK_10GFC -XENPAK_WIS -XENPAK_LSS -XENPAK_SONET_SDH

unsigned char

ucConnectorType;

unsigned char

ucProtocolType;

*/

Continues >

SmartLibrary Command Reference: Volume 2 | 837

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

unsigned char ucStdComplianceCode[10];

unsigned short uiTransmissionRange; unsigned charucFiberType[2];

/* Standards Compliance Codes: - Byte 0: 10GbE Code + XENPAK_10GBASE_SR + XENPAK_10GBASE_LR + XENPAK_10GBASE_ER + XENPAK_10GBASE_LX4 + XENPAK_10GBASE_SW + XENPAK_10GBASE_LW4 + XENPAK_10GBASE_LW + XENPAK_10GBASE_EW - Byte 1: Reserved - Byte 2: SONET/SDH + XENPAK_S_64_1 + XENPAK_S_64_2A + XENPAK_S_64_2B + XENPAK_S_64_3A + XENPAK_S_64_3B + XENPAK_S_64_5A + XENPAK_S_64_5B - Byte 3:SONET/SDH + XENPAK_I_64_1R + XENPAK_I_64_1 + XENPAK_I_64_2R + XENPAK_I_64_2 + XENPAK_I_64_3 + XENPAK_I_64_5 - Byte 4:SONET/SDH + XENPAK_L_64_1 + XENPAK_L_64_2A + XENPAK_L_64_2B + XENPAK_L_64_2C + XENPAK_L_64_3 - Byte 5:SONET/SDH + XENPAK_V_64_2A + XENPAK_V_64_2B + XENPAK_V_64_3 Byte 6 - 9: Reserved */ /* Tranmission Range in meters */ /* Fiber Type : - Byte 0: Description Value + Unspecified 0 + M M, generic 1 + 50/125 only 2 Continues >

838 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

+ 62.5/125 only + POF + HPCF + SM, generic + NDSF only +.NZDSF only - Byte 1: Description + Unspecified + Large core only +.PM F only */ unsigned long

4 8 10 20 40 80 Value 0 1 2

unsigned long unsigned char unsigned char unsigned char unsigned char unsigned char unsigned char unsigned char unsigned char unsigned char } XENPAKProfile; #define #define #define #define #define #define #define #define #define #define

/* Package of company ID. An OUI,"company ID" is a 24 bit globally unique assigned number referenced by various standards. OUI is used in the familyof 802 LAN standards, e.g., Ethernet, Token Ring, etc.*/ ulTransceiverVendorOUI; /* Transceiver vendor compnay ID */ ucName[16]; /* Transceiver vendor name in ASCII */ ucPartNumber[16]; /* Part number provided by transceiver vendor */ ucRevision[2]; /* Revision level for part number */ ucSerialNumber[16]; /* Vendor serial number */ ucDateCodeYear[4]; /* Vendor manufacturing date code in ASCII*/ ucDateCodeMonth[2]; ucDateCodeDay[2]; ucDateCodeLotNumber[2];/* Manufacturing Lot */ ucReserved[96];

ulPackageOUI;

XENPAK_MODULE_10GBASE_SR XENPAK_MODULE_10GBASE_LR XENPAK_MODULE_10GBASE_ER XENPAK_MODULE_10GBASE_LX4 XENPAK_MODULE_10GBASE_SW XENPAK_MODULE_10GBASE_LW XENPAK_MODULE_10GBASE_EW XENPAK_MODULE_10GBASE_CX4 CX4_MODULE_10GBASE XAUI_MODULE_10GBASE

0x73 0x63 0x53 0x43 0x33 0x23 0x13 0x03 0x05 0x01

SmartLibrary Command Reference: Volume 2 | 839

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

iType1 Description C Usage

XFP_PROFILE_INFO
This command is used to query the current XFP profile on the card. The XFP profile module structure is valid only when the 'module_detected' field is set. HTGetStructure $XFP_PROFILE_INFO 0 0 0 \myXFPProfile \ 0 \$iHub $iSlot $iPort HTGetStructure $XFP_PROFILE_INFO 0 0 0 \myXFPProfile \ 0 \$iHub $iSlot $iPort

Tcl Usage

Related Structure

XFPProfile

XFPProfile Description: Defined constants for field ucModuleIdentifier of XFPProfile XFP_IDENTIFIER_UNKNOWN XFP_IDENTIFIER_GBIC XFP_IDENTIFIER_MODULE_SOLDERED XFP_IDENTIFIER_SFP XFP_IDENTIFIER_300_PIN_XBI XFP_IDENTIFIER_XENPAK XFP_IDENTIFIER_XF XFP_IDENTIFIER_XFF XFP_IDENTIFIER_XFP_E XFP_IDENTIFIER_XPAK XFP_IDENTIFIER_X2 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A

Continues >

840 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

Defined constants for field ucConnectorType of XFPProfile XFP_CONNECTOR_UNKNOWN XFP_CONNECTOR_SC XFP_CONNECTOR_FC_STYLE_1 XFP_CONNECTOR_FC_STYLE_2 XFP_CONNECTOR_BNC_TNC XFP_CONNECTOR_FC_COAXIAL_HEADERS XFP_CONNECTOR_FIBERJACK XFP_CONNECTOR_LC XFP_CONNECTOR_MT_RJ XFP_CONNECTOR_MU XFP_CONNECTOR_SG XFP_CONNECTOR_OPTICAL_PIGTAIL XFP_CONNECTOR_HSSDC_II XFP_CONNECTOR_COPPER _PIGTAIL 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x20 0x21

Defined constants for field ucTransceiverType of XFPProfile Byte 0: Addr 131, 10 Gigabit Ethernet Compliance 0x02 0x04 0x08 0x20 0x40 0x80

XFP_TRANSCEIVER_10GBASE_EW XFP_TRANSCEIVER_10GBASE_LW XFP_TRANSCEIVER_10GBASE_SW XFP_TRANSCEIVER_10GBASE_ER XFP_TRANSCEIVER_10GBASE_LR XFP_TRANSCEIVER_10GBASE_SR

Continues >

SmartLibrary Command Reference: Volume 2 | 841

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

Byte 0:

Addr 131, 10 Gigabit Ethernet Compliance 0x02 0x04 0x08 0x20 0x40 0x80

XFP_TRANSCEIVER_10GBASE_EW XFP_TRANSCEIVER_10GBASE_LW XFP_TRANSCEIVER_10GBASE_SW XFP_TRANSCEIVER_10GBASE_ER XFP_TRANSCEIVER_10GBASE_LR XFP_TRANSCEIVER_10GBASE_SR Byte 1: Addr 132, 10 Gigabit Fibre Channel Compliance

XFP_TRANSCEIVER_1NT_REACH_1300_NM_FP XFP_TRANSCEIVER_EXT_REACH_1550_NM_FP XFP_TRANSCEIVER_1200_SM_LL_L XFP_TRANSCEIVER_1200_MX_SN_L Byte 2: Addr 133, 10 Gigabit Copper Links -Reserved Byte 3: Addr 134, Lower Speed Links

0x10 0x20 0x40 0x80

XFP_TRANSCEIVER_OC_48_LR XFP_TRANSCEIVER_OC_48_IR XFP_TRANSCEIVER_OC_48_SR XFP_TRANSCEIVER_2xFC_SMF XFP_TRANSCEIVER_2xFC_MMF XFP_TRANSCEIVER_1000BASE_LX_1xFC SMF Byte 4: Addr 135, SONET/SDH codes - Interconnect

0x02 0x04 0x08 0x10 0x20 0x40

XFP_TRANSCEIVER_I_64_5 XFP_TRANSCEIVER_I_64_3 XFP_TRANSCEIVER_I_64_2 XFP_TRANSCEIVER_I_64_2r XFP_TRANSCEIVER_I_64_1 XFP_TRANSCEIVER_I_64_1r Byte 5: Addr 136, SONET/SDH Codes - Short Haul

0x04 0x08 0x10 0x20 0x40 0x80

XFP_TRANSCEIVER_S_64_5b XFP_TRANSCEIVER_S_64_5a XFP_TRANSCEIVER_S_64_3b XFP_TRANSCEIVER_S_64_3a XFP_TRANSCEIVER_S_64_2b XFP_TRANSCEIVER_S_64_2a XFP_TRANSCEIVER_S_64_1

0x02 0x04 0x08 0x10 0x20 0x40 0x80

Continues >

842 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

Byte 6: Addr 137 SONET/SDH Codes - Long Haul XFP_TRANSCEIVER_L_64_3 0x08 XFP_TRANSCEIVER_L_64_2c 0x10 XFP_TRANSCEIVERL_64_2b 0x20 XFP_TRANSCEIVER_64_2a 0x40 XFP_TRANSCEIVER_L_64_1 0x80 Byte 7: Addr 138, SONET/SDH Codes - Very Long Haul XFP_TRANSCEIVER_V_64_3 0x20 XFP_TRANSCEIVER_V_64_2b 0x40 XFP_TRANSCEIVER_V_64_2a 0x80 Defined constants for field ucSerialEncodingAlgorithm of XFPProfile XFP_ENCODING_64B_66B 0x80 XFP_ENCODING_8B10B 0x40 XFP_ENCODING_SONET_SCRAMBLED 0x20 XFP_ENCODING_NRZ 0x10 XFP_ENCODING_RZ 0x08 Defined constants for field ucCDRSupport of XFPProfile XFP_CDR_LOOPBACK_MODE_SUPPORTED 0x01 XFP_CDR_LINESIDE_LOOPBACK_MODE_SUPPORTED 0x02 XFP_CDR_SUPPORT_FOR_11_1_GBS 0x08 XFP_CDR_SUPPORT_FOR_10_7_GBS 0x10 XFP_CDR_SUPPORT_FOR_10_5_GBS 0x20 XFP_CDR_SUPPORT_FOR_10_3_GBS 0x40 XFP_CDR_SUPPORT_FOR_9_95_GBS 0x80 Defined constants for field ucEnhancedOptions of XFPProfile XFP_OPTIONAL_SMU_SUPPORT_MODE 0x01 XFP_OPTIONAL_WAVELENGTH_TUNABILITY 0x02 XFP_OPTIONAL_ACTIVE_FEC_CONTROLS 0x04 XFP_OPTIONAL_VPS_BYPASS_REG_MODE 0x08 XFP_OPTIONAL_VPS_LV_REG_MODE 0x10 XFP_OPTIONAL_SOFT_P_DOWN 0x20 XFP_OPTIONAL_TX_DISABLE 0x40 XFP_OPTIONAL_VPS 0x80 Defined constants for field ucAuxMonitoring XFP_AUX_MONITORING_NOT_IMPLEMENTED XFP_AUX_MONITORING_APD_BIAS_VOLTAGE XFP_AUX_MONITORING_TEC_CURRENT XFP_AUX_MONITORING_LASER_TEMPERATURE XFP_AUX_MONITORING_LASER_WAVELENGTH XFP_AUX_MONITORING_PLUS_5V_SUPPLY_VOLTAGE XFP_AUX_MONITORING_PLUS_3_3V_SUPPLY_VOLTAGE

0x00 0x01 0x03 0x04 0x05 0x06 0x07 Continues >

SmartLibrary Command Reference: Volume 2 | 843

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

XFP_AUX_MONITORING_PLUS_1_8V_SUPPLY_VOLTAGE 0x08 XFP_AUX_MONITORING_MINUS_5_2V_SUPPLY_VOLTAGE 0x09 XFP_AUX_MONITORING_PLUS_5V_SUPPLY_CURRENT 0x0A XFP_AUX_MONITORING_PLUS_3_3V_SUPPLY_CURRENT 0x0D XFP_AUX_MONITORING_PLUS_1_8V_SUPPLY_CURRENT 0x0E XFP_AUX_MONITORING_MINUS_5_2V_SUPPLY_CURRENT 0x0F */ typedef struct tagXFPProfile { unsigned char ucModuleDetected;/* 1 - XFP module detected, 0 no XFP module detected */ unsigned char ucModuleIdentifier; /* Type of serial transceiver

XFP_IDENTIFIER_UNKNOWN XFP_IDENTIFIER_GBIC XFP_IDENTIFIER_MODULE_SOLDERED XFP_IDENTIFIER_SFP XFP_IDENTIFIER_300_PIN_XBI XFP_IDENTIFIER_XENPAK XFP_IDENTIFIER_XFP XFP_IDENTIFIER_XFF XFP_IDENTIFIER_XFP_E XFP_IDENTIFIER_XPAK XFP_IDENTIFIER_X2 */ unsigned char ucExtendedModuleID;/* Extended identifier of type of serial transceiver - bimap Bit 0-3: Reserved Bit 4: 0: TX Ref Clock Input Required 1: TX Ref Clock Input Not Required Bit 5: 0: Module with CDR function 1: Non-CDR version of XFP Bit 6-7: 00: Power Level 1 Module (1.5 W max. power dissipation. ) 01: Power Level 2 Module (2.5W Max) 10: Power Level 3 Module (3.5W max. power dissipation.) 11: Power Level 4 Module (>3.5W max. power dissipation.) */ unsigned char ucConnectorType; /* Code for connector type XFP_CONNECTOR_UNKNOWN XFP_CONNECTOR_SC 1 XFP_CONNECTOR_FC_STYLE_1 XFP_CONNECTOR_FC_STYLE_2 XFP_CONNECTOR_BNC_TNC Continues >

844 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

XFP_CONNECTOR_FC_COAXIAL_HEADERS XFP_CONNECTOR _FIBERJACK XFP_CONNECTOR _LC XFP_CONNECTOR _MT_RJ XFP_CONNECTOR _MU XFP_CONNECTOR _SG XFP_CONNECTOR_OPTICAL_PIGTAIL XFP_CONNECTOR _HSSDC_II XFP_CONNECTOR_COPPER _PIGTAIL 0x000C - 0x01FH : Reserved 0x0080 - 0x0FFH : Vendor Specific */ unsigned charucTransceiverType[8]; compatibility Byte 0:

/* Code for electronic compatibility or optical

Addr 131, 10 Gigabit Ethernet Compliance XFP_TRANSCEIVER_10GBASE_EW XFP_TRANSCEIVER_10GBASE_LW XFP_TRANSCEIVER_10GBASE_SW XFP_TRANSCEIVER_10GBASE_ER XFP_TRANSCEIVER_10GBASE_LR XFP_TRANSCEIVER_10GBASE_SR Addr 132, 10 Gigabit Fibre Channel Compliance XFP_TRANSCEIVER_1NT_REACH_1300_NM_FP XFP_TRANSCEIVER_EXT_REACH_1550_NM_FP XFP_TRANSCEIVER_1200_SM_LL_L XFP_TRANSCEIVER_1200_MX_SN_L Addr 133, 10 Gigabit Copper Links -Reserved Addr 134, Lower Speed Links XFP_TRANSCEIVER_OC_48_LR XFP_TRANSCEIVER_OC_48_IR XFP_TRANSCEIVER_OC_48_SR XFP_TRANSCEIVER_2xFC_SMF XFP_TRANSCEIVER_2xFC_MMF XFP_TRANSCEIVER_1000BASE_LX_1xFC SMF Addr 135, SONET/SDH codes - Interconnect XFP_TRANSCEIVER_I_64_5 XFP_TRANSCEIVER_I_64_3 XFP_TRANSCEIVER_I_64_2 XFP_TRANSCEIVER_I_64_2r XFP_TRANSCEIVER_I_64_1 XFP_TRANSCEIVER_I_64_1r Continues >

Byte 1:

Byte 2: Byte 3:

Byte 4:

SmartLibrary Command Reference: Volume 2 | 845

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

Byte 5:

Addr 136, SONET/SDH Codes - Short Haul XFP_TRANSCEIVER_S_64_5b XFP_TRANSCEIVER_S_64_5a XFP_TRANSCEIVER_S_64_3b XFP_TRANSCEIVER_S_64_3a XFP_TRANSCEIVER_S_64_2b XFP_TRANSCEIVER_S_64_2a XFP_TRANSCEIVER_S_64_1 Addr 137 SONET/SDH Codes - Long Haul XFP_TRANSCEIVER_L_64_3 XFP_TRANSCEIVER_L_64_2c XFP_TRANSCEIVERL_64_2b XFP_TRANSCEIVER_64_2a XFP_TRANSCEIVER_L_64_1

Byte 6:

Byte 7:

Addr 138, SONET/SDH Codes - Very Long Haul XFP_TRANSCEIVER_V_64_3 XFP_TRANSCEIVER_V_64_2b XFP_TRANSCEIVER_V_64_2a */ unsigned charucSerialEncodingAlgorithm; /* Code for serial encoding algorithm XFP_ENCODING_64B_66B XFP_ENCODING_8B10B XFP_ENCODING_SONET_SCRAMBLED XFP_ENCODING_NRZ XFP_ENCODING_RZ */ unsigned char ucMinBitRate; unsigned char ucMaxBitRate; /* Minimum bit rate, units of 100 Mbits/s /* Maximum bit rate, units of 100 Mbits/s */ */

unsigned char ucLinkLength[5];

/* Byte 0 - Link length supported for SMF fiber in km Byte 1 - Link length supported for EBW 50/125 m fiber, units of 2 m Byte 2 - Link length supported for 50/125 m fiber units of 1 m Byte 3 - Link length supported for 62.5/125 m fiber, units of 1 m Byte 4 - Link length supported for copper, units of 1m */ unsigned char ucDeviceTechnology;/* Device Technology Bit 0: 0: Transmitter not Tunable 1: Transmitter Tunable Continues >

846 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

Bit 1: 0: PIN detector 1: APD detector Bit 2: 0: Uncooled transmitter device 1: Cooled transmitter Bit 4 - 7: 0000b: 850 nm VCSEL 0001b: 1310 nm VCSEL 0010b: 1550 nm VCSEL 0011b: 1310 nm FP 0100b: 1310 nm DFB 0101b: 1550 nm DFB 0110b: 1310 nm EML 0011b: 1550 nm EML 1000b: Copper or others */ unsigned char ucVendorName[16]; /* XFP Vendor Name */

unsigned char ucCDRSupport;/* CDR Rate Support XFP_CDR_LOOPBACK_MODE_SUPPORTED XFP_CDR_LINESIDE_LOOPBACK_MODE_SUPPORTED XFP_CDR_SUPPORT_FOR_11_1_GBS XFP_CDR_SUPPORT_FOR_10_7_GBS XFP_CDR_SUPPORT_FOR_10_5_GBS XFP_CDR_SUPPORT_FOR_10_3_GBS XFP_CDR_SUPPORT_FOR_9_95_GBS */ unsigned char ucVendorOUI[3]; /* XFP vendor IEEE company ID */ unsigned char ucVendorPartNumber[16];/* Part number provided by XFP vendor */ unsigned char ucVendorRevision[2]; vendor */ unsigned char ucLaserWavelength[2]; /* Revision level for part number provided by

/* Nominal laser wavelength (Wavelength = value / 20 in nm) *

/ unsigned char ucLaserWavelengthTolerance[2];/* Guaranteed range of laser wave-length (+/- value) from Nominal wavelength. (Wavelength Tol. = value/200 in nm)*/ unsigned char ucMaxCaseTemp;/* Maximum Case Temperature in Degrees C */ Continues >

SmartLibrary Command Reference: Volume 2 | 847

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

unsigned char ucCCBase;/* Check code for Base ID Fields (addresses 120-190) */ /* Extended ID fields */ unsigned char ucPowerSupplyFields[4]; Byte 0 , Bits 7- 0 (Address 192) Maximum Power Dissipation, Max power is 8 bit value * 20 mW. /*

Byte 1 , Bits 7- 0 (Address 193) Maximum Total Power Dissipation in Power Down Mode, Max Power is 8 bit value * 10 mW. Byte 2 , Bits 7- 4 (Address 194) Maximum current required by +5V Supply. Max current is 4 bit value * 50 mA. [500 mA max]. Byte 2 , Bits 3- 0 (Address 194) Maximum current required by +3.3V Supply. Max current is 4 bit value * 100 mA. Byte 3 , Bits 7- 4 (Address 195) Maximum current required by +1.8V Supply. Max current is 4 bit value * 100 mA. Byte 3 , Bits 3- 0 (Address 195) Maximum current required by -5.2V Supply. Max current is 4 bit value * 50 mA */ unsigned char ucVendorSerialNumber[16]; /* Serial number provided by vendor */ unsigned char ucVendorDateCode[8];/* Vendor's manufacturing date code Byte 0 and 1 (Data address 212 and 213) ASCII code, two low order digits of year. (00 = 2000). Byte 2 and 3 (Data address 214 and 215) ASCII code, digits of month (01 = Jan. through 12 = Dec.) Byte 4 and 5 (Data address 216 and 217) ASCII code, day of month (01 - 31) Byte 6 and 7 (Data address 2128 and 219)ASCII code, vendor specific lot code, may be blank */ Continues >

848 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

unsigned char ucDiagMonitoringType; /* Indicates which type of diagnostic monitoring is implemented (if any)in the transceiver, Bit 3: Received power measurement type 0 = OMA, 1 = Average Power Bit :4 Module Respond to FEC BER 0= No BER Support, 1=BER Support */ unsigned char ucEnhancedOptions;/* Indicates which optional enhanced features are implemented (if any)in the transceiver */ XFP_OPTIONAL_SMU_SUPPORT_MODE XFP_OPTIONAL_WAVELENGTH_TUNABILITY XFP_OPTIONAL_ACTIVE_FEC_CONTROLS XFP_OPTIONAL_VPS_BYPASS_REG_MODE XFP_OPTIONAL_VPS_LV_REG_MODE XFP_OPTIONAL_SOFT_P_DOWN XFP_OPTIONAL_TX_DISABLE XFP_OPTIONAL_VPS */ unsigned char ucAuxMonitoring; /* Defines quantities reported by Aux. A/D channels FP_AUX_MONITORING_NOT_IMPLEMENTED XFP_AUX_MONITORING_APD_BIAS_VOLTAGE XFP_AUX_MONITORING_TEC_CURRENT XFP_AUX_MONITORING_LASER_TEMPERATURE XFP_AUX_MONITORING_LASER_WAVELENGTH XFP_AUX_MONITORING_PLUS_5V_SUPPLY_VOLTAGE XFP_AUX_MONITORING_PLUS_3_3V_SUPPLY_VOLTAGE XFP_AUX_MONITORING_PLUS_1_8V_SUPPLY_VOLTAGE XFP_AUX_MONITORING_MINUS_5_2V_SUPPLY_VOLTAGE XFP_AUX_MONITORING_PLUS_5V_SUPPLY_CURRENT XFP_AUX_MONITORING_PLUS_3_3V_SUPPLY_CURRENT XFP_AUX_MONITORING_PLUS_1_8V_SUPPLY_CURRENT XFP_AUX_MONITORING_MINUS_5_2V_SUPPLY_CURRENT */ unsigned charucCCExt;/* Check code for the Extended ID Fields */ unsigned charucReserved[256]; }XFPProfile; /*Reserved */ Continues >

SmartLibrary Command Reference: Volume 2 | 849

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

/* Defined constants for ucModuleIdentifier */ #define XFP_IDENTIFIER_UNKNOWN #define XFP_IDENTIFIER_GBIC #define XFP_IDENTIFIER_MODULE_SOLDERED #define XFP_IDENTIFIER_SFP #define XFP_IDENTIFIER_300_PIN_XBI #define XFP_IDENTIFIER_XENPAK #define XFP_IDENTIFIER_XFP #define XFP_IDENTIFIER_XFF #define XFP_IDENTIFIER_XFP_E #define XFP_IDENTIFIER_XPAK #define XFP_IDENTIFIER_X2 /* Define constants for ucConnectorType */ #define XFP_CONNECTOR_UNKNOWN #define XFP_CONNECTOR_SC #define XFP_CONNECTOR_FC_STYLE_1 #define XFP_CONNECTOR_FC_STYLE_2 #define XFP_CONNECTOR_BNC_TNC #define FP_CONNECTOR_FC_COAXIAL_HEADERS #define XFP_CONNECTOR_FIBERJACK #define XFP_CONNECTOR_LC #define XFP_CONNECTOR_MT_RJ #define XFP_CONNECTOR_MU #define XFP_CONNECTOR_SG #define XFP_CONNECTOR_OPTICAL_PIGTAIL #define XFP_CONNECTOR_HSSDC_II #define XFP_CONNECTOR_COPPER _PIGTAIL

0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A

0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x20 0x21

/* Define constants for field ucTransceiverType */ //Byte 0: Addr 131, 10 Gigabit Ethernet Compliance #define XFP_TRANSCEIVER_10GBASE_EW 0x02 #define XFP_TRANSCEIVER_10GBASE_LW 0x04 #define XFP_TRANSCEIVER_10GBASE_SW 0x08 #define XFP_TRANSCEIVER_10GBASE_ER 0x20 #define XFP_TRANSCEIVER_10GBASE_LR 0x40 #define XFP_TRANSCEIVER_10GBASE_SR 0x80 //Byte 1: Addr 132, 10 Gigabit Fibre Channel Compliance #define XFP_TRANSCEIVER_1NT_REACH_1300_NM_FP 0x10 #define XFP_TRANSCEIVER_EXT_REACH_1550_NM_FP 0x20 #define XFP_TRANSCEIVER_1200_SM_LL_L 0x40 #define XFP_TRANSCEIVER_1200_MX_SN_L 0x80 Continues >

850 |

SmartLibrary Command Reference: Volume 2

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

//Byte 3: Addr 134, Lower Speed Links #define XFP_TRANSCEIVER_OC_48_LR #define XFP_TRANSCEIVER_OC_48_IR #define XFP_TRANSCEIVER_OC_48_SR #define XFP_TRANSCEIVER_2xFC_SMF #define XFP_TRANSCEIVER_2xFC_MMF #define XFP_TRANSCEIVER_1000BASE_LX_1xFC SMF //Byte #define #define #define #define #define #define

0x02 0x04 0x08 0x10 0x20 0x40

4: Addr 135, SONET/SDH codes - Interconnect XFP_TRANSCEIVER_I_64_5 0x04 XFP_TRANSCEIVER_I_64_3 0x08 XFP_TRANSCEIVER_I_64_2 0x10 XFP_TRANSCEIVER_I_64_2r 0x20 XFP_TRANSCEIVER_I_64_1 0x40 XFP_TRANSCEIVER_I_64_1r 0x80

//Byte 5: Addr 136, SONET/SDH Codes - Short Haul #define XFP_TRANSCEIVER_S_64_5b #define XFP_TRANSCEIVER_S_64_5a #define XFP_TRANSCEIVER_S_64_3b #define XFP_TRANSCEIVER_S_64_3a #define XFP_TRANSCEIVER_S_64_2b #define XFP_TRANSCEIVER_S_64_2a #define XFP_TRANSCEIVER_S_64_1 //Byte 6: Addr 137 SONET/SDH Codes - Long Haul #define XFP_TRANSCEIVER_L_64_3 #define XFP_TRANSCEIVER_L_64_2c #define XFP_TRANSCEIVERL_64_2b #define XFP_TRANSCEIVER_64_2a #define XFP_TRANSCEIVER_L_64_1

0x02 0x04 0x08 0x10 0x20 0x40 0x80

0x08 0x10 0x20 0x40 0x80

//Byte 7: Addr 138, SONET/SDH Codes - Very Long Haul #define XFP_TRANSCEIVER_V_64_3 0x20 #define XFP_TRANSCEIVER_V_64_2b 0x40 #define XFP_TRANSCEIVER_V_64_2a 0x80 /* Defined constants for field ucSerialEncodingAlgorithm */ #define XFP_ENCODING_64B_66B 0x80 #define XFP_ENCODING_8B10B 0x40 #define XFP_ENCODING_SONET_SCRAMBLED 0x20 #define XFP_ENCODING_NRZ 0x10 #define XFP_ENCODING_RZ 0x08 Continues >

SmartLibrary Command Reference: Volume 2 | 851

Chapter 13: XAUI, XENPAK , and XFP XENPAK and XFP iType1 Commands and Structures

/* Defined constants for field ucCDRSupport */ #define XFP_CDR_LOOPBACK_MODE_SUPPORTED0x01 #define XFP_CDR_LINESIDE_LOOPBACK_MODE_SUPPORTED #define XFP_CDR_SUPPORT_FOR_11_1_GBS #define XFP_CDR_SUPPORT_FOR_10_7_GBS #define XFP_CDR_SUPPORT_FOR_10_5_GBS #define XFP_CDR_SUPPORT_FOR_10_3_GBS #define XFP_CDR_SUPPORT_FOR_9_95_GBS

0x02 0x08 0x10 0x20 0x40 0x80

/* Defined constants for field ucEnhancedOptions of XFPProfile */ #define XFP_OPTIONAL_SMU_SUPPORT_MODE 0x01 #define XFP_OPTIONAL_WAVELENGTH_TUNABILITY 0x02 #define XFP_OPTIONAL_ACTIVE_FEC_CONTROLS 0x04 #define XFP_OPTIONAL_VPS_BYPASS_REG_MODE 0x08 #define XFP_OPTIONAL_VPS_LV_REG_MODE 0x10 #define XFP_OPTIONAL_SOFT_P_DOWN 0x20 #define XFP_OPTIONAL_TX_DISABLE 0x40 #define XFP_OPTIONAL_VPS 0x80 /* Defined constants for field ucAuxMonitoring of XFPProfile */ #define XFP_AUX_MONITORING_NOT_IMPLEMENTED 0x00 #define XFP_AUX_MONITORING_APD_BIAS_VOLTAGE 0x01 #define XFP_AUX_MONITORING_TEC_CURRENT 0x03 #define XFP_AUX_MONITORING_LASER_TEMPERATURE 0x04 #define XFP_AUX_MONITORING_LASER_WAVELENGTH 0x05 #define XFP_AUX_MONITORING_PLUS_5V_SUPPLY_VOLTAGE 0x06 #define XFP_AUX_MONITORING_PLUS_3_3V_SUPPLY_VOLTAGE 0x07 #define XFP_AUX_MONITORING_PLUS_1_8V_SUPPLY_VOLTAGE 0x08 #define XFP_AUX_MONITORING_MINUS_5_2V_SUPPLY_VOLTAGE 0x09 #define XFP_AUX_MONITORING_PLUS_5V_SUPPLY_CURRENT 0x0A #define XFP_AUX_MONITORING_PLUS_3_3V_SUPPLY_CURRENT 0x0D #define XFP_AUX_MONITORING_PLUS_1_8V_SUPPLY_CURRENT 0x0E #define XFP_AUX_MONITORING_MINUS_5_2V_SUPPLY_CURRENT 0x0F

852 |

SmartLibrary Command Reference: Volume 2

Appendix A

Error Codes
When a function is not successful, an error code is returned instead of data. Error code values are always less than zero. They may be signed integers or signed long integers. Error Value
1

Definition
UNSPECIFIED_ERROR

Description
An error condition was encountered but could not be identified. This will occur if the system experienced an error that does not fit into any of the above categories. An attempt to use a Programming Library function was made without an active link to the SmartBits. An attempt to unlink the SmartBits from the serial port failed. This could occur if the SmartBits is already unlinked from the port before the ETUnLink command is called. The attached SmartBits was put into a mode of operation where the attempted call to the library function was not applicable. For instance, you cannot access packet data unless the capture mode has been enabled. An incorrect or invalid range was specified for a library function parameter. This may include ranges within structures whose pointers are passed as a parameter to the function. An attempt was made to access information from an indexed packet not currently in the capture buffer of the attached SmartBits. No errors were detected on the serial port, but the data returned from it doesn't appear to be correct. This indicates a serial port with interference. Try reducing the baud rate by modifying the ETSetBaud() parameter.

2 3

PORT_NOT_LINKED UNLINK_FAILED

INCORRECT_MODE

PARAMETER_RANGE

PACKET_NOT_AVAILABLE

SERIAL_PORT_DATA

SmartLibrary Command Reference: Volume 2 | 853

Appendix A: Error Codes

Error Value
8

Definition
ET1000_OUT_OF_SYNC

Description
The attached SmartBits is operating in a mode different from what was expected. Perform an ETUnLink command followed by Link. An attempt was made to locate a packet within the SmartBits's capture buffer, but the packet contents could not be found and/or verified. The user aborted a function before it could run to completion. An attempt to execute a command that requires a card was unsuccessful because the library failed to properly initialize the board. The library will always try to initialize the board if it hasn't been done so already, but for some reason, the initialization failed. This could indicate a failed card. An attempt to execute a command that requires a card was unsuccessful because the addressed port had no board installed in it. An attempt to execute a command that requires a card was unsuccessful because the addressed port contained a Passive Hub board. An attempt to execute a command that requires a card was unsuccessful because the addressed port contained a Passive Hub board. Not currently implemented. The Programming Library supports one connection at a time to a SmartBits. An ETLink command was issued when an active link already exists. A request was made to perform an operation on a Hub/ Slot/Port that does not exist in the current configuration. A request was made to create or perform an operation on a group with a Hub/Slot/Port that does not exist in the current configuration. An attempt was made to call a Programming Library function while BackgroundProcessing was enabled, and the Programming Library was already performing a function.

PACKET_NOT_FOUND

10 11

FUNCTION_ABORT ACTIVE_HUB_NOT_INITIALIZED

12

ACTIVE_HUB_NOT_PRESENT

13

WRONG_HUB_CARD_TYPE

14

MEMORY_ALLOCATION_ERROR

15 16

UNSUPPORTED_INTERLEAVE PORT_ALREADY_LINKED

17

HUB_SLOT_PORT_UNAVAILBLE

18

GROUP_HUB_SLOT_PORT_ERROR

19

REENTRANT_ERROR

854 |

SmartLibrary Command Reference: Volume 2

Appendix A: Error Codes

Error Value
20 21 22 23 24 25 26 27 28 29 30

Definition
DEVICE_NOT_FOUND_ERROR PORT_RELINK_REQUIRED DEVICE_NOT_READY GROUP_NOT_HOMOGENEOUS INVALID_GROUP_COMMAND ERROR_SMARTCARD_INIT_FAILED SOCKET_FAILED SOCKET_TIMEOUT COMMAND_RESPONSE_ERROR CRC_ERROR INVALID_LINK_PORT_TYPE

Description
An attempt was made to address an attached device that could not be found [e.g. an MII transceiver]. The connection is down, but no disconnect action was taken by either side. Current use: Token Ring is down. Not currently implemented. (Used only by undocumented commands). Not currently implemented. (Used only by undocumented commands). Unable to initialize card. Error in the socket connection for an Ethernet Link (PC to SmartBits). Timeout on the socket connection for an Ethernet Link (PC to SmartBits). Invalid command response received from SmartBits. CRC error in the data transfer. An attempt was made to link a PC to a SmartBits chassis over a connection that is recognized as neither a normal Serial Comm Port nor a proper TCP/IP Socket Link. (This error message should not occur.) User attempted to perform a GPS sync action when the SmartBits is not set for GPS. Could indicate that GPS is not ready or that GPS is connected to Slave instead of Master. The SmartBits chassis is reporting ar error. It has rejected the command. A module is reporting an error and has rejected the command. Possible causes include: Invalid parameter values or a command that is not appropriate for the cards current state. An attempt was made to retrieve data from a card when no data of the intended type was available. An example would be when you attempt to retrieve histogram results from a Layer3 card when no histogram information has been accumulated yet.

31

INVALID_SYNC_CONFIGURATION

32 33

HIGH_DENSITY_CONTROLLER_ERROR HIGH_DENSITY_CARD_ERROR

34

DATA_NOT_AVAILABLE

SmartLibrary Command Reference: Volume 2 | 855

Appendix A: Error Codes

Error Value
35

Definition
UNSUPPORTED_PLATFORM

Description
The function is not available on the current platform. Currently this is used for HTDefaultStructure and related functions that are not available on 16-bit Windows platforms. An error occurred in accessing a file. Currently this will occur when HTDefaultStructure or a related function is called and the defaults file is not found. The attempted action conflicted with another user of the same SmartBits. This will occur when a GPS sync start or stop is attempted shortly after another user also attempts a GPS sync action. The size of the data structure being used with the Message Function call does not match the expected size of the corresponding library data structure for this Message Function. The specified rate exceeds the ports available bandwidth. This error can occur when using NSCalculateGap. The current chassis is not a multi-user chassis. An error response was received for a non-blocking call. Call NSReportError or NSReportFirstError to get more detailed information about the error. No GPS unit is connected to the SmartBits chassis. The connected GPS unit is not ready. The serial port timed out while waiting for a response from the SmartBits. This usually indicates a problem with the physical serial link. This error will occur when a given parameter is not of the expected type, for example if a non-numeric argument is given when an integer is expected. This error often occurs when a "$" is missing in front of a variable name.

36

FILE_IO_ERROR

37

MULTI_USER_CONFLICT

38

INVALID_STRUCT_SIZE

40

BANDWIDTH_EXCEEDED_ERROR

41 42

NOT_MULTI_USER_CHASSIS NON_BLOCKING_RESPONSE_ERROR

43 44 98

GPS_NOT_CONNECTED GPS_NOT_READY SERIAL_PORT_TIMEOUT

501

NSTCL_PARAMETER_TYPE

856 |

SmartLibrary Command Reference: Volume 2

Appendix A: Error Codes

Error Value
502

Definition
NSTCL_INVALID_MSG_FUNC

Description
An attempt to unlink the SmartBits from the serial port failed. The Tcl interface is unable to process a message function because it doesnt recognize the given iType parameters as matching the accompanying data structure for the card at the specified location. An invalid parameter was given, especially regarding the Tcl interface. An improper structure type was used with a message function in the Tcl interface. An invalid number of structures have been passed down to the library by the user from the TCL interface. This means that there is not sufficient space to fit the data returned from the card in the user structure. The size of the structure that the user has passed to the library from the TCL interface is invalid. This means that there is not sufficient space to fit the data returned from the card into the user structure. The command is not supported by the card. The command requires a newer version of firmware than is currently installed in the card. The Message Function iType1 command passed to the Original Function (HTSetStructure, HTGetStructure or HTSetCommand) is invalid. The card has not negotiated a link with its link partner. MII extended capability not supported. Link partner incapable of autonegotiation. Invalid MII address. Negotiation settings do not match intended.

503 504 505

NSTCL_PARAMETER_RANGE NSTCL_STRUCT_NOT_DEFINED NSTCL_INVALID_STRUCT_COUNT

506

NSTCL_INVALID_STRUCT_SIZE

1001 1002 1003

UNSUPPORTED_COMMAND UPDATED_FIRMWARE_NEEDED INVALID_TYPE1

1100 1101 1102 1103 1104

AN_LINK_NOT_NEGOTIATED AN_NO_EXTENDED_CAPABILITY AN_LINK_PARTNER_INCAPABLE AN_INVALID_MII_ADDRESS AN_SETTINGS_NOT_VERIFIED

SmartLibrary Command Reference: Volume 2 | 857

858 |

SmartLibrary Command Reference: Volume 2

Appendix B

Message Function Card Compatibility Information


This appendix provides detailed information on card support for selected fields in the structures of several iType1 commands. It contains the following sections:

L3_DEFINE_MULTI iType1 Commands, Table B-2 through Table B-19. The L3_DEFINE_MULTI iType1 commands include some fields that can be incremented and some that cannot be incremented. The tables list the fields and show which can be incremented for different card types. ulField in L3_MOD_STREAMS_ARRAY (Layer3ModifyStreamArray). Different values of ulField in the Layer3ModifyStreamArray structure are supported by different TeraMetrics-based LAN, POS, and ATM modules. Table B-20 on page 887 lists the constants for ulField and shows which cards support them. Card support for the different options for capture events, mode, and length when using NS_CAPTURE_SETUP (NSCaptureSetup). See Table B-21 on page 890 through Table B-23 on page 892. Card support for the number of latency ranges (buckets, either eight or 16) that are monitored and reported in histogram tests that provide latency results. See Card Support for Latency Buckets on page 893. Card support for the structure used with NS_MULTI_COUNTER_INFO. See Card Support for the NSMultiCounterInfo Structure on page 895.

SmartLibrary Command Reference: Volume 2 | 859

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Incrementing Fields in L3_DEFINE_MULTI Commands


Table B-1 is a summary of the tables in this section.
Table B-1. Reference List of Tables on Incrementing Fields Table Table B-2 on page 861 Table B-3 on page 862 Table B-4 on page 863 Table B-4 on page 863 Table B-5 on page 865 Table B-6 on page 867 Table B-7 on page 868 Table B-8 on page 869 Table B-9 on page 871 Table B-10 on page 872 Table B-11 on page 873 Table B-12 on page 874 Table B-13 on page 875 Table B-14 on page 877 Table B-15 on page 879 Table B-16 on page 880 Table B-17 on page 881 Table B-18 on page 883 Table B-19 on page 884 iType1 Command
L3_DEFINE_MULTI_ICMP_STREAM L3_DEFINE_MULTI_ICMP_STREAM_VLAN L3_DEFINE_MULTI_ICMP_IPV6_STREAM L3_DEFINE_MULTI_ICMP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_IP_STREAM L3_DEFINE_MULTI_IP_STREAM_VLAN L3_DEFINE_MULTI_IPV6_STREAM L3_DEFINE_MULTI_IPV6_STREAM_VLAN L3_DEFINE_MULTI_IPX_STREAM L3_DEFINE_MULTI_SMARTBITS_[128]_STREAM L3_DEFINE_MULTI_STREAM_EXTENSION L3_DEFINE_MULTI_TCP_IPV6_STREAM L3_DEFINE_MULTI_TCP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_TCP_STREAM L3_DEFINE_MULTI_TCP_STREAM_VLAN L3_DEFINE_MULTI_UDP_IPV6_STREAM L3_DEFINE_MULTI_UDP_IPV6_STREAM_VLAN L3_DEFINE_MULTI_UDP_STREAM L3_DEFINE_MULTI_UDP_STREAM_VLAN

Related Structure
StreamICMP StreamICMPVLAN StreamICMPIPv6 StreamICMPIPv6VLAN StreamIP StreamIPVLAN StreamIPv6 StreamIPv6VLAN StreamIPX SmartBitsStream[128] L3StreamExtension StreamTCPIPv6 StreamTCPIPv6VLAN StreamTCP StreamTCPVLAN StreamUDPIPv6 StreamUDPIPv6VLAN StreamUDP StreamUDPVLAN

860 |

SmartLibrary Command Reference: Volume 2

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-2. L3_DEFINE_MULTI_ICMP_IPV6_STREAM (StreamICMPIPv6)


LAN-3100A/ 3101A/B/ 3102A/3111A

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC ucTrafficClass ucNextHeader ucHopLimit ulFlowLabel SourceIP DestinationIP RouterIP ucPayloadLengthError

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

SmartLibrary Command Reference: Volume 2 | 861

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-2. L3_DEFINE_MULTI_ICMP_IPV6_STREAM (StreamICMPIPv6) (continued)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
UcType UcCode uiIdentifier

TeraMetrics (Ethernet)

TeraMetrics (POS)

Table B-3. L3_DEFINE_MULTI_IPV6_STREAM_VLAN (StreamIPv6VLAN)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC ucTrafficClass ucNextHeader

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y Y

Y Y Y Y Y Y

862 |

SmartLibrary Command Reference: Volume 2

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-3. L3_DEFINE_MULTI_IPV6_STREAM_VLAN (StreamIPv6VLAN) (continued)


LAN-3100A/ 3101A/B LAN-3102A Y Y Y Y Y

Structure Member
ucHopLimit ulFlowLabel SourceIP DestinationIP RouterIP ucPayloadLengthError VLAN_Pri VLAN_Cfi VLAN_Vid UcType UcCode uiIdentifier

TeraMetrics (Ethernet)
Y Y Y Y Y

TeraMetrics (POS)
Y Y Y Y Y

Y Y Y

Y Y Y

Y Y Y

Table B-4. L3_DEFINE_MULTI_ICMP_STREAM_VLAN (StreamICMPVLAN) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal

SmartLibrary Command Reference: Volume 2 | 863

TeraMetrics non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-4. L3_DEFINE_MULTI_ICMP_STREAM_VLAN (StreamICMPVLAN) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC TypeOfService TimeToLive InitialSequenceNumber DestinationIP SourceIP Netmask Gateway VLAN_Pri VLAN_Cif VLAN_Vid UcType UcCode uiIdentifier ulARPStart

Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y Y

Y Y Y Y

Y Y

Y Y Y Y

Y Y Y Y

Y Y

Y Y

Y Y

Y Y Y

Y Y Y

864 |

SmartLibrary Command Reference: Volume 2

TeraMetrics non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-4. L3_DEFINE_MULTI_ICMP_STREAM_VLAN (StreamICMPVLAN) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ulARPBack ulARPGap

Table B-5. L3_DEFINE_MULTI_IP_STREAM (StreamIP) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount

SmartLibrary Command Reference: Volume 2 | 865

TeraMetrics Non-Ethernet
Y

TeraMetrics Ethernet

ML-5710A

TeraMetrics non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-5. L3_DEFINE_MULTI_IP_STREAM (StreamIP) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC TypeOfService TimeToLive InitialSequenceNumber DestinationIP SourceIP Netmask Gateway Protocol uiActualSequenceNumber ulARPStart ulARPEnd ulARPGap

Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y Y

Y Y Y Y

Y Y

Y Y Y Y

Y Y

Y Y

Y Y

866 |

SmartLibrary Command Reference: Volume 2

TeraMetrics Non-Ethernet
Y Y Y Y

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-6. L3_DEFINE_MULTI_IP_STREAM_VLAN (StreamIPVLAN) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC TypeOfService TimeToLive InitialSequenceNumber DestinationIP

Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y

Y Y Y

Y Y

Y Y Y

Y Y Y

SmartLibrary Command Reference: Volume 2 | 867

TeraMetrics non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-6. L3_DEFINE_MULTI_IP_STREAM_VLAN (StreamIPVLAN) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
SourceIP Netmask Gateway Protocol VLAN_Pri VLAN_Cif VLAN_Vid uiActualSequenceNumber ulARPStart ulARPEnd ulARPGap

Y Y Y

Y Y Y

Table B-7. L3_DEFINE_MULTI_IPV6_STREAM (StreamIPv6)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal

TeraMetrics (Ethernet)

TeraMetrics (POS)

868 |

SmartLibrary Command Reference: Volume 2

TeraMetrics non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-7. L3_DEFINE_MULTI_IPV6_STREAM (StreamIPv6) (continued)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC ucTrafficClass ucNextHeader ucHopLimit ulFlowLabel SourceIP DestinationIP RouterIP ucPayloadLengthError

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Table B-8. L3_DEFINE_MULTI_IPV6_STREAM_VLAN (StreamIPv6VLAN)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range

TeraMetrics (Ethernet)

TeraMetrics (POS)

SmartLibrary Command Reference: Volume 2 | 869

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-8. L3_DEFINE_MULTI_IPV6_STREAM_VLAN (StreamIPv6VLAN) (continued)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC ucTrafficClass ucNextHeader ucHopLimit ulFlowLabel SourceIP DestinationIP RouterIP ucPayloadLengthError VLAN_Pri VLAN_Cfi VLAN_Vid

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y

Y Y Y

Y Y Y

870 |

SmartLibrary Command Reference: Volume 2

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-9. L3_DEFINE_MULTI_IPX_STREAM (StreamIPX) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC IPXlen IPXhop IPXtype IPXdst IPXdstHost IPXdstSocket IPXsrc Y Y Y Y Y Y Y

Y Y

Y Y

Y Y

Y Y Y Y

Y Y Y Y

Y Y Y

Y Y Y

SmartLibrary Command Reference: Volume 2 | 871

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-9. L3_DEFINE_MULTI_IPX_STREAM (StreamIPX) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
IPXsrcHost IPXsrcSocket Y Y

Y Y

Y Y

Table B-10. L3_DEFINE_MULTI_SMARTBITS_[128]_STREAM (StreamSmartBits[128])* ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset Y

872 |

SmartLibrary Command Reference: Volume 2

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-10. L3_DEFINE_MULTI_SMARTBITS_[128]_STREAM (StreamSmartBits[128])* ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucVFD3Range ucVFD3Enable ucTagField ProtocolHeader

* This table applies equally to StreamSmartBits and StreamSmartBits128.

Table B-11. L3_DEFINE_MULTI_STREAM_EXTENSION (L3StreamExtension) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ulFrameRate ulTxMode ulBurstCount ulMBurstCount ulBurstGap uiInitialSeqNumber ucIPHeaderChecksumError ucIPTotalLengthError ucIPManipulateMode ucIncUDPPort uiIPLimitCount ulStartOffset

SmartLibrary Command Reference: Volume 2 | 873

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-11. L3_DEFINE_MULTI_STREAM_EXTENSION (L3StreamExtension) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ulBGPatternIndex ucDataCheckEnable ucCRCErrorEnable ucRandomBGEnable ucDataIntegrityErrorEnable ucStepCount ucIPBitsOffset ucMPLSCount ucIPOptionsCount ulCustomStreamID ucEnableCustomStreamID ucOAMHeaderPacketType

Table B-12. L3_DEFINE_MULTI_TCPIPV6_STREAM (StreamTCPIPv6)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal

TeraMetrics (Ethernet)

TeraMetrics (POS)

874 |

SmartLibrary Command Reference: Volume 2

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-12. L3_DEFINE_MULTI_TCPIPV6_STREAM (StreamTCPIPv6) (continued)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC ucTrafficClass ucNextHeader ucHopLimit ulFlowLabel SourceIP DestinationIP RouterIP ucPayloadLengthError SourcePort DestPort Window TCPAck TCPSequence Flags

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y

Y Y

Y Y

Table B-13. L3_DEFINE_MULTI_TCPIPV6_STREAM_VLAN (StreamTCPIPv6VLAN)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucActive

TeraMetrics (Ethernet)

TeraMetrics (POS)

SmartLibrary Command Reference: Volume 2 | 875

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-13. L3_DEFINE_MULTI_TCPIPV6_STREAM_VLAN (StreamTCPIPv6VLAN) (continued)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC ucTrafficClass ucNextHeader ucHopLimit ulFlowLabel SourceIP DestinationIP RouterIP ucPayloadLengthError SourcePort DestPort

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y

Y Y

Y Y

876 |

SmartLibrary Command Reference: Volume 2

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-13. L3_DEFINE_MULTI_TCPIPV6_STREAM_VLAN (StreamTCPIPv6VLAN) (continued)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
Window TCPAck TCPSequence Flags VLAN_Pri VLAN_Cfi VLAN_Vid

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y

Y Y Y

Y Y Y

Table B-14. L3_DEFINE_MULTI_TCP_STREAM (StreamTCP) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal Y

SmartLibrary Command Reference: Volume 2 | 877

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-14. L3_DEFINE_MULTI_TCP_STREAM (StreamTCP) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC TypeOfService TimeToLive InitialSequenceNumber DestinationIP SourceIP Netmask Gateway SourcePort DestPort Window TCPAck TCPSequence Flags ulARPOut ulARPBack ulARPGap Y Y Y Y Y Y Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y

Y Y Y

Y Y

Y Y Y Y

878 |

SmartLibrary Command Reference: Volume 2

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-15. L3_DEFINE_MULTI_TCP_STREAM_VLAN (StreamTCPVLAN) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC TypeOfService TimeToLive InitialSequenceNumber DestinationIP SourceIP Netmask Y Y Y Y Y Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

SmartLibrary Command Reference: Volume 2 | 879

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-15. L3_DEFINE_MULTI_TCP_STREAM_VLAN (StreamTCPVLAN) (continued) LAN-3100A/3101A/B LAN-3102A/3150A ML-7710/771/7711S

POS-3500B/BS

LAN-3201B/C

Structure Member
Gateway SourcePort DestPort Window VLAN_Pri VLAN_Cif VLAN_Vid TCPAck TCPSequence Flags ulARPOut ulARPBack ulARPGap Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y Y Y Y

Y Y Y Y Y Y

Y Y

Y Y Y Y

Table B-16. L3_DEFINE_MULTI_UDPIPV6_STREAM (StreamUDPIPv6)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal

TeraMetrics (Ethernet)

TeraMetrics (POS)

880 |

SmartLibrary Command Reference: Volume 2

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-16. L3_DEFINE_MULTI_UDPIPV6_STREAM (StreamUDPIPv6) (continued)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC ucTrafficClass ucNextHeader ucHopLimit ulFlowLabel SourceIP DestinationIP RouterIP ucPayloadLengthError UDPSrc UDPDest UDPLen

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Table B-17. L3_DEFINE_MULTI_UDPIPV6_STREAM_VLAN (StreamUDPIPv6VLAN)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength

TeraMetrics (Ethernet)

TeraMetrics (POS)

SmartLibrary Command Reference: Volume 2 | 881

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-17. L3_DEFINE_MULTI_UDPIPV6_STREAM_VLAN (StreamUDPIPv6VLAN)


LAN-3100A/ 3101A/B LAN-3102A

Structure Member
uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC ucTrafficClass ucNextHeader ucHopLimit ulFlowLabel SourceIP DestinationIP RouterIP ucPayloadLengthError UDPSrc UDPDest UDPLen VLAN_Pri VLAN_Cfi VLAN_Vid

TeraMetrics (Ethernet)

TeraMetrics (POS)

Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y

Y Y Y Y Y Y

Y Y Y Y Y Y

882 |

SmartLibrary Command Reference: Volume 2

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-18. L3_DEFINE_MULTI_UDP_STREAM (StreamUDP) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC TypeOfService TimeToLive InitialSequenceNumber DestinationIP SourceIP Netmask Y Y Y Y Y Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

SmartLibrary Command Reference: Volume 2 | 883

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-18. L3_DEFINE_MULTI_UDP_STREAM (StreamUDP) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
Gateway UDPSrc UDPDest UDPLen ucUDPChecksumEnable uiActualSequenceNumber ulARPStart ulARPEnd ulARPGap Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y

Y Y Y

Table B-19. L3_DEFINE_MULTI_UDP_STREAM_VLAN (StreamUDPVLAN) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucActive ucProtocolType ucRandomLength ucRandomData uiFrameLength uiVFD1Offset ucVFD1Range ucVFD1Pattern ulVFD1PatternCount Y

884 |

SmartLibrary Command Reference: Volume 2

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-19. L3_DEFINE_MULTI_UDP_STREAM_VLAN (StreamUDPVLAN) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ucVFD1StartVal uiVFD2Offset ucVFD2Range ucVFD2Pattern ulVFD2PatternCount ucVFD2StartVal uiVFD3Offset ucVFD3Range ucVFD3Enable ucTagField DestinationMAC SourceMAC TypeOfService TimeToLive InitialSequenceNumber DestinationIP SourceIP Netmask Gateway UDPSrc UDPDest UDPLen VLAN_Pri VLAN_Cfi VLAN_Vid ucUDPChecksumEnable ulARPStart Y Y Y Y Y Y Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y

Y Y

Y Y

Y Y

Y Y Y

Y Y Y

Y Y Y

Y Y Y

SmartLibrary Command Reference: Volume 2 | 885

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Incrementing Fields in L3_DEFINE_MULTI Commands

Table B-19. L3_DEFINE_MULTI_UDP_STREAM_VLAN (StreamUDPVLAN) (continued) ML-7710/771/7711S


LAN-3100A/3101A/B LAN-3102A

POS-3500B/BS

LAN-3201B/C

Structure Member
ulARPEnd ulARPGap

886 |

SmartLibrary Command Reference: Volume 2

TeraMetrics Non-Ethernet

TeraMetrics Ethernet

ML-5710A

Appendix B: Message Function Card Compatibility Information Card Support: ulField in Layer3ModifyStreamArray

Card Support: ulField in Layer3ModifyStreamArray


The Layer3ModifyStreamArray structure may be used with IP, UDP, and TCP streams to overwrite four bytes of a specified field in a block of streams that are already defined. Table B-20 lists the constants for ulField in the structure and shows their support by different TeraMetrics-based modules.
Table B-20. Card Support for ulField in Layer3ModifyStreamArray Structure LAN-33xxA XLW-372xA/XFP-373xA

LAN-3100A/3101A/B LAN-3102A

TeraMetrics POS-35xxAs/AR
N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Constants for ulField


L3MS_FIELD_DMAC L3MS_FIELD_SMAC L3MS_FIELD_TTL L3MS_FIELD_ISEQNUM L3MS_FIELD_DIP L3MS_FIELD_SIP L3MS_FIELD_NETMASK L3MS_FIELD_GATEWAY L3MS_FIELD_SPRT L3MS_FIELD_DPRT L3MS_FIELD_FRAMELEN L3MS_FIELD_DIPA L3MS_FIELD_DIPB L3MS_FIELD_DIPC L3MS_FIELD_DIPD L3MS_FIELD_SIPA L3MS_FIELD_SIPB L3MS_FIELD_SIPC

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

SmartLibrary Command Reference: Volume 2 | 887

TeraMetrics ATM-345xA(s)
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Appendix B: Message Function Card Compatibility Information Card Support: ulField in Layer3ModifyStreamArray

Table B-20. Card Support for ulField in Layer3ModifyStreamArray Structure (continued) LAN-33xxA XLW-372xA/XFP-373xA

LAN-3100A/3101A/B LAN-3102A

TeraMetrics POS-35xxAs/AR
Y Y Y Y Y N N Y Y Y N Y N N N Y N N N N N N N

Constants for ulField


L3MS_FIELD_SIPD L3MS_FIELD_GATEWAYA L3MS_FIELD_GATEWAYB L3MS_FIELD_GATEWAYC L3MS_FIELD_GATEWAYD L4MS_FIELD_VLANID L3MS_FIELD_VLANTAG L4MS_FIELD_TCP_SEQUENCE L4MS_FIELD_TCP_WINDOW L4MS_FIELD_TCP_FLAGS L4MS_FIELD_TCP_LENGTH L3MS_FIELD_STREAM_ACTIVE L4MS_FIELD_STARTING_OFFSET L3MS_FIELD_RTP_SSRC L3MS_FIELD_RTP_PT L3MS_FIELD_STREAM_SIGNATURE L3MS_FIELD_STREAM_START L3MS_FIELD_IP_MAN_MODE L3MS_FIELD_IP_BITS_OFFSET L3MS_FIELD_IP_LIMIT_COUNT L3MS_FIELD_DMAC_BYTE01 L3MS_FIELD_SMAC_BYTE01 L3MS_FIELD_FRAME_RATE

Y Y Y Y Y Y N Y Y Y Y Y Y N N Y N N N N Y Y N

Y Y Y Y Y Y N Y Y Y N Y N N N Y N N N N Y Y N

888 |

SmartLibrary Command Reference: Volume 2

TeraMetrics ATM-345xA(s)
Y Y Y Y Y N N Y Y Y N Y N N N N N N N N N N N

Appendix B: Message Function Card Compatibility Information Card Support: ulField in Layer3ModifyStreamArray

Table B-20. Card Support for ulField in Layer3ModifyStreamArray Structure (continued) LAN-33xxA XLW-372xA/XFP-373xA

LAN-3100A/3101A/B LAN-3102A

TeraMetrics POS-35xxAs/AR
Y Y Y Y Y Y Y N N Y Y Y Y Y Y Y Y Y Y

Constants for ulField


L3MS_FIELD_DIPV6 L3MS_FIELD_SIPV6 L3MS_FIELD_ROUTER_ADDR L3MS_FIELD_TRAFFIC_CLASS L3MS_FIELD_FLOW_LABEL L3MS_FIELD_HOP_LIMIT L3MS_FIELD_NEXT_HEADER L3MS_FIELD_VC_INDEX L3MS_FIELD_ATM_FLAGS L3MS_FIELD_SIG_SEQ_ID L3MS_FIELD_STREAM_FRAME_RATE L3MS_FIELD_CUSTOM_STREAM_ID L3MS_FIELD_BG_INDEX L3MS_FIELD_IP_CHECKSUM_ERROR_ENABLE L3MS_FIELD_DATA_CHECK_ENABLE L3MS_FIELD_DATA_INTEGRITY_ERROR_ENABLE L3MS_FIELD_CRC_ERROR_ENABLE L3MS_FIELD_RANDOM_BG_ENABLE L3MS_FIELD_CUSTOM_STREAM_ID_ENABLE

Y Y Y Y Y Y Y N N N N N N N N N N N N

Y Y Y Y Y Y Y N N Y Y Y Y Y Y Y Y Y Y

SmartLibrary Command Reference: Volume 2 | 889

TeraMetrics ATM-345xA(s)
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Appendix B: Message Function Card Compatibility Information Card Support: NS_CAPTURE_SETUP Options

Card Support: NS_CAPTURE_SETUP Options


When configuring capture using NS_CAPTURE_SETUP (NSCaptureSetup), you can set the capture event, mode, and length (portion of frame). The tables in this section list the support of these options by different SmartCards and modules.

Table B-21 Events (ulCaptureEvents) Table B-22 Mode (ulCaptureMode) Table B-23 Length (ulCaptureLength)

Table B-21. Capture Events (ulCaptureEvents)


LAN-33xxA/XLW-372xA/XFP-373xA

ATM-3451A/AS, ATM-3453A/AS

TeraMetrics POS-35xxAs/AR

POS-3500B/Bs/3502A/AS

GX-1405B/BS/GX-1420B
Y Y Y Y N N Y N N N Y N Y

ML-7710/771/7711S

ulCaptureEvents
CAPTURE_EVENTS_CRC_ERRORS CAPTURE_EVENTS_UNDERSIZE CAPTURE_EVENTS_OVERSIZE CAPTURE_EVENTS_VLAN_TAG CAPTURE_EVENTS_IP_CHECKSUM_ ERROR CAPTURE_EVENTS_DATA_INTEGRITY_ ERROR CAPTURE_EVENTS_RX_TRIGGER CAPTURE_EVENTS_RUNNING_ DISPARITY_ERRORS CAPTURE_EVENTS_ABORT CAPTURE_EVENTS_COLLISIONS CAPTURE_EVENTS_ALIGNMENT_ ERRORS CAPTURE_EVENTS_OUT_OF_ SEQUENCE CAPTURE_EVENTS_SIGNATURE

Y Y Y N N Y Y N N N N N N

Y Y Y Y Y N Y N N N N N Y

Y N N N Y N Y N N N N N Y

N N N N N N Y N N N N N N

Y Y Y N Y Y Y N N N N N N

Y N N N N N Y N N N N N N

Y N N N N N Y N N N N N N

Y Y Y N Y Y Y N N N N N N

Y Y Y N Y Y Y N N N N N N

Y N N N Y Y Y N N N N N N

Y N N N N N Y N N N N N N

890 |

SmartLibrary Command Reference: Volume 2

SX-7210/7410B/7411

LAN-3100A/3101A/B LAN-3102A

LAN-3710/AL/AE/AS

LAN-3200A/AS

LAN-3201B/C

LAN-3100A

ML-5710A

Appendix B: Message Function Card Compatibility Information Card Support: NS_CAPTURE_SETUP Options

Table B-21. Capture Events (continued)(ulCaptureEvents)


LAN-33xxA/XLW-372xA/XFP-373xA

ATM-3451A/AS, ATM-3453A/AS

TeraMetrics POS-35xxAs/AR

POS-3500B/Bs/3502A/AS

GX-1405B/BS/GX-1420B
Y N N N Y

ML-7710/771/7711S

ulCaptureEvents
CAPTURE_EVENTS_NO_SIGNATURE CAPTURE_EVENTS_FILTER_FRAME_ LENGTH CAPTURE_EVENTS_OAM_FRAME_ ONLY CAPTURE_EVENTS_IP_OPTION CAPTURE_EVENTS_ALL_FRAMES

N N N N Y

Y N N N Y

Y N N Y Y

N N N N Y

N N N N Y

N N N N Y

N N N N Y

N Y* Y N Y

N Y Y N Y

N N N N Y

N N N N Y

* This is supported on LAN-3710AL/AE/AS modules only

Table B-22. Capture Mode (ulCaptureMode)


LAN-33xxA/XLW-372xA/XFP-373xA

TeraMetrics POS-35xxAs/AR

POS-3500B/BS/3502A/AS

GX-1405B/BS/GX-1420B
Y Y N

TeraMetrics ATM-345xA

ML-7710/771/7711S

LAN-3100A/3101A/B LAN-3102A

LAN-3200A/AS

ulCaptureMode
CAPTURE_MODE_FILTER_ON_ EVENTS CAPTURE_MODE_START_ON_ EVENTS CAPTURE_MODE_STOP_ON_ EVENTS

Y N N

Y N N

Y N N

Y N N

Y Y Y

Y Y Y

Y Y Y

Y N N

Y Y N

Y Y Y

Y Y Y

SmartLibrary Command Reference: Volume 2 | 891

SX-74xx/72xx

LAN-3201B/C

LAN-3100A

ML-5710A

LAN-371x

SX-7210/7410B/7411

LAN-3100A/3101A/B LAN-3102A

LAN-3710/AL/AE/AS

LAN-3200A/AS

LAN-3201B/C

LAN-3100A

ML-5710A

Appendix B: Message Function Card Compatibility Information Card Support: NS_CAPTURE_SETUP Options

Table B-23. Capture Length (ulCaptureLength)


LAN-33xxA/XLW-372xA/XFP-373xA

TeraMetrics POS-35xxAs/AR

POS-3500B/BS/3502A/AS

TeraMetrics ATM-345xA

ML-7710/771/7711S

LAN-3100A/3101A/B LAN-3102A

LAN-3200A/AS

ulCaptureLength
CAPTURE_LENGTH_ENTIRE_FRAME CAPTURE_LENGTH_1ST_64_BYTES CAPTURE_LENGTH_LAST_64_BYTES CAPTURE_LENGTH_1ST_128_BYTES CAPTURE_LENGTH_LAST_128_BYTES CAPTURE_LENGTH_CUSTOM

Y N N N N N

Y Y Y Y Y N

Y Y Y Y Y N

Y Y Y Y Y Y

Y Y Y N N N

Y Y Y N N N

Y Y Y N N N

Y Y Y Y Y N

Y Y Y Y Y N

Y Y Y N N N

Y N N N N N

Y Y Y N N N

892 |

SmartLibrary Command Reference: Volume 2

SX-74xx/72xx

GX-1405B/BS

LAN-3201B/C

LAN-3100A

ML-5710A

LAN-371x

Appendix B: Message Function Card Compatibility Information Card Support for Latency Buckets

Card Support for Latency Buckets


The SmartMetrics and TeraMetrics-based modules support either eight or 16 latency range settings (buckets), depending on module type. Table B-24 lists the ATM, Ethernet, Fibre Channel, and POS modules for the SmartBits 600x/6000x and shows the number of latency buckets provided by each module type. Note: In SmartMetrics and TeraMetrics-based modules, the last bucket acts as an overflow container: It receives all results that do not fit into any of the other defined latency ranges.
Table B-24. Number of Latency Buckets by Card Type

Module ATM
ATM-345xA/As 16

Number of Latency Buckets

Ethernet
LAN-3100A LAN-3101A/B LAN-3102A LAN-3111A/AS LAN-3150A LAN-3300A LAN-3301A LAN-3302A N/A 16 16 16 N/A 16 16 16

Gigabit Ethernet
LAN-3200A/AS LAN-3201B/C LAN-3310A LAN-3311A LAN-3710AE LAN-3710AL LAN-3710AS XLW-372xA XFP-373xA N/A 8 16 16 8 8 8 16 16

SmartLibrary Command Reference: Volume 2 | 893

Appendix B: Message Function Card Compatibility Information Card Support for Latency Buckets

Table B-24. Number of Latency Buckets by Card Type

Module Ethernet Dual Media


LAN-3320A LAN-3321A LAN-3324A LAN-3325A LAN-3327A 16 16 16 16 16

Number of Latency Buckets

Fibre Channel
FBC-3601A FBC-3602A 16 16

POS
POS-3500B/BS POS-3502A/AS POS-3504As/AR POS-3505As/AR POS-3510A/AS POS-3511A/AS POS-3518As/AR POS-3519As/AR 8 8 16 16 16 16 16 16

894 |

SmartLibrary Command Reference: Volume 2

Appendix B: Message Function Card Compatibility Information Card Support for the NSMultiCounterInfo Structure

Card Support for the NSMultiCounterInfo Structure


The NSMultiCounterInfo structure used by the NS_MULTI_COUNTER_INFO message function contains a member, ulCounterType, that specifies various counters. Constants are used to reference these counters, and various SmartBits modules support different constants. Table B-25 lists which modules support which constants. For more information about NS_MULTI_COUNTER_INFO, see page 717.
Table B-25. NS_MULTI_COUNTER_INFO Counters and Constants LAN-3300A/3301A/3302A

XLW-372xA/XFP-373xA

TeraMetrics POS-35xx
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3310A/3311A

LAN-332xA/3306A

Counter and Constants NS_MULTI_L2_COUNTERS


Tx Frames (NS_MULTI_TX_FRAMES) Tx Signature Frames (NS_MULTI_TX_SIGNATURE_FRAMES) Tx Bytes (NS_MULTI_TX_BYTES) Tx Signature Frames (NS_MULTI_TX_SIGNATURE_FRAMES) Tx Bytes (NS_MULTI_TX_BYTES) Tx Trigger (NS_MULTI_TX_TRIGGER) Tx Latency (NS_MULTI_TX_LATENCY) Tx Timestamp (NS_MULTI_TX_TIMESTAMP) Rx Timestamp (NS_MULTI_RX_TIMESTAMP) Rx Frame (NS_MULTI_RX_FRAMES) Rx Signature Frame (NS_MULTI_RX_SIGNATURE_FRAMES) Rx Bytes (NS_MULTI_RX_BYTES) Rx Trigger (NS_MULTI_RX_TRIGGER) Rx Latency (NS_MULTI_RX_LATENCY) Tx Stack (NS_MULTI_TX_STACK) Rx Stack (NS_MULTI_RX_STACK)

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y

SmartLibrary Command Reference: Volume 2 | 895

ATM-345x
N N N N N N N N N N N N N N N N

Appendix B: Message Function Card Compatibility Information Card Support for the NSMultiCounterInfo Structure

Table B-25. NS_MULTI_COUNTER_INFO Counters and Constants (continued) LAN-3300A/3301A/3302A

XLW-372xA/XFP-373xA

TeraMetrics POS-35xx
Y Y Y Y Y Y Y Y Y Y Y N

LAN-3310A/3311A

LAN-332xA/3306A

Counter and Constants


Rx Dropped Frames (NS_MULTI_RX_DROPPED_FRAMES)

NS_MULTI_IPV4_COUNTERS
Tx IPv4 (NS_MULTI_TX_IPV4_FRAMES) Rx IPv4 (NS_MULTI_RX_IPV4_FRAMES) Rx ICMPv4 Unreachable (NS_MULTI_IPV4_ICMP_UNREACHABLE_RX) Y Y Y Y Y Y Y Y Y Y Y Y Y Y N

NS_MULTI_IPV6_COUNTERS
Tx IPv6 (NS_MULTI_TX_IPV6_FRAMES) Rx IPv6 (NS_MULTI_RX_IPV6_FRAMES) Rx ICMPv6 Unreachable (NS_MULTI_IPV6_ICMP_UNREACHABLE_RX) Y Y Y Y Y Y Y Y Y Y Y Y Y Y N

NS_MULTI_ERROR_COUNTERS
Rx CRC Error (NS_MULTI_RX_CRC_ERROR) Rx Data Integrity Error (NS_MULTI_RX_DATA_INTEGRITY_ERROR) Rx IPv4 Checksum Error (NS_MULTI_IPV4_CHECKSUM_ERROR) Rx IPV6 Payload Checksum Error (NS_MULTI_IPV6_PAYLOAD_CHECKSUM_ER ROR) Alignment Error (NS_MULTI_ALIGNMENT_ERROR) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N

896 |

SmartLibrary Command Reference: Volume 2

ATM-345x
N N

Appendix B: Message Function Card Compatibility Information Card Support for the NSMultiCounterInfo Structure

Table B-25. NS_MULTI_COUNTER_INFO Counters and Constants (continued) LAN-3300A/3301A/3302A

XLW-372xA/XFP-373xA

TeraMetrics POS-35xx
N N N N N N N N N N N N N N N

LAN-3310A/3311A

LAN-332xA/3306A

Counter and Constants NS_MULTI_MPLS_COUNTERS


Rx MPLS (NS_MULTI_RX_MPLS_FRAMES) Tx MPLS (NS_MULTI_TX_MPLS_FRAMES) Rx Signature MPLS (NS_MULTI_RX_SIGNATURE_MPLS_FRAMES) Tx Signature MPLS (NS_MULTI_TX_SIGNATURE_MPLS_FRAMES)

Y N Y N

Y N Y N

Y N Y N

Y N Y N

NS_MULTI_ETH_COUNTERS
Collision (NS_MULTI_COLLISION) Xs Collision (NS_MULTI_XS_COLLISION) Rx Undersize (NS_MULTI_RX_UNDERSIZE) Rx Oversize (NS_MULTI_RX_OVERSIZE) Rx VLAN (NS_MULTI_RX_VLAN) Rx_Pause (NS_MULTI_RX_PAUSE) Rx Jumbo (NS_MULTI_RX_JUMBO) Y Y Y Y Y Y Y N N Y Y Y Y Y Y Y Y Y Y Y Y N N Y Y Y N Y N N N N N N N

NS_MULTI_IPV4_ARP_COUNTERS
Rx ARP Replies (NS_MULTI_ARP_REPLIES_RX) Tx ARP Replies (NS_MULTI_ARP_REPLIES_TX) Tx ARP Requests (NS_MULTI_ARP_REQUESTS_TX) Tx ARP Requests (NS_MULTI_ARP_REQUESTS_RX) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N

SmartLibrary Command Reference: Volume 2 | 897

ATM-345x
Y Y N N

Appendix B: Message Function Card Compatibility Information Card Support for the NSMultiCounterInfo Structure

Table B-25. NS_MULTI_COUNTER_INFO Counters and Constants (continued) LAN-3300A/3301A/3302A

XLW-372xA/XFP-373xA

TeraMetrics POS-35xx
Y Y Y Y Y Y Y Y Y Y Y Y

LAN-3310A/3311A

LAN-332xA/3306A

Counter and Constants NS_MULTI_IPV4_PING_COUNTERS


Rx Ping Replies (NS_MULTI_IPV4_PING_REPLIES_RX) Tx Ping Replies (NS_MULTI_IPV4_PING_REPLIES_TX) Tx Ping Requests (NS_MULTI_IPV4_PING_REQUESTS_TX) Rx Ping Requests (NS_MULTI_IPV4_PING_REQUESTS_RX)

Y Y Y Y

Y Y Y Y

Y Y Y Y

Y Y Y Y

NS_MULTI_IPV6_NEIGHBOR_SOLICITATION_COUNTERS
Tx Neighbor Solicitation (NS_MULTI_NEIGHBOR_SOLICITATION_TX) Rx Neighbor Solicitation (NS_MULTI_NEIGHBOR_SOLICITATION_RX) Tx Neighbor Advertisement (NS_MULTI_NEIGHBOR_ADVERT_TX) Rx Neighbor Advertisement (NS_MULTI_NEIGHBOR_ADVERT_RX) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N

NS_MULTI_IPV6_PING_COUNTERS
Rx IPv6 Ping Replies (NS_MULTI_IPV6_PING_REPLIES_RX) Tx IPv6 Ping Replies (NS_MULTI_IPV6_PING_REPLIES_TX) Tx IPv6 Ping Requests (NS_MULTI_IPV6_PING_REQUESTS_TX) Rx IPv6 Ping Requests (NS_MULTI_IPV6_PING_REQUESTS_RX) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N

898 |

SmartLibrary Command Reference: Volume 2

ATM-345x
N N N N

Appendix C

Bit Definitions for MII Registers


Auto negotiation (AN) is an optional standard function defined in the 1998 IEEE 802.3 specification. Its purpose is to enable device interfaces to achieve their highest possible mode of operation over a link segment. It does this by providing a means for the interfaces to exchange information about their capabilities (such as speed and duplex) over the link.

PHY Transceiver and MII Registers


The capabilities of an interface depend upon the capabilities of the PHY transceiver that is used with the interface. For auto negotiation on 10/100Mb links, the PHY transceiver uses a set of registers to store information about its capabilities. These registers are called MII registers, referring to the 100BASE-T specification of a Media Independent Interface, or MII. There are 32 PHY registers altogether; however, only a few of these are involved in auto negotiation. Each MII register stores a 16-bit value. Individual bit definitions are used to indicate the presence or absence of specific operating capabilities, as well as for control information and status information.

SmartLibrary Commands to Control MII Functions


The Original Functions HTFindMIIAddress, HTReadMII, and HTWriteMII can be used to read and set the bit values in the MII registers on SmartCards and modules. In addition, you can use the following ETH Message Function iType1 commands to read and write MII registers on Ethernet cards:

ETH_FIND_MII_ADDRESS ETH_READ_MII_INFO ETH_WRITE_MII

Table C-1 lists the MII registers and their functions. Table C-2 through Table C-6 provide the bit definitions for registers 0, 1, 4, 5, 9, and 10. Note: Refer to the IEEE 802.3 specification for detailed information.

SmartLibrary Command Reference: Volume 2 | 899

Appendix C: Bit Definitions for MII Registers Summary of MII Registers and Bit Definitions

Summary of MII Registers and Bit Definitions


Table C-1 lists the MII registers and their functions. Table C-2 through Table C-6 list the bit definitions for registers 0, 1, 4, 5, 9, and 10.
Table C-1. MII Registers

Register Address
0 1 2, 3 4 5 6 7 8 9 10 11-14 15 16 17-31

Register Name
Control Status PHY Identifier Auto Negotiation Advertisement Auto Negotiation Link Partner Base Page Ability Auto Negotiation Expansion Auto Negotiation Next Page Transmit Auto Negotiation Link Partner Received Next Page 1000BASE-T2 Control Register 1000BASE-T2 Status Register Reserved Extended Status Vendor Specific Reserved

900 |

SmartLibrary Command Reference: Volume 2

Appendix C: Bit Definitions for MII Registers Summary of MII Registers and Bit Definitions

Table C-2. Bit Definitions for MII Register 0 (Control)

Bit
15 14 13

Name
PHY Reset Enable Loopback Speed Selection

Description
1 = PHY reset 0 = Normal operation 1 = Enable loopback mode 0 = Disable loopback mode Bit 6 1 1 0 0 Bit 13 1 0 1 0 Meaning Reserved 1000Mb 100Mb 10Mb

12 11 10 9 8 7 6

Auto Negotiation Enable Power Down Isolate Restart Auto Negotiation Duplex mode Collision Test Speed selection

1 = Enable AN 0 = Disable AN 1 = Power down 0 = Normal operation 1 = Electrically isolate PHY from MII or GMII 0 = Normal operation 1 = Restart AN 0 = Normal operation 1 = Full duplex 0 = Half duplex 1 = Enable COL signal test 0 = Disable COL signal test Bit 6 1 1 0 0 Bit 13 1 0 1 0 Meaning Reserved 1000Mb 100Mb 10Mb

5-0

Reserved

Write as 0, ignore on Read

Note: It is recommended that SmartLibrary commands HTSetSpeed, HTDuplexMode, and GigAutoFiber Negotiate are used for configuring speed, duplex mode, and autonegotiation.

SmartLibrary Command Reference: Volume 2 | 901

Appendix C: Bit Definitions for MII Registers Summary of MII Registers and Bit Definitions

Table C-3. Bit Definitions for MII Register 1 (Status)

Bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Name
100BASE-T4 100BASE-X Full Duplex 100BASE-X Half Duplex 10Mb Full Duplex 10Mb Half Duplex 100BASE-T2 Full Duplex 100BASE-T2 Half Duplex Extended Status Reserved MF Preamble Suppression Auto Negotiation Complete Remote Fault Auto Negotiation Ability Link Status Jabber Detect Extended Capability

Description
1 = PHY able to perform 100BASE-T4 0 = PHY not able to perform 100BASE-T4 1 = PHY able to perform full duplex 100BASE-X 0 = PHY not able to perform full duplex 100BASE-X 1 = PHY able to perform half duplex 100BASE-X 0 = PHY not able to perform half duplex 100BASE-X 1 = PHY able to perform full duplex 10 Mb 0 = PHY not able to perform full duplex 10 Mb 1 = PHY able to perform half duplex 10 Mb 0 = PHY not able to perform half duplex 10 Mb 1 = PHY able to perform full duplex 100BASE-T2 0 = PHY not able to perform full duplex 100BASE-T2 1 = PHY able to perform half duplex 100BASE-T2 0 = PHY not able to perform half duplex 100BASE-T2 1 = Extended status information in Register 15 0 = No extended status information in Register 15 Ignore when read. 1 = PHY will accept management frames with preamble suppressed 0 = PHY will not accept management frames with preamble suppressed 1 = AN process completed 0 = AN process not completed 1 = Remote fault condition detected 0 = No remote fault condition detected 1 = PHY is able to perform AN 0 = PHY is not able to perform AN 1 = Link is up 0 = Link is down 1 = Jabber condition detected 0 = No jabber condition detected 1 = Extended register capabilities 0 = Extended register set capabilities only

Note: It is recommended that SmartLibrary commands HTSetSpeed, HTDuplexMode, and GigAutoFiber Negotiate are used for configuring speed, duplex mode, and autonegotiation.

902 |

SmartLibrary Command Reference: Volume 2

Appendix C: Bit Definitions for MII Registers Summary of MII Registers and Bit Definitions

Table C-4. Bit Definitions for MII Register 4 (AN Advertisement) and Register 5 (AN Link Partner)

Bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Name
Next Page Acknowledge Remote Fault Technology Ability

Description
1 = Next Page ability supported 0 = Next Page ability not supported Used by AN to indicate that the device has received its Link Partners Link Code Word. Remote fault information. Reserved Asymmetric Pause Pause Capable 100BASE-T4 100BASE-TX Full Duplex 100BASE-TX 10BASE-T Full Duplex 10BASE-T Half Duplex

Selector Field

Reserved

SmartLibrary Command Reference: Volume 2 | 903

Appendix C: Bit Definitions for MII Registers Summary of MII Registers and Bit Definitions

Table C-5. Bit Definitions for MII Register 9 (1000BASE-T Control Register)

Bit
15 14 13 12 11 10 9-0

Name
Transmitter Test Mode

Description
Default bit values are 00

Receiver Test Mode Master/Slave Manual Configuration Enable Master/Slave Manual Configuration Value T2_Repeater/DTE Bit Reserved*

Default bit value is 0 1 = Enable Master/Slave Manual Configuration value 0 = Disable Master/Slave Manual Configuration value 1 = Configure PHY as Master during AN (only when Bit 12 = 1) 0 = Configure PHY as Slave during AN (only when Bit 12 = 1) 1 = Repeater device port 0 = DTE device

* The LAN-3300A and LAN-3301A modules cannot be set to half-duplex mode when the port speed is 1000bps.

Table C-6. Bit Definitions for MII Register 10 (1000BASE-T Status Register)

Bit
15 14 13 12 11-8 7-0

Name
Master/Slave Manual Configuration Fault Master/Slave Configuration Resolution Complete Local Receiver Status Remote Receiver Status Reserved Idle Error Count

Description
1 = Master/Slave manual configuration fault detected 0 = Master/Slave manual configuration fault not detected 1 = Master/Slave configuration resolution has completed 0 = Master/Slave configuration resolution has not completed 1 = Local receiver OK 0 = Local receiver not OK 1 = Remote receiver OK 0 = Remote receiver not OK

Idle Error Count

904 |

SmartLibrary Command Reference: Volume 2

Index
Numerics 10/100 Mb Ethernet (ETH) supported SmartCards/Modules 82, 114 100 Mbps Fast Ethernet (FST) supported SmartCards/Modules 114, 186 802.1x commands 499, 505, 511 C counter retrieval command, global 717 E error codes 853 Ethernet 10/100 Mbps supported SmartCards/Modules 82, 114 F Fast Ethernet (FST) supported SmartCards/Modules 114, 186 FC (Fibre Channel) supported SmartCards/Modules 150 G Gigabit Ethernet (GIG) supported SmartCards/Modules 200 L Layer 2 (L2) supported SmartCards/Modules 232 Layer 3 SmartMetrics (L3) supported SmartCards/Modules 236, 478, 496, 818 M MII registers and bit definitions 899 P Packet Over Sonet (POS) supported SmartCards/Modules 784 PPP supported SmartCards/Modules 794 R related documentation 20 return values (error codes) 853 S SmartLibrary related documentation 20 Spirent Communications company address 22 Supported SmartCards/Modules Fast Ethernet (FST) 114, 186 supported SmartCards/Modules 10/100 Mb Ethernet (EHT) 82, 114 100 Mbps Fast Ethernet (FST) 114, 186 Ethernet 10/100 Mbps 82, 114 FC (Fibre Channel) 150 Gigabit Ethernet (GIG) 200 Layer 2 (L2) 232 Layer 3 SmartMetrics (L3) 236, 478, 496, 818 Packet Over Sonet (POS) 784 PPP 794 U User Guide related manuals 20

SmartLibrary Command Reference: Volume 2 | 905

Вам также может понравиться