interface: fix ifname present check in interface status
[project/qosify.git] / qosify.h
index 7a598e3bebfc8edc1f48c9aa605f3afc699f61a2..dab1ebb7e3fda2431fa50d7a7ceaeed727f5a394 100644 (file)
--- a/qosify.h
+++ b/qosify.h
@@ -26,6 +26,8 @@
 
 #define QOSIFY_DNS_IFNAME "ifb-dns"
 
+#define QOSIFY_PRIO_BASE       0x110
+
 enum qosify_map_id {
        CL_MAP_TCP_PORTS,
        CL_MAP_UDP_PORTS,
@@ -51,7 +53,8 @@ struct qosify_map_data {
                struct in_addr ip;
                struct in6_addr ip6;
                struct {
-                       uint32_t seq;
+                       uint32_t seq : 30;
+                       uint32_t only_cname : 1;
                        const char *pattern;
                        regex_t regex;
                } dns;
@@ -75,6 +78,7 @@ extern struct qosify_flow_config flow_config;
 int qosify_run_cmd(char *cmd, bool ignore_error);
 
 int qosify_loader_init(void);
+const char *qosify_get_program(uint32_t flags, int *fd);
 
 int qosify_map_init(void);
 int qosify_map_dscp_value(const char *val, uint8_t *dscp);
@@ -90,7 +94,7 @@ void qosify_map_set_dscp_default(enum qosify_map_id id, uint8_t val);
 void qosify_map_reset_config(void);
 void qosify_map_update_config(void);
 void qosify_map_set_classes(struct blob_attr *val);
-int qosify_map_lookup_dns_entry(char *host, uint8_t *dscp, uint32_t *seq);
+int qosify_map_lookup_dns_entry(char *host, bool cname, uint8_t *dscp, uint32_t *seq);
 int qosify_map_add_dns_host(char *host, const char *addr, const char *type, int ttl);
 int map_parse_flow_config(struct qosify_flow_config *cfg, struct blob_attr *attr,
                          bool reset);