ELinks 0.18.0
protocol.c File Reference
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "bfu/dialog.h"
#include "document/view.h"
#include "intl/libintl.h"
#include "main/module.h"
#include "network/connection.h"
#include "protocol/protocol.h"
#include "protocol/uri.h"
#include "session/session.h"
#include "terminal/terminal.h"
#include "terminal/window.h"
#include "util/memory.h"
#include "util/string.h"
#include "protocol/about.h"
#include "protocol/auth/auth.h"
#include "protocol/bittorrent/bittorrent.h"
#include "protocol/bittorrent/connection.h"
#include "protocol/curl/ftpes.h"
#include "protocol/curl/http.h"
#include "protocol/curl/sftp.h"
#include "protocol/data.h"
#include "protocol/file/cgi.h"
#include "protocol/file/dgi.h"
#include "protocol/file/file.h"
#include "protocol/file/mailcap.h"
#include "protocol/finger/finger.h"
#include "protocol/fsp/fsp.h"
#include "protocol/ftp/ftp.h"
#include "protocol/gemini/gemini.h"
#include "protocol/gopher/gopher.h"
#include "protocol/http/http.h"
#include "protocol/nntp/connection.h"
#include "protocol/nntp/nntp.h"
#include "protocol/rewrite/rewrite.h"
#include "protocol/smb/smb.h"
#include "protocol/user.h"
Include dependency graph for protocol.c:

Data Structures

struct  protocol_backend
 

Macros

#define VALID_PROTOCOL(p)   (0 <= (p) && (p) < PROTOCOL_BACKENDS)
 

Functions

protocol_T get_protocol (const char *name, int namelen)
 
int get_protocol_port (protocol_T protocol)
 
int get_protocol_need_slashes (protocol_T protocol)
 
int get_protocol_need_slash_after_host (protocol_T protocol)
 
int get_protocol_keep_double_slashes (protocol_T protocol)
 
int get_protocol_free_syntax (protocol_T protocol)
 
int get_protocol_need_ssl (protocol_T protocol)
 
protocol_handler_Tget_protocol_handler (protocol_T protocol)
 
static void generic_external_protocol_handler (struct session *ses, struct uri *uri)
 
protocol_external_handler_Tget_protocol_external_handler (struct terminal *term, struct uri *uri)
 

Variables

static const struct protocol_backend protocol_backends []
 
static union option_info protocol_options []
 
static struct moduleprotocol_submodules []
 
struct module protocol_module
 

Macro Definition Documentation

◆ VALID_PROTOCOL

#define VALID_PROTOCOL ( p)    (0 <= (p) && (p) < PROTOCOL_BACKENDS)

Function Documentation

◆ generic_external_protocol_handler()

static void generic_external_protocol_handler ( struct session * ses,
struct uri * uri )
static

◆ get_protocol()

protocol_T get_protocol ( const char * name,
int namelen )

◆ get_protocol_external_handler()

protocol_external_handler_T * get_protocol_external_handler ( struct terminal * term,
struct uri * uri )

◆ get_protocol_free_syntax()

int get_protocol_free_syntax ( protocol_T protocol)

◆ get_protocol_handler()

protocol_handler_T * get_protocol_handler ( protocol_T protocol)

◆ get_protocol_keep_double_slashes()

int get_protocol_keep_double_slashes ( protocol_T protocol)

◆ get_protocol_need_slash_after_host()

int get_protocol_need_slash_after_host ( protocol_T protocol)

◆ get_protocol_need_slashes()

int get_protocol_need_slashes ( protocol_T protocol)

◆ get_protocol_need_ssl()

int get_protocol_need_ssl ( protocol_T protocol)

◆ get_protocol_port()

int get_protocol_port ( protocol_T protocol)

Variable Documentation

◆ protocol_backends

const struct protocol_backend protocol_backends[]
static

◆ protocol_module

struct module protocol_module
Initial value:
N_("Protocol"),
)
#define NULL
Definition explodename.c:35
#define N_(msg)
Definition libintl.h:25
#define struct_module(name, options, hooks, submods, data, init, done, getname)
Definition module.h:47
static union option_info protocol_options[]
Definition protocol.c:287
static struct module * protocol_submodules[]
Definition protocol.c:305

◆ protocol_options

union option_info protocol_options[]
static
Initial value:
= {
INIT_OPT_TREE("", N_("Protocols"),
"protocol", OPT_SORT,
N_("Protocol specific options.")),
INIT_OPT_STRING("protocol", N_("Default protocol prefix"),
"default_protocol", OPT_ZERO, "https://",
N_("Default protocol prefix when none protocol was entered.")),
INIT_OPT_STRING("protocol", N_("No-proxy domains"),
"no_proxy", OPT_ZERO, "",
N_("Comma separated list of domains for which the proxy "
"(HTTP/FTP) should be disabled. Optionally, a port can be "
"specified for some domains as well. If it's blank, "
"NO_PROXY environment variable is checked as well.")),
NULL_OPTION_INFO,
}
@ OPT_SORT
For OPT_TREE, automatically sort the content of the tree alphabetically (but all subtrees in front of...
Definition options.h:93
@ OPT_ZERO
Definition options.h:23

◆ protocol_submodules

struct module* protocol_submodules[]
static