From a293f829a40d10220a42a88432b229e573c03419 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 13 Oct 2019 16:57:33 +0000 Subject: [PATCH] Add flags for A1, A2 and A3 Signed-off-by: Michael Tremer --- src/loc/network.h | 6 ++++++ src/network.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/loc/network.h b/src/loc/network.h index 8603e47..02c8ad5 100644 --- a/src/loc/network.h +++ b/src/loc/network.h @@ -22,6 +22,12 @@ #include #include +enum loc_network_flags { + LOC_NETWORK_FLAG_ANONYMOUS_PROXY = (1 << 0), // A1 + LOC_NETWORK_FLAG_SATELLITE_PROVIDER = (1 << 1), // A2 + LOC_NETWORK_FLAG_ANYCAST = (1 << 2), // A3 +}; + struct loc_network; int loc_network_new(struct loc_ctx* ctx, struct loc_network** network, struct in6_addr* start_address, unsigned int prefix); diff --git a/src/network.c b/src/network.c index a4a7747..182e0dd 100644 --- a/src/network.c +++ b/src/network.c @@ -35,7 +35,7 @@ struct loc_network { char country_code[3]; uint32_t asn; - uint32_t flags; + enum loc_network_flags flags; }; static int valid_prefix(struct in6_addr* address, unsigned int prefix) { -- 2.47.3