This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if (PyTuple_Check(obj)) {
if (PyTuple_Size(obj) < 1) {
PyErr_SetString(PyExc_TypeError, "Destination tuple size invalid");
return false;
}
if (PyTuple_Check(obj)) {
if (PyTuple_Size(obj) < 1) {
PyErr_SetString(PyExc_TypeError, "Destination tuple size invalid");
return false;
}
if (!PyString_Check(PyTuple_GetItem(obj, 0))) {
PyErr_SetString(PyExc_TypeError, "Destination tuple first element not string");
return false;
if (!PyString_Check(PyTuple_GetItem(obj, 0))) {
PyErr_SetString(PyExc_TypeError, "Destination tuple first element not string");
return false;
-static PyObject *PyObject_FromNBTName(struct nbt_name_socket *socket, struct smb_iconv_convenience *ic,
+static PyObject *PyObject_FromNBTName(struct nbt_name_socket *socket, struct smb_iconv_convenience *ic,
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|bbii:query_name",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|bbii:query_name",
for (i = 0; i < io.out.num_addrs; i++) {
PyList_SetItem(reply_addrs, i, PyString_FromString(io.out.reply_addrs[i]));
}
for (i = 0; i < io.out.num_addrs; i++) {
PyList_SetItem(reply_addrs, i, PyString_FromString(io.out.reply_addrs[i]));
}
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|ii:name_status",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|ii:name_status",
- PyList_SetItem(py_names, i, Py_BuildValue("(sii)",
+ PyList_SetItem(py_names, i, Py_BuildValue("(sii)",
- const char *kwnames[] = { "name", "address", "dest", "register_demand", "broadcast",
+ const char *kwnames[] = { "name", "address", "dest", "register_demand", "broadcast",
"multi_homed", "ttl", "timeout", "retries", NULL };
io.in.broadcast = true;
"multi_homed", "ttl", "timeout", "retries", NULL };
io.in.broadcast = true;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OsO|bbbiii:query_name",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OsO|bbbiii:query_name",
- &py_name, &io.in.address, &py_dest,
- &io.in.register_demand,
- &io.in.broadcast, &io.in.multi_homed,
+ &py_name, &io.in.address, &py_dest,
+ &io.in.register_demand,
+ &io.in.broadcast, &io.in.multi_homed,
- const char *kwnames[] = { "name", "address", "dest", "nb_flags", "broadcast",
+ const char *kwnames[] = { "name", "address", "dest", "nb_flags", "broadcast",
"ttl", "timeout", "retries", NULL };
io.in.broadcast = true;
"ttl", "timeout", "retries", NULL };
io.in.broadcast = true;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OsO|ibiii:query_name",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OsO|ibiii:query_name",
- &py_name, &io.in.address, &py_dest,
- &io.in.nb_flags,
- &io.in.broadcast,
+ &py_name, &io.in.address, &py_dest,
+ &io.in.nb_flags,
+ &io.in.broadcast,
- { "query_name", (PyCFunction)py_nbt_name_query, METH_VARARGS|METH_KEYWORDS,
+ { "query_name", (PyCFunction)py_nbt_name_query, METH_VARARGS|METH_KEYWORDS,
"S.query_name(name, dest, broadcast=True, wins=False, timeout=0, retries=3) -> (reply_from, name, reply_addr)\n"
"Query for a NetBIOS name" },
{ "register_name", (PyCFunction)py_nbt_name_register, METH_VARARGS|METH_KEYWORDS,
"S.query_name(name, dest, broadcast=True, wins=False, timeout=0, retries=3) -> (reply_from, name, reply_addr)\n"
"Query for a NetBIOS name" },
{ "register_name", (PyCFunction)py_nbt_name_register, METH_VARARGS|METH_KEYWORDS,