Main Page Data Structures File List Data Fields Globals Related Pages

# inet/url.h

Go to the documentation of this file.

    00001 #ifndef URL_H
    00002 #define URL_H
    00003
    00004 #define DEFAULT_FTP_DATA_PORT    20
    00005 #define DEFAULT_FTP_PORT         21
    00006 #define DEFAULT_TELNET_PORT      23
    00007 #define DEFAULT_SMTP_PORT        25
    00008 #define DEFAULT_TIME_PORT        37
    00009 #define DEFAULT_DNS_PORT         42
    00010 #define DEFAULT_WHOIS_PORT       43
    00011 #define DEFAULT_TFTP_PORT        69
    00012 #define DEFAULT_GOPHER_PORT      70
    00013 #define DEFAULT_FINGER_PORT      79
    00014 #define DEFAULT_HTTP_PORT        80
    00015 #define DEFAULT_POP3_PORT       110
    00016 #define DEFAULT_NNTP_PORT       119
    00017 #define DEFAULT_WAIS_PORT       210
    00018 #define DEFAULT_HTTPS_PORT      443
    00019 #define DEFAULT_SNEWS_PORT      563
    00020 #define DEFAULT_PROSPERO_PORT  1525
    00021
    00022
    00023 typedef struct {
    00024   char *scheme;
    00025   char *user;
    00026   char *pass;
    00027   char *host;
    00028   unsigned short port;
    00029   char *path;
    00030   char *query;
    00031   char *fragment;
    00032 } URL;
    00033
    00034 extern  void      free_url(URL *url);
    00035 extern  URL      *parse_url(const char *urlString);
    00036 extern  unsigned  url_decode(char *str, unsigned len);
    00037 extern  char     *url_encode(char *s, unsigned len);
    00038
    00039 #endif