Eris Linux A.P.I. 0.1
API to access Eris Linux system from a custom container
Loading...
Searching...
No Matches
liberis.h File Reference
#include <stddef.h>
Include dependency graph for liberis.h:

Go to the source code of this file.

Functions

int eris_contact_server (void)
 Ask the device to contact the server immediately.
int eris_get_server_contact_period (void)
 Get the period in seconds that the device waits between contacts with the server.
int eris_set_server_contact_period (int period)
 Set the period in seconds that the device waits between contacts with the server.
int eris_get_number_of_slots (void)
 Return the maximal number of containers allowed.
int eris_get_container_name (int slot, char *buffer, size_t size)
 Read the name of the container in a given slot.
int eris_get_container_presence (int slot)
 Check if a container is present in a given slot.
int eris_get_container_status (int container, char *buffer, size_t size)
 Get the status of the container in a given slot.
int eris_get_container_version (int container, char *buffer, size_t size)
 Read the version number of the container in a given slot.
int eris_get_container_update_policy (void)
 Read the container update policy.
int eris_set_container_update_policy (int policy)
 Write the container update policy.
int eris_get_list_of_gpio (char *buffer, size_t size)
 Get a list of available GPIOs.
int eris_request_gpio_for_input (const char *id)
 Reserve a GPIO and configure it for input.
int eris_request_gpio_for_output (const char *id, int value)
 Configure a GPIO for output and set its initial value.
int eris_release_gpio (const char *id)
 Release a GPIO that you don't use anymore.
int eris_read_gpio_value (const char *id)
 Read the value on a GPIO configured in input.
int eris_write_gpio_value (const char *id, int value)
 Write a value on a GPIO configured in output.
int eris_get_list_of_network_interfaces (char *buffer, size_t size)
 Get a list of network interfaces.
int eris_get_network_interface_status (const char *interface, char *buffer, size_t size)
 Get the status of a network interface.
int eris_set_network_interface_status (const char *interface, const char *status)
 Activate or disactivate a network interface.
int eris_get_network_interface_config (const char *interface, char *buffer, size_t size)
 Get the configuration of a network interface.
int eris_set_network_interface_config (const char *interface, const char *autoconf, const char *mode, const char *ip, const char *address, const char *netmask, const char *gateway)
 Set the configuration of a network interface.
int eris_get_nameserver_address (char *buffer, size_t size)
 Get the IP address of the Domain Name Server.
int eris_set_nameserver_address (const char *address)
 Set the IP address of the Domain Name Server.
int eris_is_network_interface_wireless (const char *interface)
 Indicate whether a network interface is wireless or not.
int eris_scan_wifi (const char *interface, char *buffer, size_t size)
 Scan the available Wifi access points.
int eris_connect_wifi (const char *interface, const char *ssid, const char *password)
 Connect to a Wifi access point.
int eris_disconnect_wifi (void)
 Disconnect to any Wifi access points.
int eris_get_wifi_quality (const char *interface, char *buffer, size_t size)
 Get the Wifi connection quality.
int eris_reboot (void)
 Reboot the system as soon as possible.
int eris_get_automatic_reboot_flag (void)
 Read the Automatic-Reboot flag.
int eris_set_automatic_reboot_flag (int autoreboot)
 Write the Automatic-Reboot flag.
int eris_get_reboot_needed_flag (void)
 Check if a reboot is currently pending.
int eris_set_reboot_needed_flag (int flag)
 Enable or cancel a pending reboot.
int eris_rollback (void)
 Rollback to the previous system version.
int eris_restore_factory_preset (void)
 Force the system to return to a factory preset state.
int eris_get_list_of_packages (char *buffer, size_t size)
 Get the list of Eris Linux installed packages.
int eris_get_package_recipe (const char *name, char *buffer, size_t size)
 Get the name of the recipe used to build a package.
int eris_get_package_version (const char *name, char *buffer, size_t size)
 Get the version of a packages.
int eris_get_package_licenses (const char *name, char *buffer, size_t size)
 Get the licenses concerning a package.
int eris_get_list_of_licenses (char *buffer, size_t size)
 Get the list of the licenses used by installed packages.
int eris_get_license_text (const char *name, char *buffer, size_t size)
 Get the text of a license.
int eris_get_system_type (char *buffer, size_t size)
 Read Eris Linux system image type.
int eris_get_system_model (char *buffer, size_t size)
 Read Eris Linux system model.
int eris_get_system_uuid (char *buffer, size_t size)
 Get the Universally Unique Identifier (UUID) of the machine.
int eris_get_system_version (char *buffer, size_t size)
 Read Eris Linux system version.
int eris_get_system_update_status (void)
 Get the current update status of the system.
int eris_get_ntp_server (char *buffer, size_t size)
 Get the current NTP server used by the machine.
int eris_set_ntp_server (const char *server)
 Set the NTP server to use by the machine.
int eris_get_ntp_enable (char *buffer, size_t size)
 Get the current NTP status.
int eris_set_ntp_enable (const char *status)
 Set the NTP status.
int eris_list_time_zones (char *buffer, size_t size)
 List the timezones known by the system.
int eris_get_time_zone (char *buffer, size_t size)
 Get the current timezone of the system.
int eris_set_time_zone (const char *timezone)
 Set the system timezone.
int eris_get_local_time (char *buffer, size_t size)
 Get the local time.
int eris_get_system_time (char *buffer, size_t size)
 Get the system time.
int eris_set_system_time (const char *time)
 Set the system time.
int eris_feed_watchdog (void)
 Refresh the watchdog timer.
int eris_disable_watchdog (void)
 Disable the watchdog timer.
int eris_get_watchdog_delay (void)
 Read the watchdog delay.
int eris_set_watchdog_delay (int delay)
 Set the watchdog delay.
int eris_start_watchdog_feeder (void)
 Start the automatic watchdog feeder.
int eris_stop_watchdog_feeder (void)
 Stop the automatic watchdog feeder.
int eris_watchdog_feeder_status (char *buffer, size_t size)
 Get the automatic watchdog feeder status.

Function Documentation

◆ eris_get_system_version()

int eris_get_system_version ( char * buffer,
size_t size )

Read Eris Linux system version.

Parameters
bufferThe buffer to fill with the version number.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

This function fills the buffer with the version of the Eris Linux system image.

The version number is modified at each system update.

The version number is written during image production and can not be modified.

◆ eris_set_nameserver_address()

int eris_set_nameserver_address ( const char * address)

Set the IP address of the Domain Name Server.

Parameters
addressThe IP address of the DNS
Returns
0 on success, -1 on error and errno is set appropriately.

Example of use:

int eris_set_nameserver_address(const char *address)
Set the IP address of the Domain Name Server.