| // Copyright 2023 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.net.filter; |
| |
| /// The largest number of changes that can be provided in a single call to |
| /// `PushChanges`, or events that will be provided in a single `Watch` response. |
| // |
| // This limit was chosen by calculating the maximum number of `Event`s or |
| // `Change`s that could be sent in a single FIDL message while staying within |
| // the maximum message size enforced by the bindings. |
| // |
| // At the time of writing, FIDL messages are limited to 64 KiB. In the current |
| // FIDL wire format, the size of each `Event` is 1536 bytes (larger than a |
| // `Change`), and the fixed overhead of the `Watch` reponse is 32 bytes (16 for |
| // the FIDL message header + 16 for the vector), so we selected the maximum N |
| // where 32 + N * 1536 <= 64 KiB. |
| const MAX_BATCH_SIZE uint16 = 42; |
| |
| /// The default priority of a routine relative to other routines installed on |
| /// the same hook. |
| const DEFAULT_ROUTINE_PRIORITY Priority = 0; |