1 /* ------------------------------------------------
2 Copyright 2014 AT&T Intellectual Property
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
7 http://www.apache.org/licenses/LICENSE-2.0
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ------------------------------------------- */
17 #include <callbackregistries.h>
18 #include <ipcencoding.h>
25 //gs_uint64_t lfta_prefilter(struct packet * p);
26 extern gs_uint64_t (*lfta_prefilter)(void *pkt);
33 void rts_fta_process_packet(struct packet * p)
36 gs_uint64_t prefilter;
37 static gs_uint32_t t=0;
38 static struct pr_stats s = {0};
41 prefilter=(*lfta_prefilter)(p);
43 if (ftaexec_start()<0) {
44 gslog(LOG_EMERG,"GSCPRTS::error::could not init "
45 "FTA list itteration\n");
49 while ((f=ftaexec_next())!=0) {
50 // fprintf(stderr,"%llu %llu %llu\n",f->prefilter,prefilter,~( (prefilter&(f->prefilter)) | (~(f->prefilter)) ));
51 if (~( (prefilter&(f->prefilter)) | (~(f->prefilter)) ) == 0)
52 f->accept_packet(f,0,p,0);
64 if (ftaexec_start()<0) {
65 gslog(LOG_EMERG,"GSCPRTS::error::could not init "
66 "FTA list itteration\n");
69 while ((f=ftaexec_next())!=0) {
70 f->control_fta(f,FTA_COMMAND_FILE_DONE,0,0);