| 1 | /* |
| 2 | * Copyright (c) 2015-2016, Intel Corporation |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions are met: |
| 6 | * |
| 7 | * * Redistributions of source code must retain the above copyright notice, |
| 8 | * this list of conditions and the following disclaimer. |
| 9 | * * Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * * Neither the name of Intel Corporation nor the names of its contributors |
| 13 | * may be used to endorse or promote products derived from this software |
| 14 | * without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 26 | * POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
| 28 | |
| 29 | #ifndef LBR_H |
| 30 | #define LBR_H |
| 31 | |
| 32 | #include "ue2common.h" |
| 33 | |
| 34 | struct mq; |
| 35 | struct NFA; |
| 36 | |
| 37 | #ifdef __cplusplus |
| 38 | extern "C" |
| 39 | { |
| 40 | #endif |
| 41 | |
| 42 | // LBR Dot |
| 43 | |
| 44 | char nfaExecLbrDot_Q(const struct NFA *n, struct mq *q, s64a end); |
| 45 | char nfaExecLbrDot_Q2(const struct NFA *n, struct mq *q, s64a end); |
| 46 | char nfaExecLbrDot_QR(const struct NFA *n, struct mq *q, ReportID report); |
| 47 | char nfaExecLbrDot_reportCurrent(const struct NFA *n, struct mq *q); |
| 48 | char nfaExecLbrDot_inAccept(const struct NFA *n, ReportID report, struct mq *q); |
| 49 | char nfaExecLbrDot_inAnyAccept(const struct NFA *n, struct mq *q); |
| 50 | char nfaExecLbrDot_queueInitState(const struct NFA *n, struct mq *q); |
| 51 | char nfaExecLbrDot_initCompressedState(const struct NFA *n, u64a offset, |
| 52 | void *state, u8 key); |
| 53 | char nfaExecLbrDot_queueCompressState(const struct NFA *nfa, const struct mq *q, |
| 54 | s64a loc); |
| 55 | char nfaExecLbrDot_expandState(const struct NFA *nfa, void *dest, |
| 56 | const void *src, u64a offset, u8 key); |
| 57 | |
| 58 | #define nfaExecLbrDot_testEOD NFA_API_NO_IMPL |
| 59 | #define nfaExecLbrDot_B_Reverse NFA_API_NO_IMPL |
| 60 | #define nfaExecLbrDot_zombie_status NFA_API_ZOMBIE_NO_IMPL |
| 61 | |
| 62 | // LBR Verm |
| 63 | |
| 64 | char nfaExecLbrVerm_Q(const struct NFA *n, struct mq *q, s64a end); |
| 65 | char nfaExecLbrVerm_Q2(const struct NFA *n, struct mq *q, s64a end); |
| 66 | char nfaExecLbrVerm_QR(const struct NFA *n, struct mq *q, ReportID report); |
| 67 | char nfaExecLbrVerm_reportCurrent(const struct NFA *n, struct mq *q); |
| 68 | char nfaExecLbrVerm_inAccept(const struct NFA *n, ReportID report, |
| 69 | struct mq *q); |
| 70 | char nfaExecLbrVerm_inAnyAccept(const struct NFA *n, struct mq *q); |
| 71 | char nfaExecLbrVerm_queueInitState(const struct NFA *n, struct mq *q); |
| 72 | char nfaExecLbrVerm_initCompressedState(const struct NFA *n, u64a offset, |
| 73 | void *state, u8 key); |
| 74 | char nfaExecLbrVerm_queueCompressState(const struct NFA *nfa, |
| 75 | const struct mq *q, s64a loc); |
| 76 | char nfaExecLbrVerm_expandState(const struct NFA *nfa, void *dest, |
| 77 | const void *src, u64a offset, u8 key); |
| 78 | |
| 79 | #define nfaExecLbrVerm_testEOD NFA_API_NO_IMPL |
| 80 | #define nfaExecLbrVerm_B_Reverse NFA_API_NO_IMPL |
| 81 | #define nfaExecLbrVerm_zombie_status NFA_API_ZOMBIE_NO_IMPL |
| 82 | |
| 83 | // LBR Negated Verm |
| 84 | |
| 85 | char nfaExecLbrNVerm_Q(const struct NFA *n, struct mq *q, s64a end); |
| 86 | char nfaExecLbrNVerm_Q2(const struct NFA *n, struct mq *q, s64a end); |
| 87 | char nfaExecLbrNVerm_QR(const struct NFA *n, struct mq *q, ReportID report); |
| 88 | char nfaExecLbrNVerm_reportCurrent(const struct NFA *n, struct mq *q); |
| 89 | char nfaExecLbrNVerm_inAccept(const struct NFA *n, ReportID report, |
| 90 | struct mq *q); |
| 91 | char nfaExecLbrNVerm_inAnyAccept(const struct NFA *n, struct mq *q); |
| 92 | char nfaExecLbrNVerm_queueInitState(const struct NFA *n, struct mq *q); |
| 93 | char nfaExecLbrNVerm_initCompressedState(const struct NFA *n, u64a offset, |
| 94 | void *state, u8 key); |
| 95 | char nfaExecLbrNVerm_queueCompressState(const struct NFA *nfa, |
| 96 | const struct mq *q, s64a loc); |
| 97 | char nfaExecLbrNVerm_expandState(const struct NFA *nfa, void *dest, |
| 98 | const void *src, u64a offset, u8 key); |
| 99 | |
| 100 | #define nfaExecLbrNVerm_testEOD NFA_API_NO_IMPL |
| 101 | #define nfaExecLbrNVerm_B_Reverse NFA_API_NO_IMPL |
| 102 | #define nfaExecLbrNVerm_zombie_status NFA_API_ZOMBIE_NO_IMPL |
| 103 | |
| 104 | // LBR Shuf |
| 105 | |
| 106 | char nfaExecLbrShuf_Q(const struct NFA *n, struct mq *q, s64a end); |
| 107 | char nfaExecLbrShuf_Q2(const struct NFA *n, struct mq *q, s64a end); |
| 108 | char nfaExecLbrShuf_QR(const struct NFA *n, struct mq *q, ReportID report); |
| 109 | char nfaExecLbrShuf_reportCurrent(const struct NFA *n, struct mq *q); |
| 110 | char nfaExecLbrShuf_inAccept(const struct NFA *n, ReportID report, |
| 111 | struct mq *q); |
| 112 | char nfaExecLbrShuf_inAnyAccept(const struct NFA *n, struct mq *q); |
| 113 | char nfaExecLbrShuf_queueInitState(const struct NFA *n, struct mq *q); |
| 114 | char nfaExecLbrShuf_initCompressedState(const struct NFA *n, u64a offset, |
| 115 | void *state, u8 key); |
| 116 | char nfaExecLbrShuf_queueCompressState(const struct NFA *nfa, |
| 117 | const struct mq *q, s64a loc); |
| 118 | char nfaExecLbrShuf_expandState(const struct NFA *nfa, void *dest, |
| 119 | const void *src, u64a offset, u8 key); |
| 120 | |
| 121 | #define nfaExecLbrShuf_testEOD NFA_API_NO_IMPL |
| 122 | #define nfaExecLbrShuf_B_Reverse NFA_API_NO_IMPL |
| 123 | #define nfaExecLbrShuf_zombie_status NFA_API_ZOMBIE_NO_IMPL |
| 124 | |
| 125 | // LBR Truffle |
| 126 | |
| 127 | char nfaExecLbrTruf_Q(const struct NFA *n, struct mq *q, s64a end); |
| 128 | char nfaExecLbrTruf_Q2(const struct NFA *n, struct mq *q, s64a end); |
| 129 | char nfaExecLbrTruf_QR(const struct NFA *n, struct mq *q, ReportID report); |
| 130 | char nfaExecLbrTruf_reportCurrent(const struct NFA *n, struct mq *q); |
| 131 | char nfaExecLbrTruf_inAccept(const struct NFA *n, ReportID report, |
| 132 | struct mq *q); |
| 133 | char nfaExecLbrTruf_inAnyAccept(const struct NFA *n, struct mq *q); |
| 134 | char nfaExecLbrTruf_queueInitState(const struct NFA *n, struct mq *q); |
| 135 | char nfaExecLbrTruf_initCompressedState(const struct NFA *n, u64a offset, |
| 136 | void *state, u8 key); |
| 137 | char nfaExecLbrTruf_queueCompressState(const struct NFA *nfa, |
| 138 | const struct mq *q, s64a loc); |
| 139 | char nfaExecLbrTruf_expandState(const struct NFA *nfa, void *dest, |
| 140 | const void *src, u64a offset, u8 key); |
| 141 | |
| 142 | #define nfaExecLbrTruf_testEOD NFA_API_NO_IMPL |
| 143 | #define nfaExecLbrTruf_B_Reverse NFA_API_NO_IMPL |
| 144 | #define nfaExecLbrTruf_zombie_status NFA_API_ZOMBIE_NO_IMPL |
| 145 | |
| 146 | #ifdef __cplusplus |
| 147 | } |
| 148 | #endif |
| 149 | |
| 150 | #endif |
| 151 | |