sd-network: Add support to emit and receive pop3 server information

This commit is contained in:
Susant Sahani
2020-03-23 04:16:47 +01:00
parent 284e8fd0d7
commit 8102b9e710
2 changed files with 7 additions and 0 deletions

View File

@@ -256,6 +256,10 @@ _public_ int sd_network_link_get_sip_servers(int ifindex, char ***ret) {
return network_link_get_strv(ifindex, "SIP", ret);
}
_public_ int sd_network_link_get_pop3_servers(int ifindex, char ***pop3) {
return network_link_get_strv(ifindex, "POP3_SERVERS", pop3);
}
_public_ int sd_network_link_get_dns_default_route(int ifindex) {
char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex) + 1];
_cleanup_free_ char *s = NULL;

View File

@@ -167,6 +167,9 @@ int sd_network_link_get_route_domains(int ifindex, char ***domains);
/* Get the sip servers for a given link. */
int sd_network_link_get_sip_servers(int ifindex, char ***sip);
/* Get the pop3 servers for a given link. */
int sd_network_link_get_pop3_servers(int ifindex, char ***pop3);
/* Get whether this link shall be used as 'default route' for DNS queries */
int sd_network_link_get_dns_default_route(int ifindex);