| 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 | |
| 15 | G_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 | */ |
| 45 | typedef struct _NMDeviceMacsecClass NMDeviceMacsecClass; |
| 46 | |
| 47 | NM_AVAILABLE_IN_1_6 |
| 48 | GType nm_device_macsec_get_type(void); |
| 49 | |
| 50 | NM_AVAILABLE_IN_1_6 |
| 51 | NMDevice *nm_device_macsec_get_parent(NMDeviceMacsec *device); |
| 52 | |
| 53 | NM_AVAILABLE_IN_1_6 |
| 54 | NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) |
| 55 | const char *nm_device_macsec_get_hw_address(NMDeviceMacsec *device); |
| 56 | |
| 57 | NM_AVAILABLE_IN_1_6 |
| 58 | guint64 nm_device_macsec_get_sci(NMDeviceMacsec *device); |
| 59 | NM_AVAILABLE_IN_1_6 |
| 60 | guint8 nm_device_macsec_get_icv_length(NMDeviceMacsec *device); |
| 61 | NM_AVAILABLE_IN_1_6 |
| 62 | guint64 nm_device_macsec_get_cipher_suite(NMDeviceMacsec *device); |
| 63 | NM_AVAILABLE_IN_1_6 |
| 64 | guint nm_device_macsec_get_window(NMDeviceMacsec *device); |
| 65 | NM_AVAILABLE_IN_1_6 |
| 66 | guint8 nm_device_macsec_get_encoding_sa(NMDeviceMacsec *device); |
| 67 | NM_AVAILABLE_IN_1_6 |
| 68 | const char *nm_device_macsec_get_validation(NMDeviceMacsec *device); |
| 69 | NM_AVAILABLE_IN_1_6 |
| 70 | gboolean nm_device_macsec_get_encrypt(NMDeviceMacsec *device); |
| 71 | NM_AVAILABLE_IN_1_6 |
| 72 | gboolean nm_device_macsec_get_protect(NMDeviceMacsec *device); |
| 73 | NM_AVAILABLE_IN_1_6 |
| 74 | gboolean nm_device_macsec_get_include_sci(NMDeviceMacsec *device); |
| 75 | NM_AVAILABLE_IN_1_6 |
| 76 | gboolean nm_device_macsec_get_es(NMDeviceMacsec *device); |
| 77 | NM_AVAILABLE_IN_1_6 |
| 78 | gboolean nm_device_macsec_get_scb(NMDeviceMacsec *device); |
| 79 | NM_AVAILABLE_IN_1_6 |
| 80 | gboolean nm_device_macsec_get_replay_protect(NMDeviceMacsec *device); |
| 81 | G_END_DECLS |
| 82 | |
| 83 | #endif /* __NM_DEVICE_MACSEC_H__ */ |
| 84 |
