diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-06 14:03:20 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-09 10:46:11 +0000 |
commit | a8f11faf7f584916078d6fadb36e0c2f1984e2b0 (patch) | |
tree | 1f7b00067a856148b01c4e017442297957da9b84 /src/libserver/url.h | |
parent | 3e3b94276f03f520bcd1756876c1077f250127d9 (diff) | |
download | rspamd-a8f11faf7f584916078d6fadb36e0c2f1984e2b0.tar.gz rspamd-a8f11faf7f584916078d6fadb36e0c2f1984e2b0.zip |
[Rework] Rework URL structure: adjust tld part
Diffstat (limited to 'src/libserver/url.h')
-rw-r--r-- | src/libserver/url.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/libserver/url.h b/src/libserver/url.h index 87766c4e6..00f09ac30 100644 --- a/src/libserver/url.h +++ b/src/libserver/url.h @@ -53,15 +53,7 @@ struct rspamd_url { guint datashift; guint queryshift; guint fragmentshift; - - gchar *tld; - gchar *visible_part; - - struct rspamd_url *phished_url; - - guint urllen; - guint rawlen; - guint32 flags; + guint tldshift; guint16 protocollen; guint16 userlen; @@ -70,8 +62,14 @@ struct rspamd_url { guint16 querylen; guint16 fragmentlen; guint16 tldlen; - guint16 count; + + guint urllen; + guint rawlen; + guint32 flags; + + gchar *visible_part; + struct rspamd_url *phished_url; }; #define rspamd_url_user(u) ((u)->userlen > 0 ? (u)->string + (u)->usershift : NULL) @@ -79,6 +77,7 @@ struct rspamd_url { #define rspamd_url_host(u) ((u)->hostlen > 0 ? (u)->string + (u)->hostshift : NULL) #define rspamd_url_host_unsafe(u) ((u)->string + (u)->hostshift) +#define rspamd_url_tld_unsafe(u) ((u)->string + (u)->tldshift) #define rspamd_url_data_unsafe(u) ((u)->string + (u)->datashift) #define rspamd_url_query_unsafe(u) ((u)->string + (u)->queryshift) |