1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6 This file is part of systemd.
8 Copyright 2014 Tom Gundersen <teg@jklm.no>
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
39 typedef struct NLTypeSystemUnion NLTypeSystemUnion;
40 typedef struct NLTypeSystem NLTypeSystem;
41 typedef struct NLType NLType;
43 struct NLTypeSystemUnion {
46 int (*lookup)(const char *);
47 const NLTypeSystem *type_systems;
58 const NLTypeSystem *type_system;
59 const NLTypeSystemUnion *type_system_union;
62 int type_system_get_type(const NLTypeSystem *type_system, const NLType **ret, uint16_t type);
63 int type_system_get_type_system(const NLTypeSystem *type_system, const NLTypeSystem **ret, uint16_t type);
64 int type_system_get_type_system_union(const NLTypeSystem *type_system, const NLTypeSystemUnion **ret, uint16_t type);
65 int type_system_union_get_type_system(const NLTypeSystemUnion *type_system_union, const NLTypeSystem **ret, const char *key);
67 typedef enum NLUnionLinkInfoData {
68 NL_UNION_LINK_INFO_DATA_BOND,
69 NL_UNION_LINK_INFO_DATA_BRIDGE,
70 NL_UNION_LINK_INFO_DATA_VLAN,
71 NL_UNION_LINK_INFO_DATA_VETH,
72 NL_UNION_LINK_INFO_DATA_DUMMY,
73 NL_UNION_LINK_INFO_DATA_MACVLAN,
74 NL_UNION_LINK_INFO_DATA_VXLAN,
75 NL_UNION_LINK_INFO_DATA_IPIP_TUNNEL,
76 NL_UNION_LINK_INFO_DATA_IPGRE_TUNNEL,
77 NL_UNION_LINK_INFO_DATA_SIT_TUNNEL,
78 NL_UNION_LINK_INFO_DATA_VTI_TUNNEL,
79 _NL_UNION_LINK_INFO_DATA_MAX,
80 _NL_UNION_LINK_INFO_DATA_INVALID = -1
81 } NLUnionLinkInfoData;
83 const char *nl_union_link_info_data_to_string(NLUnionLinkInfoData p) _const_;
84 NLUnionLinkInfoData nl_union_link_info_data_from_string(const char *p) _pure_;