2 // Copyright (c) 2010-2017 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
21 /* The following functions are not a real implementation of a
22 DPI. They serve only to create dpi_stub.so which can be loaded into
25 static int dpi_init(uint32_t thread_count, int argc, const char *argv[])
30 size_t dpi_get_flow_entry_size(void) {return 0;}
31 void flow_data_dpi_flow_expire(void *flow_data) {}
32 void *dpi_thread_start() {return NULL;}
33 void dpi_thread_stop(void *opaque) {}
34 void dpi_finish(void) {}
36 int dpi_process(void *opaque, struct flow_info *fi, void *flow_data,
37 struct dpi_payload *payload, uint32_t results[],
43 static struct dpi_engine dpi_engine = {
45 .dpi_get_flow_entry_size = dpi_get_flow_entry_size,
46 .dpi_flow_expire = flow_data_dpi_flow_expire,
47 .dpi_thread_start = dpi_thread_start,
48 .dpi_thread_stop = dpi_thread_stop,
49 .dpi_process = dpi_process,
50 .dpi_finish = dpi_finish,
54 struct dpi_engine *get_dpi_engine(void)