AoGetInterface()

Updated: April 19, 2023

Get an interface from a control

Synopsis:

#include <aoi.h>

void *AoGetInterface(const AOICtrl_t *ctrl,
                     const char *ifname,
                     const int32_t minver,
                     const int32_t nth);

Arguments:

ctrl
A pointer to an AOICtrl_t handle to the control containing the interface you want to get.
ifname
(Optional) The name of the interface to get, or NULL if you don't want to get the interface by its name.
minver
(Optional) The minimum version of the interface to get. This argument is processed only if ifname is specified.
nth
The zero-based index of the interface to get.

Library:

libaoi.so

Description:

This function searches for the nth interface (in a zero-based index) in the given control. If the name and minimum version are specified, the function looks for a matching interface at the nth position. If either of these two arguments is different from the corresponding interface metadata field, no interface is returned.

Before calling this function, the caller must hold the control using AoHold().

Returns:

A pointer to the interface if the specified interface was found at the nth index in the control, or NULL is no such interface was found.

Classification:

QNX Neutrino