aboutsummaryrefslogtreecommitdiffstats
path: root/doc/extcap_example.py
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-11-09 13:56:12 +0100
committerAnders Broman <a.broman58@gmail.com>2016-12-09 04:49:33 +0000
commitb7e7796e20d5b194a72658a0e3f88522e7f66ebc (patch)
tree54291ca366573e7719a8bfd453410b209c7db708 /doc/extcap_example.py
parentfb0c288f99518eac830cf29e92c3543a8045878e (diff)
extcap: add new option type (timestamp).
Bug: 12787 Change-Id: I941833c55fb607c8af2ef832082af58d7b94e965 Reviewed-on: https://code.wireshark.org/review/18721 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'doc/extcap_example.py')
-rwxr-xr-xdoc/extcap_example.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/extcap_example.py b/doc/extcap_example.py
index 0847cb5..446cccb 100755
--- a/doc/extcap_example.py
+++ b/doc/extcap_example.py
@@ -106,6 +106,7 @@ def extcap_config(interface):
args.append ( (6, '--d1test', 'Double 1 Test', 'Long Test Value', 'double', '{default=123.456}'))
args.append ( (7, '--d2test', 'Double 2 Test', 'Long Test Value', 'double', '{default= 123,456}'))
args.append ( (8, '--password', 'Password', 'Package message password', 'password', '') )
+ args.append ( (9, '--ts', 'Start Time', 'Capture start time', 'timestamp', '') )
values.append ( (3, "if1", "Remote1", "true" ) )
values.append ( (3, "if2", "Remote2", "false" ) )
@@ -243,6 +244,7 @@ if __name__ == '__main__':
delay = 0
message = ""
fake_ip = ""
+ ts = 0
parser = ArgumentParser(
prog="Extcap Example",
@@ -264,6 +266,7 @@ if __name__ == '__main__':
parser.add_argument("--remote", help="Demonstrates a selector choice", default="if1", choices=["if1", "if2"] )
parser.add_argument("--message", help="Demonstrates string variable", nargs='?', default="" )
parser.add_argument("--fake_ip", help="Add a fake sender IP adress", nargs='?', default="127.0.0.1" )
+ parser.add_argument("--ts", help="Capture start time", action="store_true" )
try:
args, unknown = parser.parse_known_args()
@@ -306,6 +309,8 @@ if __name__ == '__main__':
if ( args.fake_ip == None or len(args.fake_ip) < 7 or len(args.fake_ip.split('.')) != 4 ):
fake_ip = "127.0.0.1"
+ ts = args.ts
+
if args.extcap_config:
extcap_config(interface)
elif args.extcap_dlts: