APIs by Example: TCP/IP Management APIs, Part 2

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.

Download the save file containing the source code.

Read the entire article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s