7 def set_client(ci,cs,pw):
10 assert(client_cs is None)
13 c.max_outstanding = cfg.getint(cs, 'max_requests_outstanding')
18 global max_requests_outstanding
20 process_cfg_common_always()
24 c.url = cfg.get('server','url')
27 sa = c.saddrs[0].url()
29 process_cfg_clients(set_client)
31 c.routes = cfg.get('virtual','routes')
32 c.max_queue_time = cfg.get(client_cs, 'max_queue_time')
34 process_cfg_ipif(client_cs,
43 queue = PacketQueue(c.max_queue_time)
45 def outbound(packet, saddr, daddr):
46 #print('OUT ', saddr, daddr, repr(packet))
52 if outstanding >= c.max_outstanding: break
54 if not queue.nonempty():
55 if outstanding >= c.target_
57 while (outstanding < and
58 (queue.notempty() or outstanding < c.
60 common_startup(defcfg)
62 start_ipif(c.ipif_command, outbound)