69 struct uri *resolved_uri;
74 if ( ! resolved_uri ) {
83 "unsupported URI scheme \"%s\"\n",
92 if ( (
rc = opener->
open ( intf, resolved_uri ) ) != 0 ) {
116 const char *uri_string ) {
152 return opener->
open ( intf, peer, local );
156 "unsupported socket type (%s,%s)\n",
173 const char *uri_string =
va_arg ( args,
const char * );
181 int semantics =
va_arg ( args,
int );
188 "open unsupported location type %d\n",
struct arbelprm_rc_send_wqe rc
void intf_restart(struct interface *intf, int rc)
Shut down and restart an object interface.
static const char * socket_semantics_name(int semantics)
Name communication semantics.
#define INTF_DBG(intf)
printf() arguments for representing an object interface
static void uri_put(struct uri *uri)
Decrement URI reference count.
#define URI_OPENERS
URI opener table.
int xfer_open_socket(struct interface *intf, int semantics, struct sockaddr *peer, struct sockaddr *local)
Open socket.
uint32_t type
Operating system type.
int xfer_open_uri(struct interface *intf, struct uri *uri)
Open URI.
#define INTF_COL(intf)
Find debugging colourisation for an object interface.
sa_family_t sa_family
Socket address family.
int strcasecmp(const char *first, const char *second)
Compare case-insensitive strings.
Uniform Resource Identifiers.
int semantics
Communication semantics (e.g.
#define ENOTSUP
Operation not supported.
Data transfer interfaces.
#define ENOMEM
Not enough space.
const char * scheme
Scheme.
int(* open)(struct interface *intf, struct uri *uri)
Open URI.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define SOCKET_OPENERS
Socket opener table.
const char * scheme
URI protocol name.
Location is a URI string.
Generalized socket address structure.
char * strerror(int errno)
Retrieve string representation of error number.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
static const char * socket_family_name(int family)
Name address family.
Data transfer interface opening.
int xfer_open(struct interface *intf, int type,...)
Open location.
int xfer_vreopen(struct interface *intf, int type, va_list args)
Reopen location.
int(* open)(struct interface *intf, struct sockaddr *peer, struct sockaddr *local)
Open socket.
__builtin_va_list va_list
int xfer_vopen(struct interface *intf, int type, va_list args)
Open location.
A Uniform Resource Identifier.
struct uri_opener * xfer_uri_opener(const char *scheme)
Find opener for URI scheme.
struct uri * resolve_uri(const struct uri *base_uri, struct uri *relative_uri)
Resolve base+relative URI.
#define va_start(ap, last)
struct uri * cwuri
Current working URI.
int xfer_open_uri_string(struct interface *intf, const char *uri_string)
Open URI string.
#define NULL
NULL pointer (VOID *)
struct uri * parse_uri(const char *uri_string)
Parse URI.
#define INTF_FMT
printf() format string for INTF_DBG()