diff options
author | Thomas Haller <thaller@redhat.com> | 2014-08-28 19:17:07 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-11-07 15:19:05 +0100 |
commit | c52e33101436bfd5cabffdc01947b6850616a7c1 (patch) | |
tree | ee955b99da4ebf0a1dd4631c8826ba28ac3cba2f /src/nm-types.h | |
parent | c2628193607ccf6f8fb162f8459ccbb815c5cd86 (diff) |
core: move definition of NMLinkType to nm-types.h
As we use NMLinkType in NetworkManagerUtils.h, we cannot use
the utils header without nm-platform.h. That is clearly wrong.
Apparently NMLinkType has a wider use outside of platform (and
its name is not prefixed with 'platform' either).
Move the enum definition to nm-types.h.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/nm-types.h')
-rw-r--r-- | src/nm-types.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/nm-types.h b/src/nm-types.h index e67ae2052..4d204fc2b 100644 --- a/src/nm-types.h +++ b/src/nm-types.h @@ -60,6 +60,49 @@ typedef struct _NMPlatformIP6Address NMPlatformIP6Address; typedef struct _NMPlatformIP6Route NMPlatformIP6Route; typedef struct _NMPlatformLink NMPlatformLink; +typedef enum { + /* Please don't interpret type numbers outside nm-platform and use functions + * like nm_platform_link_is_software() and nm_platform_supports_slaves(). + * + * type & 0x10000 -> Software device type + * type & 0x20000 -> Type supports slaves + */ + + /* No type, used as error value */ + NM_LINK_TYPE_NONE, + + /* Unknown type */ + NM_LINK_TYPE_UNKNOWN, + + /* Hardware types */ + NM_LINK_TYPE_ETHERNET, + NM_LINK_TYPE_INFINIBAND, + NM_LINK_TYPE_OLPC_MESH, + NM_LINK_TYPE_WIFI, + NM_LINK_TYPE_WWAN_ETHERNET, /* WWAN pseudo-ethernet */ + NM_LINK_TYPE_WIMAX, + + /* Software types */ + NM_LINK_TYPE_DUMMY = 0x10000, + NM_LINK_TYPE_GRE, + NM_LINK_TYPE_GRETAP, + NM_LINK_TYPE_IFB, + NM_LINK_TYPE_LOOPBACK, + NM_LINK_TYPE_MACVLAN, + NM_LINK_TYPE_MACVTAP, + NM_LINK_TYPE_OPENVSWITCH, + NM_LINK_TYPE_TAP, + NM_LINK_TYPE_TUN, + NM_LINK_TYPE_VETH, + NM_LINK_TYPE_VLAN, + NM_LINK_TYPE_VXLAN, + + /* Software types with slaves */ + NM_LINK_TYPE_BRIDGE = 0x10000 | 0x20000, + NM_LINK_TYPE_BOND, + NM_LINK_TYPE_TEAM, +} NMLinkType; + /* settings */ typedef struct _NMAgentManager NMAgentManager; typedef struct _NMSecretAgent NMSecretAgent; |