aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/runner/portmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/runner/portmap.c')
-rw-r--r--lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/runner/portmap.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/runner/portmap.c b/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/runner/portmap.c
deleted file mode 100644
index ca0c1c93..00000000
--- a/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/runner/portmap.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Twisted Matrix Laboratories.
- * See LICENSE for details.
-
- *
- */
-
-/* portmap.c: A simple Python wrapper for pmap_set(3) and pmap_unset(3) */
-
-#include <Python.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_clnt.h>
-
-static PyObject * portmap_set(PyObject *self, PyObject *args)
-{
- unsigned long program, version;
- int protocol;
- unsigned short port;
-
- if (!PyArg_ParseTuple(args, "llih:set",
- &program, &version, &protocol, &port))
- return NULL;
-
- pmap_unset(program, version);
- pmap_set(program, version, protocol, port);
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-static PyObject * portmap_unset(PyObject *self, PyObject *args)
-{
- unsigned long program, version;
-
- if (!PyArg_ParseTuple(args, "ll:unset",
- &program, &version))
- return NULL;
-
- pmap_unset(program, version);
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-static PyMethodDef PortmapMethods[] = {
- {"set", portmap_set, METH_VARARGS,
- "Set an entry in the portmapper."},
- {"unset", portmap_unset, METH_VARARGS,
- "Unset an entry in the portmapper."},
- {NULL, NULL, 0, NULL}
-};
-
-void initportmap(void)
-{
- (void) Py_InitModule("portmap", PortmapMethods);
-}
-