NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS
#include <tsol/tndb.h>int chstate(tsol_chstateop_t state, struct netbuf *addr);
A host regards another host as labeled or unlabeled, based on the remote host's database caches that are loaded in the kernel. In some cases (for example, when a diskless client boots), the server host must initially regard the client as an unlabeled host even though the client is a labeled host; at a later time, the server host can regard the client as a labeled host. chstate() allows a process to toggle the view of a host between labeled and unlabeled.
typedef enum { STATE_UNLABELED = 1, STATE_LABELED = 2 } tsol_chstateop_t;
The argument addr is a pointer to the netbuf structure:
struct netbuf { unsigned int maxlen; unsigned int len; char *buf; };
where *buf contains the address of the host whose view is being changed. Currently, only the IP address format is supported; and it should be specified as type sockaddr_in.
chstate() requires the PRIV_SYS_NET_CONFIG
privilege.
may fail for one of these reasons:
The addr argument points to a bad address.
Either the state argument is not one of the listed type constants, or the remote host template for the host specified by addr is not available (after using fallback mechanism).
The calling process does not have the PRIV_SYS_NET_CONFIG
privilege.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS