OpenNSL API Guide and Reference Manual
fieldX.h
Go to the documentation of this file.
1 
4 /*****************************************************************************
5  *
6  * This software is governed by the Broadcom Advanced Switch APIs license.
7  * This license is set out in the
8  * https://github.com/Broadcom-Switch/OpenNSL/Legal/LICENSE-Adv file.
9  *
10  * Copyright 2015-2016 Broadcom Corporation. All rights reserved.
11  *
12  ***************************************************************************/
16 #ifndef __OPENNSL_FIELDX_H__
17 #define __OPENNSL_FIELDX_H__
18 
19 #include <opennsl/types.h>
20 #include <opennsl/policer.h>
21 #include <opennsl/port.h>
22 #include <opennsl/rx.h>
23 
24 #define OPENNSL_FIELD_COLOR_PRESERVE 0
25 #define OPENNSL_FIELD_COLOR_GREEN 1
26 #define OPENNSL_FIELD_COLOR_YELLOW 2
27 #define OPENNSL_FIELD_COLOR_RED 3
28 #define OPENNSL_FIELD_COLOR_BLACK 4
29 #define OPENNSL_FIELD_TCPCONTROL_FIN 0x01
30 #define OPENNSL_FIELD_TCPCONTROL_SYN 0x02
31 #define OPENNSL_FIELD_TCPCONTROL_RST 0x04
32 #define OPENNSL_FIELD_TCPCONTROL_PSH 0x08
33 #define OPENNSL_FIELD_TCPCONTROL_ACK 0x10
34 #define OPENNSL_FIELD_TCPCONTROL_URG 0x20
35 #define OPENNSL_FIELD_TCPCONTROL_R40 0x40
36 #define OPENNSL_FIELD_TCPCONTROL_R80 0x80
37 #define OPENNSL_FIELD_TCPCONTROL_MASK 0x3f
38 #define OPENNSL_FIELD_PKT_RES_UNKNOWN 0x0
39 #define OPENNSL_FIELD_PKT_RES_CONTROL 0x1
41 #define OPENNSL_FIELD_PKT_RES_L2BC 0x3
42 #define OPENNSL_FIELD_PKT_RES_L2UC 0x4
43 #define OPENNSL_FIELD_PKT_RES_L3MCUNKNOWN 0x6
44 #define OPENNSL_FIELD_PKT_RES_L3MCKNOWN 0x7
45 #define OPENNSL_FIELD_PKT_RES_L3UCKNOWN 0xa
46 #define OPENNSL_FIELD_PKT_RES_L3UCUNKNOWN 0xb
47 #define OPENNSL_FIELD_USER_NUM_UDFS 277
48 
50 
53 
127 /* __doxy_func_body_end__ */
128 
134 typedef enum opennsl_field_stage_e {
152 /* __doxy_func_body_end__ */
153 
154 #define OPENNSL_FIELD_QUALIFY_MAX (opennslFieldQualifyCount + OPENNSL_FIELD_USER_NUM_UDFS)
156 #define OPENNSL_FIELD_EXACT_MATCH_MASK (~0)
158 typedef enum opennsl_field_IpType_e {
178 /* __doxy_func_body_end__ */
179 
190 /* __doxy_func_body_end__ */
191 
201 /* __doxy_func_body_end__ */
202 
203 #define OPENNSL_FIELD_RANGE_SRCPORT 0x00000001
205 #define OPENNSL_FIELD_RANGE_DSTPORT 0x00000002
206 #define OPENNSL_FIELD_RANGE_TCP 0x00000004
207 #define OPENNSL_FIELD_RANGE_UDP 0x00000008
208 #define OPENNSL_FIELD_RANGE_INVERT 0x00000010
211 #define OPENNSL_FIELD_RANGE_OUTER_VLAN 0x00000040
213 #define OPENNSL_FIELD_RANGE_INNER_VLAN 0x00000080
215 #define OPENNSL_FIELD_RANGE_PACKET_LENGTH 0x00000100
217 #define OPENNSL_FIELD_RANGE_REPLACE 0x00000800
226 typedef uint32 opennsl_field_range_t;
227 
229 typedef struct opennsl_field_qset_s {
233 /* __doxy_func_body_end__ */
234 
235 #define OPENNSL_FIELD_QSET_INIT(qset) \
236  memset(&(qset), 0, sizeof(opennsl_field_qset_t))
237 #define OPENNSL_FIELD_QSET_ADD(qset, q) SHR_BITSET(((qset).w), (q))
238 #define OPENNSL_FIELD_QSET_REMOVE(qset, q) SHR_BITCLR(((qset).w), (q))
239 #define OPENNSL_FIELD_QSET_TEST(qset, q) SHR_BITGET(((qset).w), (q))
240 #define OPENNSL_FIELD_GROUP_PRIO_ANY -0x7fffffff
241 
338 /* __doxy_func_body_end__ */
339 
346 /* __doxy_func_body_end__ */
347 
352 typedef struct opennsl_field_aset_s {
359 /* __doxy_func_body_end__ */
360 
361 #define OPENNSL_FIELD_ASET_INIT(aset) \
362  memset(&(aset), 0, sizeof(opennsl_field_aset_t))
363 #define OPENNSL_FIELD_ASET_ADD(aset, q) SHR_BITSET(((aset).w), (q))
364 #define OPENNSL_FIELD_ASET_REMOVE(aset, q) SHR_BITCLR(((aset).w), (q))
365 #define OPENNSL_FIELD_ASET_TEST(aset, q) SHR_BITGET(((aset).w), (q))
366 #define OPENNSL_FIELD_PRESEL_INIT(presel_set) \
367  memset(&(presel_set), 0, sizeof(opennsl_field_presel_set_t))
368 #define OPENNSL_FIELD_PRESEL_ADD(presel_set, presel_id) SHR_BITSET(((presel_set).w), (presel_id))
369 #define OPENNSL_FIELD_PRESEL_REMOVE(presel_set, presel_id) SHR_BITCLR(((presel_set).w), (presel_id))
370 #define OPENNSL_FIELD_PRESEL_TEST(presel_set, presel_id) SHR_BITGET(((presel_set).w), (presel_id))
371 
373  int prio_min;
374  int prio_max;
385 /* __doxy_func_body_end__ */
386 
394 /* __doxy_func_body_end__ */
395 
396 #define OPENNSL_FIELD_PRESEL_SEL_MAX 1024
399 typedef struct opennsl_field_presel_set_s {
402 /* __doxy_func_body_end__ */
403 
404 /***************************************************************************/
418 extern int opennsl_field_init(
419  int unit) LIB_DLL_EXPORTED ;
420 
421 /***************************************************************************/
434 extern int opennsl_field_detach(
435  int unit) LIB_DLL_EXPORTED ;
436 
437 /***************************************************************************/
474 extern int opennsl_field_group_create(
475  int unit,
476  opennsl_field_qset_t qset,
477  int pri,
479 
480 /***************************************************************************/
518  int unit,
519  opennsl_field_qset_t qset,
520  int pri,
522 
523 /***************************************************************************/
562  int unit,
563  opennsl_field_qset_t qset,
564  int pri,
567 
568 /***************************************************************************/
607  int unit,
608  opennsl_field_qset_t qset,
609  int pri,
612 
614  int unit,
615  opennsl_field_group_t group,
616  void *user_data);
617 
618 /***************************************************************************/
632  int unit,
634  void *user_data) LIB_DLL_EXPORTED ;
635 
636 /***************************************************************************/
659 extern int opennsl_field_group_set(
660  int unit,
661  opennsl_field_group_t group,
663 
664 /***************************************************************************/
687 extern int opennsl_field_group_get(
688  int unit,
689  opennsl_field_group_t group,
691 
692 /***************************************************************************/
716  int unit,
717  opennsl_field_group_t group,
719 
720 /***************************************************************************/
744  int unit,
745  opennsl_field_group_t group,
747 
748 /***************************************************************************/
763 extern int opennsl_field_group_destroy(
764  int unit,
766 
767 /***************************************************************************/
781  int unit,
782  opennsl_field_group_t group,
783  int priority) LIB_DLL_EXPORTED ;
784 
785 /***************************************************************************/
799  int unit,
800  opennsl_field_group_t group,
801  int *priority) LIB_DLL_EXPORTED ;
802 
803 /***************************************************************************/
821  int unit,
822  opennsl_field_group_t group,
824 
825 /***************************************************************************/
843  int unit,
844  opennsl_field_group_t group,
845  int enable) LIB_DLL_EXPORTED ;
846 
847 /***************************************************************************/
865  int unit,
866  opennsl_field_group_t group,
867  int *enable) LIB_DLL_EXPORTED ;
868 
869 /***************************************************************************/
896 extern int opennsl_field_range_create(
897  int unit,
898  opennsl_field_range_t *range,
899  uint32 flags,
900  opennsl_l4_port_t min,
902 
903 /***************************************************************************/
919 extern int opennsl_field_group_install(
920  int unit,
922 
923 /***************************************************************************/
940 extern int opennsl_field_range_get(
941  int unit,
942  opennsl_field_range_t range,
943  uint32 *flags,
944  opennsl_l4_port_t *min,
946 
947 /***************************************************************************/
962 extern int opennsl_field_range_destroy(
963  int unit,
965 
966 /***************************************************************************/
988 extern int opennsl_field_entry_create(
989  int unit,
990  opennsl_field_group_t group,
992 
993 /***************************************************************************/
1016  int unit,
1017  opennsl_field_group_t group,
1019 
1020 /***************************************************************************/
1043  int unit,
1044  opennsl_field_group_t group,
1045  int entry_size,
1046  opennsl_field_entry_t *entry_array,
1047  int *entry_count) LIB_DLL_EXPORTED ;
1048 
1049 /***************************************************************************/
1065 extern int opennsl_field_entry_destroy(
1066  int unit,
1068 
1069 /***************************************************************************/
1081  int unit) LIB_DLL_EXPORTED ;
1082 
1083 /***************************************************************************/
1102 extern int opennsl_field_entry_copy(
1103  int unit,
1104  opennsl_field_entry_t src_entry,
1106 
1107 /***************************************************************************/
1121 extern int opennsl_field_entry_install(
1122  int unit,
1124 
1125 /***************************************************************************/
1155  int unit,
1157 
1158 /***************************************************************************/
1173 extern int opennsl_field_entry_remove(
1174  int unit,
1176 
1177 /***************************************************************************/
1196  int unit,
1197  opennsl_field_entry_t entry_id,
1198  int level,
1200 
1201 /***************************************************************************/
1218  int unit,
1219  opennsl_field_entry_t entry_id,
1220  int level) LIB_DLL_EXPORTED ;
1221 
1222 /***************************************************************************/
1235  int unit,
1236  opennsl_field_entry_t entry_id,
1237  int level,
1239 
1240 /***************************************************************************/
1318 extern int opennsl_field_entry_prio_get(
1319  int unit,
1320  opennsl_field_entry_t entry,
1321  int *prio) LIB_DLL_EXPORTED ;
1322 
1323 /***************************************************************************/
1401 extern int opennsl_field_entry_prio_set(
1402  int unit,
1403  opennsl_field_entry_t entry,
1404  int prio) LIB_DLL_EXPORTED ;
1405 
1406 #define OPENNSL_FIELD_QUALIFY_PRESEL 0x40000000
1411 /***************************************************************************/
1422 extern int opennsl_field_qualifier_delete(
1423  int unit,
1424  opennsl_field_entry_t entry,
1426 
1427 /***************************************************************************/
1437 extern int opennsl_field_qualify_InPort(
1438  int unit,
1439  opennsl_field_entry_t entry,
1440  opennsl_port_t data,
1442 
1443 /***************************************************************************/
1454  int unit,
1455  opennsl_field_entry_t entry,
1456  opennsl_port_t data,
1458 
1459 /***************************************************************************/
1470  int unit,
1471  opennsl_field_entry_t entry,
1472  opennsl_pbmp_t data,
1474 
1475 /***************************************************************************/
1488  int unit,
1489  opennsl_field_entry_t entry,
1490  opennsl_module_t data_modid,
1491  opennsl_module_t mask_modid,
1492  opennsl_port_t data_port,
1493  opennsl_port_t mask_port) LIB_DLL_EXPORTED ;
1494 
1495 /***************************************************************************/
1508  int unit,
1509  opennsl_field_entry_t entry,
1510  opennsl_module_t data_modid,
1511  opennsl_module_t mask_modid,
1512  opennsl_port_t data_port,
1513  opennsl_port_t mask_port) LIB_DLL_EXPORTED ;
1514 
1515 /***************************************************************************/
1526  int unit,
1527  opennsl_field_entry_t entry,
1528  opennsl_trunk_t data,
1530 
1531 /***************************************************************************/
1542  int unit,
1543  opennsl_field_entry_t entry,
1544  opennsl_l4_port_t data,
1546 
1547 /***************************************************************************/
1558  int unit,
1559  opennsl_field_entry_t entry,
1560  opennsl_l4_port_t data,
1562 
1563 /***************************************************************************/
1574  int unit,
1575  opennsl_field_entry_t entry,
1576  opennsl_vlan_t data,
1578 
1579 /***************************************************************************/
1590  int unit,
1591  opennsl_field_entry_t entry,
1592  opennsl_vlan_t data,
1594 
1595 /***************************************************************************/
1606  int unit,
1607  opennsl_field_entry_t entry,
1608  opennsl_vlan_t data,
1610 
1611 /***************************************************************************/
1622  int unit,
1623  opennsl_field_entry_t entry,
1624  uint16 data,
1625  uint16 mask) LIB_DLL_EXPORTED ;
1626 
1627 /***************************************************************************/
1637  int unit,
1638  opennsl_field_entry_t entry,
1640 
1641 /***************************************************************************/
1650 extern int opennsl_field_qualify_Color(
1651  int unit,
1652  opennsl_field_entry_t entry,
1653  uint8 color) LIB_DLL_EXPORTED ;
1654 
1655 /***************************************************************************/
1666  int unit,
1667  opennsl_field_entry_t entry,
1668  uint8 data,
1669  uint8 mask) LIB_DLL_EXPORTED ;
1670 
1671 /***************************************************************************/
1682  int unit,
1683  opennsl_field_entry_t entry,
1684  uint32 data,
1685  uint32 mask) LIB_DLL_EXPORTED ;
1686 
1687 /***************************************************************************/
1697 extern int opennsl_field_qualify_SrcIp(
1698  int unit,
1699  opennsl_field_entry_t entry,
1700  opennsl_ip_t data,
1702 
1703 /***************************************************************************/
1713 extern int opennsl_field_qualify_DstIp(
1714  int unit,
1715  opennsl_field_entry_t entry,
1716  opennsl_ip_t data,
1718 
1719 /***************************************************************************/
1729 extern int opennsl_field_qualify_DSCP(
1730  int unit,
1731  opennsl_field_entry_t entry,
1732  uint8 data,
1733  uint8 mask) LIB_DLL_EXPORTED ;
1734 
1735 /***************************************************************************/
1746  int unit,
1747  opennsl_field_entry_t entry,
1748  uint8 data,
1749  uint8 mask) LIB_DLL_EXPORTED ;
1750 
1751 /***************************************************************************/
1761 extern int opennsl_field_qualify_Ttl(
1762  int unit,
1763  opennsl_field_entry_t entry,
1764  uint8 data,
1765  uint8 mask) LIB_DLL_EXPORTED ;
1766 
1767 /***************************************************************************/
1778  int unit,
1779  opennsl_field_entry_t entry,
1780  opennsl_field_range_t range,
1781  int invert) LIB_DLL_EXPORTED ;
1782 
1783 /***************************************************************************/
1793 extern int opennsl_field_qualify_SrcIp6(
1794  int unit,
1795  opennsl_field_entry_t entry,
1796  opennsl_ip6_t data,
1798 
1799 /***************************************************************************/
1809 extern int opennsl_field_qualify_DstIp6(
1810  int unit,
1811  opennsl_field_entry_t entry,
1812  opennsl_ip6_t data,
1814 
1815 /***************************************************************************/
1826  int unit,
1827  opennsl_field_entry_t entry,
1828  uint8 data,
1829  uint8 mask) LIB_DLL_EXPORTED ;
1830 
1831 /***************************************************************************/
1842  int unit,
1843  opennsl_field_entry_t entry,
1844  uint8 data,
1845  uint8 mask) LIB_DLL_EXPORTED ;
1846 
1847 /***************************************************************************/
1857 extern int opennsl_field_qualify_SrcMac(
1858  int unit,
1859  opennsl_field_entry_t entry,
1860  opennsl_mac_t data,
1862 
1863 /***************************************************************************/
1873 extern int opennsl_field_qualify_DstMac(
1874  int unit,
1875  opennsl_field_entry_t entry,
1876  opennsl_mac_t data,
1878 
1879 /***************************************************************************/
1888 extern int opennsl_field_qualify_IpType(
1889  int unit,
1890  opennsl_field_entry_t entry,
1892 
1893 /***************************************************************************/
1904  int unit,
1905  opennsl_field_entry_t entry,
1906  uint32 data,
1907  uint32 mask) LIB_DLL_EXPORTED ;
1908 
1909 /***************************************************************************/
1920  int unit,
1921  opennsl_field_entry_t entry,
1922  uint32 data,
1923  uint32 mask) LIB_DLL_EXPORTED ;
1924 
1925 /***************************************************************************/
1936  int unit,
1937  opennsl_field_entry_t entry,
1938  uint32 data,
1939  uint32 mask) LIB_DLL_EXPORTED ;
1940 
1941 /***************************************************************************/
1951  int unit,
1952  opennsl_field_entry_t entry,
1954 
1955 /***************************************************************************/
1966  int unit,
1967  opennsl_field_entry_t entry,
1968  uint8 data,
1969  uint8 mask) LIB_DLL_EXPORTED ;
1970 
1971 /***************************************************************************/
1980 extern int opennsl_field_qualify_IpFrag(
1981  int unit,
1982  opennsl_field_entry_t entry,
1984 
1985 /***************************************************************************/
1995 extern int opennsl_field_qualify_Vrf(
1996  int unit,
1997  opennsl_field_entry_t entry,
1998  uint32 data,
1999  uint32 mask) LIB_DLL_EXPORTED ;
2000 
2001 /***************************************************************************/
2012  int unit,
2013  opennsl_field_entry_t entry,
2014  uint32 intf_id,
2015  uint32 mask) LIB_DLL_EXPORTED ;
2016 
2017 /***************************************************************************/
2028  int unit,
2029  opennsl_field_entry_t entry,
2030  uint8 data,
2031  uint8 mask) LIB_DLL_EXPORTED ;
2032 
2033 /***************************************************************************/
2044  int unit,
2045  opennsl_field_entry_t entry,
2046  uint16 data,
2047  uint16 mask) LIB_DLL_EXPORTED ;
2048 
2049 /***************************************************************************/
2059  int unit,
2060  opennsl_field_entry_t entry,
2061  uint8 *color) LIB_DLL_EXPORTED ;
2062 
2063 /***************************************************************************/
2073  int unit,
2074  opennsl_field_entry_t entry,
2075  opennsl_if_t *if_id) LIB_DLL_EXPORTED ;
2076 
2077 /***************************************************************************/
2088  int unit,
2089  opennsl_field_entry_t entry,
2090  opennsl_port_t *data,
2092 
2093 /***************************************************************************/
2104  int unit,
2105  opennsl_field_entry_t entry,
2106  opennsl_port_t *data,
2108 
2109 /***************************************************************************/
2125  int unit,
2126  opennsl_field_entry_t entry,
2127  opennsl_pbmp_t *data,
2129 
2130 /***************************************************************************/
2143  int unit,
2144  opennsl_field_entry_t entry,
2145  opennsl_module_t *data_modid,
2146  opennsl_module_t *mask_modid,
2147  opennsl_port_t *data_port,
2148  opennsl_port_t *mask_port) LIB_DLL_EXPORTED ;
2149 
2150 /***************************************************************************/
2163  int unit,
2164  opennsl_field_entry_t entry,
2165  opennsl_module_t *data_modid,
2166  opennsl_module_t *mask_modid,
2167  opennsl_port_t *data_port,
2168  opennsl_port_t *mask_port) LIB_DLL_EXPORTED ;
2169 
2170 /***************************************************************************/
2181  int unit,
2182  opennsl_field_entry_t entry,
2183  opennsl_trunk_t *data,
2185 
2186 /***************************************************************************/
2197  int unit,
2198  opennsl_field_entry_t entry,
2199  opennsl_l4_port_t *data,
2201 
2202 /***************************************************************************/
2213  int unit,
2214  opennsl_field_entry_t entry,
2215  opennsl_l4_port_t *data,
2217 
2218 /***************************************************************************/
2229  int unit,
2230  opennsl_field_entry_t entry,
2231  opennsl_vlan_t *data,
2233 
2234 /***************************************************************************/
2245  int unit,
2246  opennsl_field_entry_t entry,
2247  opennsl_vlan_t *data,
2249 
2250 /***************************************************************************/
2261  int unit,
2262  opennsl_field_entry_t entry,
2263  uint16 *data,
2264  uint16 *mask) LIB_DLL_EXPORTED ;
2265 
2266 /***************************************************************************/
2277  int unit,
2278  opennsl_field_entry_t entry,
2279  uint8 *data,
2280  uint8 *mask) LIB_DLL_EXPORTED ;
2281 
2282 /***************************************************************************/
2293  int unit,
2294  opennsl_field_entry_t entry,
2295  uint32 *data,
2296  uint32 *mask) LIB_DLL_EXPORTED ;
2297 
2298 /***************************************************************************/
2309  int unit,
2310  opennsl_field_entry_t entry,
2311  opennsl_ip_t *data,
2313 
2314 /***************************************************************************/
2325  int unit,
2326  opennsl_field_entry_t entry,
2327  opennsl_ip_t *data,
2329 
2330 /***************************************************************************/
2341  int unit,
2342  opennsl_field_entry_t entry,
2343  uint8 *data,
2344  uint8 *mask) LIB_DLL_EXPORTED ;
2345 
2346 /***************************************************************************/
2357  int unit,
2358  opennsl_field_entry_t entry,
2359  uint8 *data,
2360  uint8 *mask) LIB_DLL_EXPORTED ;
2361 
2362 /***************************************************************************/
2373  int unit,
2374  opennsl_field_entry_t entry,
2375  uint8 *data,
2376  uint8 *mask) LIB_DLL_EXPORTED ;
2377 
2378 /***************************************************************************/
2391  int unit,
2392  opennsl_field_entry_t entry,
2393  int max_count,
2394  opennsl_field_range_t *range,
2395  int *invert,
2396  int *count) LIB_DLL_EXPORTED ;
2397 
2398 /***************************************************************************/
2409  int unit,
2410  opennsl_field_entry_t entry,
2411  opennsl_ip6_t *data,
2413 
2414 /***************************************************************************/
2425  int unit,
2426  opennsl_field_entry_t entry,
2427  opennsl_ip6_t *data,
2429 
2430 /***************************************************************************/
2441  int unit,
2442  opennsl_field_entry_t entry,
2443  uint8 *data,
2444  uint8 *mask) LIB_DLL_EXPORTED ;
2445 
2446 /***************************************************************************/
2457  int unit,
2458  opennsl_field_entry_t entry,
2459  uint8 *data,
2460  uint8 *mask) LIB_DLL_EXPORTED ;
2461 
2462 /***************************************************************************/
2473  int unit,
2474  opennsl_field_entry_t entry,
2475  opennsl_mac_t *data,
2477 
2478 /***************************************************************************/
2489  int unit,
2490  opennsl_field_entry_t entry,
2491  opennsl_mac_t *data,
2493 
2494 /***************************************************************************/
2504  int unit,
2505  opennsl_field_entry_t entry,
2507 
2508 /***************************************************************************/
2519  int unit,
2520  opennsl_field_entry_t entry,
2521  uint32 *data,
2522  uint32 *mask) LIB_DLL_EXPORTED ;
2523 
2524 /***************************************************************************/
2535  int unit,
2536  opennsl_field_entry_t entry,
2537  uint32 *data,
2538  uint32 *mask) LIB_DLL_EXPORTED ;
2539 
2540 /***************************************************************************/
2551  int unit,
2552  opennsl_field_entry_t entry,
2553  uint32 *data,
2554  uint32 *mask) LIB_DLL_EXPORTED ;
2555 
2556 /***************************************************************************/
2566  int unit,
2567  opennsl_field_entry_t entry,
2569 
2570 /***************************************************************************/
2581  int unit,
2582  opennsl_field_entry_t entry,
2583  uint8 *data,
2584  uint8 *mask) LIB_DLL_EXPORTED ;
2585 
2586 /***************************************************************************/
2596  int unit,
2597  opennsl_field_entry_t entry,
2599 
2600 /***************************************************************************/
2611  int unit,
2612  opennsl_field_entry_t entry,
2613  uint32 *data,
2614  uint32 *mask) LIB_DLL_EXPORTED ;
2615 
2616 /***************************************************************************/
2627  int unit,
2628  opennsl_field_entry_t entry,
2629  uint8 *data,
2630  uint8 *mask) LIB_DLL_EXPORTED ;
2631 
2632 /***************************************************************************/
2643  int unit,
2644  opennsl_field_entry_t entry,
2645  uint16 *data,
2646  uint16 *mask) LIB_DLL_EXPORTED ;
2647 
2648 /***************************************************************************/
2659  int unit,
2660  opennsl_field_entry_t entry,
2661  uint8 data,
2662  uint8 mask) LIB_DLL_EXPORTED ;
2663 
2664 /***************************************************************************/
2675  int unit,
2676  opennsl_field_entry_t entry,
2677  uint8 *data,
2678  uint8 *mask) LIB_DLL_EXPORTED ;
2679 
2680 /***************************************************************************/
2691  int unit,
2692  opennsl_field_entry_t entry,
2693  uint8 data,
2694  uint8 mask) LIB_DLL_EXPORTED ;
2695 
2696 /***************************************************************************/
2707  int unit,
2708  opennsl_field_entry_t entry,
2709  uint8 *data,
2710  uint8 *mask) LIB_DLL_EXPORTED ;
2711 
2712 /***************************************************************************/
2723  int unit,
2724  opennsl_field_entry_t entry,
2725  uint64 data,
2726  uint64 mask) LIB_DLL_EXPORTED ;
2727 
2728 /***************************************************************************/
2739  int unit,
2740  opennsl_field_entry_t entry,
2741  uint64 *data,
2742  uint64 *mask) LIB_DLL_EXPORTED ;
2743 
2744 /***************************************************************************/
2769 extern int opennsl_field_action_add(
2770  int unit,
2771  opennsl_field_entry_t entry,
2772  opennsl_field_action_t action,
2773  uint32 param0,
2774  uint32 param1) LIB_DLL_EXPORTED ;
2775 
2776 /***************************************************************************/
2793 extern int opennsl_field_action_delete(
2794  int unit,
2795  opennsl_field_entry_t entry,
2796  opennsl_field_action_t action,
2797  uint32 param0,
2798  uint32 param1) LIB_DLL_EXPORTED ;
2799 
2800 /***************************************************************************/
2824 extern int opennsl_field_action_mac_add(
2825  int unit,
2826  opennsl_field_entry_t entry,
2827  opennsl_field_action_t action,
2829 
2830 /***************************************************************************/
2855  int unit,
2856  opennsl_field_entry_t entry,
2857  opennsl_field_action_t action,
2859 
2860 /***************************************************************************/
2878 extern int opennsl_field_action_get(
2879  int unit,
2880  opennsl_field_entry_t entry,
2881  opennsl_field_action_t action,
2882  uint32 *param0,
2883  uint32 *param1) LIB_DLL_EXPORTED ;
2884 
2885 /***************************************************************************/
2902 extern int opennsl_field_action_mac_get(
2903  int unit,
2904  opennsl_field_entry_t entry,
2905  opennsl_field_action_t action,
2907 
2908 /***************************************************************************/
2926  int unit,
2927  opennsl_field_entry_t entry,
2928  opennsl_field_action_t action,
2930 
2931 /***************************************************************************/
2950 extern int opennsl_field_action_remove(
2951  int unit,
2952  opennsl_field_entry_t entry,
2954 
2955 /***************************************************************************/
2968  int unit,
2970 
2971 /***************************************************************************/
2991 extern int opennsl_field_stat_create(
2992  int unit,
2993  opennsl_field_group_t group,
2994  int nstat,
2995  opennsl_field_stat_t *stat_arr,
2996  int *stat_id) LIB_DLL_EXPORTED ;
2997 
2998 /***************************************************************************/
3018 extern int opennsl_field_stat_create_id(
3019  int unit,
3020  opennsl_field_group_t group,
3021  int nstat,
3022  opennsl_field_stat_t *stat_arr,
3023  int stat_id) LIB_DLL_EXPORTED ;
3024 
3025 /***************************************************************************/
3040 extern int opennsl_field_stat_id_get(
3041  int unit,
3042  opennsl_field_group_t group,
3043  uint32 stat_id,
3044  uint32 *stat_counter_id) LIB_DLL_EXPORTED ;
3045 
3046 /***************************************************************************/
3057 extern int opennsl_field_stat_destroy(
3058  int unit,
3059  int stat_id) LIB_DLL_EXPORTED ;
3060 
3061 /***************************************************************************/
3073 extern int opennsl_field_stat_size(
3074  int unit,
3075  int stat_id,
3076  int *stat_size) LIB_DLL_EXPORTED ;
3077 
3078 /***************************************************************************/
3090 extern int opennsl_field_stat_set(
3091  int unit,
3092  int stat_id,
3093  opennsl_field_stat_t stat,
3094  uint64 value) LIB_DLL_EXPORTED ;
3095 
3096 /***************************************************************************/
3108 extern int opennsl_field_stat_all_set(
3109  int unit,
3110  int stat_id,
3111  uint64 value) LIB_DLL_EXPORTED ;
3112 
3113 /***************************************************************************/
3127 extern int opennsl_field_stat_get(
3128  int unit,
3129  int stat_id,
3130  opennsl_field_stat_t stat,
3131  uint64 *value) LIB_DLL_EXPORTED ;
3132 
3133 /***************************************************************************/
3146  int unit,
3147  opennsl_field_entry_t entry,
3148  int stat_id) LIB_DLL_EXPORTED ;
3149 
3150 /***************************************************************************/
3165  int unit,
3166  opennsl_field_entry_t entry,
3167  int stat_id) LIB_DLL_EXPORTED ;
3168 
3169 /***************************************************************************/
3184 extern int opennsl_field_entry_stat_get(
3185  int unit,
3186  opennsl_field_entry_t entry,
3187  int *stat_id) LIB_DLL_EXPORTED ;
3188 
3189 /***************************************************************************/
3200 extern int opennsl_field_stat_detach(
3201  int unit,
3203 
3206 
3207 /***************************************************************************/
3224 extern int opennsl_field_presel_create(
3225  int unit,
3227 
3228 /***************************************************************************/
3248  int unit,
3250 
3251 /***************************************************************************/
3264 extern int opennsl_field_presel_destroy(
3265  int unit,
3267 
3268 /***************************************************************************/
3286  int unit,
3287  opennsl_field_group_t group,
3289 
3290 /***************************************************************************/
3305  int unit,
3306  opennsl_field_group_t group,
3308 
3309 /***************************************************************************/
3320  int unit,
3321  opennsl_field_entry_t entry,
3322  uint32 data,
3323  uint32 mask) LIB_DLL_EXPORTED ;
3324 
3325 /***************************************************************************/
3336  int unit,
3337  opennsl_field_entry_t entry,
3338  uint32 *data,
3339  uint32 *mask) LIB_DLL_EXPORTED ;
3340 
3341 /***************************************************************************/
3361 extern int opennsl_field_qualify_Stage(
3362  int unit,
3363  opennsl_field_entry_t entry,
3365 
3366 /***************************************************************************/
3376  int unit,
3377  opennsl_field_entry_t entry,
3379 
3380 #endif /* __OPENNSL_FIELDX_H__ */
3381