aboutsummaryrefslogtreecommitdiffstats
path: root/core/fs/pxe/url.h
blob: baea2b70d8468ec49d5fbd1e8b5ff7f474b2c93e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * url.h
 */

#ifndef CORE_PXE_URL_H
#define CORE_PXE_URL_H

enum url_type {
    URL_NORMAL,
    URL_OLD_TFTP,
    URL_PREFIX
};

struct url_info {
    char *scheme;
    char *user;
    char *passwd;
    char *host;
    unsigned int port;
    char *path;			/* Includes query */
    enum url_type type;
};

void parse_url(struct url_info *ui, char *url);
char *url_escape_unsafe(const char *input);
char *url_unescape(char *buffer, char terminator);

#endif /* CORE_PXE_URL_H */