+
+def l3_initialize_args():
+ """
+ Initialize argument parsing for ovs-l3ping utility.
+ """
+ parser = argparse.ArgumentParser(description='Test L3 tunnel '
+ 'connectivity between two Open vSwitch instances.')
+
+ parser.add_argument('-v', '--version', action='version',
+ version='ovs-l3ping (Open vSwitch) @VERSION@')
+
+ parser.add_argument("-b", "--bandwidth", action='store',
+ dest="targetBandwidth", default="1M", type=bandwidth,
+ help='Target bandwidth for UDP tests in bits/second. Use '
+ 'postfix M or K to alter unit magnitude.')
+ parser.add_argument("-i", "--interval", action='store',
+ dest="testInterval", default=5, type=int,
+ help='Interval for how long to run each test in seconds.')
+
+ parser.add_argument("-t", "--tunnel-mode", action='store',
+ dest="tunnelMode", required=True,
+ help='Do L3 tests with this tunnel type.')
+
+ group = parser.add_mutually_exclusive_group(required=True)
+ group.add_argument("-s", "--server", action="store", dest="server",
+ metavar="TUNNELIP,SERVER",
+ type=l3_endpoint_server,
+ help='Run in server mode and wait for the client to '
+ 'connect.')
+ group.add_argument('-c', "--client", action="store", dest="client",
+ metavar="TUNNELIP,CLIENT,SERVER",
+ type=l3_endpoint_client,
+ help='Run in client mode and connect to the server.')
+ return parser.parse_args()