tpws: move portfilter code

This commit is contained in:
bol-van
2024-04-26 17:23:03 +03:00
parent f48617e1a3
commit 147af10b61
5 changed files with 41 additions and 43 deletions

View File

@@ -47,3 +47,11 @@ static inline void phton16(uint8_t *p, uint16_t v) {
int fprint_localtime(FILE *F);
time_t file_mod_time(const char *filename);
typedef struct
{
uint16_t from,to;
bool neg;
} port_filter;
bool pf_in_range(uint16_t port, const port_filter *pf);
bool pf_parse(const char *s, port_filter *pf);