ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
validation.h File Reference

Common validation macros to reduce duplication in protocol handlers. More...

Go to the source code of this file.

Macros

#define VALIDATE_NOTNULL_DATA(client, data, packet_name)
#define VALIDATE_MIN_SIZE(client, len, min_size, packet_name)
#define VALIDATE_EXACT_SIZE(client, len, expected_size, packet_name)
#define VALIDATE_AUDIO_STREAM_ENABLED(client, packet_name)
#define VALIDATE_AUDIO_SAMPLE_COUNT(client, num_samples, max_samples, packet_name)
#define VALIDATE_AUDIO_ALIGNMENT(client, len, sample_size, packet_name)
#define VALIDATE_RESOURCE_INITIALIZED(client, resource, resource_name)
#define VALIDATE_PACKET_SIZE(client, data, len, expected_size, packet_name)
#define VALIDATE_NONZERO(client, value, value_name, packet_name)
#define VALIDATE_RANGE(client, value, min_val, max_val, value_name, packet_name)
#define VALIDATE_CAPABILITY_FLAGS(client, flags, valid_mask, packet_name)
#define VALIDATE_FLAGS_MASK(client, flags, valid_mask, packet_name)
#define VALIDATE_PACKET_NOT_NULL(client, data, packet_name)

Functions

void disconnect_client_for_bad_data (client_info_t *client, const char *format,...)

Detailed Description

Common validation macros to reduce duplication in protocol handlers.

Definition in file util/validation.h.