10000 gh-95389: socketmodule: expose popular `ETHERTYPE_*` constants by noamcohen97 · Pull Request #95390 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-95389: socketmodule: expose popular ETHERTYPE_* constants #95390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
  • Loading branch information
noamcohen97 and CAM-Gerlach authored Aug 1, 2022
commit 257e46b1f99078508450d512c3ca3e7e7a159ce7
10 changes: 5 additions & 5 deletions Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ created. Socket addresses are represented as follows:
``(ifname, proto[, pkttype[, hatype[, addr]]])`` where:

- *ifname* - String specifying the device name.
- *proto* - The Ethernet protocol number. May be one of
:ref:`ETHERTYPE_* constants <socket-ethernet-types>`
- *proto* - The Ethernet protocol number.
May be :data:`ETH_P_ALL` to capture all protocols,
one of the :ref:`ETHERTYPE_* constants <socket-ethernet-types>`
or any other Ethernet protocol number.
In both cases, values must be in network-byte-order.
Value must be in network-byte-order.
- *pkttype* - Optional integer specifying the packet type:

- ``PACKET_HOST`` (the default) - Packet addressed to the local host.
Expand Down Expand Up @@ -509,8 +510,7 @@ Constants
constructor as *proto* for the :const:`AF_PACKET` family in order to
capture every packet, regardless of protocol.

For more information you can consult the Linux documentation
:manpage:`packet(7)`.
For more information, see the :manpage:`packet(7)` manpage.

.. availability:: Linux.

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Expose some of ``ETHERTYPE_*`` and ``ETH_P_ALL`` constants in :mod:`socket`. Patch by Noam Cohen.
Expose :data:`~socket.ETH_P_ALL` and some of the
:ref:`ETHERTYPE_* constants <socket-ethernet-types>` in :mod:`socket`.
Patch by Noam Cohen.
0