Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

IMA_SetDefaultGateway (3IMA)

Name

IMA_SetDefaultGateway - Sets the default gateway for the specified physical network port.

Synopsis

cc [ flag... ] file... -lima [ library... ]
#include <ima.h>

IMA_STATUS IMA_SetDefaultGateway(
     /* in */     IMA_OID oid,
     /* in */     IMA_IP_ADDRESS defaultGateway
);

Parameters

oid

The object ID of the physical network port (PNP) whose default gateway is to be set

defaultGateway

The new default gateway for the PNP

Description

The IMA_SetDefaultGateway() API sets the default gateway for the specified PNP.

Return Values

IMA_STATUS_REBOOT_NECESSARY

Returned if a reboot is necessary before the setting of the defaultGateway argument takes effect

IMA_ERROR_NOT_SUPPORTED

Returned if setting the defaultGateway argument is not supported by the specified PNP

IMA_ERROR_INVALID_PARAMETER

Returned if any fields in the defaultGateway argument contain invalid values

IMA_ERROR_INVALID_OBJECT_TYPE

Returned if the oid argument does not specify a valid object type

IMA_ERROR_INCORRECT_OBJECT_TYPE

Returned if the oid argument does not specify a PNP

IMA_ERROR_OBJECT_NOT_FOUND

Returned if the oid argument does not specify a PNP known to the system

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/library/storage/snia-ima
Interface Stability
Volatile
MT-Level
Safe

See Also

libima(3LIB), attributes(7), IMA_GetIpProperties(3IMA)