aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-09 17:48:52 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-09 21:18:49 +0100
commitf12a7fb70153815db528e9ff48088479b3313da3 (patch)
tree904477a65c073c9a662c680700cb00678cce58e6 /src/cadet/cadet.h
parentd829597ee90dccffffd46a082372af6b35042130 (diff)
downloadgnunet-f12a7fb70153815db528e9ff48088479b3313da3.tar.gz
gnunet-f12a7fb70153815db528e9ff48088479b3313da3.zip
improve comments
Diffstat (limited to 'src/cadet/cadet.h')
-rw-r--r--src/cadet/cadet.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cadet/cadet.h b/src/cadet/cadet.h
index 049f3a85a..f3f6fb6b4 100644
--- a/src/cadet/cadet.h
+++ b/src/cadet/cadet.h
@@ -67,10 +67,16 @@ extern "C"
67#define GNUNET_CADET_LOCAL_CHANNEL_ID_CLI 0x80000000 67#define GNUNET_CADET_LOCAL_CHANNEL_ID_CLI 0x80000000
68#define GNUNET_CADET_LOCAL_CHANNEL_ID_SERV 0xB0000000 68#define GNUNET_CADET_LOCAL_CHANNEL_ID_SERV 0xB0000000
69 69
70#define HIGH_PID 0xFFFF0000 70#define HIGH_PID 0xFF000000
71#define LOW_PID 0x0000FFFF 71#define LOW_PID 0x00FFFFFF
72 72
73#define PID_OVERFLOW(pid, max) (pid > HIGH_PID && max < LOW_PID) 73/**
74 * Test if the two PIDs (of type `uint32_t`) are in the range where we
75 * have to worry about overflows. This is the case when @a pid is
76 * large and @a max is small, useful when comparing @a pid smaller
77 * than @a max.
78 */
79#define PID_OVERFLOW(pid, max) (((pid) > HIGH_PID) && ((max) < LOW_PID))
74 80
75/******************************************************************************/ 81/******************************************************************************/
76/************************** MESSAGES ******************************/ 82/************************** MESSAGES ******************************/