Go to the source code of this file.
|
#define | XCEPT_GROUP_WIRESHARK 1 |
|
#define | BoundsError 1 |
|
#define | ContainedBoundsError 2 |
|
#define | ReportedBoundsError 3 |
|
#define | FragmentBoundsError 4 |
|
#define | TypeError 5 |
|
#define | DissectorError 6 |
|
#define | ScsiBoundsError 7 |
|
#define | OutOfMemoryError 8 |
|
#define | ReassemblyError 9 |
|
#define | CATCH_NONFATAL_ERRORS CATCH4(ReportedBoundsError, ContainedBoundsError, ScsiBoundsError, ReassemblyError) |
|
#define | CATCH_BOUNDS_ERRORS |
|
#define | CATCH_BOUNDS_AND_DISSECTOR_ERRORS |
|
#define | EXCEPT_CAUGHT |
|
#define | EXCEPT_RETHROWN |
|
#define | EXCEPT_FINALLY |
|
#define | TRY |
|
#define | ENDTRY |
|
#define | CATCH(x) |
|
#define | CATCH2(x, y) |
|
#define | CATCH3(x, y, z) |
|
#define | CATCH4(w, x, y, z) |
|
#define | CATCH5(v, w, x, y, z) |
|
#define | CATCH6(u, v, w, x, y, z) |
|
#define | CATCH7(t, u, v, w, x, y, z) |
|
#define | CATCH_ALL |
|
#define | FINALLY |
|
#define | THROW(x) except_throw(XCEPT_GROUP_WIRESHARK, (x), NULL) |
|
#define | THROW_ON(cond, x) |
|
#define | THROW_MESSAGE(x, y) except_throw(XCEPT_GROUP_WIRESHARK, (x), (y)) |
|
#define | THROW_MESSAGE_ON(cond, x, y) |
|
#define | THROW_FORMATTED(x, ...) except_throwf(XCEPT_GROUP_WIRESHARK, (x), __VA_ARGS__) |
|
#define | VTHROW_FORMATTED(x, format, args) except_vthrowf(XCEPT_GROUP_WIRESHARK, (x), format, args) |
|
#define | GET_MESSAGE except_message(exc) |
|
#define | RETHROW |
|
#define | EXCEPT_CODE except_code(exc) |
|
#define | CLEANUP_PUSH(f, a) except_cleanup_push((f),(a)) |
|
#define | CLEANUP_POP except_cleanup_pop(0) |
|
#define | CLEANUP_CALL_AND_POP except_cleanup_pop(1) |
|
#define | CLEANUP_PUSH_PFX(pfx, f, a) except_cleanup_push_pfx(pfx,(f),(a)) |
|
#define | CLEANUP_POP_PFX(pfx) except_cleanup_pop_pfx(pfx,0) |
|
#define | CLEANUP_CALL_AND_POP_PFX(pfx) except_cleanup_pop_pfx(pfx,1) |
|
Wireshark's exceptions.
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
◆ BoundsError
Index is beyond the captured length of the tvbuff. This generally means that the capture was done with a "slice" length or "snapshot" length less than the maximum packet size, and a link-layer packet was cut short by that, so not all of the data in the link-layer packet was available.
◆ CATCH
Value: if (except_state == 0 && exc != 0 && \
exc->except_id.except_code == (x) && \
(except_state |= EXCEPT_CAUGHT)) \
◆ CATCH2
Value: if (except_state == 0 && exc != 0 && \
(exc->except_id.except_code == (x) || \
exc->except_id.except_code == (y)) && \
(except_state|=EXCEPT_CAUGHT)) \
◆ CATCH3
#define CATCH3 |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Value: if (except_state == 0 && exc != 0 && \
(exc->except_id.except_code == (x) || \
exc->except_id.except_code == (y) || \
exc->except_id.except_code == (z)) && \
(except_state|=EXCEPT_CAUGHT)) \
◆ CATCH4
#define CATCH4 |
( |
|
w, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Value: if (except_state == 0 && exc != 0 && \
(exc->except_id.except_code == (w) || \
exc->except_id.except_code == (x) || \
exc->except_id.except_code == (y) || \
exc->except_id.except_code == (z)) && \
(except_state|=EXCEPT_CAUGHT)) \
◆ CATCH5
#define CATCH5 |
( |
|
v, |
|
|
|
w, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Value: if (except_state == 0 && exc != 0 && \
(exc->except_id.except_code == (v) || \
exc->except_id.except_code == (w) || \
exc->except_id.except_code == (x) || \
exc->except_id.except_code == (y) || \
exc->except_id.except_code == (z)) && \
(except_state|=EXCEPT_CAUGHT)) \
◆ CATCH6
#define CATCH6 |
( |
|
u, |
|
|
|
v, |
|
|
|
w, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Value: if (except_state == 0 && exc != 0 && \
(exc->except_id.except_code == (u) || \
exc->except_id.except_code == (v) || \
exc->except_id.except_code == (w) || \
exc->except_id.except_code == (x) || \
exc->except_id.except_code == (y) || \
exc->except_id.except_code == (z)) && \
(except_state|=EXCEPT_CAUGHT)) \
◆ CATCH7
#define CATCH7 |
( |
|
t, |
|
|
|
u, |
|
|
|
v, |
|
|
|
w, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Value: if (except_state == 0 && exc != 0 && \
(exc->except_id.except_code == (t) || \
exc->except_id.except_code == (u) || \
exc->except_id.except_code == (v) || \
exc->except_id.except_code == (w) || \
exc->except_id.except_code == (x) || \
exc->except_id.except_code == (y) || \
exc->except_id.except_code == (z)) && \
(except_state|=EXCEPT_CAUGHT)) \
◆ CATCH_ALL
Value: if (except_state == 0 && exc != 0 && \
(except_state|=EXCEPT_CAUGHT)) \
◆ CATCH_BOUNDS_AND_DISSECTOR_ERRORS
#define CATCH_BOUNDS_AND_DISSECTOR_ERRORS |
Value:
#define BoundsError
Definition exceptions.h:28
#define ReassemblyError
Definition exceptions.h:102
#define ScsiBoundsError
Definition exceptions.h:87
#define ReportedBoundsError
Definition exceptions.h:50
#define FragmentBoundsError
Definition exceptions.h:60
#define DissectorError
Definition exceptions.h:76
#define ContainedBoundsError
Definition exceptions.h:41
◆ CATCH_BOUNDS_ERRORS
#define CATCH_BOUNDS_ERRORS |
◆ ContainedBoundsError
#define ContainedBoundsError 2 |
Index is beyond the contained length of the tvbuff. This generally means that the tvbuff was constructed as a subset of a parent tvbuff, based on a length specified by data in the packet, but the length in question runs past the reported length of the data in the parent tvbuff. That means that the packet is invalid, as the data indicating the length says the length exceeds what's contained in the packet. It is therefore currently reported as a "Malformed
packet".
◆ DissectorError
A bug was detected in a dissector.
DO NOT throw this with THROW(); that means that no details about the dissector error will be reported. (Instead, the message will blame you for not providing details.)
Instead, use the DISSECTOR_ASSERT(), etc. macros in epan/proto.h.
◆ ENDTRY
Value: \
if(!(except_state&EXCEPT_CAUGHT) && exc != 0) \
except_rethrow(exc); \
except_try_pop();\
}
◆ EXCEPT_CAUGHT
◆ EXCEPT_FINALLY
◆ EXCEPT_RETHROWN
◆ FINALLY
Value: if( !(except_state & EXCEPT_FINALLY) && (except_state|=EXCEPT_FINALLY)) \
◆ FragmentBoundsError
#define FragmentBoundsError 4 |
Index is beyond the contained length, and possibly the reported length, of the tvbuff, but we believe it is an unreassembled fragment, either because the "this is an unreassembled fragment" flag or pinfo->fragmented is set. This means that the packet wasn't reassembled, but could possibly be correctly dissected if reassembly preferences were changed. It is therefore not reported as a "Malformed packet".
◆ OutOfMemoryError
#define OutOfMemoryError 8 |
Running out of memory. A dissector tried to allocate memory but that failed.
◆ ReassemblyError
#define ReassemblyError 9 |
The reassembly state machine was passed a bad fragment offset, or other similar issues. We used to use DissectorError in these cases, but they're not necessarily the dissector's fault - if the packet contains a bad fragment offset, the dissector shouldn't have to figure that out by itself since that's what the reassembly machine is for.
◆ ReportedBoundsError
#define ReportedBoundsError 3 |
Index is beyond the reported length of the tvbuff. This generally means that the packet is invalid, i.e. whatever code constructed the packet and put it on the wire didn't put enough data into it. It is therefore currently reported as a "Malformed
packet".
◆ RETHROW
Value:{ \
\
ws_assert(except_state == EXCEPT_CAUGHT); \
\
longjmp(except_ch.except_jmp,1); \
}
◆ ScsiBoundsError
#define ScsiBoundsError 7 |
Index is out of range. An attempt was made to read past the end of a buffer. This error is specific to SCSI data transfers where for some CDBs it is normal that the data PDU might be short. I.e. ReportLuns initially called with allocation_length=8, just enough to get the "size" of lun list back after which the initiator will reissue the command with an allocation_length that is big enough.
◆ THROW_MESSAGE_ON
#define THROW_MESSAGE_ON |
( |
|
cond, |
|
|
|
x, |
|
|
|
y |
|
) |
| |
Value: G_STMT_START { \
if ((cond)) \
except_throw(XCEPT_GROUP_WIRESHARK, (x), (y)); \
} G_STMT_END
◆ THROW_ON
#define THROW_ON |
( |
|
cond, |
|
|
|
x |
|
) |
| |
Value: G_STMT_START { \
if ((cond)) \
except_throw(XCEPT_GROUP_WIRESHARK, (x), NULL); \
} G_STMT_END
◆ TRY
Value:{\
volatile int except_state = 0; \
{ XCEPT_GROUP_WIRESHARK, XCEPT_CODE_ANY } }; \
except_try_push(catch_spec, 1, &exc); \
\
if(except_state & EXCEPT_CAUGHT) \
except_state |= EXCEPT_RETHROWN; \
except_state &= ~EXCEPT_CAUGHT; \
\
if (except_state == 0 && exc == 0) \
◆ TypeError