wg: Add and improve WG_PKT_* macros to help clean up the code
commit8ee7426de2a2b1f9ba0ba236fe9c3321e93e5fe3
authorAaron LI <aly@aaronly.me>
Mon, 15 Jan 2024 14:34:32 +0000 (15 22:34 +0800)
committerAaron LI <aly@aaronly.me>
Sat, 10 Feb 2024 14:33:53 +0000 (10 22:33 +0800)
tree49baf3a860f8e33e06f9890da4895986920ac739
parentb85a20f3c1f2bb583ea1f5b284a6375c77afa5ad
wg: Add and improve WG_PKT_* macros to help clean up the code

- Add WG_PKT_IS_INITIATION, WG_PKT_IS_RESPONSE, WG_PKT_IS_COOKIE,
  and WG_PKT_IS_DATA macros.
- Extend the original WG_PKT_DATA_MINLEN macro to be
  WG_PKT_ENCRYPTED_LEN(n).
sys/net/wg/if_wg.c