ipaddressrange | NET Class Library for range of IP address | TCP library
kandi X-RAY | ipaddressrange Summary
kandi X-RAY | ipaddressrange Summary
IPAddressRange Class Library
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ipaddressrange
ipaddressrange Key Features
ipaddressrange Examples and Code Snippets
Community Discussions
Trending Discussions on ipaddressrange
QUESTION
I'm trying to add an ip to the network rules of CosmosDb (firewall) in azure, using powershell.
A lot of other resources seem to have a command available to do this (eg. keyvault Add-AzKeyVaultNetworkRule -VaultName myvault -IpAddressRange "10.0.1.0/24"
), but I can't find any for CosmosDb. Does anyone know if it actually exist? Thanks!
ANSWER
Answered 2021-May-03 at 14:37QUESTION
I was following the answers on this question, but using the code in the answer doesn't work the way I would like. I would like to have some sort of method for getting all possible IPs between two given IPs (as the question said) and store them in an array or some kind of object, but the OP there didn't try to use the library suggested, as was commented.
I don't really know what to do, and I can't do any hardcoding here.
I am using .NET Core 3.1.
Main:
...ANSWER
Answered 2020-Jun-23 at 19:03is this IPv4? or IPv6? If we assume IPv4... then IP addresses are really just 32-bit big-endian unsigned integers. Let's take, as examples, 125.80.207.121 and 141.221.132.118; now think of them in terms of hex...
decimal 125.80.207.121 is hex 7D.50.CF.79; 7D50CF79 is 2102447993
decimal 141.221.132.118 is hex 8D.DD.84.4F; 8DDD844F is 2380104783
So the IP addresses between 125.80.207.121 and 141.221.132.118 are the same as the integers between 2102447993 and 2380104783, when considered as 32-bit big-endian unsigned values - then just split the octets into pieces and output each octet as an integer.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ipaddressrange
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page