Skip to content

Export Cython functions into pcap.pxd - #66

Open
IridiumXOR wants to merge 1 commit into
pynetwork:masterfrom
IridiumXOR:master
Open

Export Cython functions into pcap.pxd#66
IridiumXOR wants to merge 1 commit into
pynetwork:masterfrom
IridiumXOR:master

Conversation

@IridiumXOR

Copy link
Copy Markdown
  • pcap.pxd created in order to permit to others Cython module to use C functions and other Cython structures
  • pcap.pyx updated in order to remove code moved into pcap.pxd

I have not (yet) Python/Cython code that uses pypcap so I have NOT try my mods on python code which use pypcap (I have only test the compilation process)

- pcap.pxd created in order to permit to others Cython module to use C functions and other Cython structures
- pcap.pyx updated in order to remove code moved into pcap.pxd
Comment thread pcap.pxd
timeout_ms -- requests for the next packet will return None if the timeout
(in milliseconds) is reached and no packets were received
(Default: no timeout)
immediate -- disable buffering, if possible

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to have the docstring repeated in both the pcap.pyx and pcap.pxd file?

Comment thread pcap.pxd
__copyright__ = 'Copyright (c) 2004 Dug Song'
__license__ = 'BSD license'
__url__ = 'https://github.com/pynetwork/pypcap'
__version__ = '1.2.0'

@hellais hellais Feb 14, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, can we have these be defined in only one of the two places? Otherwise it becomes a bit more painful to keep them in sync, especially when bumping the version.

Comment thread pcap.pxd
DLT_PRONET = 4
DLT_CHAOS = 5
DLT_IEEE802 = 6
DLT_ARCNET = 7

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix the spacing in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants