def run(self): # XXX TODO: Replace portmap with something that supports ipv6 print "Starting NLM Call Back server on port %i" % self.port portmap.unset(100021, 0) portmap.unset(100021, 1) portmap.unset(100021, 3) portmap.unset(100021, 4) portmap.set(100021, 4, 6, self.port) # portmap.set(100021, 4, 17, self.port) rpc.RPCServer.run(self)
def startService(self): internet.TCPServer.startService(self) import portmap portNo = self._port.getHost()[2] service = self.service for version in rpcVersions: portmap.set(self.rpcConf.services[name], version, self.proto, portNo) inetd.forkPassingFD(service.program, service.programArgs, os.environ, service.user, service.group, p)