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

# semanage\_node(3)

SELinux Network Nodes Management API

## NAME

semanage\_node - SELinux Network Nodes Management API

## SYNOPSIS

**#include \<semanage/node\_record.h\>**\
 **#include \<semanage/nodes\_policy.h\>**\
 **#include \<semanage/nodes\_local.h\>**

This object contains properties associated with a network node.

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

## Record API Overview

**semanage\_node\_create**(3)**-**\
 create a node

**semanage\_node\_free**(3)**-**\
 release resources for this node

**semanage\_node\_key\_create**(3)**-**\
 create a key, which can be used to identify a node

**semanage\_node\_key\_free**(3)**-**\
 release resources for this node key

**semanage\_node\_key\_extract**(3)**-**\
 create a key matching this node

**semanage\_node\_clone**(3)**-**\
 create an identical node (deep-copy clone)

**semanage\_node\_compare**(3)**-**\
 compare this node to the provided key

**semanage\_node\_compare2**(3)**-**\
 compare this node to another

## Properties API Overview

**semanage\_node\_get\_addr**(3)**-**\
 return the IP address of this node in string representation

**semanage\_node\_set\_addr**(3)**-**\
 set the IP address of this node from the provided string representation and protocol

**semanage\_node\_get\_addr\_bytes**(3)**-**\
 return the IP address of this node as a byte array in network byte order

**semanage\_node\_set\_addr\_bytes**(3)**-**\
 set the IP address of this node from the provided byte array in network byte order

**semanage\_node\_get\_mask**(3)**-**\
 return the IP mask of this node in string representation

**semanage\_node\_set\_mask**(3)**-**\
 set the IP mask of this node from the provided string representation and protocol version

**semanage\_node\_get\_mask\_bytes**(3)**-**\
 return the IP mask of this node as a byte array in network byte order

**semanage\_node\_set\_mask\_bytes**(3)**-**\
 set the IP mask of this node from the provided byte array in network byte order

**semanage\_node\_get\_proto**(3)**-**\
 return the IP protocol version for this node

**semanage\_node\_get\_proto\_str**(3)**-**\
 return a string representation of the given node protocol

**semanage\_node\_set\_proto**(3)**-**\
 set the IP protocol version for this node

**semanage\_node\_get\_con**(3)**-**\
 return the SELinux context associated with this node

**semanage\_node\_set\_con**(3)**-**\
 set the SELinux context associated with this node

## Record Store API Overview

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

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

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

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

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

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

[**semanage\_node\_count**(3)](/semanage_node_count/3.md)**-**\
 count the number of nodes defined in the persistent policy

[**semanage\_node\_count\_local**(3)](/semanage_node_count_local/3.md)**-**\
 count the number of nodes defined in the local store

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

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

[**semanage\_node\_list**(3)](/semanage_node_list/3.md)**-**\
 return an array containing all nodes in the persistent policy

[**semanage\_node\_list\_local**(3)](/semanage_node_list_local/3.md)**-**\
 return an array containing all nodes in the local store
