|
| 1 | +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 2 | +// SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +#[event("path_secret_map:initialized")] |
| 5 | +#[subject(endpoint)] |
| 6 | +struct PathSecretMapInitialized { |
| 7 | + /// The capacity of the path secret map |
| 8 | + capacity: usize, |
| 9 | +} |
| 10 | + |
| 11 | +#[event("path_secret_map:uninitialized")] |
| 12 | +#[subject(endpoint)] |
| 13 | +struct PathSecretMapUninitialized { |
| 14 | + /// The capacity of the path secret map |
| 15 | + capacity: usize, |
| 16 | + |
| 17 | + /// The number of entries in the map |
| 18 | + entries: usize, |
| 19 | +} |
| 20 | + |
| 21 | +#[event("path_secret_map:background_handshake_requested")] |
| 22 | +#[subject(endpoint)] |
| 23 | +/// Emitted when a background handshake is requested |
| 24 | +struct PathSecretMapBackgroundHandshakeRequested<'a> { |
| 25 | + peer_address: SocketAddress<'a>, |
| 26 | +} |
| 27 | + |
| 28 | +#[event("path_secret_map:entry_replaced")] |
| 29 | +#[subject(endpoint)] |
| 30 | +/// Emitted when the entry is inserted into the path secret map |
| 31 | +struct PathSecretMapEntryInserted<'a> { |
| 32 | + peer_address: SocketAddress<'a>, |
| 33 | + |
| 34 | + credential_id: &'a [u8], |
| 35 | +} |
| 36 | + |
| 37 | +#[event("path_secret_map:entry_replaced")] |
| 38 | +#[subject(endpoint)] |
| 39 | +/// Emitted when the entry is considered ready for use |
| 40 | +struct PathSecretMapEntryReady<'a> { |
| 41 | + peer_address: SocketAddress<'a>, |
| 42 | + |
| 43 | + credential_id: &'a [u8], |
| 44 | +} |
| 45 | + |
| 46 | +#[event("path_secret_map:entry_replaced")] |
| 47 | +#[subject(endpoint)] |
| 48 | +/// Emitted when an entry is replaced by a new one for the same `peer_address` |
| 49 | +struct PathSecretMapEntryReplaced<'a> { |
| 50 | + peer_address: SocketAddress<'a>, |
| 51 | + |
| 52 | + new_credential_id: &'a [u8], |
| 53 | + |
| 54 | + previous_credential_id: &'a [u8], |
| 55 | +} |
| 56 | + |
| 57 | +#[event("path_secret_map:unknown_path_secret_packet_sent")] |
| 58 | +#[subject(endpoint)] |
| 59 | +/// Emitted when an UnknownPathSecret packet was sent |
| 60 | +struct UnknownPathSecretPacketSent<'a> { |
| 61 | + peer_address: SocketAddress<'a>, |
| 62 | + credential_id: &'a [u8], |
| 63 | +} |
| 64 | + |
| 65 | +#[event("path_secret_map:unknown_path_secret_packet_received")] |
| 66 | +#[subject(endpoint)] |
| 67 | +/// Emitted when an UnknownPathSecret packet was received |
| 68 | +struct UnknownPathSecretPacketReceived<'a> { |
| 69 | + peer_address: SocketAddress<'a>, |
| 70 | + credential_id: &'a [u8], |
| 71 | +} |
| 72 | + |
| 73 | +#[event("path_secret_map:unknown_path_secret_packet_accepted")] |
| 74 | +#[subject(endpoint)] |
| 75 | +/// Emitted when an UnknownPathSecret packet was authentic and processed |
| 76 | +struct UnknownPathSecretPacketAccepted<'a> { |
| 77 | + peer_address: SocketAddress<'a>, |
| 78 | + credential_id: &'a [u8], |
| 79 | +} |
| 80 | + |
| 81 | +#[event("path_secret_map:unknown_path_secret_packet_rejected")] |
| 82 | +#[subject(endpoint)] |
| 83 | +/// Emitted when an UnknownPathSecret packet was rejected as invalid |
| 84 | +struct UnknownPathSecretPacketRejected<'a> { |
| 85 | + peer_address: SocketAddress<'a>, |
| 86 | + credential_id: &'a [u8], |
| 87 | +} |
| 88 | + |
| 89 | +#[event("path_secret_map:unknown_path_secret_packet_dropped")] |
| 90 | +#[subject(endpoint)] |
| 91 | +/// Emitted when an UnknownPathSecret packet was dropped due to a missing entry |
| 92 | +struct UnknownPathSecretPacketDropped<'a> { |
| 93 | + peer_address: SocketAddress<'a>, |
| 94 | + credential_id: &'a [u8], |
| 95 | +} |
| 96 | + |
| 97 | +#[event("path_secret_map:replay_definitely_detected")] |
| 98 | +#[subject(endpoint)] |
| 99 | +/// Emitted when credential replay was definitely detected |
| 100 | +struct ReplayDefinitelyDetected<'a> { |
| 101 | + credential_id: &'a [u8], |
| 102 | + key_id: u64, |
| 103 | +} |
| 104 | + |
| 105 | +#[event("path_secret_map:replay_potentially_detected")] |
| 106 | +#[subject(endpoint)] |
| 107 | +/// Emitted when credential replay was potentially detected, but could not be verified |
| 108 | +/// due to a limiting tracking window |
| 109 | +struct ReplayPotentiallyDetected<'a> { |
| 110 | + credential_id: &'a [u8], |
| 111 | + key_id: u64, |
| 112 | + gap: u64, |
| 113 | +} |
| 114 | + |
| 115 | +#[event("path_secret_map:replay_detected_packet_sent")] |
| 116 | +#[subject(endpoint)] |
| 117 | +/// Emitted when an ReplayDetected packet was sent |
| 118 | +struct ReplayDetectedPacketSent<'a> { |
| 119 | + peer_address: SocketAddress<'a>, |
| 120 | + credential_id: &'a [u8], |
| 121 | +} |
| 122 | + |
| 123 | +#[event("path_secret_map:replay_detected_packet_received")] |
| 124 | +#[subject(endpoint)] |
| 125 | +/// Emitted when an ReplayDetected packet was received |
| 126 | +struct ReplayDetectedPacketReceived<'a> { |
| 127 | + peer_address: SocketAddress<'a>, |
| 128 | + credential_id: &'a [u8], |
| 129 | +} |
| 130 | + |
| 131 | +#[event("path_secret_map:replay_detected_packet_accepted")] |
| 132 | +#[subject(endpoint)] |
| 133 | +/// Emitted when an StaleKey packet was authentic and processed |
| 134 | +struct ReplayDetectedPacketAccepted<'a> { |
| 135 | + peer_address: SocketAddress<'a>, |
| 136 | + credential_id: &'a [u8], |
| 137 | + key_id: u64, |
| 138 | +} |
| 139 | + |
| 140 | +#[event("path_secret_map:replay_detected_packet_rejected")] |
| 141 | +#[subject(endpoint)] |
| 142 | +/// Emitted when an ReplayDetected packet was rejected as invalid |
| 143 | +struct ReplayDetectedPacketRejected<'a> { |
| 144 | + peer_address: SocketAddress<'a>, |
| 145 | + credential_id: &'a [u8], |
| 146 | +} |
| 147 | + |
| 148 | +#[event("path_secret_map:replay_detected_packet_dropped")] |
| 149 | +#[subject(endpoint)] |
| 150 | +/// Emitted when an ReplayDetected packet was dropped due to a missing entry |
| 151 | +struct ReplayDetectedPacketDropped<'a> { |
| 152 | + peer_address: SocketAddress<'a>, |
| 153 | + credential_id: &'a [u8], |
| 154 | +} |
| 155 | + |
| 156 | +#[event("path_secret_map:stale_key_packet_sent")] |
| 157 | +#[subject(endpoint)] |
| 158 | +/// Emitted when an StaleKey packet was sent |
| 159 | +struct StaleKeyPacketSent<'a> { |
| 160 | + peer_address: SocketAddress<'a>, |
| 161 | + credential_id: &'a [u8], |
| 162 | +} |
| 163 | + |
| 164 | +#[event("path_secret_map:stale_key_packet_received")] |
| 165 | +#[subject(endpoint)] |
| 166 | +/// Emitted when an StaleKey packet was received |
| 167 | +struct StaleKeyPacketReceived<'a> { |
| 168 | + peer_address: SocketAddress<'a>, |
| 169 | + credential_id: &'a [u8], |
| 170 | +} |
| 171 | + |
| 172 | +#[event("path_secret_map:stale_key_packet_accepted")] |
| 173 | +#[subject(endpoint)] |
| 174 | +/// Emitted when an StaleKey packet was authentic and processed |
| 175 | +struct StaleKeyPacketAccepted<'a> { |
| 176 | + peer_address: SocketAddress<'a>, |
| 177 | + credential_id: &'a [u8], |
| 178 | +} |
| 179 | + |
| 180 | +#[event("path_secret_map:stale_key_packet_rejected")] |
| 181 | +#[subject(endpoint)] |
| 182 | +/// Emitted when an StaleKey packet was rejected as invalid |
| 183 | +struct StaleKeyPacketRejected<'a> { |
| 184 | + peer_address: SocketAddress<'a>, |
| 185 | + credential_id: &'a [u8], |
| 186 | +} |
| 187 | + |
| 188 | +#[event("path_secret_map:stale_key_packet_dropped")] |
| 189 | +#[subject(endpoint)] |
| 190 | +/// Emitted when an StaleKey packet was dropped due to a missing entry |
| 191 | +struct StaleKeyPacketDropped<'a> { |
| 192 | + peer_address: SocketAddress<'a>, |
| 193 | + credential_id: &'a [u8], |
| 194 | +} |
0 commit comments