Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
openapi_static_filter.h
Go to the documentation of this file.
1 
9 /**********************************************************************
10 *
11 * Copyright 2019-2023 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_static_filter.h
28 *
29 * @purpose This code implements the OpEN Static Filter API
30 *
31 * @component OPEN
32 *
33 * @create 06/08/2019
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_STATIC_FILTER_H_INCLUDED
39 #define OPENAPI_STATIC_FILTER_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
44 typedef enum
45 {
50 
51 /*************************************************************************/
75  open_buffdesc *macAddr, uint32_t vlanID);
76 
77 /*************************************************************************/
99  open_buffdesc *macAddr, uint32_t vlanID);
100 
101 /*************************************************************************/
118  OPEN_CONTROL_t adminMode);
119 
120 /*************************************************************************/
136  OPEN_CONTROL_t *adminMode);
137 
138 /*************************************************************************/
157  open_buffdesc *macAddr, uint32_t vlanId,
158  open_buffdesc *srcIntfList);
159 
160 /*************************************************************************/
179  open_buffdesc *macAddr, uint32_t vlanId,
180  uint32_t ifNum);
181 
182 /*************************************************************************/
201  open_buffdesc *macAddr, uint32_t vlanId,
202  uint32_t ifNum);
203 
204 /*************************************************************************/
223  open_buffdesc *macAddr, uint32_t vlanId,
224  uint32_t ifNum);
225 
226 /*************************************************************************/
246  open_buffdesc *macAddr, uint32_t vlanId,
247  uint32_t ifNum);
248 
249 /*************************************************************************/
270  open_buffdesc *macAddr, uint32_t vlanId,
271  uint32_t ifNum, open_buffdesc *fwdIntfList,
272  open_buffdesc *filterIntfList);
273 
274 /*************************************************************************/
295  open_buffdesc *macAddr, uint32_t vlanId,
296  uint32_t ifNum,
297  open_buffdesc *fwdIntfList,
298  open_buffdesc *filterIntfList);
299 
300 /*************************************************************************/
317  open_buffdesc *macAddr, uint32_t *vlanId);
318 
319 /*************************************************************************/
338  open_buffdesc *macAddr, uint32_t vlanId,
339  open_buffdesc *nextMacAddr, uint32_t *nextVlanId);
340 
341 /*************************************************************************/
361  open_buffdesc *macAddr, uint32_t vlanId,
362  uint32_t *numOfSrcIntf, open_buffdesc *srcIntfList);
363 
364 /*************************************************************************/
384  open_buffdesc *macAddr, uint32_t vlanId,
385  uint32_t *numOfDstIntf,
386  open_buffdesc *dstIntfList);
387 
388 /*************************************************************************/
408  open_buffdesc *macAddr, uint32_t vlanId,
409  uint32_t *numOfDstIntf,
410  open_buffdesc *dstFiltIntfList);
411 
412 /*************************************************************************/
428  uint32_t *count);
429 
430 /*************************************************************************/
448  uint32_t *totalCount, uint32_t *multicastFiltCount,
449  uint32_t *unicastFiltCount);
450 
451 /*************************************************************************/
469  open_buffdesc *macAddr, uint32_t vlanId,
470  OPEN_BOOL_t *status);
471 
472 /*************************************************************************/
488  uint32_t *size);
489 
490 /*************************************************************************/
508  uint32_t ifNum, OPEN_BOOL_t *status);
509 
510 /*************************************************************************/
527  uint32_t ifNum, OPEN_BOOL_t *status);
528 
529 /*************************************************************************/
548  open_buffdesc *macAddr, OPEN_BOOL_t *status);
549 
550 /*************************************************************************/
568 
569 /*************************************************************************/
587  uint32_t vlanId,
589 
590 /*************************************************************************/
607  uint32_t vlanId,
609 
610 /*************************************************************************/
627  uint32_t ifNum, OPEN_BOOL_t *status);
628 
629 /*************************************************************************/
649  open_buffdesc *macAddr, uint32_t vlanId,
650  uint32_t streamId);
651 
652 /*************************************************************************/
670  open_buffdesc *macAddr, uint32_t vlanId,
671  uint32_t *streamId);
672 
673 #endif /* OPENAPI_STATIC_FILTER_H_INCLUDED */
674 
open_error_t openapiFilterDstFiltIntfListGet(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t *numOfDstIntf, open_buffdesc *dstFiltIntfList)
Gets list of destination filter interfaces for a MAC static filter.
open_error_t openapiFilterVlanFilteringModeGet(openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_FILTER_VLAN_FILTER_MODE_t *mode)
Gets multicast address filtering configuration for the specified vlan.
open_error_t openapiFilterStreamGet(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t *streamId)
Gets the configured stream id.
open_error_t openapiFilterSrcIntfAdd(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t ifNum)
Adds a source interface to the static MAC filter.
open_error_t openapiFilterCheckMacAddrTypeMulticast(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, OPEN_BOOL_t *status)
Checks to see the mac address type, unicast or multicast.
open_error_t openapiFilterSrcIntfListGet(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t *numOfSrcIntf, open_buffdesc *srcIntfList)
Gets list of source interfaces for a MAC static filter.
open_error_t openapiFilterAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
Sets the static MAC filter admin mode.
open_error_t openapiFilterCountersGet(openapiClientHandle_t *client_handle, uint32_t *totalCount, uint32_t *multicastFiltCount, uint32_t *unicastFiltCount)
Gets the number of total, multicast and unicast MAC static filters configured.
open_error_t openapiFilterFirstGet(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t *vlanId)
Gets the first configured MAC static filter.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiFilterVlanFilteringModeSet(openapiClientHandle_t *client_handle, uint32_t vlanId, OPEN_FILTER_VLAN_FILTER_MODE_t mode)
Sets multicast address filtering configuration for the specified vlan.
open_error_t openapiFilterCountGet(openapiClientHandle_t *client_handle, uint32_t *count)
Gets the number of MAC static filters configured.
open_error_t openapiFilterIsValidIntf(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *status)
Checks if the interface is valid for filtering.
open_error_t openapiFilterCreate(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanID)
Create a MAC Static Filter.
open_error_t openapiFilterAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Gets the static MAC filter admin mode.
open_error_t openapiFilterDstIntfListDelete(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t ifNum, open_buffdesc *fwdIntfList, open_buffdesc *filterIntfList)
Deletes destination interfaces from the static MAC filter.
open_error_t openapiFilterStreamSet(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t streamId)
Sets the stream id of an existing macfilter with given MAC address and vlan id.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiFilterSizeGet(openapiClientHandle_t *client_handle, uint32_t *size)
Gets the buffer size used by filtering component for the bit mask.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiFilterFilteringModeSet(openapiClientHandle_t *client_handle, OPEN_FILTER_VLAN_FILTER_MODE_t mode)
Set multicast address filtering configuration for all vlans.
open_error_t openapiFilterNextGet(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, open_buffdesc *nextMacAddr, uint32_t *nextVlanId)
Gets the next configured MAC static filter.
open_error_t openapiFilterDstIntfAdd(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t ifNum)
Adds a destination interface to the static MAC filter.
open_error_t openapiFilterDstIntfDelete(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t ifNum)
Deletes a destination interface from the destination interface list of the static MAC filter...
open_error_t openapiFilterDstIntfListAdd(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t ifNum, open_buffdesc *fwdIntfList, open_buffdesc *filterIntfList)
Adds destination interfaces to the static MAC filter.
OPEN_FILTER_VLAN_FILTER_MODE_t
< Filtering VLAN modes
open_error_t openapiFilterSrcIntfDelete(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t ifNum)
Deletes a source interface from the source interface list of the static MAC filter.
open_error_t openapiFilterIsIntfInAnyFilter(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *status)
Checks if a particular interface is present in any MAC filter.
open_error_t openapiFilterDstIntfListGet(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, uint32_t *numOfDstIntf, open_buffdesc *dstIntfList)
Gets list of destination interfaces for a MAC static filter.
open_error_t openapiFilterRemove(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanID)
Remove a configured MAC Static Filter.
open_error_t openapiFilterPortParmCanSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *status)
Check to see if the port is the appropriate type on which the param can be set.
open_error_t openapiFilterSrcIntfListModify(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, open_buffdesc *srcIntfList)
Apply a source interface list to the static MAC filter.
open_error_t openapiFilterIsConfigured(openapiClientHandle_t *client_handle, open_buffdesc *macAddr, uint32_t vlanId, OPEN_BOOL_t *status)
Checks to see if a MAC filter is configured or not.