Common Enumerations

Read time 11 minutes Package: Nalix.Abstractions
On this page

Assembly: Nalix.Abstractions
Namespaces: Nalix.Abstractions.Networking, Nalix.Abstractions.Networking.Protocols, Nalix.Abstractions.Networking.Packets, Nalix.Abstractions.Security, Nalix.Abstractions.Identity, Nalix.Abstractions.Serialization, Nalix.Abstractions.Middleware, Nalix.Abstractions.Concurrency

This page provides a complete, source-verified reference for every enumeration in Nalix.Abstractions.


1. Networking, Transport & Packet Framing

NetworkTransport (byte)

Identifies the network transport protocol (src/Nalix.Abstractions/Networking/NetworkTransport.cs):

MemberValueDescription
TCP0Transmission Control Protocol (reliable stream).
UDP1User Datagram Protocol (low-latency datagrams).
WEBSOCKET2WebSocket over TCP (RFC 6455 framed stream).

TransportFraming (byte)

Selects the stream framing mode on IConnection.ITransport and Protocol.Framing (src/Nalix.Abstractions/Networking/TransportFraming.cs):

MemberValueDescription
None0Raw unframed stream (used for passthrough or pre-upgrade sockets).
UInt16LengthPrefixed12-byte little-endian ushort length prefix (default for Nalix TCP).
VarIntLengthPrefixed2LEB128 variable-length integer prefix (governed by VarIntFramingOptions).

OperatingMode (byte)

Configures the listener operating mode in IProtocolBindingBuilder.WithMode(...):

MemberValueDescription
Server0Standard session-authenticated Nalix server mode (UdpServerListener).
Passthrough1Stateless connectionless datagram mode (UdpPassthroughListener + PassthroughConnection).

ProtocolOpCode (ushort)

Reserved system and protocol opcodes (0x0000..0x00FF, src/Nalix.Abstractions/Networking/Protocols/ProtocolOpCode.cs). Application packets must use >= 0x0100 (enforced by NALIX035).

MemberValueDescription
SESSION_INIT0x0000Client initiates X25519 handshake with ephemeral public key and nonce.
SYSTEM_CONTROL0x0001System control frame (Control: PING, PONG, DISCONNECT, ERROR, etc.).
SESSION_SIGNAL0x0002Session resumption flow (SessionResume: request, ack, or reject).
SESSION_PROOF0x0003Client proves possession of the derived session key over the transcript hash.
SYSTEM_TIMESYNC0x0004High-resolution clock synchronization frame (TimeSync).
SESSION_TOFU0x0005Trust-On-First-Use static Ed25519/X25519 identity frame (SessionTofu).
SESSION_CHALLENGE0x0006Server handshake response carrying server ephemeral public key, nonce, and signature.
SESSION_ESTABLISHED0x0007Server confirmation that the encrypted session is established (SessionEstablished).
SYSTEM_DIRECTIVE0x0008Server-to-client runtime instruction frame (Directive: throttle, redirect, notice).
SESSION_REKEY0x0009Mid-session symmetric key rotation frame.
POW_CHALLENGE0x000AServer-issued Proof-of-Work puzzle (ProofOfWorkChallenge).
POW_PROOF0x000BClient-submitted Proof-of-Work solution (ProofOfWorkProof).
TUNNEL_REQUEST0x00F3Tunnel request packet.
TUNNEL_PROVIDE_ACK0x00F4Tunnel provisioning acknowledgement.
TUNNEL_CONNECT_ACK0x00F5Tunnel connection request acknowledgement.
TUNNEL_READY0x00F6Tunnel readiness notification.
TUNNEL_PROVIDE0x00F7Tunnel provisioning metadata packet.
TUNNEL_CONNECT0x00F8Logical tunnel connection request.
TRAVERSAL_REFLECTOR_INIT0x00F9NAT traversal reflector initialization.
TRAVERSAL_REFLECTOR_ALLOCATED0x00FANAT traversal reflector endpoint allocation response.
TRAVERSAL_PEER_SIGNAL0x00FBPeer candidate signaling packet.
TRAVERSAL_NAT_PROBE_ACK0x00FCNAT reachability probe acknowledgement.
TRAVERSAL_NAT_PROBE0x00FDDirect peer reachability probe.
RUNTIME_OBSERVATION0x00FERuntime telemetry observation packet.
OBSERVABILITY_ACCESS0x00FFObservability access authorization packet.

