iPXE
Data Fields
uri Struct Reference

A Uniform Resource Identifier. More...

#include <uri.h>

Data Fields

struct refcnt refcnt
 Reference count. More...
 
const char * scheme
 Scheme. More...
 
const char * opaque
 Opaque part. More...
 
const char * user
 User name. More...
 
const char * password
 Password. More...
 
const char * host
 Host name. More...
 
const char * port
 Port number. More...
 
const char * path
 Path. More...
 
const char * query
 Query. More...
 
const char * fragment
 Fragment. More...
 
struct parametersparams
 Form parameters. More...
 

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"

bob@n.nosp@m.owhe.nosp@m.re.co.nosp@m.m :

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

◆ refcnt

struct refcnt uri::refcnt

Reference count.

Definition at line 52 of file uri.h.

Referenced by parse_uri(), uri_dup(), uri_get(), and uri_put().

◆ scheme

const char* uri::scheme

Scheme.

Definition at line 54 of file uri.h.

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

◆ opaque

const char* uri::opaque

◆ user

const char* uri::user

◆ password

const char* uri::password

◆ host

const char* uri::host

◆ port

const char* uri::port

Port number.

Definition at line 64 of file uri.h.

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

◆ path

const char* uri::path

◆ query

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().

◆ fragment

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().

◆ params

struct parameters* uri::params

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