All Projects → maltalex → Ineter

maltalex / Ineter

Licence: mpl-2.0
Fast Java library for working with IP addresses, ranges, and subnets

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Ineter

Iptools
PHP Library for manipulating network addresses (IPv4 and IPv6)
Stars: ✭ 163 (+317.95%)
Mutual labels:  network, networking, ipv6, ipv4, subnet
Netaddr
A network address manipulation library for Python
Stars: ✭ 648 (+1561.54%)
Mutual labels:  networking, ipv6, ipv4, subnet
Ipaddress
Java library for handling IP addresses and subnets, both IPv4 and IPv6
Stars: ✭ 197 (+405.13%)
Mutual labels:  ipv6, ipv4, subnet
Pytricia
A library for fast IP address lookup in Python.
Stars: ✭ 140 (+258.97%)
Mutual labels:  networking, ipv6, ipv4
Netlink
Socket and Networking Library using msgpack.org[C++11]
Stars: ✭ 197 (+405.13%)
Mutual labels:  networking, ipv6, ipv4
Vflow
Enterprise Network Flow Collector (IPFIX, sFlow, Netflow) from Verizon Media
Stars: ✭ 776 (+1889.74%)
Mutual labels:  network, ipv6, ipv4
Ship
A simple, handy network addressing multitool with plenty of features
Stars: ✭ 81 (+107.69%)
Mutual labels:  networking, ipv6, ipv4
Valvesockets Csharp
Managed C# abstraction of GameNetworkingSockets library by Valve Software
Stars: ✭ 273 (+600%)
Mutual labels:  networking, ipv6, ipv4
freebind
IPv4 and IPv6 address rate limiting evasion tool
Stars: ✭ 88 (+125.64%)
Mutual labels:  ipv6, ipv4, subnet
PHP-IPAddress
IP Address utility classes for PHP
Stars: ✭ 63 (+61.54%)
Mutual labels:  ipv6, ipv4, subnet
Enet
⚡️ ENet reliable UDP networking library
Stars: ✭ 202 (+417.95%)
Mutual labels:  network, networking, ipv6
Dsnet
Simple command to manage a centralised wireguard VPN. Think wg-quick but quicker: key generation + address allocation.
Stars: ✭ 365 (+835.9%)
Mutual labels:  networking, ipv6, ipv4
Ipnetwork
IPNetwork command line and C# library take care of complex network, IP, IPv4, IPv6, netmask, CIDR, subnet, subnetting, supernet, and supernetting calculation for .NET developers. It works with IPv4 as well as IPv6, is written in C#, has a light and clean API, and is fully unit-tested
Stars: ✭ 276 (+607.69%)
Mutual labels:  ipv6, ipv4, subnet
Enet Csharp
Reliable UDP networking library
Stars: ✭ 464 (+1089.74%)
Mutual labels:  networking, ipv6, ipv4
Nsupdate.info
Dynamic DNS service
Stars: ✭ 720 (+1746.15%)
Mutual labels:  ipv6, ipv4
Flannel
flannel is a network fabric for containers, designed for Kubernetes
Stars: ✭ 6,905 (+17605.13%)
Mutual labels:  network, subnet
Xdp
Package xdp allows one to use XDP sockets from the Go programming language.
Stars: ✭ 36 (-7.69%)
Mutual labels:  network, networking
Java Knowledge Mind Map
【🌱🌱Java服务端知识技能图谱】用思维脑图梳理汇总Java服务端知识技能
Stars: ✭ 787 (+1917.95%)
Mutual labels:  network, jvm
Edgeos Blacklist
Automatically updates IP blacklist for EdgeOS (supports IPv4 & IPv6)
Stars: ✭ 34 (-12.82%)
Mutual labels:  ipv6, ipv4
Nexer
Content based network multiplexer or redirector made with love and Go
Stars: ✭ 7 (-82.05%)
Mutual labels:  network, networking

Build Status codecov

ineter

What?

ineter (pronounced "Eye-netter") is a tiny Java library for working with:

  • Individual IP addresses - IPv4Address, IPv6Address/ZonedIPv6Address
  • IP address ranges - IPv4Range, IPv6Range
  • IP subnets - IPv4Subnet, IPv6Subnet

Why?

  • Low memory (and GC) footprint: ineter uses primitive types to represent addresses - an int for IPv4, two long fields for IPv6. For comparison, Java's InetAddress uses an InetAddressHolder with two String fields and two int fields just for IPv4
  • Immutability: ineter is immutable and thread-safe by default
  • Speed: ineter is written with performance in mind
  • Rich set of supported operations
  • MPL-2.0 license, allowing commercial use as well as re-licensing under GNU

Where?

Maven:

<dependency>
	<groupId>com.github.maltalex</groupId>
	<artifactId>ineter</artifactId>
	<version>0.2.0</version>
</dependency>

Gradle:

compile 'com.github.maltalex:ineter:0.2.0'

How?

Individual IPv4/IPv6 addresses

IPv4Address ipv4 = IPv4Address.of("10.0.0.1");
IPv6Address ipv6 = IPv6Address.of("2001:🔢4321");

ipv4.isPrivate(); // true
ipv4.isMulticast(); // false
ipv6.isGlobalUnicast(); // true
ipv4.compareTo(IPv4Address.of(0x0a000001)); // addresses are comparable
ipv6.toInetAddress(); // addresses can be converted to other forms
ipv6.toSubnet(); // IPv6Address as a single /128 subnet
ipv4.plus(5); // 10.0.0.6
ipv4.distanceTo(IPv4Address.of("10.0.0.100")); // 99
ipv4.previous(); // 10.0.0.0

Arbitrary address ranges

IPv4Range ipv4Range = IPv4Range.parse("192.168.100.0-192.168.101.127");
IPv6Range ipv6Range = IPv6Range.of("2001::","2001::1000"); //Build using first and last address
IPv6Range singletonRange = IPv6Range.parse("2002::"); // A single address in range form

ipv6Range.contains(IPv6Address.of("2001::1000")); //true
ipv4Range.overlaps(IPv4Range.of("10.0.0.1", "10.0.0.10")); //false
ipv4Range.toSubnets(); // Returns the list of subnets that make up the range
ipv4Range.withLast(IPv4Address.of("192.168.102.0")); //range with different last address
ipv6Range.length(); //4097
IPv6Range.merge(ipv6Range, singletonRange); //ranges can be merged

Subnets

IPv4Subnet ipv4Subnet = IPv4Subnet.of("192.168.0.0/16");
IPv6Range ipv6Subnet = IPv6Range.parse("2001::/64"); // subnets are ranges too!

ipv4Subnet.getNetworkMask(); //255.255.0.0
ipv4Subnet.getNetworkBitCount(); //16
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].