dotted_netmask() — requests Function Reference
Architecture documentation for the dotted_netmask() function in utils.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD d9bcc783_1d0f_9e64_5fcb_6cf40bd58dba["dotted_netmask()"] 2c39b9da_e317_5e6c_bbac_8362bac2110c["utils.py"] d9bcc783_1d0f_9e64_5fcb_6cf40bd58dba -->|defined in| 2c39b9da_e317_5e6c_bbac_8362bac2110c 34b0e954_f61f_4779_0ea3_62759d4a4f26["address_in_network()"] 34b0e954_f61f_4779_0ea3_62759d4a4f26 -->|calls| d9bcc783_1d0f_9e64_5fcb_6cf40bd58dba style d9bcc783_1d0f_9e64_5fcb_6cf40bd58dba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/requests/utils.py lines 685–693
def dotted_netmask(mask):
"""Converts mask from /xx format to xxx.xxx.xxx.xxx
Example: if mask is 24 function returns 255.255.255.0
:rtype: str
"""
bits = 0xFFFFFFFF ^ (1 << 32 - mask) - 1
return socket.inet_ntoa(struct.pack(">I", bits))
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does dotted_netmask() do?
dotted_netmask() is a function in the requests codebase, defined in src/requests/utils.py.
Where is dotted_netmask() defined?
dotted_netmask() is defined in src/requests/utils.py at line 685.
What calls dotted_netmask()?
dotted_netmask() is called by 1 function(s): address_in_network.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free