aboutsummaryrefslogtreecommitdiffstats
path: root/doc/extcap_example.py
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-05-26 07:52:17 -0400
committerRoland Knall <rknall@gmail.com>2017-05-30 18:10:03 +0000
commit6c44f2017c891e15045fca5c5cff79acd48ad4e5 (patch)
treee7270e94624e201819100fc67865cc938c608023 /doc/extcap_example.py
parent44327d8a6c7a312642adcec775555ab8a3430787 (diff)
Qt: Add support to verify extcap capture filter
Bug: 11668 Change-Id: Ib218d87c1905e53ffdab4e3dd6f93ba2c3d07c8b Reviewed-on: https://code.wireshark.org/review/21770 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'doc/extcap_example.py')
-rwxr-xr-xdoc/extcap_example.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/extcap_example.py b/doc/extcap_example.py
index 27b9538..e984b37 100755
--- a/doc/extcap_example.py
+++ b/doc/extcap_example.py
@@ -177,6 +177,10 @@ def extcap_dlts(interface):
elif ( interface == '2' ):
print ("dlt {number=148}{name=USER1}{display=Demo Implementation for Extcap}")
+def validate_capture_filter(capture_filter):
+ if capture_filter != "filter" and capture_filter != "valid":
+ print("Illegal capture filter")
+
"""
### FAKE DATA GENERATOR
@@ -446,6 +450,9 @@ if __name__ == '__main__':
if ( args.extcap_interfaces == False and args.extcap_interface == None ):
parser.exit("An interface must be provided or the selection must be displayed")
+ if ( args.extcap_capture_filter and not args.capture ):
+ validate_capture_filter(args.extcap_capture_filter)
+ sys.exit(0)
if ( args.extcap_interfaces == True or args.extcap_interface == None ):
extcap_interfaces()