best way to get all possible ips from network writing in cidr
7,390 views
Skip to first unread message
Vasiliy Tolstov
unread,
Mar 15, 2013, 5:52:24 AM3/15/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Hello. I need to scan some ips that runs my own server and check,
does it responds.
For example i have network 62.76.47.12/16 After net.ParseCIDR i have IPNet that contains ip and mask, what is
the best way to get all ips in that range and iterate over it?
Hm, what is about ipv6 and Add function? As i see some functions
expect to see only ipv4
ziutek
unread,
Mar 20, 2013, 9:45:56 AM3/20/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
On 20 Mar, 14:22, Vasiliy Tolstov <v.tols...@selfip.ru> wrote:
> Hm, what is about ipv6 and Add function? As i see some functions
> expect to see only ipv4
One thing that I love about net package is that it treats IPv4 and
IPv6 in unified way. So Add function shouldn't be an exception.
netaddr.IPAdd function works in this way, see tests:
> One thing that I love about net package is that it treats IPv4 and
> IPv6 in unified way. So Add function shouldn't be an exception.
> netaddr.IPAdd function works in this way, see tests:
>
> https://github.com/ziutek/utils/blob/master/netaddr/ip_test.go