ELinks 0.18.0
connection.c File Reference
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "elinks.h"
#include "cache/cache.h"
#include "intl/libintl.h"
#include "main/module.h"
#include "network/connection.h"
#include "network/socket.h"
#include "protocol/nntp/codes.h"
#include "protocol/nntp/connection.h"
#include "protocol/nntp/nntp.h"
#include "protocol/nntp/response.h"
#include "protocol/protocol.h"
#include "protocol/uri.h"
#include "util/memory.h"
#include "util/string.h"
Include dependency graph for connection.c:

Macros

#define NNTP_MAX_COMMAND_LENGTH   512

Functions

static void nntp_send_command (struct connection *conn)
static enum nntp_target get_nntp_target (char *data, int datalen)
static int init_nntp_article_range (struct nntp_connection_info *nntp, char *data, int datalen)
static struct nntp_connection_infoinit_nntp_connection_info (struct connection *conn)
static void nntp_quit (struct connection *conn)
static void nntp_end_request (struct connection *conn, struct connection_state state)
static void read_nntp_data (struct socket *socket, struct read_buffer *rb)
static struct connection_state get_nntp_connection_state (nntp_code_T code)
static void nntp_got_response (struct socket *socket, struct read_buffer *rb)
static void nntp_get_response (struct socket *socket)
static enum nntp_command get_nntp_command (struct nntp_connection_info *nntp)
static void add_nntp_command_to_string (struct string *req, struct nntp_connection_info *nntp)
void nntp_protocol_handler (struct connection *conn)
void news_protocol_handler (struct connection *conn)

Macro Definition Documentation

◆ NNTP_MAX_COMMAND_LENGTH

#define NNTP_MAX_COMMAND_LENGTH   512

Function Documentation

◆ add_nntp_command_to_string()

void add_nntp_command_to_string ( struct string * req,
struct nntp_connection_info * nntp )
static

◆ get_nntp_command()

enum nntp_command get_nntp_command ( struct nntp_connection_info * nntp)
static

◆ get_nntp_connection_state()

struct connection_state get_nntp_connection_state ( nntp_code_T code)
static

◆ get_nntp_target()

enum nntp_target get_nntp_target ( char * data,
int datalen )
static

◆ init_nntp_article_range()

int init_nntp_article_range ( struct nntp_connection_info * nntp,
char * data,
int datalen )
static

◆ init_nntp_connection_info()

struct nntp_connection_info * init_nntp_connection_info ( struct connection * conn)
static

◆ news_protocol_handler()

void news_protocol_handler ( struct connection * conn)

◆ nntp_end_request()

void nntp_end_request ( struct connection * conn,
struct connection_state state )
static

◆ nntp_get_response()

void nntp_get_response ( struct socket * socket)
static

◆ nntp_got_response()

void nntp_got_response ( struct socket * socket,
struct read_buffer * rb )
static

◆ nntp_protocol_handler()

void nntp_protocol_handler ( struct connection * conn)

◆ nntp_quit()

void nntp_quit ( struct connection * conn)
static

◆ nntp_send_command()

void nntp_send_command ( struct connection * conn)
static

◆ read_nntp_data()

void read_nntp_data ( struct socket * socket,
struct read_buffer * rb )
static