LCOV - code coverage report
Current view: top level - resolve - resolved-dns-search-domain.h (source / functions) Hit Total Coverage
Test: systemd_full.info Lines: 0 2 0.0 %
Date: 2019-08-23 13:36:53 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 2 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: LGPL-2.1+ */
       2                 :            : #pragma once
       3                 :            : 
       4                 :            : #include "macro.h"
       5                 :            : 
       6                 :            : typedef struct DnsSearchDomain DnsSearchDomain;
       7                 :            : 
       8                 :            : typedef enum DnsSearchDomainType {
       9                 :            :         DNS_SEARCH_DOMAIN_SYSTEM,
      10                 :            :         DNS_SEARCH_DOMAIN_LINK,
      11                 :            : } DnsSearchDomainType;
      12                 :            : 
      13                 :            : #include "resolved-link.h"
      14                 :            : #include "resolved-manager.h"
      15                 :            : 
      16                 :            : struct DnsSearchDomain {
      17                 :            :         Manager *manager;
      18                 :            : 
      19                 :            :         unsigned n_ref;
      20                 :            : 
      21                 :            :         DnsSearchDomainType type;
      22                 :            :         Link *link;
      23                 :            : 
      24                 :            :         char *name;
      25                 :            : 
      26                 :            :         bool marked:1;
      27                 :            :         bool route_only:1;
      28                 :            : 
      29                 :            :         bool linked:1;
      30                 :            :         LIST_FIELDS(DnsSearchDomain, domains);
      31                 :            : };
      32                 :            : 
      33                 :            : int dns_search_domain_new(
      34                 :            :                 Manager *m,
      35                 :            :                 DnsSearchDomain **ret,
      36                 :            :                 DnsSearchDomainType type,
      37                 :            :                 Link *link,
      38                 :            :                 const char *name);
      39                 :            : 
      40                 :            : DnsSearchDomain* dns_search_domain_ref(DnsSearchDomain *d);
      41                 :            : DnsSearchDomain* dns_search_domain_unref(DnsSearchDomain *d);
      42                 :            : 
      43                 :            : void dns_search_domain_unlink(DnsSearchDomain *d);
      44                 :            : void dns_search_domain_move_back_and_unmark(DnsSearchDomain *d);
      45                 :            : 
      46                 :            : void dns_search_domain_unlink_all(DnsSearchDomain *first);
      47                 :            : void dns_search_domain_unlink_marked(DnsSearchDomain *first);
      48                 :            : void dns_search_domain_mark_all(DnsSearchDomain *first);
      49                 :            : 
      50                 :            : int dns_search_domain_find(DnsSearchDomain *first, const char *name, DnsSearchDomain **ret);
      51                 :            : 
      52                 :          0 : static inline const char* DNS_SEARCH_DOMAIN_NAME(DnsSearchDomain *d) {
      53         [ #  # ]:          0 :         return d ? d->name : NULL;
      54                 :            : }
      55                 :            : 
      56                 :            : DEFINE_TRIVIAL_CLEANUP_FUNC(DnsSearchDomain*, dns_search_domain_unref);

Generated by: LCOV version 1.14