|
Squid Web Cache master
|
a swap metadata field inside the buffer given to SwapMetaUnpacker More...
#include <SwapMetaView.h>
Public Member Functions | |
| void | checkExpectedLength (size_t) const |
| ensures that our fixed-size field value has the given expected length | |
Public Attributes | |
| const void * | rawValue = nullptr |
| size_t | rawLength = 0 |
| RawSwapMetaType | rawType = RawSwapMetaTypeBottom |
| SwapMetaType | type = STORE_META_VOID |
Private Member Functions | |
| SwapMetaView ()=default | |
| SwapMetaView (const SwapMetaView &)=default | |
| SwapMetaView (SwapMetaView &&)=default | |
| SwapMetaView & | operator= (const SwapMetaView &)=default |
| SwapMetaView & | operator= (SwapMetaView &&)=default |
| SwapMetaView (const void *begin, const void *const end) | |
Friends | |
| class | SwapMetaIterator |
Definition at line 20 of file SwapMetaView.h.
|
privatedefault |
|
privatedefault |
|
privatedefault |
|
explicitprivate |
positions the view at the first swap meta field in the given buffer
| begin | is where the buffer and the field starts |
| end | is where the buffer (but not necessarily the field) finishes |
Definition at line 57 of file SwapMetaView.cc.
References assert, Store::HandleBadRawType(), Here, Store::HonoredSwapMetaType(), rawLength, rawType, rawValue, Store::SwapMetaExtract(), Store::SwapMetaFieldValueLengthMax, and type.
| void Store::SwapMetaView::checkExpectedLength | ( | size_t | expectedLength | ) | const |
Definition at line 83 of file SwapMetaView.cc.
References Here, and ToSBuf().
Referenced by Store::CheckSwapMetaKey(), and Store::UnpackSwapMetaKey().
|
privatedefault |
|
privatedefault |
|
friend |
Definition at line 50 of file SwapMetaView.h.
| size_t Store::SwapMetaView::rawLength = 0 |
The number of bytes in rawValue (i.e. L in swap meta TLV field). This length may not match the length of valid fields of this type. Not meaningful when type is STORE_META_VOID.
Definition at line 35 of file SwapMetaView.h.
Referenced by SwapMetaView(), Store::CheckSwapMetaUrl(), Store::operator<<(), and Store::UnpackNewSwapMetaVaryHeaders().
| RawSwapMetaType Store::SwapMetaView::rawType = RawSwapMetaTypeBottom |
The serialized type (i.e. T in swap meta TLV field). This type value may not match any named by SwapMetaType.
Definition at line 39 of file SwapMetaView.h.
Referenced by SwapMetaView(), and Store::operator<<().
| const void* Store::SwapMetaView::rawValue = nullptr |
A serialized rawLength-byte value (i.e. V in swap meta TLV field). The value contents may be completely malformed/bogus. Not meaningful when type is STORE_META_VOID.
Definition at line 30 of file SwapMetaView.h.
Referenced by SwapMetaView(), Store::CheckSwapMetaKey(), Store::CheckSwapMetaUrl(), Store::operator<<(), Store::UnpackNewSwapMetaVaryHeaders(), and Store::UnpackSwapMetaKey().
| SwapMetaType Store::SwapMetaView::type = STORE_META_VOID |
The sanitized TLV type that always matches one named by SwapMetaType: rawType (if matches a value named by SwapMetaType) or STORE_META_VOID.
Definition at line 43 of file SwapMetaView.h.
Referenced by SwapMetaView(), Store::CheckSwapMetaKey(), Store::CheckSwapMetaUrl(), Store::UnpackNewSwapMetaVaryHeaders(), and Store::UnpackSwapMetaKey().