1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2022 Felix Fietkau <nbd@nbd.name>
8 #include <libubox/uloop.h>
12 struct network_pex_host
{
13 struct list_head list
;
14 union network_endpoint endpoint
;
19 struct list_head hosts
;
20 struct uloop_timeout request_update_timer
;
25 PEX_EV_ENDPOINT_CHANGE
,
30 void network_pex_init(struct network
*net
);
31 int network_pex_open(struct network
*net
);
32 void network_pex_close(struct network
*net
);
34 void network_pex_event(struct network
*net
, struct network_peer
*peer
,
37 static inline bool network_pex_active(struct network_pex
*pex
)
39 return pex
->fd
.fd
>= 0;
42 int global_pex_open(void);