1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2017 Red Hat, Inc.
4 */
5
6#ifndef __NM_DEVICE_MACSEC_H__
7#define __NM_DEVICE_MACSEC_H__
8
9#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
10#error "Only <NetworkManager.h> can be included directly."
11#endif
12
13#include "nm-device.h"
14
15G_BEGIN_DECLS
16
17#define NM_TYPE_DEVICE_MACSEC (nm_device_macsec_get_type())
18#define NM_DEVICE_MACSEC(obj) \
19 (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_MACSEC, NMDeviceMacsec))
20#define NM_DEVICE_MACSEC_CLASS(klass) \
21 (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_MACSEC, NMDeviceMacsecClass))
22#define NM_IS_DEVICE_MACSEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_MACSEC))
23#define NM_IS_DEVICE_MACSEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_MACSEC))
24#define NM_DEVICE_MACSEC_GET_CLASS(obj) \
25 (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_MACSEC, NMDeviceMacsecClass))
26
27#define NM_DEVICE_MACSEC_PARENT "parent"
28#define NM_DEVICE_MACSEC_HW_ADDRESS "hw-address"
29#define NM_DEVICE_MACSEC_SCI "sci"
30#define NM_DEVICE_MACSEC_ICV_LENGTH "icv-length"
31#define NM_DEVICE_MACSEC_CIPHER_SUITE "cipher-suite"
32#define NM_DEVICE_MACSEC_WINDOW "window"
33#define NM_DEVICE_MACSEC_ENCODING_SA "encoding-sa"
34#define NM_DEVICE_MACSEC_VALIDATION "validation"
35#define NM_DEVICE_MACSEC_ENCRYPT "encrypt"
36#define NM_DEVICE_MACSEC_PROTECT "protect"
37#define NM_DEVICE_MACSEC_INCLUDE_SCI "include-sci"
38#define NM_DEVICE_MACSEC_ES "es"
39#define NM_DEVICE_MACSEC_SCB "scb"
40#define NM_DEVICE_MACSEC_REPLAY_PROTECT "replay-protect"
41
42/**
43 * NMDeviceMacsec:
44 */
45typedef struct _NMDeviceMacsecClass NMDeviceMacsecClass;
46
47NM_AVAILABLE_IN_1_6
48GType nm_device_macsec_get_type(void);
49
50NM_AVAILABLE_IN_1_6
51NMDevice *nm_device_macsec_get_parent(NMDeviceMacsec *device);
52
53NM_AVAILABLE_IN_1_6
54NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address)
55const char *nm_device_macsec_get_hw_address(NMDeviceMacsec *device);
56
57NM_AVAILABLE_IN_1_6
58guint64 nm_device_macsec_get_sci(NMDeviceMacsec *device);
59NM_AVAILABLE_IN_1_6
60guint8 nm_device_macsec_get_icv_length(NMDeviceMacsec *device);
61NM_AVAILABLE_IN_1_6
62guint64 nm_device_macsec_get_cipher_suite(NMDeviceMacsec *device);
63NM_AVAILABLE_IN_1_6
64guint nm_device_macsec_get_window(NMDeviceMacsec *device);
65NM_AVAILABLE_IN_1_6
66guint8 nm_device_macsec_get_encoding_sa(NMDeviceMacsec *device);
67NM_AVAILABLE_IN_1_6
68const char *nm_device_macsec_get_validation(NMDeviceMacsec *device);
69NM_AVAILABLE_IN_1_6
70gboolean nm_device_macsec_get_encrypt(NMDeviceMacsec *device);
71NM_AVAILABLE_IN_1_6
72gboolean nm_device_macsec_get_protect(NMDeviceMacsec *device);
73NM_AVAILABLE_IN_1_6
74gboolean nm_device_macsec_get_include_sci(NMDeviceMacsec *device);
75NM_AVAILABLE_IN_1_6
76gboolean nm_device_macsec_get_es(NMDeviceMacsec *device);
77NM_AVAILABLE_IN_1_6
78gboolean nm_device_macsec_get_scb(NMDeviceMacsec *device);
79NM_AVAILABLE_IN_1_6
80gboolean nm_device_macsec_get_replay_protect(NMDeviceMacsec *device);
81G_END_DECLS
82
83#endif /* __NM_DEVICE_MACSEC_H__ */
84

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