Lines Matching refs:ret
21 static int network_get_string(const char *field, char **ret) { in network_get_string() argument
25 assert_return(ret, -EINVAL); in network_get_string()
35 *ret = TAKE_PTR(s); in network_get_string()
64 static int network_get_strv(const char *key, char ***ret) { in network_get_strv() argument
69 assert_return(ret, -EINVAL); in network_get_strv()
77 *ret = NULL; in network_get_strv()
88 *ret = TAKE_PTR(a); in network_get_strv()
93 int sd_network_get_dns(char ***ret) { in sd_network_get_dns() argument
94 return network_get_strv("DNS", ret); in sd_network_get_dns()
97 int sd_network_get_ntp(char ***ret) { in sd_network_get_ntp() argument
98 return network_get_strv("NTP", ret); in sd_network_get_ntp()
101 int sd_network_get_search_domains(char ***ret) { in sd_network_get_search_domains() argument
102 return network_get_strv("DOMAINS", ret); in sd_network_get_search_domains()
105 int sd_network_get_route_domains(char ***ret) { in sd_network_get_route_domains() argument
106 return network_get_strv("ROUTE_DOMAINS", ret); in sd_network_get_route_domains()
109 static int network_link_get_string(int ifindex, const char *field, char **ret) { in network_link_get_string() argument
115 assert_return(ret, -EINVAL); in network_link_get_string()
127 *ret = TAKE_PTR(s); in network_link_get_string()
132 static int network_link_get_strv(int ifindex, const char *key, char ***ret) { in network_link_get_strv() argument
139 assert_return(ret, -EINVAL); in network_link_get_strv()
148 *ret = NULL; in network_link_get_strv()
159 *ret = TAKE_PTR(a); in network_link_get_strv()
301 int sd_network_link_get_dns(int ifindex, char ***ret) { in sd_network_link_get_dns() argument
302 return network_link_get_strv(ifindex, "DNS", ret); in sd_network_link_get_dns()
305 int sd_network_link_get_ntp(int ifindex, char ***ret) { in sd_network_link_get_ntp() argument
306 return network_link_get_strv(ifindex, "NTP", ret); in sd_network_link_get_ntp()
309 int sd_network_link_get_sip(int ifindex, char ***ret) { in sd_network_link_get_sip() argument
310 return network_link_get_strv(ifindex, "SIP", ret); in sd_network_link_get_sip()
313 int sd_network_link_get_search_domains(int ifindex, char ***ret) { in sd_network_link_get_search_domains() argument
314 return network_link_get_strv(ifindex, "DOMAINS", ret); in sd_network_link_get_search_domains()
317 int sd_network_link_get_route_domains(int ifindex, char ***ret) { in sd_network_link_get_route_domains() argument
318 return network_link_get_strv(ifindex, "ROUTE_DOMAINS", ret); in sd_network_link_get_route_domains()
340 static int network_link_get_ifindexes(int ifindex, const char *key, int **ret) { in network_link_get_ifindexes() argument
348 assert_return(ret, -EINVAL); in network_link_get_ifindexes()
377 *ret = TAKE_PTR(ifis); in network_link_get_ifindexes()
382 int sd_network_link_get_carrier_bound_to(int ifindex, int **ret) { in sd_network_link_get_carrier_bound_to() argument
383 return network_link_get_ifindexes(ifindex, "CARRIER_BOUND_TO", ret); in sd_network_link_get_carrier_bound_to()
386 int sd_network_link_get_carrier_bound_by(int ifindex, int **ret) { in sd_network_link_get_carrier_bound_by() argument
387 return network_link_get_ifindexes(ifindex, "CARRIER_BOUND_BY", ret); in sd_network_link_get_carrier_bound_by()
390 int sd_network_link_get_stat(int ifindex, struct stat *ret) { in sd_network_link_get_stat() argument
401 if (ret) in sd_network_link_get_stat()
402 *ret = st; in sd_network_link_get_stat()