PacketFlags ([Flags] byte)

Bitflags stored at byte offset 2 (PacketHeaderOffset.Flags = 2) of the 6-byte PacketHeader (src/Nalix.Abstractions/Networking/Packets/PacketFlags.cs):

MemberValueStatusDescription
NONE0x00ActiveUncompressed, unencrypted, unfragmented application frame.
COMPRESSED1 << 1 (0x02)ActivePayload is compressed with LZ4Codec.
ENCRYPTED1 << 2 (0x04)ActivePayload is wrapped in an EnvelopeCipher AEAD/Symmetric envelope.
ALERT1 << 2 (0x04)ActiveAlias value (1 << 2) used for alert signaling.
FRAGMENTED1 << 3 (0x08)ActivePayload carries an 8-byte FragmentHeader chunk.
RELIABLE1 << 4 (0x10)[Obsolete]Legacy reliability flag — transport reliability is determined by NetworkTransport.
UNRELIABLE1 << 5 (0x20)[Obsolete]Legacy unreliability flag — use NetworkTransport.UDP.
ACKNOWLEDGED1 << 6 (0x40)[Obsolete]Legacy acknowledgement flag.
SYSTEM1 << 7 (0x80)ActiveSystem-level protocol frame (Control, Directive, TimeSync, handshake).

PacketPriority (byte)

MemberValueDescription
NONE0x00Standard priority level.
LOW0x01Lower-than-normal background priority.
MEDIUM0x02Moderate priority level.
HIGH0x03High priority (default for Control and Directive after pool reset).
URGENT0x04Highest priority level (TimeSync).

PacketHeaderOffset (int)

Defines the byte offsets of the 6-byte PacketHeader and the start of application payload fields (src/Nalix.Abstractions/Networking/Packets/PacketHeaderOffset.cs):

MemberValueTypeDescription
OpCode0ushortWire offset 0: 2-byte little-endian OpCode.
Flags2PacketFlagsWire offset 2: 1-byte PacketFlags.
Priority3PacketPriorityWire offset 3: 1-byte PacketPriority.
SequenceId4ushortWire offset 4: 2-byte little-endian SequenceId.
Region6—End of the 6-byte header (PacketConstants.HeaderSize = 6).
MaxValue255—Maximum allowed header offset value.

2. Protocol Control & Signals

ControlType (byte)

Identifies the control command carried by a Control frame (src/Nalix.Abstractions/Networking/Protocols/ControlType.cs):

MemberValueDescription
NONE0x00No control message specified.
PING0x01Liveness and RTT probe request.
PONG0x02Liveness response echoing the PING sequence and timestamp.
DISCONNECT0x04Graceful disconnect notification with ProtocolReason.
ERROR0x05Protocol or dispatch error notification.
RESUME0x09Session resumption control signal.
SHUTDOWN0x0AServer shutdown notification.
REDIRECT0x0BEndpoint redirection instruction.
NOTICE0x0DInformational maintenance or status notice.
TIMEOUT0x10Handler or request timeout notification.
FAIL0x11Generic operation failure.
TIMESYNCREQUEST0x12Client request for server clock synchronization.
TIMESYNCRESPONSE0x13Server response carrying high-resolution timestamps.
CIPHER_UPDATE0x14Request to switch the active CipherSuiteType.
CIPHER_UPDATE_ACK0x15Acknowledges a CIPHER_UPDATE transition.
PUBLIC_KEY_REQUEST0x16Client request for the server’s static public key (TOFU).
POW_REQUEST0x17Client request for a Proof-of-Work challenge puzzle.
SESSION_REKEY0x18Request to rotate the session encryption secret.
SESSION_REKEY_ACK0x19Acknowledges completion of session key rotation.
RESERVED10xFEReserved for future protocol extension.
RESERVED20xFFReserved for future protocol extension.

ControlFlags ([Flags] byte)

MemberValueDescription
NONE0x00No flags set.
IS_TRANSIENT1 << 0Condition is transient and safe to retry.
IS_AUTHRELATED1 << 1Condition relates to authentication or authorization.
HAS_REDIRECT1 << 2Redirect target metadata is present.
SLOW_DOWN1 << 3Client should reduce its outbound send rate.

