Questions tagged [ip-address]
Questions related to IP addresses, IPv4 and IPv6.
83 questions
11votes
4answers
2kviews
Leetcode 93: Restore IP Addresses
(Source: Leetcode 93: Restore IP Addresses [Medium])(Topics: [String] [Backtracking]) The problem is as follows: Definition: A valid IP address is defined to consist of exactly four integers ...
1vote
2answers
597views
Split netmask or ip address
I've written a python function to split a netmask or an ip address. The code is about to become part of a custom router api. ...
3votes
3answers
157views
IPv4 filter in Java
I have a simple class for representing IPv4-addresses via int values, and a simple IP-address filter that works like a set of IPv4-addresses. ...
4votes
1answer
287views
Parsing an IP routing report with half a million lines into a PANDAS dataframe
I have a file that has around 440K lines of data. I need to read these data and find the actual "table" in the text file. Part of the text file looks like this. ...
2votes
1answer
296views
Generating a random ipaddress in C
I was looking to receive some feedback on the function I wrote to generate a random ip address. The code is pretty messy and just wanted some feedback regarding optimizations, memory leaks and best ...
3votes
2answers
3kviews
Check if IP address list has subnet or is supernet
I need to iterate over a list of IP addresses, to check if the elements inside are subnets/supernets between them, for this I use the IP-address library. Currently I have the following problem: my ...
1vote
1answer
162views
Retrieving first non-private ip for local system in elixir
I've recently started learning elixir, and the following is my attempt at fetching the local IP address of the system. It can definitely be improved further, but as this would be my first ever project ...
5votes
1answer
498views
Dynamic DNS IP Checker/Changer for Google Domains in Python
I needed a way to automatically update my IP forwarding rules on Google Domains for my home web server running behind my router. (I'm not paying for a static IP!). After writing a simple functional ...
1vote
1answer
75views
Network flow analysis
I've created a short Python script in order to do some analysis on network flows. I have an inventory of networks (/8 to /30 masks) of medium size (around 10k references) that provide several ...
4votes
0answers
152views
Running DNS lookup over million IP addresses
I need to run over all the IP addresses on the CIDR 10.96.0.0/12 network. There are 1,048,574 IP addresses. I created a multi ...
11votes
3answers
2kviews
IP address detection code
I am using PHP for detecting a user's IP address and displaying their details, and I use OOP (i.e. object-oriented programming). Are there any problems in it or is it well-written? index.php: ...
3votes
1answer
63views
Abbreviating and expanding IP v6 addresses with APL
Recently I solved a challenge (problem 1 of the 3rd easy problem set of phase 2 of the '19 APL Competition) on abbreviating and expanding IP v6 addresses. For that matter, I had to write two functions,...
2votes
0answers
26views
I am gathering all the Azure subnets for Central US and trying to filter out the smaller subnets that are part of the larger... Very slow
The goal of this code is to remove subnets from the list that are redundant (included in the larger ones) It is VERY slow. Wondering how it can be sped up. At present, I’m not looking to optimize ...
7votes
2answers
1kviews
Simple IP address parser in C
I have written a C function to parse an IP address that should match the regular expression ^\d+.\d+.\d+.\d+ and nothing else. Additionally all bytes are limited to ...
7votes
3answers
405views
IP4 strings validator
Trying to write fast non dependency IP4 string validator for embedded system, It should counts leading zeros, values over 255 and other corrupted strings. Not sure if I missed something. Сan you guys ...