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 */
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
);