Operating System - OpenVMS
1753795 Members
6828 Online
108799 Solutions
New Discussion юеВ

Retrieve Network Interface and Port Information

 
SOLVED
Go to solution
cfili
Occasional Advisor

Retrieve Network Interface and Port Information

I am trying to pull back network interface card information (name, mac, ip, packets in/out, bytes in/out) and network port information (type, process tied to the port). However, I am having a hard time finding answers on how to do so from a c/c++ application using system service calls. If anyone could point me in the right direction, I would greatly appreciate it.

Thanks.
8 REPLIES 8
Ian Miller.
Honored Contributor

Re: Retrieve Network Interface and Port Information

GETDVI I guess is the way to get some of this. I belive there are new item codes due in VMS V8.3 which will help.

Existing ones will get you some of this information.
____________________
Purely Personal Opinion
Robert Brooks_1
Honored Contributor
Solution

Re: Retrieve Network Interface and Port Information

Ian's right; $GETDVI is probably your best bet and some stuff being added for V8.3 will help. However, there are no item codes being added for V8.3 that return any sort of counter or performance information. That'll come later.

LAN item codes being added for V8.3 are LAN_SPEED, LAN_LINK_UP, LAN_DEFAULT_MAC_ADDRESS, LAN_MAC_ADDRESS, LAN_FULL_DUPLEX, LAN_ALL_MULTICAST_MODE, LAN_PROMISCUOUS_MODE, LAN_JUMBO_FRAMES_ENABLED, LAN_AUTONEG_ENABLED, LAN_PROTOCOL_NAME, and LAN_PROTOCOL_TYPE.

These are all prefixed with DVI$_ for SYS$GETDVI and LIB$GETDVI, of course.


SHOW DEVICE /FULL for LAN devices will make use of the above item codes.

-- Rob (VMS Engineering)
cfili
Occasional Advisor

Re: Retrieve Network Interface and Port Information

This will be for a 7.3 system. Looks like that will give me some of the NIC information I am looking for, anything similar for active ports?

Thanks for the input.
Volker Halle
Honored Contributor

Re: Retrieve Network Interface and Port Information

cfili,

welcome to the OpenVMS ITRC forum.

You seem to be mainly interested in TCPIP related information, this can generally not be obtained via OpenVMS system service calls, as it also depends on the TCPIP product being used.

Port (in TCPIP speak) information can be obtained using $ TCPIP SHOW DEVICE/FULL and related process information with $ SHOW DEV/FULL bg-device (or GETDVI for BG-device).

The most detailled information about network cards and all network protocols running on that card can be obtained with the SDA (no callable interface) command SDA> SHOW LAN and SDA> SHOW LAN/FULL.

Volker.
Robert Atkinson
Respected Contributor

Re: Retrieve Network Interface and Port Information

I'd also recommend '$ tcpip show int /ful' :-

ALPHA_ROB$$ tcpip show int/ful

Interface: WE0
IP_Addr: xx.xx.xx.xx NETWRK: 255.255.248.0 BRDCST: xx.xx.xx.xx
Cluster
C_Addr: xx.xx.xx.xx C_NETWRK: 255.255.248.0 C_BRDCST: xx.xx.xx.xx
Ethernet_Addr: AA-00-04-00-47-04 MTU: 1500
Flags: UP BRDCST RUN MCAST SMPX
RECEIVE SEND
Packets 175797307 144832046
Errors 0 0
Collisions: 0

Robert_Boyd
Respected Contributor

Re: Retrieve Network Interface and Port Information

I realize these are not via a callable interface, but I've been using these from a perl script to scan for port settings/variants.

You can also use LANCP to find out information about LAN interfaces:

LANCP SHOW DEVICE/INTERNAL gives console settings and other interesting info(not documented)
as well as LANCP SHOW DEVICE/CHARACTERISTIC
and LANCP LIST DEVICE/CHARACTERISTIC.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
cfili
Occasional Advisor

Re: Retrieve Network Interface and Port Information

Ok, thanks to everyone who replied, your responses have been very helpful.
cfili
Occasional Advisor

Re: Retrieve Network Interface and Port Information

closing thread.