Last week’s installment of Carsten Flensburg’s APIs by Example featured three TCP/IP management APIs: Retrieve TCP/IP attributes (QtocRtvTCPA), List Network Connections (QtocLstNetCnn), and List Network Connection Data (QtocRtvNetCnnDta).
This week’s example complements last week’s code by letting you retrieve the same information that’s available in IBM’s WrkTCPSts command. Two sample programs are provided. The first, CBX1061, uses the List Network Interfaces (QtocLstNetIfc) API to retrieve a list of logical TCP/IP network interfaces, then prints each network interface in a simple report. The second program, CBX1062, uses the List Network Routes (QtocLstNetRte) to retrieve a list of the TCP/IP network routes and print each network route to a report.
The earliest OS/400 release required for both sample programs is V5R1.