File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,18 @@ static pfring_module_info pfring_module_list[] = {
146146
147147/* **************************************************** */
148148
149+ int pfring_is_module_prefix (const char * prefix ) {
150+ int i = -1 ;
151+
152+ while (pfring_module_list [++ i ].name )
153+ if (strcmp (pfring_module_list [i ].name , prefix ) == 0 )
154+ return 1 ;
155+
156+ return 0 ;
157+ }
158+
159+ /* **************************************************** */
160+
149161pfring * pfring_open (const char * device_name , u_int32_t caplen , u_int32_t flags ) {
150162 int i = -1 ;
151163 int mod_found = 0 ;
Original file line number Diff line number Diff line change @@ -1369,6 +1369,11 @@ pfring_if_t *pfring_findalldevs(void);
13691369 */
13701370void pfring_freealldevs (pfring_if_t * list );
13711371
1372+ /**
1373+ * Check if the prefix is a valid pf_ring module prefix
1374+ */
1375+ int pfring_is_module_prefix (const char * prefix );
1376+
13721377/* ********************************* */
13731378
13741379int pfring_parse_bpf_filter (const char * filter_buffer , u_int caplen ,
You can’t perform that action at this time.
0 commit comments