Squid Web Cache
master
Loading...
Searching...
No Matches
SwapMeta.cc
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3
*
4
* Squid software is distributed under GPLv2+ license and includes
5
* contributions from numerous individuals and organizations.
6
* Please see the COPYING and CONTRIBUTORS files for details.
7
*/
8
9
#include "
squid.h
"
10
#include "
store/SwapMeta.h
"
11
12
void
13
Store::CheckSwapMetaSerialization
(
const
RawSwapMetaType
type,
const
RawSwapMetaLength
length,
const
void
*value)
14
{
15
// we do not serialize deprecated or reserved types
16
assert
(
HonoredSwapMetaType
(type));
17
18
assert
(length >= 0);
19
assert
(
size_t
(length) <=
SwapMetaFieldValueLengthMax
);
20
21
// cannot write a non-empty value if it is missing
22
assert
(!length || value);
23
}
24
SwapMeta.h
assert
#define assert(EX)
Definition
assert.h:17
Store::SwapMetaFieldValueLengthMax
const size_t SwapMetaFieldValueLengthMax
Definition
SwapMeta.h:107
Store::RawSwapMetaLength
int RawSwapMetaLength
Definition
SwapMeta.h:100
Store::RawSwapMetaType
char RawSwapMetaType
Definition
SwapMeta.h:95
Store::HonoredSwapMetaType
constexpr bool HonoredSwapMetaType(const RawSwapMetaType type)
Definition
SwapMeta.h:197
Store::CheckSwapMetaSerialization
void CheckSwapMetaSerialization(RawSwapMetaType, RawSwapMetaLength, const void *)
Definition
SwapMeta.cc:13
squid.h
squid
src
store
SwapMeta.cc
Generated by
1.9.8