---
name: "semanage_iface"
section: "3"
platform: "linux"
package: "libsemanage-dev"
version: "3.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/semanage_iface"
---

# semanage\_iface(3)

SELinux Network Interfaces Management API

## NAME

semanage\_iface - SELinux Network Interfaces Management API

## SYNOPSIS

**#include \<semanage/iface\_record.h\>**\
 **#include \<semanage/interfaces\_policy.h\>**\
 **#include \<semanage/interfaces\_local.h\>**

This object contains properties associated with a network interface.

For details on a specific function, see its manual page.

## Record API Overview

**semanage\_iface\_create**(3)**-**\
 create an interface

**semanage\_iface\_free**(3)**-**\
 release resources for this interface

**semanage\_iface\_key\_create**(3)**-**\
 create a key, which can be used to identify an interface

**semanage\_iface\_key\_free**(3)**-**\
 release resources for this interface key

**semanage\_iface\_key\_extract**(3)**-**\
 create a key matching this interface

**semanage\_iface\_clone**(3)**-**\
 create an identical interface (deep-copy clone)

**semanage\_iface\_compare**(3)**-**\
 compare this interface to the provided key

**semanage\_iface\_compare2**(3)**-**\
 compare this interface to another

## Properties API Overview

**semanage\_iface\_get\_name**(3)**-**\
 return the name of this interface

**semanage\_iface\_set\_name**(3)**-**\
 set the name of this interface

**semanage\_iface\_get\_ifcon**(3)**-**\
 return the SELinux context associated with this interface

**semanage\_iface\_set\_ifcon**(3)**-**\
 set the SELinux context associated with this interface

**semanage\_iface\_get\_msgcon**(3)**-**\
 return the SELinux context associated with packets sent over this interface

**semanage\_iface\_set\_msgcon**(3)**-**\
 set the SELinux context associated with packets sent over this interface

## Record Store API Overview

[**semanage\_iface\_modify\_local**(3)](/semanage_iface_modify_local/3.md)**-**\
 add or update an interface in the local store

[**semanage\_iface\_del\_local**(3)](/semanage_iface_del_local/3.md)**-**\
 delete an interface from the local store

[**semanage\_iface\_exists**(3)](/semanage_iface_exists/3.md)**-**\
 check if an interface is defined in the persistent policy

[**semanage\_iface\_exists\_local**(3)](/semanage_iface_exists_local/3.md)**-**\
 check if an interface is defined in the local store

[**semanage\_iface\_query**(3)](/semanage_iface_query/3.md)**-**\
 query an interface in the persistent policy

[**semanage\_iface\_query\_local**(3)](/semanage_iface_query_local/3.md)**-**\
 query an interface in the local store

[**semanage\_iface\_count**(3)](/semanage_iface_count/3.md)**-**\
 count the number of interfaces defined in the persistent policy

[**semanage\_iface\_count\_local**(3)](/semanage_iface_count_local/3.md)**-**\
 count the number of interfaces defined in the local store

[**semanage\_iface\_iterate**(3)](/semanage_iface_iterate/3.md)**-**\
 execute a callback for each interface in the persistent policy

[**semanage\_iface\_iterate\_local**(3)](/semanage_iface_iterate_local/3.md)**-**\
 execute a callback for each interface in the local store

[**semanage\_iface\_list**(3)](/semanage_iface_list/3.md)**-**\
 return an array containing all interfaces in the persistent policy

[**semanage\_iface\_list\_local**(3)](/semanage_iface_list_local/3.md)**-**\
 return an array containing all interfaces in the local store
