From 0dd96ebc575a3c6073db89b3a9795b9c565666d1 Mon Sep 17 00:00:00 2001 From: Andrew Ferguson <adferguson@gmail.com> Date: Fri, 24 Jan 2014 16:59:42 -0500 Subject: [PATCH] userspace switch can be reached on unix port by dpctl --- mininet/node.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mininet/node.py b/mininet/node.py index b249cd97..2af68a69 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -827,10 +827,13 @@ def setup( cls ): def dpctl( self, *args ): "Run dpctl command" + listenAddr = None if not self.listenPort: - return "can't run dpctl without passive listening port" + listenAddr = 'unix:/tmp/' + self.name + else: + listenAddr = 'tcp:127.0.0.1:%i' % self.listenPort return self.cmd( 'dpctl ' + ' '.join( args ) + - ' tcp:127.0.0.1:%i' % self.listenPort ) + ' ' + listenAddr ) def connected( self ): "Is the switch connected to a controller?" -- GitLab