aboutgitcodebugslistschat
path: root/tcp.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-11-17 16:58:41 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-11-25 01:34:37 +0100
commit60be7438fa2f908ea107c4d2e5832d736701c2b4 (patch)
tree86367784fb2b72489db37a60a67721695c144e2b /tcp.h
parent46b78ce96a2894aa251eb6aa1ef17ad040d68ecf (diff)
downloadpasst-60be7438fa2f908ea107c4d2e5832d736701c2b4.tar
passt-60be7438fa2f908ea107c4d2e5832d736701c2b4.tar.gz
passt-60be7438fa2f908ea107c4d2e5832d736701c2b4.tar.bz2
passt-60be7438fa2f908ea107c4d2e5832d736701c2b4.tar.lz
passt-60be7438fa2f908ea107c4d2e5832d736701c2b4.tar.xz
passt-60be7438fa2f908ea107c4d2e5832d736701c2b4.tar.zst
passt-60be7438fa2f908ea107c4d2e5832d736701c2b4.zip
tcp: Better helpers for converting between connection pointer and index
The macro CONN_OR_NULL() is used to look up connections by index with bounds checking. Replace it with an inline function, which means: - Better type checking - No danger of multiple evaluation of an @index with side effects Also add a helper to perform the reverse translation: from connection pointer to index. Introduce a macro for this which will make later cleanups easier and safer. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.h')
0 files changed, 0 insertions, 0 deletions