All Projects → gaissmai → go-inet

gaissmai / go-inet

Licence: MIT license
A Go library for reading, formatting, sorting, lookup and converting IP-addresses and IP-blocks

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to go-inet

IP2Location-C-Library
IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.
Stars: ✭ 37 (+164.29%)
Mutual labels:  ipv6, ipv4, ip-lookup
ipapi-python
Python bindings for https://ipapi.co (IP Address Location) - Use with python / django / flask for IP address location lookup
Stars: ✭ 42 (+200%)
Mutual labels:  ipv6, ipv4, ip-lookup
ip2location-nginx
Nginx module that allows user to lookup for geolocation information using IP2Location database.
Stars: ✭ 33 (+135.71%)
Mutual labels:  ipv6, ipv4, ip-lookup
IP2Location-PHP-Module
This module is a PHP module that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, mobile, usage types, address type, IAB category, etc that any IP address or host name originates from.
Stars: ✭ 154 (+1000%)
Mutual labels:  ipv6, ipv4, ip-lookup
net-protocol
golang模拟内核协议栈 实现链路层、网络层、传输层、应用层 用户态协议栈 ,基于虚拟网卡TUN/TAP
Stars: ✭ 129 (+821.43%)
Mutual labels:  ipv6, ipv4
hphr
Halophile Router (a VyOS-based, SaltStack-automated, NetBox-configured router for small provider networks)
Stars: ✭ 39 (+178.57%)
Mutual labels:  ipv6, ipv4
go-net-radix
Go bindings for radix tree library for fast subnet (IPv4 and IPv6) lookups
Stars: ✭ 37 (+164.29%)
Mutual labels:  ipv6, ipv4
ipaddress
Data analysis of IP addresses and networks
Stars: ✭ 20 (+42.86%)
Mutual labels:  ipv6, ipv4
uC-TCP-IP
A compact, reliable, high-performance TCP/IP protocol stack. Features dual IPv4 and IPv6 support, an SSL/TLS socket option, and support for Ethernet, Wi-Fi, and PHY controllers.
Stars: ✭ 66 (+371.43%)
Mutual labels:  ipv6, ipv4
bacnet-stack
BACnet Protocol Stack library provides a BACnet application layer, network layer and media access (MAC) layer communications services.
Stars: ✭ 199 (+1321.43%)
Mutual labels:  ipv6, ipv4
ip
Immutable value object for IPv4 and IPv6 addresses, including helper methods and Doctrine support.
Stars: ✭ 212 (+1414.29%)
Mutual labels:  ipv6, ipv4
tracetrout
A magical reverse traceroute HTTP(S) server
Stars: ✭ 48 (+242.86%)
Mutual labels:  ipv6, ipv4
Geolocate-IP-Browser-Extension
A browser extension, which shows you the origin of your IP address.
Stars: ✭ 21 (+50%)
Mutual labels:  ipv6, ipv4
Aggregator
A stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.
Stars: ✭ 19 (+35.71%)
Mutual labels:  ipv6, ipv4
treebitmap
Fast IP lookup table for IPv4/IPv6 prefixes
Stars: ✭ 81 (+478.57%)
Mutual labels:  ipv6, ipv4
ipv6calc
ipv6calc
Stars: ✭ 33 (+135.71%)
Mutual labels:  ipv6, ipv4
python-iptools
A few useful functions and objects for manipulating ip addresses in python.
Stars: ✭ 68 (+385.71%)
Mutual labels:  ipv6, ipv4
PHP-IPAddress
IP Address utility classes for PHP
Stars: ✭ 63 (+350%)
Mutual labels:  ipv6, ipv4
whereabouts
An HTTP service for mapping IPv4 and IPv6 addresses to cities, countries & continents
Stars: ✭ 16 (+14.29%)
Mutual labels:  ipv6, ipv4
Ip
🌏根据IpV4、IpV6地址获取定位信息的PHP🐘组件 PHP components that obtain location information based on IpV4, IpV6 addresses
Stars: ✭ 23 (+64.29%)
Mutual labels:  ipv6, ipv4

CI Go Reference GitHub Go Report Card Coverage Status

go-inet

A Go library for reading, formatting, sorting and converting IP-addresses and IP-blocks.

ATTENTION: v2 with new API

Version v2 uses the math based on type uint128 struct {hi uint64, lo uint64}, no longer bytes fiddling in network byte order. The API is reduced to the bare minimum, the tree representation is abstracted with an Interface.

github.com/gaissmai/go-inet/v2/inet

Package inet represents IP-addresses and IP-Blocks as comparable types.

Some missing utility functions in the standard library for IP-addresses and IP-blocks are provided.

This IP representation is comparable and can be sorted very quickly without prior conversions to/from the different IP versions.

The library is mainly intended for fast ACL-lookups and for IP address management (IPAM) in global scope and not for host related systems programming.

So, no IP address zone indices are supported and IPv4-mapped IPv6 addresses are stripped down to plain IPv4 addresses. The information of the prior mapping is discarded.

Blocks are IP-networks or arbitrary IP-ranges, e.g.

192.168.0.1/24              // CIDR
::1/128                     // CIDR
10.0.0.3-10.0.17.134        // IP range, no CIDR
2001:db8::1-2001:db8::f6    // IP range, no CIDR

github.com/gaissmai/go-inet/v2/tree

Package tree is a minimal interval tree implementation.

All interval types implementing the tree.Interface can use this library for fast lookups and a stringified tree representation.

The tree can be visualized as:

 ▼
 ├─ 10.0.0.0/9
 │  ├─ 10.0.0.0/11
 │  │  ├─ 10.0.0.0-10.0.0.29
 │  │  ├─ 10.0.16.0/20
 │  │  └─ 10.0.32.0/20
 │  └─ 10.32.0.0/11
 │     ├─ 10.32.8.0/22
 │     ├─ 10.32.12.0-10.32.13.77
 │     └─ 10.32.16.0/22
 ├─ 2001:db8:900::/48
 │  ├─ 2001:db8:900::/49
 │  │  ├─ 2001:db8:900::/52

github.com/gaissmai/go-inet/v2/inettree

Package inettree implements the tree.Interface for inet.Block.

Documentation

Please study the applications in the examples directory to get familiar with the API.

License

go-inet is licensed under the MIT License.

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].