Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

windows_dscp_fix-0.2.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

windows_dscp_fix-0.2.1-cp311-none-win_amd64.whl (108.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

File details

Details for the file windows_dscp_fix-0.2.1.tar.gz.

File metadata

  • Download URL: windows_dscp_fix-0.2.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.13

File hashes

Hashes for windows_dscp_fix-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d480fadca0a8c1a276538afce6f119e0c2f9d2dc00318903230720dd7cc791b4
MD5 2177c9acea3259dfe6aa8dcb6c7db2ba
BLAKE2b-256 9e38fbbb5ec99c0d9d834d31aa637268dae96c3620f9bb3658f2f3a20872265f

See more details on using hashes here.

File details

Details for the file windows_dscp_fix-0.2.1-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for windows_dscp_fix-0.2.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 a2a5f12e9f5d191f909b96536bec3337c9233721fd0d1ce054c9968c769a5b53
MD5 ef6b5e0c454cc4b0b101bd7ae3a1889f
BLAKE2b-256 5ec9b65a3c0a428ec805230ef3d39cc498ba32db8d4b5fc32e28b72475057cc5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page