X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Ftestbeds%2Fplanetlab%2Ftunproto.py;fp=src%2Fnepi%2Ftestbeds%2Fplanetlab%2Ftunproto.py;h=0ea63b929de9c7eea635ef9d3667cb76f6323afc;hb=152fd56d074ae6c2dbbe205bbfacf66fa3dfa63a;hp=df23a7bd59b9c9200c36992503633b3d0bff8f67;hpb=2b1a68706ebda4773d5c728594f73ab52304097a;p=nepi.git diff --git a/src/nepi/testbeds/planetlab/tunproto.py b/src/nepi/testbeds/planetlab/tunproto.py index df23a7bd..0ea63b92 100644 --- a/src/nepi/testbeds/planetlab/tunproto.py +++ b/src/nepi/testbeds/planetlab/tunproto.py @@ -425,6 +425,11 @@ class TunProtoUDP(TunProtoBase): def shutdown(self): self.kill() + def launch(self, check_proto='udp', listen=False, extra_args=None): + if extra_args is None: + extra_args = ("-u",str(self.port)) + super(TunProtoUDP, self).launch(check_proto, listen, extra_args) + class TunProtoFD(TunProtoBase): def __init__(self, local, peer, home_path, key, listening): super(TunProtoFD, self).__init__(local, peer, home_path, key) @@ -439,6 +444,9 @@ class TunProtoFD(TunProtoBase): def shutdown(self): self.kill() + def launch(self, check_proto='fd', listen=False, extra_args=[]): + super(TunProtoFD, self).launch(check_proto, listen, extra_args) + class TunProtoTCP(TunProtoBase): def __init__(self, local, peer, home_path, key, listening): super(TunProtoTCP, self).__init__(local, peer, home_path, key) @@ -466,6 +474,11 @@ class TunProtoTCP(TunProtoBase): def shutdown(self): self.kill() + def launch(self, check_proto='tcp', listen=None, extra_args=[]): + if listen is None: + listen = self.listening + super(TunProtoTCP, self).launch(check_proto, listen, extra_args) + class TapProtoUDP(TunProtoUDP): def __init__(self, local, peer, home_path, key, listening): super(TapProtoUDP, self).__init__(local, peer, home_path, key, listening)