1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-03 12:35:02 +00:00

Use stub inline functions for no-op versions of tcp_fastopen*().

Inline functions "use" variables passed as arguments unlike empty
macros appeasing compiler warnings about unused variables.
This commit is contained in:
John Baldwin 2022-04-08 17:25:13 -07:00
parent 5cd9d25403
commit 3b994db74b

View File

@ -93,14 +93,49 @@ void tcp_fastopen_disable_path(struct tcpcb *);
void tcp_fastopen_update_cache(struct tcpcb *, uint16_t, uint8_t,
uint8_t *);
#else
#define tcp_fastopen_init() ((void)0)
#define tcp_fastopen_destroy() ((void)0)
#define tcp_fastopen_alloc_counter() NULL
#define tcp_fastopen_decrement_counter(c) ((void)0)
#define tcp_fastopen_check_cookie(i, c, l, lc) (-1)
#define tcp_fastopen_connect(t) ((void)0)
#define tcp_fastopen_disable_path(t) ((void)0)
#define tcp_fastopen_update_cache(t, m, l, c) ((void)0)
static __inline void
tcp_fastopen_init(void)
{
}
static __inline void
tcp_fastopen_destroy(void)
{
}
static __inline unsigned int *
tcp_fastopen_alloc_counter(void)
{
return (NULL);
}
static __inline void
tcp_fastopen_decrement_counter(unsigned int *_counter)
{
}
static __inline int
tcp_fastopen_check_cookie(struct in_conninfo *_inc, uint8_t *_cookie,
unsigned int _len, uint64_t *_latest_cookie)
{
return (-1);
}
static __inline void
tcp_fastopen_connect(struct tcpcb *_tp)
{
}
static __inline void
tcp_fastopen_disable_path(struct tcpcb *_tp)
{
}
static __inline void
tcp_fastopen_update_cache(struct tcpcb *_tp, uint16_t _mss, uint8_t _cookie_len,
uint8_t *_cookie)
{
}
#endif /* TCP_RFC7413 */
#endif /* _KERNEL */