1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2007 - 2008 Novell, Inc.
4 * Copyright (C) 2007 - 2012 Red Hat, Inc.
5 */
6
7#ifndef __NM_DEVICE_ETHERNET_H__
8#define __NM_DEVICE_ETHERNET_H__
9
10#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
11#error "Only <NetworkManager.h> can be included directly."
12#endif
13
14#include "nm-device.h"
15
16G_BEGIN_DECLS
17
18#define NM_TYPE_DEVICE_ETHERNET (nm_device_ethernet_get_type())
19#define NM_DEVICE_ETHERNET(obj) \
20 (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernet))
21#define NM_DEVICE_ETHERNET_CLASS(klass) \
22 (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
23#define NM_IS_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_ETHERNET))
24#define NM_IS_DEVICE_ETHERNET_CLASS(klass) \
25 (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_ETHERNET))
26#define NM_DEVICE_ETHERNET_GET_CLASS(obj) \
27 (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
28
29#define NM_DEVICE_ETHERNET_HW_ADDRESS "hw-address"
30#define NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS "perm-hw-address"
31#define NM_DEVICE_ETHERNET_SPEED "speed"
32#define NM_DEVICE_ETHERNET_CARRIER "carrier"
33#define NM_DEVICE_ETHERNET_S390_SUBCHANNELS "s390-subchannels"
34
35/**
36 * NMDeviceEthernet:
37 */
38typedef struct _NMDeviceEthernetClass NMDeviceEthernetClass;
39
40GType nm_device_ethernet_get_type(void);
41
42NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address)
43const char *nm_device_ethernet_get_hw_address(NMDeviceEthernet *device);
44
45const char *nm_device_ethernet_get_permanent_hw_address(NMDeviceEthernet *device);
46guint32 nm_device_ethernet_get_speed(NMDeviceEthernet *device);
47gboolean nm_device_ethernet_get_carrier(NMDeviceEthernet *device);
48NM_AVAILABLE_IN_1_2
49const char *const *nm_device_ethernet_get_s390_subchannels(NMDeviceEthernet *device);
50
51G_END_DECLS
52
53#endif /* __NM_DEVICE_ETHERNET_H__ */
54

source code of include/libnm/nm-device-ethernet.h