#include <uri.h>
Data Fields | |
| struct refcnt | refcnt |
| Reference count. | |
| const char * | scheme |
| Scheme. | |
| const char * | opaque |
| Opaque part. | |
| const char * | user |
| User name. | |
| const char * | password |
| Password. | |
| const char * | host |
| Host name. | |
| const char * | port |
| Port number. | |
| const char * | path |
| Path. | |
| const char * | query |
| Query. | |
| const char * | fragment |
| Fragment. | |
Terminology for this data structure is as per uri(7), except that "path" is defined to include the leading '/' for an absolute path.
Note that all fields within a URI are optional and may be NULL.
The pointers to the various fields are packed together so they can be accessed in array fashion in some places in uri.c where doing so saves significant code size.
Some examples are probably helpful:
http://www.etherboot.org/wiki :
scheme = "http", host = "www.etherboot.org", path = "/wiki"
/var/lib/tftpboot :
path = "/var/lib/tftpboot"
mailto:bob@nowhere.com :
scheme = "mailto", opaque = "bob@nowhere.com"
ftp://joe:secret@insecure.org:8081/hidden/path/to?what=is#this
scheme = "ftp", user = "joe", password = "secret", host = "insecure.org", port = "8081", path = "/hidden/path/to", query = "what=is", fragment = "this"
Definition at line 47 of file uri.h.
struct refcnt uri::refcnt [read] |
| const char* uri::scheme |
Scheme.
Definition at line 51 of file uri.h.
Referenced by dump_uri(), parse_uri(), uri_is_absolute(), and xfer_open_uri().
| const char* uri::opaque |
| const char* uri::user |
User name.
Definition at line 55 of file uri.h.
Referenced by dump_uri(), ftp_user(), http_step(), and parse_uri().
| const char* uri::password |
Password.
Definition at line 57 of file uri.h.
Referenced by dump_uri(), ftp_password(), http_step(), imgfetch(), and parse_uri().
| const char* uri::host |
Host name.
Definition at line 59 of file uri.h.
Referenced by dump_uri(), ftp_open(), http_open_filter(), http_step(), parse_uri(), slam_open(), tcp_open_uri(), tftp_core_open(), tftp_reopen(), and udp_open_uri().
| const char* uri::port |
Port number.
Definition at line 61 of file uri.h.
Referenced by dump_uri(), parse_uri(), and uri_port().
| const char* uri::path |
Path.
Definition at line 63 of file uri.h.
Referenced by dump_uri(), ftp_open(), ftp_uri_path(), http_step(), image_set_uri(), parse_uri(), resolve_uri(), slam_open(), tftp_core_open(), tftp_send_rrq(), uri_has_absolute_path(), and uri_has_relative_path().
| const char* uri::query |
Query.
Definition at line 65 of file uri.h.
Referenced by dump_uri(), parse_uri(), and resolve_uri().
| const char* uri::fragment |
Fragment.
Definition at line 67 of file uri.h.
Referenced by dump_uri(), parse_uri(), and resolve_uri().
1.5.7.1