Dash Core  0.12.2.1
P2P Digital Currency
test_framework.netutil Namespace Reference

Functions

def get_socket_inodes (pid)
 
def _remove_empty (array)
 
def _convert_ip_port (array)
 
def netstat (typ='tcp')
 
def get_bind_addrs (pid)
 
def all_interfaces ()
 
def addr_to_hex (addr)
 
def test_ipv6_local ()
 

Variables

string STATE_ESTABLISHED = '01'
 
string STATE_SYN_SENT = '02'
 
string STATE_SYN_RECV = '03'
 
string STATE_FIN_WAIT1 = '04'
 
string STATE_FIN_WAIT2 = '05'
 
string STATE_TIME_WAIT = '06'
 
string STATE_CLOSE = '07'
 
string STATE_CLOSE_WAIT = '08'
 
string STATE_LAST_ACK = '09'
 
string STATE_LISTEN = '0A'
 
string STATE_CLOSING = '0B'
 

Function Documentation

◆ _convert_ip_port()

def test_framework.netutil._convert_ip_port (   array)
private

Definition at line 44 of file netutil.py.

Referenced by test_framework.netutil.netstat().

◆ _remove_empty()

def test_framework.netutil._remove_empty (   array)
private

Definition at line 41 of file netutil.py.

Referenced by test_framework.netutil.netstat().

◆ addr_to_hex()

def test_framework.netutil.addr_to_hex (   addr)
Convert string IPv4 or IPv6 address to binary address as returned by
get_bind_addrs.
Very naive implementation that certainly doesn't work for all IPv6 variants.

Definition at line 113 of file netutil.py.

Referenced by rpcbind_test.run_bind_test().

◆ all_interfaces()

def test_framework.netutil.all_interfaces ( )
Return all interfaces that are up

Definition at line 88 of file netutil.py.

Referenced by rpcbind_test.run_test().

◆ get_bind_addrs()

def test_framework.netutil.get_bind_addrs (   pid)
Get bind addresses as (host,port) tuples for process pid.

Definition at line 76 of file netutil.py.

Referenced by rpcbind_test.run_bind_test().

◆ get_socket_inodes()

def test_framework.netutil.get_socket_inodes (   pid)
Get list of socket inodes for process pid.

Definition at line 29 of file netutil.py.

Referenced by test_framework.netutil.get_bind_addrs().

◆ netstat()

def test_framework.netutil.netstat (   typ = 'tcp')
Function to return a list with status of tcp connections at linux systems
To get pid of all network process running on system, you must run this script
as superuser

Definition at line 55 of file netutil.py.

Referenced by test_framework.netutil.get_bind_addrs().

◆ test_ipv6_local()

def test_framework.netutil.test_ipv6_local ( )
Check for (local) IPv6 support.

Definition at line 142 of file netutil.py.

Variable Documentation

◆ STATE_CLOSE

string test_framework.netutil.STATE_CLOSE = '07'

Definition at line 23 of file netutil.py.

◆ STATE_CLOSE_WAIT

string test_framework.netutil.STATE_CLOSE_WAIT = '08'

Definition at line 24 of file netutil.py.

◆ STATE_CLOSING

string test_framework.netutil.STATE_CLOSING = '0B'

Definition at line 27 of file netutil.py.

◆ STATE_ESTABLISHED

string test_framework.netutil.STATE_ESTABLISHED = '01'

Definition at line 17 of file netutil.py.

◆ STATE_FIN_WAIT1

string test_framework.netutil.STATE_FIN_WAIT1 = '04'

Definition at line 20 of file netutil.py.

◆ STATE_FIN_WAIT2

string test_framework.netutil.STATE_FIN_WAIT2 = '05'

Definition at line 21 of file netutil.py.

◆ STATE_LAST_ACK

string test_framework.netutil.STATE_LAST_ACK = '09'

Definition at line 25 of file netutil.py.

◆ STATE_LISTEN

string test_framework.netutil.STATE_LISTEN = '0A'

Definition at line 26 of file netutil.py.

◆ STATE_SYN_RECV

string test_framework.netutil.STATE_SYN_RECV = '03'

Definition at line 19 of file netutil.py.

◆ STATE_SYN_SENT

string test_framework.netutil.STATE_SYN_SENT = '02'

Definition at line 18 of file netutil.py.

◆ STATE_TIME_WAIT

string test_framework.netutil.STATE_TIME_WAIT = '06'

Definition at line 22 of file netutil.py.