iPXE
Data Fields
uri Struct Reference

A Uniform Resource Identifier. More...

#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.
struct parametersparams
 Form parameters.

Detailed Description

A Uniform Resource Identifier.

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.ipxe.org/wiki :

scheme = "http", host = "www.ipxe.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 50 of file uri.h.


Field Documentation

Reference count.

Definition at line 52 of file uri.h.

Referenced by parse_uri(), and uri_dup().

const char* uri::scheme

Scheme.

Definition at line 54 of file uri.h.

Referenced by http_open(), http_scheme(), netboot(), parse_uri(), tftp_uri(), uri_dump(), uri_is_absolute(), uri_okx(), and xfer_open_uri().

const char* uri::opaque
const char* uri::user
const char* uri::password
const char* uri::host
const char* uri::port

Port number.

Definition at line 64 of file uri.h.

Referenced by http_open(), parse_uri(), tftp_uri(), uri_dump(), uri_okx(), and uri_port().

const char* uri::path
const char* uri::query

Query.

Definition at line 68 of file uri.h.

Referenced by http_open(), imgdownload(), parse_uri(), resolve_uri(), uri_dump(), and uri_okx().

const char* uri::fragment

Fragment.

Definition at line 70 of file uri.h.

Referenced by imgdownload(), parse_uri(), resolve_uri(), uri_dump(), and uri_okx().


The documentation for this struct was generated from the following file: