Skip to content

Commit

Permalink
Added sendpacket support by default
Browse files Browse the repository at this point in the history
  • Loading branch information
6e726d committed May 19, 2015
1 parent 2331603 commit ea1e46c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pcapobj.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ static PyObject* p_datalink(register pcapobject* pp, PyObject* args);
static PyObject* p_setnonblock(register pcapobject* pp, PyObject* args);
static PyObject* p_getnonblock(register pcapobject* pp, PyObject* args);
static PyObject* p_dump_open(register pcapobject* pp, PyObject* args);
#ifdef HAVE_PCAP_SENDPACKET
static PyObject* p_sendpacket(register pcapobject* pp, PyObject* args);
#endif


static PyMethodDef p_methods[] = {
{"loop", (PyCFunction) p_loop, METH_VARARGS, "loops packet dispatching"},
Expand All @@ -72,9 +69,7 @@ static PyMethodDef p_methods[] = {
{"getnonblock", (PyCFunction) p_getnonblock, METH_VARARGS, "returns the current `non-blocking' state"},
{"setnonblock", (PyCFunction) p_setnonblock, METH_VARARGS, "puts into `non-blocking' mode, or take it out, depending on the argument"},
{"dump_open", (PyCFunction) p_dump_open, METH_VARARGS, "creates a dumper object"},
#ifdef HAVE_PCAP_SENDPACKET
{"sendpacket", (PyCFunction) p_sendpacket, METH_VARARGS, "sends a packet through the interface"},
#endif
{NULL, NULL} /* sentinel */
};

Expand Down Expand Up @@ -420,7 +415,6 @@ p_getnonblock(register pcapobject* pp, PyObject* args)
return Py_BuildValue("i", state);
}

#ifdef HAVE_PCAP_SENDPACKET
static PyObject*
p_sendpacket(register pcapobject* pp, PyObject* args)
{
Expand All @@ -447,4 +441,3 @@ p_sendpacket(register pcapobject* pp, PyObject* args)
Py_INCREF(Py_None);
return Py_None;
}
#endif

0 comments on commit ea1e46c

Please sign in to comment.