iNetwork

class iNetwork(conn)

Note

Deprecated: Will be removed in the next major version.

Arguments:
iNetwork.getNetInterfaceData(ipaddr, cb)

Note

Deprecated: Will be removed in the next major version.

Retrieves detailed information about a specified IPv4 network interface. IBM i API: QTOCNETSTS/QtocRtvNetIfcDta

Arguments:
iNetwork.getTCPIPAttr(cb)

Note

Deprecated: Will be removed in the next major version.

Retrieve TCP/IP Attributes. IBM i API: QTOCNETSTS/QtocRtvTCPA

Arguments:
getTCPIPAttrCallback(error, output)
Arguments:
  • error (Error|null) – the error object if an error occured or null.
  • output (getTCPIPAttrOutput|null) – This is an object if successful or null when an error occurs.
getTCPIPAttrOutput()

getTCPIPAttr Output Object

Arguments:
  • TCP/IPv4_stack_status (string) –
  • How_long_active (string) –
  • When_last_started_-_date (string) –
  • When_last_started_-_time (string) –
  • When_last_ended_-_date (string) –
  • When_last_ended_-_time (string) –
  • Who_last_started_-_job_name (string) –
  • Who_last_started_-_job_user_name (string) –
  • Who_last_started_-_job_number (string) –
  • Who_last_started_-_internal_job_identifier (string) –
  • Who_last_ended_-_job_name (string) –
  • Who_last_ended_-_job_user_name (string) –
  • Who_last_ended_-_job_number (string) –
  • Who_last_ended_-_internal_job_identifier (string) –
  • Offset_to_additional_information (string) –
  • Length_of_additional_information (string) –
  • Limited_mode (string) –
  • Offset_to_list_of_Internet_addresses (string) –
  • Number_of_Internet_addresses (string) –
  • Entry_length_for_list_of_Internet_addresses (string) –
  • DNS_protocol (string) –
  • Retries (string) –
  • Time_interval (string) –
  • Search_order (string) –
  • Initial_domain_name_server (string) –
  • DNS_listening_port (string) –
  • Host_name (string) –
  • Domain_name (string) –
  • Domain_search_list (string) –
getNetInterfaceDataCallback(error, output)
Arguments:
  • error (Error|null) – the error object if an error occured or null.
  • output (getNetInterfaceDataOutput|null) – This is an object if successful or null when an error occurs.
getNetInterfaceDataOutput()

getNetInterfaceData Output Object

Arguments:
  • Internet_address (string) –
  • Internet_address_binary (string) –
  • Network_address (string) –
  • Network_address_binary (string) –
  • Line_description (string) –
  • Interface_status (string) –
  • Interface_type_of_service (string) –
  • Interface_MTU (string) –
  • Interface_line_type (string) –
  • Host_address (string) –
  • Host_address_binary (string) –
  • Interface_subnet_mask (string) –
  • Interface_subnet_mask_binary (string) –
  • Directed_broadcast_address (string) –
  • Directed_broadcast_address_binary (string) –
  • Change_date (string) –
  • Change_time (string) –
  • Associated_local_interface (string) –
  • Associated_local_interface_binary (string) –
  • Change_status (string) –
  • Packet_rules (string) –
  • Automatic_start (string) –
  • TRLAN_bit_sequencing (string) –
  • Interface_type (string) –
  • Proxy_ARP_allowed (string) –
  • Proxy_ARP_enabled (string) –
  • Configured_MTU (string) –
  • Network_name (string) –
  • Interface_name (string) –
  • Alias_name (string) –
  • Interface_description (string) –
  • Offset_to_preferred_interface_list (string) –
  • Number_of_entries_in_preferred_interface_list (string) –
  • Length_of_one_preferred_interface_list_entry (string) –
  • DHCP_created (string) –
  • DHCP_dynamic_DNS_updates (string) –
  • DHCP_lease_expiration (string) –
  • DHCP_lease_expiration_-_date (string) –
  • DHCP_lease_expiration_-_time (string) –
  • DHCP_lease_obtained (string) –
  • DHCP_lease_obtained_-_date (string) –
  • DHCP_lease_obtained_-_time (string) –
  • Use_DHCP_unique_identifier (string) –
  • DHCP_server_IP_address (string) –
  • Preferred_interface_Internet_address (string) –
  • Preferred_interface_Internet_address_binary (string) –

Examples

Retrieve TCP / IP attributes

const { Connection, iNetwork } = require('itoolkit');

const connection = new Connection({
  transport: 'ssh',
  transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});

const net = new iNetwork(connection);

net.getTCPIPAttr((error, output) => {
  if (error) {
    throw error;
  }
  console.log((output));
});

Retrieve network interface data

const { Connection, iNetwork } = require('itoolkit');

const connection = new Connection({
  transport: 'ssh',
  transportOptions: { host: 'myhost', username: 'myuser', password: 'mypassword' },
});

const net = new iNetwork(connection);

net.getNetInterfaceData('127.0.0.1', (error, output) => {
  if (error) {
    throw error;
  }
  console.log(output);
});