ProtocolAdvice (byte)

MemberValueDescription
NONE0No specific action required.
RETRY1Safe to retry immediately.
BACKOFF_RETRY2Retry with exponential backoff.
DO_NOT_RETRY3Permanent error; do not retry automatically.
REAUTHENTICATE4Perform handshake or authentication again.
SLOW_DOWN5Reduce request rate.
RECONNECT6Reconnect to the server or redirect endpoint.
FIX_AND_RETRY7Correct request payload before retrying.

ProtocolReason (ushort)

Standard reason codes carried in Control, Directive, and SessionResume frames (src/Nalix.Abstractions/Networking/Protocols/ProtocolReason.cs), grouped by numeric category:

RangeCategoryMembers
0–49GeneralNONE = 0, UNKNOWN = 1, CANCELLED = 2, NOT_IMPLEMENTED = 3, TEMPORARY_FAILURE = 4, DEPRECATED = 5, REQUEST_INVALID = 6, INTERNAL_ERROR = 7
100–149Transport / NetworkTIMEOUT = 100, REMOTE_CLOSED = 101, LOCAL_CLOSED = 102, NETWORK_ERROR = 103, CONNECTION_REFUSED = 104, CONNECTION_RESET = 105, DNS_FAILURE = 106, MTU_VIOLATION = 107, CONGESTION = 108, KEEPALIVE_FAILED = 109
150–199Protocol / FramingPROTOCOL_ERROR = 150, VERSION_UNSUPPORTED = 151, FRAME_TOO_LARGE = 152, MESSAGE_TOO_LARGE = 153, UNEXPECTED_MESSAGE = 154, MISSING_REQUIRED_FIELD = 155, DUPLICATE_MESSAGE = 156, STATE_VIOLATION = 157, CRYPTO_UNSUPPORTED = 158, COMPRESSION_UNSUPPORTED = 159, OPERATION_UNSUPPORTED = 160, MALFORMED_PACKET = 161
200–259Security / AuthN / AuthZUNAUTHENTICATED = 200, UNAUTHORIZED = 201, FORBIDDEN = 202, ACCOUNT_LOCKED = 203, ACCOUNT_SUSPENDED = 204, BANNED = 205, IP_BLOCKED = 206, RATE_LIMITED = 207, TOKEN_EXPIRED = 208, TOKEN_REVOKED = 209, DEVICE_UNTRUSTED = 210
260–299Crypto / IntegrityTLS_HANDSHAKE_FAILED = 260, TLS_REQUIRED = 261, TLS_CERT_INVALID = 262, SIGNATURE_INVALID = 263, CHECKSUM_FAILED = 264, DECRYPTION_FAILED = 265, REPLAY_DETECTED = 266, NONCE_INVALID = 267, POW_REQUIRED = 270, POW_INVALID = 271
300–349Service / InfrastructureSERVER_SHUTDOWN = 300, SERVICE_UNAVAILABLE = 301, MAINTENANCE = 302, OVERLOADED = 303, DEPENDENCY_FAILURE = 304, DATABASE_UNAVAILABLE = 305, CACHE_UNAVAILABLE = 306, QUEUE_UNAVAILABLE = 307
350–399Application / SemanticsVALIDATION_FAILED = 350, NOT_FOUND = 351, ALREADY_EXISTS = 352, PRECONDITION_FAILED = 353, STATE_CONFLICT = 354, UNSUPPORTED_MEDIA_TYPE = 355, SERIALIZATION_FAILED = 356, UNSUPPORTED_PACKET = 357, TRANSFORM_FAILED = 358
400–449Flow Control / QoSTHROTTLED = 400, SLOW_CONSUMER = 401, CREDIT_EXHAUSTED = 402, WINDOW_EXCEEDED = 403
450–499Resource / QuotaRESOURCE_LIMIT = 450, MEMORY_EXHAUSTED = 451, CONNECTION_LIMIT = 452, FD_LIMIT = 453, DISK_FULL = 454, CPU_LIMIT = 455
500–549Client / Local DecisionsCLIENT_QUIT = 500, ABORTED = 501, IDLE_TIMEOUT = 502, LOCAL_POLICY = 503, COMPRESSION_FAILED = 504
550–599Session / Time / ClockSESSION_NOT_FOUND = 550, SESSION_EXPIRED = 551, DUPLICATE_SESSION = 552, KEY_ROTATION_REQUIRED = 553, TIME_SKEW = 554
600–649Consistency / CoordinationLEADER_CHANGE = 600, NOT_LEADER = 601, CONSENSUS_UNAVAILABLE = 602, STALE_READ = 603
650–699Routing / PlacementREDIRECT = 650, MIGRATE = 651, REGION_UNAVAILABLE = 652
700–749Compliance / PolicyLEGAL_BLOCK = 700, CONTENT_VIOLATION = 701, AGE_RESTRICTED = 702, INVALID_USERNAME = 703, WEAK_PASSWORD = 704
900–999ReservedRESERVED_900 = 900, RESERVED_901 = 901

