Krug.NetworkUtil (Krug v1.1.45) View Source

Utilitary module to handle network info

Link to this section Summary

Functions

Extract a list of valid ip v4 addresses from a "ips_string", splitted by the "ips_separator".

Based in a IP address and a netmask (subnet /16 or /24), generates a list of IP addresses suposed by in a same network/VPC

Obtains the local machine ipv4 local network IP (i.e: 192.168.1.2 | 172.0.0.2)

Obtains the local machine ipv4 local netmask (i.e: 255.255.0.0 | 255.255.255.0)

Filter the nodes list (atom list on format :"my_cookie@ipv4") according IP address and get the major address.

Filter the nodes list (atom list on format :"my_cookie@ipv4") according IP address and get the minor address.

Start the local node from a cluster of nodes

Link to this section Functions

Link to this function

extract_valid_ip_v4_addresses(ips_string, ips_separator)

View Source

Extract a list of valid ip v4 addresses from a "ips_string", splitted by the "ips_separator".

Link to this function

generate_ipv4_netmask_16_24_ip_list(ipv4_address, ipv4_netmask)

View Source

Based in a IP address and a netmask (subnet /16 or /24), generates a list of IP addresses suposed by in a same network/VPC

For subnets /16 will be returned only a limit range of ≃10% of all possible IP's. This will be IP's that are near neighboors of given "ipv4_address". Example given "ipv4_address" was 192.168.40.120, then the first will be 192.168.30.0 and the last will be 192.168.50.255

Obtains the local machine ipv4 local network IP (i.e: 192.168.1.2 | 172.0.0.2)

Link to this function

get_local_wlan_ip_v4_netmask()

View Source

Obtains the local machine ipv4 local netmask (i.e: 255.255.0.0 | 255.255.255.0)

Link to this function

get_major_node(node_list)

View Source

Filter the nodes list (atom list on format :"my_cookie@ipv4") according IP address and get the major address.

Link to this function

get_minor_node(node_list)

View Source

Filter the nodes list (atom list on format :"my_cookie@ipv4") according IP address and get the minor address.

Link to this function

start_local_node_to_cluster_ip_v4(cluster_name, cluster_cookie)

View Source

Start the local node from a cluster of nodes