Merging with HEAD
authorClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Mon, 30 May 2011 14:46:20 +0000 (16:46 +0200)
committerClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Mon, 30 May 2011 14:46:20 +0000 (16:46 +0200)
Fixing a few thingies in tunproto

1  2 
src/nepi/testbeds/planetlab/tunproto.py

@@@ -425,6 -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)
      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)
      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)