SimpleLink Host Driver  1.0.0.1
 All Data Structures Functions Variables Groups Pages
wlan_rx_filters.h
1 /*
2  * wlan_rx_filters.h - CC31xx/CC32xx Host Driver Implementation
3  *
4  * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
5  *
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  *
14  * Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in the
16  * documentation and/or other materials provided with the
17  * distribution.
18  *
19  * Neither the name of Texas Instruments Incorporated nor the names of
20  * its contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  *
35 */
36 
37 #ifndef RX_FILTERS_PREPROCESSOR_CLI_IF_H_
38 #define RX_FILTERS_PREPROCESSOR_CLI_IF_H_
39 
40 
41 /*****************************************************************************/
42 /* Include files */
43 /*****************************************************************************/
44 #include "simplelink.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 
51 /*****************************************************************************/
52 /* Macro declarations */
53 /*****************************************************************************/
54 
59 #define SL_RX_FILTER_MAX_FILTERS 64
60 
65 #define SL_RX_FILTER_MAX_PRE_PREPARED_FILTERS_SETS (32)
66 
70 #define SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS (2)
71 
75 #define SL_RX_FILTER_NUM_OF_FILTER_PAYLOAD_ARGS (2)
76 
80 #define SL_RX_FILTER_NUM_OF_COMBINATION_TYPE_ARGS (2)
81 
85 #define SL_RX_FILTER_LENGTH_OF_REGX_PATTERN_LENGTH (32)
86 
87 
88 /* List of possible error numbers */
89 #define RXFL_OK (0) /* O.K */
90 #define RXFL_OUTPUT_OR_INPUT_BUFFER_LENGTH_TOO_SMALL (76) /* ! The output buffer length is smaller than required for that operation */
91 #define RXFL_DEPENDENT_FILTER_SOFTWARE_FILTER_NOT_FIT (75) /* Node filter can't be child of software filter and vice_versa */
92 #define RXFL_DEPENDENCY_IS_NOT_PERSISTENT (74) /* Dependency filter is not persistent */
93 #define RXFL_SYSTEM_STATE_NOT_SUPPORTED_FOR_THIS_FILTER (72) /* System state is not supported */
94 #define RXFL_TRIGGER_USE_REG5_TO_REG8 (71) /* Only counters 5 - 8 are allowed, for Tigger */
95 #define RXFL_TRIGGER_USE_REG1_TO_REG4 (70) /* Only counters 1 - 4 are allowed, for trigger */
96 #define RXFL_ACTION_USE_REG5_TO_REG8 (69) /* Only counters 5 - 8 are allowed, for action */
97 #define RXFL_ACTION_USE_REG1_TO_REG4 (68) /* Only counters 1 - 4 are allowed, for action */
98 #define RXFL_FIELD_SUPPORT_ONLY_EQUAL_AND_NOTEQUAL (67) /* Rule compare function Id is out of range */
99 #define RXFL_WRONG_MULTICAST_BROADCAST_ADDRESS (66) /* The address should be of type mutlicast or broadcast */
100 #define RXFL_THE_FILTER_IS_NOT_OF_HEADER_TYPE (65) /* The filter should be of header type */
101 #define RXFL_WRONG_COMPARE_FUNC_FOR_BROADCAST_ADDRESS (64) /* The compare funcion is not suitable for broadcast address */
102 #define RXFL_WRONG_MULTICAST_ADDRESS (63) /* The address should be of muticast type */
103 #define RXFL_DEPENDENT_FILTER_IS_NOT_PERSISTENT (62) /* The dependency filter is not persistent */
104 #define RXFL_DEPENDENT_FILTER_IS_NOT_ENABLED (61) /* The dependency filter is not enabled */
105 #define RXFL_FILTER_HAS_CHILDS (60) /* The filter has childs and can't be removed */
106 #define RXFL_CHILD_IS_ENABLED (59) /* Can't disable filter while the child is enabled */
107 #define RXFL_DEPENDENCY_IS_DISABLED (58) /* Can't enable filetr in case its depndency filter is disabled */
108 #define RXFL_NUMBER_OF_CONNECTION_POINTS_EXCEEDED (52) /* Number of connection points exceeded */
109 #define RXFL_DEPENDENT_FILTER_DEPENDENCY_ACTION_IS_DROP (51) /* The dependent filter has Drop action, thus the filter can't be created */
110 #define RXFL_FILTER_DO_NOT_EXISTS (50) /* The filter doesn't exists */
111 #define RXFL_DEPEDENCY_NOT_ON_THE_SAME_LAYER (49) /* The filter and its dependency must be on the same layer */
112 #define RXFL_NUMBER_OF_ARGS_EXCEEDED (48) /* Number of arguments excceded */
113 #define RXFL_ACTION_NO_REG_NUMBER (47) /* Action require counter number */
114 #define RXFL_DEPENDENT_FILTER_LAYER_DO_NOT_FIT (46) /* the filter and its dependency should be from the same layer */
115 #define RXFL_DEPENDENT_FILTER_SYSTEM_STATE_DO_NOT_FIT (45) /* The filter and its dependency system state don't fit */
116 #define RXFL_DEPENDENT_FILTER_DO_NOT_EXIST_2 (44) /* The parent filter don't exist */
117 #define RXFL_DEPENDENT_FILTER_DO_NOT_EXIST_1 (43) /* The parent filter is null */
118 #define RXFL_RULE_HEADER_ACTION_TYPE_NOT_SUPPORTED (42) /* The action type is not supported */
119 #define RXFL_RULE_HEADER_TRIGGER_COMPARE_FUNC_OUT_OF_RANGE (41) /* The Trigger comparision function is out of range */
120 #define RXFL_RULE_HEADER_TRIGGER_OUT_OF_RANGE (40) /* The Trigger is out of range */
121 #define RXFL_RULE_HEADER_COMPARE_FUNC_OUT_OF_RANGE (39) /* The rule compare function is out of range */
122 #define RXFL_FRAME_TYPE_NOT_SUPPORTED (38) /* ASCII frame type string is illegal */
123 #define RXFL_RULE_FIELD_ID_NOT_SUPPORTED (37) /* Rule field ID is out of range */
124 #define RXFL_RULE_HEADER_FIELD_ID_ASCII_NOT_SUPPORTED (36) /* This ASCII field ID is not supported */
125 #define RXFL_RULE_HEADER_NOT_SUPPORTED (35) /* The header rule is not supported on current release */
126 #define RXFL_RULE_HEADER_OUT_OF_RANGE (34) /* The header rule is out of range */
127 #define RXFL_RULE_HEADER_COMBINATION_OPERATOR_OUT_OF_RANGE (33) /* Combination function Id is out of ramge */
128 #define RXFL_RULE_HEADER_FIELD_ID_OUT_OF_RANGE (32) /* rule field Id is out of range */
129 #define RXFL_UPDATE_NOT_SUPPORTED (31) /* Update not supported */
130 #define RXFL_NO_FILTERS_ARE_DEFINED (24) /* No filters are defined in the system */
131 #define RXFL_NUMBER_OF_FILTER_EXCEEDED (23) /* Number of max filters excceded */
132 
133 
134 /******************************************************************************/
135 /* Type declarations */
136 /******************************************************************************/
137 
144 typedef _i8 SlrxFilterID_t;
145 
146 
151 typedef _u8 SlrxFilterCompareMask_t;
152 
160 typedef _u8 SlrxFilterIdMask_t[128/8];
161 
166 typedef _u8 SlrxFilterPrePreparedFilters_t;
167 #define SL_ARP_AUTO_REPLY_PRE_PREPARED_FILTERS (0)
168 #define SL_MULTICASTSIPV4_DROP_PREPREPARED_FILTERS (1)
169 #define SL_MULTICASTSIPV6_DROP_PREPREPARED_FILTERS (2)
170 #define SL_MULTICASTSWIFI_DROP_PREPREPARED_FILTERS (3)
171 
172 
173 
180 typedef _u8 SlrxFilterPrePreparedFiltersMask_t[SL_RX_FILTER_MAX_PRE_PREPARED_FILTERS_SETS/8];
181 
182 
188 {
189  _u8 x[SL_RX_FILTER_LENGTH_OF_REGX_PATTERN_LENGTH];
191 
192 
197 typedef _u8 SlrxFilterAsciiArg_t;
198 
199 
203 typedef _u8 SlrxFilterBinaryArg_t ;
204 
205 
212 typedef _u8 SlrxFilterActionArg_t ;
213 
214 
215 
220 typedef _u32 SlrxFilterOffset_t;
221 
222 
223 
228 typedef _u8 SlrxFilterRuleType_t;
229 /* possible values for SlrxFilterRuleType_t */
230 #define HEADER (0)
231 #define COMBINATION (1)
232 #define EXACT_PATTERN (2)
233 #define LIKELIHOOD_PATTERN (3)
234 #define ALWAYS_TRUE (4)
235 #define NUM_OF_FILTER_TYPES (5)
236 
237 
243 #define RX_FILTER_BINARY (0x1)
244 #define RX_FILTER_PERSISTENT (0x8)
245 #define RX_FILTER_ENABLE (0x10)
246 
247 typedef union SlrxFilterFlags_t
248 {
249 
250  /* struct
251  { */
256  /* _u8 Binary: 1; */
260  /* _u8 AutoSort : 1; */
264  /* _u8 AutoFaultDetect : 1; */
268  /* _u8 Enabled : 1; */
269  /* _u8 padding : 3; */
270  /*
271  };*/
272 
274 
276 
281 typedef _u8 SlrxFilterCompareFunction_t;
282 /* Possible values for SlrxFilterCompareFunction_t */
283 #define COMPARE_FUNC_IN_BETWEEN (0)
284 #define COMPARE_FUNC_EQUAL (1)
285 #define COMPARE_FUNC_NOT_EQUAL_TO (2)
286 #define COMPARE_FUNC_NOT_IN_BETWEEN (3)
287 #define COMPARE_FUNC_NUM_OF_FILTER_COMPARE_FUNC (4)
288 
293 typedef _u8 SlrxTriggerCompareFunction_t;
294 /* Possible values for SlrxTriggerCompareFunction_t */
295 #define TRIGGER_COMPARE_FUNC_EQUAL (0)
296 /* arg1 == protocolVal ,not supported in current release */
297 #define TRIGGER_COMPARE_FUNC_NOT_EQUAL_TO (1)
298 /* arg1 == protocolVal */
299 #define TRIGGER_COMPARE_FUNC_SMALLER_THAN (2)
300 /* arg1 == protocolVal */
301 #define TRIGGER_COMPARE_FUNC_BIGGER_THAN (3)
302 /* definition */
303 #define TRIGGER_COMPARE_FUNC_NUM_OF_FILTER_COMPARE_FUNC (4)
304 
305 
310 typedef _u8 SlrxFilterHdrField_t;
311 /* Possible values for SlrxFilterHdrField_t */
312 #define NULL_FIELD_ID_TYPE (0)
313 /* 802.11 control\data\management */
314 #define FRAME_TYPE_FIELD (1)
315 /* 802.11 beacon\probe\.. */
316 #define FRAME_SUBTYPE_FIELD (2)
317  /* 802.11 bssid type */
318 #define BSSID_FIELD (3)
319  /* */
320 #define MAC_SRC_ADDRESS_FIELD (4)
321  /* */
322 #define MAC_DST_ADDRESS_FIELD (5)
323 /* */
324 #define FRAME_LENGTH_FIELD (6)
325 /* */
326 #define PROTOCOL_TYPE_FIELD (7)
327  /* */
328 #define IP_VERSION_FIELD (8)
329  /* TCP / UDP */
330 #define IP_PROTOCOL_FIELD (9)
331  /* */
332 #define IPV4_SRC_ADRRESS_FIELD (10)
333 /* */
334 #define IPV4_DST_ADDRESS_FIELD (11)
335 /* */
336 #define IPV6_SRC_ADRRESS_FIELD (12)
337 /* */
338 #define IPV6_DST_ADDRESS_FIELD (13)
339  /* */
340 #define SRC_PORT_FIELD (14)
341  /* */
342 #define DST_PORT_FIELD (15)
343  /* Definition */
344 #define NUM_OF_FIELD_NAME_FIELD (16)
345 
349 /* -- 36 bytes */
351 {
352  /*----------------------------- Large size ---------------------------------*/
358  SlrxFilterBinaryArg_t RxFilterDB16BytesRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][16 ]; /* Binary Values for comparition */
364  /*----------------------------- Medium size ---------------------------------*/
368  SlrxFilterBinaryArg_t RxFilterDB6BytesRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][6]; /* Binary Values for comparition */
374  SlrxFilterAsciiArg_t RxFilterDB18BytesAsciiRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][18]; /* Ascii Values for comparison */
375  /*----------------------------- Small size ---------------------------------*/
380  SlrxFilterBinaryArg_t RxFilterDB4BytesRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][4]; /* Binary Values for comparison */
384  SlrxFilterAsciiArg_t RxFilterDB5BytesRuleAsciiArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][5]; /* Ascii Values for comparison */
385  /*----------------------------- 1 byte size ---------------------------------*/
388  SlrxFilterBinaryArg_t RxFilterDB1BytesRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][1]; /* Binary Values for comparison */
390 
391 
392 
396 /* -- 52 bytes */
398 {
400  /* -- 36 byte */
402 
406  /* -- 16 bytes */
407  SlrxFilterCompareMask_t RuleHeaderArgsMask[16];
408 
410 
417 /* -- 56 byte */
419 {
421  /* -- 52 bytes */
423 
425  /* -- 1 byte */
426  SlrxFilterHdrField_t RuleHeaderfield;
427 
428  /* -- 1 byte */
432  SlrxFilterCompareFunction_t RuleCompareFunc;
433 
435  /* -- 2 bytes */
436  _u8 RulePadding[2];
437 
439 
444 /* -- 40 byte */
446 {
448  /* -- 32 byte */
451  /* -- 4 byte */
452  SlrxFilterOffset_t LowerOffset;
454  /* -- 4 byte */
455  SlrxFilterOffset_t UpperOffset;
457 
462 typedef _u8 SlrxFilterCombinationTypeOperator_t;
463 /* Possible values for SlrxFilterCombinationTypeOperator_t */
465 #define COMBINED_FUNC_NOT (0)
466 
467 #define COMBINED_FUNC_AND (1)
468 
469 #define COMBINED_FUNC_OR (2)
470 
477 /* -- 4 byte */
479 {
480  /* ! combination operator */
481  /* -- 1 byte */
482  SlrxFilterCombinationTypeOperator_t CombinationTypeOperator;
483  /* ! filterID, may be one or two depends on the combination operator type */
484  /* -- 2 byte */
485  SlrxFilterID_t CombinationFilterId[SL_RX_FILTER_NUM_OF_COMBINATION_TYPE_ARGS];
486  /* ! Padding */
487  /* -- 1 byte */
488  _u8 Padding;
490 
491 
496 /* -- 56 byte */
497 typedef union SlrxFilterRule_t
498 {
499  /* ! Header type rule , see explanation on the ::SlrxFilterHeaderType_t structure */
500  /* -- 56 byte */
501  SlrxFilterHeaderType_t HeaderType;
502  /* ! Payload rule, not supported in current release */
503  /* -- 40 byte */
504  SlrxFilterPayloadType_t PayLoadHeaderType; /* future for exact pattern or like hood pattern */
505  /* ! Combined type rule , see explanation in ::SlrxFilterCombinationType_t structure */
506  /* -- 4 byte */
507  SlrxFilterCombinationType_t CombinationType;
509 
514 #define RX_FILTER_ROLE_AP (1)
515 #define RX_FILTER_ROLE_STA (2)
516 #define RX_FILTER_ROLE_PROMISCUOUS (4)
517 #define RX_FILTER_ROLE_NULL (0)
518 
520 {
521 /* struct */
522 /* { */
523 /* _u8 RoleAP :1; */
524 /* _u8 RoleStation :1; */
525  /* The filter is activated only in Promiscuous mode */
526 /* _u8 PromiscuousMode :1; */
527 /* _u8 RoleReserved :5; */
528 /* }; */
529  /* ! Bit fiels of the Filter role */
530  _u8 IntRepresentation;
531 
533 
538 #define RX_FILTER_CONNECTION_STATE_STA_CONNECTED (1)
539 #define RX_FILTER_CONNECTION_STATE_STA_NOT_CONNECTED (2)
540 #define RX_FILTER_CONNECTION_STATE_STA_HAS_IP (4)
541 #define RX_FILTER_CONNECTION_STATE_STA_HAS_NO_IP (8)
542 
544 {
545 /* struct */
546 /* { */
547 /* _u8 RoleStationWiFiConnected :1; */
548 /* _u8 RoleStationWiFiDisconneted:1; */
549 /* _u8 RoleStationWiFiHasIp:1; */
550 /* _u8 RoleStationWiFiHasNoIp:1; */
551 /* _u8 RoleStationWiFiSocketOpened:1; */
552 /* _u8 RoleStationWiFiSocketclosed:1; */
553 /* }; */
554 /* */
555  /* ! */
556  _u8 IntRepresentation;
557 
559 
567 typedef _u32 SlrxFilterDBTriggerArg_t;
568 
569 
570 
574 typedef _u8 SlrxFilterCounterId_t;
575 /* Possible values for SlrxFilterCounterId_t */
576 #define NO_TRIGGER (0)
577 #define RX_FILTER_COUNTER1 (1)
578 #define RX_FILTER_COUNTER2 (2)
579 #define RX_FILTER_COUNTER3 (3)
580 #define RX_FILTER_COUNTER4 (4)
581 #define RX_FILTER_COUNTER5 (5)
582 #define RX_FILTER_COUNTER6 (6)
583 #define RX_FILTER_COUNTER7 (7)
584 #define RX_FILTER_COUNTER8 (8)
585 #define MAX_RX_FILTER_COUNTER (9)
586 
587 
588 
594 typedef _u8 SlrxFilterActionArgs_t;
595 /* Possible values for SlrxFilterActionArgs_t */
596 #define ACTION_ARG_REG_1_4 (0)
597  /* ! Can be use as counter */
598 #define ACTION_ARG_TEMPLATE (1)
599  /* ! Can be use as counter */
600 #define ACTION_ARG_EVENT (2)
601 
602 /* ! GPIO number */
603 #define ACTION_ARG_GPIO (4)
604 
608 #define SL_RX_FILTER_NUM_OF_BYTES_FOR_ACTIONS_ARGS (5)
609 
610 
611 
612 
621 /* -- 12 byte */
622 typedef struct SlrxFilterTrigger_t
623 {
625  /* NULL value means tree root.
626  */
627  /* -- 1 byte */
628  SlrxFilterID_t ParentFilterID;
629  /* ! See ::SlrxFilterCounterId_t explanation */
630  /* -- 1 byte */
631  SlrxFilterCounterId_t Trigger;
632  /* ! See :: SlrxFilterTriggerConnectionStates_t */
633  /* -- 1 byte */
634  SlrxFilterTriggerConnectionStates_t TriggerArgConnectionState;
635  /* ! See ::SlrxFilterTriggerRoles_t */
636  /* -- 1 byte */
637  SlrxFilterTriggerRoles_t TriggerArgRoleStatus;
638  /* ! The Trigger arguments are in the same order as the Trigger bit field order. */
639  /* -- 4 byte */
640  SlrxFilterDBTriggerArg_t TriggerArg;
645  /* -- 1 byte */
646  SlrxTriggerCompareFunction_t TriggerCompareFunction;
647 
648  /* ! padding */
649  /* -- 3 byte */
650  _u8 Padding[3];
652 
660 #define RX_FILTER_ACTION_NULL (0x0)
661 #define RX_FILTER_ACTION_DROP (0x1)
662 #define RX_FILTER_ACTION_GPIO (0x2)
663 #define RX_FILTER_ACTION_ON_REG_INCREASE (0x4)
664 #define RX_FILTER_ACTION_ON_REG_DECREASE (0x8)
665 #define RX_FILTER_ACTION_ON_REG_RESET (0x10)
666 #define RX_FILTER_ACTION_SEND_TEMPLATE (0x20) /* unsupported */
667 #define RX_FILTER_ACTION_EVENT_TO_HOST (0x40) /* unsupported */
668 
670 {
671 /* struct */
672 /* { */
673  /* ! No action to execute the packet is dropped,drop is always on leaf. */
674  /* ! If not dropped ,The packet is passed to the next filter or in case it is the last filter to the host */
675 /* _u8 ActionDrop : 1; */
676  /* ! Not Supported in the current release */
677 /* _u8 ActionGpio : 1; */
683 /* _u8 ActionOnREGIncrease : 1; */
684 /* _u8 ActionOnREGDecrease : 1; */
685 /* _u8 ActionOnREGReset : 1; */
686 
687  /* ! Not Supported in the current release */
688 /* _u8 ActionSendTemplate : 1; */
689  /* ! Not Supported in the current release */
690 /* _u8 ActionEventToHost: 1; */
691 /* _u8 padding: 1; */
692 /* }; */
693 
695 
697 
702 /* -- 8 byte */
703 typedef struct SlrxFilterAction_t
704 {
705  /* -- 1 byte */
706  /* ! Determine which actions are supported */
707  SlrxFilterActionType_t ActionType;
708  /* ! Buffer for the action arguments */
717  /* -- 5 byte */
718  SlrxFilterActionArg_t ActionArg[SL_RX_FILTER_NUM_OF_BYTES_FOR_ACTIONS_ARGS];
719 
720  /* ! Padding */
721  /* - 2 Bytes */
722  _u8 Padding[2];
723 
725 
726 
734 /* 20 bytes */
736 {
737  /* -- 16 bytes */
738  SlrxFilterIdMask_t FilterIdMask;
739  /* 4 bytes */
740  _u8 Padding[4];
742 
743 
744 
745 /* -- 56 bytes */
747 {
748  /* -- 1 bytes */
749  _u8 FilterId;
750 
751  /* -- 1 bytes */
752  /* ! the args representation */
753  _u8 BinaryRepresentation;
754 
755  /* -- 52 byte */
756  SlrxFilterRuleHeaderArgsAndMask_t FilterRuleHeaderArgsAndMask;
757 
758  /* -- 2 bytes */
759  _u8 Padding[2];
761 
762 
767 /* -- 16 bytes */
769 {
770 
771  /* ! the filter set bit map */
772  /* -- 16 bytes */
773  SlrxFilterIdMask_t FilterIdMask;
774 
776 
777 
783 {
784  /* ! the filter set bit map */
785  /* -- 4 bytes */
786  SlrxFilterPrePreparedFiltersMask_t FilterPrePreparedFiltersMask;
787 
789 
790 
794 /*-- 4 bytes */
796 {
797  /* -- 4 bytes */
798  /* ! the filter set bit map */
799  SlrxFilterPrePreparedFiltersMask_t FilterPrePreparedFiltersMask;
800 
802 
803 
804 
805 typedef _u8 SLrxFilterOperation_t;
806 #define SL_ENABLE_DISABLE_RX_FILTER (0)
807 #define SL_REMOVE_RX_FILTER (1)
808 #define SL_STORE_RX_FILTERS (2)
809 #define SL_UPDATE_RX_FILTER_ARGS (3)
810 #define SL_FILTER_RETRIEVE_ENABLE_STATE (4)
811 #define SL_FILTER_PRE_PREPARED_RETRIEVE_CREATE_REMOVE_STATE (5)
812 #define SL_FILTER_PRE_PREPARED_SET_CREATE_REMOVE_STATE (6)
813 
814 
815 /* Bit manipulation for 8 bit */
816 #define ISBITSET8(x,i) ((x[i>>3] & (0x80>>(i&7)))!=0) /* < Is bit set, 8 bit unsigned numbers = x , location = i */
817 #define SETBIT8(x,i) x[i>>3]|=(0x80>>(i&7)); /* < Set bit,8 bit unsigned numbers = x , location = i */
818 #define CLEARBIT8(x,i) x[i>>3]&=(0x80>>(i&7))^0xFF; /* < Clear bit,8 bit unsigned numbers = x , location = i */
819 
820 
821 /*********************************************************************************************/
822 /* Function prototypes */
823 /*********************************************************************************************/
824 
845 #if _SL_INCLUDE_FUNC(sl_WlanRxFilterAdd)
846 SlrxFilterID_t sl_WlanRxFilterAdd( SlrxFilterRuleType_t RuleType,
847  SlrxFilterFlags_t FilterFlags,
848  const SlrxFilterRule_t* const Rule,
849  const SlrxFilterTrigger_t* const Trigger,
850  const SlrxFilterAction_t* const Action,
851  SlrxFilterID_t* pFilterId);
852 
853 #endif
854 
855 
856 
857 
858 
885 #if _SL_INCLUDE_FUNC(sl_WlanRxFilterSet)
886 _i16 sl_WlanRxFilterSet( const SLrxFilterOperation_t RxFilterOperation,
887  const _u8* const pInputBuffer,
888  _u16 InputbufferLength);
889 #endif
890 
910 #if _SL_INCLUDE_FUNC(sl_WlanRxFilterGet)
911 _i16 sl_WlanRxFilterGet(const SLrxFilterOperation_t RxFilterOperation,
912  _u8* pOutputBuffer,
913  _u16 OutputbufferLength);
914 #endif
915 
916 
924 #ifdef __cplusplus
925 }
926 #endif /* __cplusplus */
927 
928 #endif /* RX_FILTERS_PREPROCESSOR_CLI_IF_H_ */
929 
930 
Definition: wlan_rx_filters.h:397
SlrxFilterRegxPattern_t RegxPattern
Definition: wlan_rx_filters.h:449
Definition: wlan_rx_filters.h:497
SlrxFilterHeaderArg_t RuleHeaderArgs
Definition: wlan_rx_filters.h:401
Definition: wlan_rx_filters.h:782
SlrxFilterCompareFunction_t RuleCompareFunc
Definition: wlan_rx_filters.h:432
Definition: wlan_rx_filters.h:519
SlrxFilterActionArg_t ActionArg[SL_RX_FILTER_NUM_OF_BYTES_FOR_ACTIONS_ARGS]
Definition: wlan_rx_filters.h:718
SlrxFilterBinaryArg_t RxFilterDB1BytesRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][1]
Definition: wlan_rx_filters.h:388
Definition: wlan_rx_filters.h:247
_u8 IntRepresentation
Definition: wlan_rx_filters.h:694
SlrxFilterOffset_t LowerOffset
Definition: wlan_rx_filters.h:452
Definition: wlan_rx_filters.h:418
Definition: wlan_rx_filters.h:669
Definition: wlan_rx_filters.h:735
SlrxFilterBinaryArg_t RxFilterDB4BytesRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][4]
Definition: wlan_rx_filters.h:380
SlrxFilterAsciiArg_t RxFilterDB18BytesAsciiRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][18]
Definition: wlan_rx_filters.h:374
SlrxFilterCompareMask_t RuleHeaderArgsMask[16]
Definition: wlan_rx_filters.h:407
Definition: wlan_rx_filters.h:746
SlrxTriggerCompareFunction_t TriggerCompareFunction
Definition: wlan_rx_filters.h:646
_u8 IntRepresentation
Definition: wlan_rx_filters.h:273
SlrxFilterRuleHeaderArgsAndMask_t RuleHeaderArgsAndMask
Definition: wlan_rx_filters.h:422
Definition: wlan_rx_filters.h:350
SlrxFilterHdrField_t RuleHeaderfield
Definition: wlan_rx_filters.h:426
Definition: wlan_rx_filters.h:478
Definition: wlan_rx_filters.h:445
Definition: wlan_rx_filters.h:703
Definition: wlan_rx_filters.h:187
Definition: wlan_rx_filters.h:543
SlrxFilterOffset_t UpperOffset
Definition: wlan_rx_filters.h:455
SlrxFilterBinaryArg_t RxFilterDB6BytesRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][6]
Definition: wlan_rx_filters.h:368
_u8 RulePadding[2]
Definition: wlan_rx_filters.h:436
Definition: wlan_rx_filters.h:622
SlrxFilterID_t ParentFilterID
Definition: wlan_rx_filters.h:628
SlrxFilterAsciiArg_t RxFilterDB5BytesRuleAsciiArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][5]
Definition: wlan_rx_filters.h:384
SlrxFilterBinaryArg_t RxFilterDB16BytesRuleArgs[SL_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][16]
Definition: wlan_rx_filters.h:358