Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_hash.h
Go to the documentation of this file.
1 
9 /**********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 ***********************************************************************
26 *
27 * @filename openapi_hash.h
28 *
29 * @purpose Hash Prediction
30 *
31 * @component OpEN
32 *
33 * @create 10/17/2014
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_HASH_H_INCLUDED
39 #define OPENAPI_HASH_H_INCLUDED
40 
41 #include "openapi_common.h"
42 #include "openapi_mpls.h"
43 
44 typedef enum
45 {
46  OPEN_AGGR_TYPE_ECMP = 0,
47  OPEN_AGGR_TYPE_LAG = 1
48 } OPEN_AGGR_TYPE_t;
49 
50 typedef struct open_hash_egress_obj_s
51 {
52  union
53  {
54  uint32_t lagId;
55  open_inet_pfx_t ecmpId;
56  } aggrId;
58 
59 typedef struct open_hashPktInfo_s
60 {
61  OPEN_AGGR_TYPE_t aggrType;
62  open_hash_egress_obj_t egressId;
63  open_USP_t inUsp;
64  unsigned char src_mac[OPEN_MAC_ADDR_LEN];
65  unsigned char dst_mac[OPEN_MAC_ADDR_LEN];
66  uint32_t vid;
67  uint32_t ethertype;
68  uint32_t srcIp;
69  uint32_t destIp;
70  open_in6_addr_t srcIp6;
71  open_in6_addr_t destIp6;
72  uint32_t protocol;
73  uint32_t srcL4Port;
74  uint32_t dstL4Port;
76 
77 /*****************************************************************/
92  uint32_t intf, open_USP_t *usp);
93 
94 /*****************************************************************/
111  open_USP_t *usp,
112  OPEN_MPLS_LABELS_t *mpls_label);
113 
114 #endif /* OPENAPI_HASH_H_INCLUDED */
115 
open_error_t openapiHashIntfUnitSlotPortGet(openapiClientHandle_t *client_handle, uint32_t intf, open_USP_t *usp)
Get the unit, slot and port of the interface.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiHashDestGet(open_hashPktInfo_t *packetInfo, open_USP_t *usp, OPEN_MPLS_LABELS_t *mpls_label)
Get the destination physical port for the given packet and configuration information.
Hash Mode names.