Support create / activate paradigm for pcap objects, and RFMON#32
Support create / activate paradigm for pcap objects, and RFMON#32ograff wants to merge 1 commit intopynetwork:masterfrom ograff:rfmon_support
Conversation
pcap.pyx
Outdated
| pcap_set_timeout(self.__pcap, timeout_ms) | ||
| pcap_set_immediate_mode(self.__pcap, immediate) | ||
| pcap_set_rfmon(self.__pcap, rfmon) | ||
| pcap_activate(self.__pcap) |
There was a problem hiding this comment.
You should check for errors here.
There was a problem hiding this comment.
Good point, will do!
On Aug 14, 2016 17:55, "Guy Harris" [email protected] wrote:
In pcap.pyx
#32 (comment):@@ -197,8 +202,15 @@ cdef class pcap:
self.__pcap = pcap_open_offline(p, self.__ebuf) if not self.__pcap:
self.__pcap = pcap_open_live(pcap_ex_name(p), snaplen, promisc,timeout_ms, self.__ebuf)self.__pcap = pcap_create(pcap_ex_name(p), self.__ebuf)passing = Truepcap_set_snaplen(self.__pcap, snaplen)pcap_set_promisc(self.__pcap, promisc)pcap_set_timeout(self.__pcap, timeout_ms)pcap_set_immediate_mode(self.__pcap, immediate)pcap_set_rfmon(self.__pcap, rfmon)pcap_activate(self.__pcap)You should check for errors here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pynetwork/pypcap/pull/32/files/0a0962d0a7ff0a71772256c1e44770f7d7eb2c07#r74712447,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOnrWjL_yQLZBx9j9bV-HilY0kOuZujks5qf7jrgaJpZM4JkCjY
.
|
I totally forgot to test that before pushing, sorry ignore that commit |
Use pcap_create, then set options, and pcap_activate when creating pcap objects Support setting rfmon option of pcap creation Fixes #31
|
In general I think it's best if when submitting pull requests you don't also regenerate the c files as it makes diffs much more messy. |
| ctypedef void (*pcap_handler)(void *arg, pcap_pkthdr *hdr, char *pkt) | ||
|
|
||
| cdef extern from "pcap.h": | ||
| pcap_t *pcap_open_live(char *device, int snaplen, int promisc, |
There was a problem hiding this comment.
Since this is a function that is exposed by the API and users will probably expect it we should leave it.
|
Hello ! What is the status of this PR ? We are calling Thanks a lot for answering :) |
|
Hi @gpotter2, I left some comments on the PR, that should be addressed or dismissed. If you have some spare time, it would be great if you could help out with that. Testing and code review of the PR is also appreciated. That will for sure speed up the time it takes to get this into a new release. |
|
I just merged master into this branch in |
|
@ograff it seems like you didn't allow edits from the maintainer to this PR. Could you enable it? (see: https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/). In the meantime I created a rebased PR of this in here: #67 @gpotter2 could you help out with testing the branch and ensuring that this works as expected? |
|
Yes, I'll get that enabled later today, sorry about that!
…On Feb 22, 2018 6:53 AM, "Arturo Filastò" ***@***.***> wrote:
@ograff <https://github.com/ograff> it seems like you didn't allow edits
from the maintainer to this PR. Could you enable it? (see:
https://help.github.com/articles/allowing-changes-to-
a-pull-request-branch-created-from-a-fork/).
In the meantime I created a rebased PR of this in here: #67
<#67>
@gpotter2 <https://github.com/gpotter2> could you help out with testing
the branch and ensuring that this works as expected?
If so I can, hopefully, within some reasonable amount of time work on
putting out a new release with it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#32 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAOnrXTECS-RBvBayck2mWRi2CwajnQpks5tXVUzgaJpZM4JkCjY>
.
|
|
Closing this as it's been superseeded by the merged branch: #67. |
Use pcap_create, then set options, and pcap_activate when creating pcap
objects
Support setting rfmon option of pcap creation
Fixes #31