3. Security & Identity

CipherSuiteType (byte)

Defines the symmetric stream and AEAD cipher suites supported by EnvelopeCipher (src/Nalix.Abstractions/Security/CipherSuiteType.cs):

MemberValueModeNonce SizeTag SizeDescription
None0Plaintext——No encryption (default prior to handshake).
Salsa203Symmetric8 B0 BSalsa20 stream cipher (XOR keystream with sequence-XORed nonce).
Chacha204Symmetric12 B0 BRFC 8439 ChaCha20 stream cipher.
Salsa20Poly13057AEAD8 B16 BSalsa20 stream cipher + detached 16-byte Poly1305 MAC tag.
Chacha20Poly13058AEAD12 B16 BRFC 8439 ChaCha20-Poly1305 AEAD (default for PacketEncryptionAttribute).

PermissionLevel (byte)

Authority levels assigned to IConnection.Level and checked by PermissionMiddleware (src/Nalix.Abstractions/Security/PermissionLevel.cs):

MemberValueDescription
NONE0Unverified initial connection state.
POW_VERIFIED10Client has solved a Proof-of-Work challenge (ProofOfWorkProof).
ESTABLISHED20Client has completed the X25519 cryptographic handshake (HandshakeHandlers).
GUEST25Anonymous guest session.
READ_ONLY50Authenticated read-only observer.
USER100Standard authenticated user (default for [PacketPermission]).
SUPERVISOR175Moderator or elevated supervisor privileges.
TENANT_ADMINISTRATOR200Organization or tenant administrator.
SYSTEM_ADMINISTRATOR225Server-wide system administrator.
OWNER255Root / owner authority level.

PermissionEvaluation (byte)

Controls how PermissionMiddleware evaluates [PacketPermission] (src/Nalix.Abstractions/Security/PermissionEvaluation.cs):

MemberValueDescription
MinimumLevel0Requires connection.Level >= attribute.Level (hierarchical comparison, default).
StrictMatch1Requires connection.Level == attribute.Level (exact match).

SnowflakeType (byte)

Categorizes 64-bit Snowflake identifiers (Unknown = 0, Configuration = 1, Log = 2, System = 3, Account = 10, Session = 11, Message = 20, Notification = 21, Email = 22, Sms = 23, Order = 30, Inventory = 31, Transaction = 32, Invoice = 33, SupportTicket = 34, MaxValue = 255).


4. Serialization, Middleware & Concurrency

SerializeLayout (byte)

  • Auto = 0 — Automatic layout.
  • Sequential = 1 — Serializes fields/properties in declaration order.
  • Explicit = 2 — Serializes fields/properties ordered by [SerializeOrder(n)].

DropPolicy (int)

Configures DispatchOptions.DropPolicy when a connection’s inbound packet queue is full:

  • DropNewest = 0 — Drops the newly arrived packet (default).
  • DropOldest = 1 — Evicts the oldest queued packet to admit the new packet.
  • Block = 2 — Applies backpressure up to DispatchOptions.BlockTimeout.
  • Coalesce = 3 — Replaces the most recent queued packet of the same opcode.

MiddlewareStage (byte)

  • Inbound = 0 — Runs before the packet handler.
  • Outbound = 1 — Runs after the packet handler when sending a response.
  • Both = 2 — Runs on both inbound and outbound paths.

WorkerPriority (byte)

  • LOW = 0, NORMAL = 1, HIGH = 2, URGENT = 3.