fix setsockopt behavior for ToS/DSCP on Windows.
Project description
Windows DSCP Fix Python Package
A Python package to fix setsockopt(..,IP_TOS,..)
behavior on Windows.
Why
-
In the IPPROTO_IP socket options for
setsockopt
,IP_TOS
is marked as "DO NOT USE", and Windows QoS2 subsystem takes over the admission. -
ToS/DSCP value is still an important field for QoS guarantee in IEEE 802.11 network, according to RFC 8325. However, there is no existing convenient method to tune the value.
-
On Windows, only DSCP value is allowed to set except ECN bits and the Administrator permission is required (link). So, this functionality has to be maintained as a third-party module, which will not be accepted by mainline.
Usage
import socket
import windows_dscp_fix
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, 128) #NOTE: Administrator permission required
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for windows_dscp_fix-0.2.1-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2a5f12e9f5d191f909b96536bec3337c9233721fd0d1ce054c9968c769a5b53 |
|
MD5 | ef6b5e0c454cc4b0b101bd7ae3a1889f |
|
BLAKE2b-256 | 5ec9b65a3c0a428ec805230ef3d39cc498ba32db8d4b5fc32e28b72475057cc5 |