Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.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 
43 typedef enum
44 {
45  OPEN_FILTER_FORWARD_ALL,
46  OPEN_FILTER_FORWARD_UNREGISTERED,
47  OPEN_FILTER_FILTER_UNREGISTERED
48 } OPEN_FILTER_VLAN_FILTER_MODE_t;
49 
50 /*************************************************************************/
74  open_buffdesc *macAddr, uint32_t vlanID);
75 
76 /*************************************************************************/
98  open_buffdesc *macAddr, uint32_t vlanID);
99 
100 /*************************************************************************/
117  OPEN_CONTROL_t adminMode);
118 
119 /*************************************************************************/
135  OPEN_CONTROL_t *adminMode);
136 
137 /*************************************************************************/
156  open_buffdesc *macAddr, uint32_t vlanId,
157  open_buffdesc *srcIntfList);
158 
159 /*************************************************************************/
178  open_buffdesc *macAddr, uint32_t vlanId,
179  uint32_t ifNum);
180 
181 /*************************************************************************/
200  open_buffdesc *macAddr, uint32_t vlanId,
201  uint32_t ifNum);
202 
203 /*************************************************************************/
222  open_buffdesc *macAddr, uint32_t vlanId,
223  uint32_t ifNum);
224 
225 /*************************************************************************/
245  open_buffdesc *macAddr, uint32_t vlanId,
246  uint32_t ifNum);
247 
248 /*************************************************************************/
269  open_buffdesc *macAddr, uint32_t vlanId,
270  uint32_t ifNum, open_buffdesc *fwdIntfList,
271  open_buffdesc *filterIntfList);
272 
273 /*************************************************************************/
294  open_buffdesc *macAddr, uint32_t vlanId,
295  uint32_t ifNum,
296  open_buffdesc *fwdIntfList,
297  open_buffdesc *filterIntfList);
298 
299 /*************************************************************************/
316  open_buffdesc *macAddr, uint32_t *vlanId);
317 
318 /*************************************************************************/
337  open_buffdesc *macAddr, uint32_t vlanId,
338  open_buffdesc *nextMacAddr, uint32_t *nextVlanId);
339 
340 /*************************************************************************/
360  open_buffdesc *macAddr, uint32_t vlanId,
361  uint32_t *numOfSrcIntf, open_buffdesc *srcIntfList);
362 
363 /*************************************************************************/
383  open_buffdesc *macAddr, uint32_t vlanId,
384  uint32_t *numOfDstIntf,
385  open_buffdesc *dstIntfList);
386 
387 /*************************************************************************/
407  open_buffdesc *macAddr, uint32_t vlanId,
408  uint32_t *numOfDstIntf,
409  open_buffdesc *dstFiltIntfList);
410 
411 /*************************************************************************/
427  uint32_t *count);
428 
429 /*************************************************************************/
447  uint32_t *totalCount, uint32_t *multicastFiltCount,
448  uint32_t *unicastFiltCount);
449 
450 /*************************************************************************/
468  open_buffdesc *macAddr, uint32_t vlanId,
469  OPEN_BOOL_t *status);
470 
471 /*************************************************************************/
487  uint32_t *size);
488 
489 /*************************************************************************/
507  uint32_t ifNum, OPEN_BOOL_t *status);
508 
509 /*************************************************************************/
526  uint32_t ifNum, OPEN_BOOL_t *status);
527 
528 /*************************************************************************/
547  open_buffdesc *macAddr, OPEN_BOOL_t *status);
548 
549 /*************************************************************************/
566  OPEN_FILTER_VLAN_FILTER_MODE_t mode);
567 
568 /*************************************************************************/
586  uint32_t vlanId,
587  OPEN_FILTER_VLAN_FILTER_MODE_t mode);
588 
589 /*************************************************************************/
606  uint32_t vlanId,
607  OPEN_FILTER_VLAN_FILTER_MODE_t *mode);
608 
609 /*************************************************************************/
626  uint32_t ifNum, OPEN_BOOL_t *status);
627 
628 /*************************************************************************/
648  open_buffdesc *macAddr, uint32_t vlanId,
649  uint32_t streamId);
650 
651 /*************************************************************************/
669  open_buffdesc *macAddr, uint32_t vlanId,
670  uint32_t *streamId);
671 
672 #endif /* OPENAPI_STATIC_FILTER_H_INCLUDED */
673 
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_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.