fuck! don't perform ssl handshake for blocked hosts!
[mediator.git] / src / crackurl.h
blobbf51df90e619f7137860fd10a3eb1aaef5841751
1 #ifndef CRACKURL_H
2 #define CRACKURL_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
9 typedef struct {
10 char *scheme;
11 char *host;
12 int port; /* always set, can be 0 for unknown protocol */
13 char *portstr; /* can be NULL, starts with ':' */
14 char *path; /* can be NULL, starts with '/' */
15 char *query; /* can be NULL, starts with '?' */
16 char *fragment; /* can be NULL, starts with '#' */
17 char *username; /* can be NULL */
18 char *password; /* can be NULL even when username is not NULL */
19 } cracked_url_t;
22 /* can clear UNLY PROPERLY INITIALIZED *url! */
23 extern void cracked_url_clear (cracked_url_t *url);
25 /* will just fill *url with zeroes at start (not with cracked_url_clear()!) */
26 /* will return property initialized *url in any case */
27 /* will return 0 if urlstr is ok and <0 on error (and *url is empty then) */
28 extern int crack_url (cracked_url_t *url, const char *urlstr);
31 #ifdef __cplusplus
33 #endif
34 #endif