iPXE
|
Data transfer interface opening. More...
#include <stdarg.h>
#include <string.h>
#include <strings.h>
#include <errno.h>
#include <ipxe/xfer.h>
#include <ipxe/uri.h>
#include <ipxe/socket.h>
#include <ipxe/open.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
struct uri_opener * | xfer_uri_opener (const char *scheme) |
Find opener for URI scheme. More... | |
int | xfer_open_uri (struct interface *intf, struct uri *uri) |
Open URI. More... | |
int | xfer_open_uri_string (struct interface *intf, const char *uri_string) |
Open URI string. More... | |
int | xfer_open_socket (struct interface *intf, int semantics, struct sockaddr *peer, struct sockaddr *local) |
Open socket. More... | |
int | xfer_vopen (struct interface *intf, int type, va_list args) |
Open location. More... | |
int | xfer_open (struct interface *intf, int type,...) |
Open location. More... | |
int | xfer_vreopen (struct interface *intf, int type, va_list args) |
Reopen location. More... | |
Data transfer interface opening.
Definition in file open.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
struct uri_opener* xfer_uri_opener | ( | const char * | scheme | ) |
Find opener for URI scheme.
scheme | URI scheme |
opener | Opener, or NULL |
Definition at line 47 of file open.c.
References for_each_table_entry, NULL, uri_opener::scheme, strcasecmp(), and URI_OPENERS.
Referenced by netboot(), and xfer_open_uri().
Open URI.
intf | Data transfer interface |
uri | URI |
rc | Return status code |
The URI will be regarded as being relative to the current working URI (see churi()).
Definition at line 67 of file open.c.
References cwuri, DBGC, ENOMEM, ENOTSUP, INTF_COL, INTF_DBG, INTF_FMT, uri_opener::open, rc, resolve_uri(), uri::scheme, strerror(), uri_put(), and xfer_uri_opener().
Referenced by create_downloader(), efi_pxe_tftp_open(), pxe_tftp_open(), sanpath_open(), xfer_open_uri_string(), and xfer_vopen().
int xfer_open_uri_string | ( | struct interface * | intf, |
const char * | uri_string | ||
) |
Open URI string.
intf | Data transfer interface |
uri_string | URI string (e.g. "http://ipxe.org/kernel") |
rc | Return status code |
The URI will be regarded as being relative to the current working URI (see churi()).
Definition at line 115 of file open.c.
References DBGC, ENOMEM, INTF_COL, INTF_DBG, INTF_FMT, parse_uri(), rc, uri_put(), and xfer_open_uri().
Referenced by open(), validator_start_download(), validator_start_ocsp(), and xfer_vopen().
int xfer_open_socket | ( | struct interface * | intf, |
int | semantics, | ||
struct sockaddr * | peer, | ||
struct sockaddr * | local | ||
) |
Open socket.
intf | Data transfer interface |
semantics | Communication semantics (e.g. SOCK_STREAM) |
peer | Peer socket address |
local | Local socket address, or NULL |
rc | Return status code |
Definition at line 142 of file open.c.
References DBGC, ENOTSUP, for_each_table_entry, INTF_COL, INTF_DBG, INTF_FMT, socket_opener::open, sockaddr::sa_family, socket_opener::semantics, socket_family_name(), SOCKET_OPENERS, and socket_semantics_name().
Referenced by apply_syslog_settings(), dns_resolv(), ftp_reply(), peerdisc_socket_open(), slam_open(), start_dhcp(), start_dhcpv6(), start_pxebs(), tftp_reopen_mc(), and xfer_vopen().
Open location.
intf | Data transfer interface |
type | Location type |
args | Remaining arguments depend upon location type |
rc | Return status code |
Definition at line 170 of file open.c.
References DBGC, ENOTSUP, INTF_COL, INTF_DBG, INTF_FMT, LOCATION_SOCKET, LOCATION_URI, LOCATION_URI_STRING, type, va_arg, xfer_open_socket(), xfer_open_uri(), and xfer_open_uri_string().
Referenced by xfer_open(), and xfer_vreopen().
int xfer_open | ( | struct interface * | intf, |
int | type, | ||
... | |||
) |
Open location.
intf | Data transfer interface |
type | Location type |
... | Remaining arguments depend upon location type |
rc | Return status code |
Definition at line 202 of file open.c.
References rc, type, va_end, va_start, and xfer_vopen().
Referenced by efi_download_start().
Reopen location.
intf | Data transfer interface |
type | Location type |
args | Remaining arguments depend upon location type |
rc | Return status code |
This will close the existing connection and open a new connection using xfer_vopen(). It is intended to be used as a .vredirect method handler.
Definition at line 224 of file open.c.
References intf_restart(), type, and xfer_vopen().
Referenced by downloader_vredirect(), iscsi_vredirect(), and xfer_vredirect().