12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System.Net;
- namespace PCC.App.Tpm;
- public record TPM_EVT_LISTENER_STATUS_CHANGED(string LocalPeerId, TPM_EVT_LISTEN_STATUS Status, Exception? Exception = null);
- public enum TPM_EVT_LISTEN_STATUS
- {
- INVALID = 0,
- STARTING,
- START_FAIL,
- STARTED,
- STOPPING,
- STOP_FAIL,
- STOPPED,
- }
- public record TPM_EVT_INBOUND_CON_ACCEPTED(string LocalPeerId, string ConnectionId, EndPoint? RemoteEndpoint);
- public record TPM_EVT_INBOUND_CON_ERROR(string LocalPeerId, string ConnectionId, string? RemotePeerId, Exception? Exception = null);
- public record TPM_EVT_INBOUND_CON_STATUS_CHANGED(TPM_EVT_INBOUND_CON_STATUS Status, string LocalPeerId, string ConnectionId, string? RemotePeerId);
- public enum TPM_EVT_INBOUND_CON_STATUS
- {
- INVALID = 0,
- HANDSHAKE_FAIL_NOT_TRUSTED,
- HANDSHAKE_OK,
- SECURE_ALERT_REPLAY_ATTACK_DETECT,
- SECURE_WARN_TIMESTAMP_SKEW,
- DISCONNECTED
- }
- public record TPM_EVT_OUTBOUND_CON_ERROR(string LocalPeerId, string? RemotePeerId, Exception? Exception = null);
- public record TPM_EVT_OUTBOUND_CON_STATUS_CHANGED(TPM_EVT_OUTBOUND_CON_STATUS Status, string LocalPeerId, string? RemotePeerId);
- public enum TPM_EVT_OUTBOUND_CON_STATUS
- {
- INVALID = 0,
- CONNECTION_ATTEMPT,
- HANDSHAKE_ATTEMPT,
- HANDSHAKE_FAIL_ACK_NOT_MATCHED,
- HANDSHAKE_OK,
- SECURE_ALERT_REPLAY_ATTACK_DETECT,
- SECURE_WARN_TIMESTAMP_SKEW,
- DISCONNECTED
- }
- public record TPM_EVT_INBOUND_RX(string LocalPeerId, string RemotePeerId, DateTimeOffset senderTimestamp, ReadOnlyMemory<byte> payload);
- public record TPM_EVT_INBOUND_TX(string LocalPeerId, string RemotePeerId, DateTimeOffset senderTimestamp, ReadOnlyMemory<byte> payload);
- public record TPM_EVT_OUTBOUND_RX(string LocalPeerId, string RemotePeerId, DateTimeOffset senderTimestamp, ReadOnlyMemory<byte> payload);
- public record TPM_EVT_OUTBOUND_TX(string LocalPeerId, string RemotePeerId, DateTimeOffset senderTimestamp, ReadOnlyMemory<byte> payload);
|