Functions | Variables
push.c File Reference
#include "syshead.h"
#include "push.h"
#include "options.h"
#include "ssl.h"
#include "ssl_verify.h"
#include "manage.h"
#include "memdbg.h"
Include dependency graph for push.c:

Go to the source code of this file.


void receive_auth_failed (struct context *c, const struct buffer *buffer)
void server_pushed_signal (struct context *c, const struct buffer *buffer, const bool restart, const int adv)
static bool push_option_fmt (struct gc_arena *gc, struct push_list *push_list, int msglevel, const char *fmt,...)
 Add an option to the given push list by providing a format string. More...
void send_auth_failed (struct context *c, const char *client_reason)
void send_restart (struct context *c, const char *kill_msg)
void incoming_push_message (struct context *c, const struct buffer *buffer)
bool send_push_request (struct context *c)
static bool prepare_push_reply (struct context *c, struct gc_arena *gc, struct push_list *push_list)
 Prepare push options, based on local options and available peer info. More...
static bool send_push_options (struct context *c, struct buffer *buf, struct push_list *push_list, int safe_cap, bool *push_sent, bool *multi_push)
static bool send_push_reply (struct context *c, struct push_list *per_client_push_list)
static void push_option_ex (struct gc_arena *gc, struct push_list *push_list, const char *opt, bool enable, int msglevel)
void push_option (struct options *o, const char *opt, int msglevel)
void clone_push_list (struct options *o)
void push_options (struct options *o, char **p, int msglevel, struct gc_arena *gc)
void push_reset (struct options *o)
void push_remove_option (struct options *o, const char *p)
int process_incoming_push_request (struct context *c)
static void push_update_digest (md_ctx_t *ctx, struct buffer *buf, const struct options *opt)
int process_incoming_push_msg (struct context *c, const struct buffer *buffer, bool honor_received_options, unsigned int permission_mask, unsigned int *option_types_found)
void remove_iroutes_from_push_route_list (struct options *o)


static char push_reply_cmd [] = "PUSH_REPLY"

Function Documentation

◆ clone_push_list()

void clone_push_list ( struct options o)

◆ incoming_push_message()

void incoming_push_message ( struct context c,
const struct buffer buffer 

◆ prepare_push_reply()

static bool prepare_push_reply ( struct context c,
struct gc_arena gc,
struct push_list push_list 

◆ process_incoming_push_msg()

int process_incoming_push_msg ( struct context c,
const struct buffer buffer,
bool  honor_received_options,
unsigned int  permission_mask,
unsigned int *  option_types_found 

◆ process_incoming_push_request()

int process_incoming_push_request ( struct context c)

◆ push_option()

void push_option ( struct options o,
const char *  opt,
int  msglevel 

◆ push_option_ex()

static void push_option_ex ( struct gc_arena gc,
struct push_list push_list,
const char *  opt,
bool  enable,
int  msglevel 

◆ push_option_fmt()

static bool push_option_fmt ( struct gc_arena gc,
struct push_list push_list,
int  msglevel,
const char *  fmt,

Add an option to the given push list by providing a format string.

The string added to the push options is allocated in o->gc, so the caller does not have to preserve anything.

gcGC arena where options are allocated
push_listPush list containing options
msglevelThe message level to use when printing errors
fmtFormat string for the option
...Format string arguments
true on success, false on failure.

Definition at line 591 of file push.c.

References push_option_ex(), string_alloc(), and vsnprintf.

Referenced by prepare_push_reply(), and server_pushed_signal().

◆ push_options()

void push_options ( struct options o,
char **  p,
int  msglevel,
struct gc_arena gc 

Definition at line 583 of file push.c.

References make_extended_arg_array(), print_argv(), and push_option().

Referenced by add_option().

◆ push_remove_option()

void push_remove_option ( struct options o,
const char *  p 

◆ push_reset()

void push_reset ( struct options o)

Definition at line 609 of file push.c.

References CLEAR, and options::push_list.

Referenced by add_option(), and clone_push_list().

◆ push_update_digest()

static void push_update_digest ( md_ctx_t ctx,
struct buffer buf,
const struct options opt 

◆ receive_auth_failed()

void receive_auth_failed ( struct context c,
const struct buffer buffer 

◆ remove_iroutes_from_push_route_list()

void remove_iroutes_from_push_route_list ( struct options o)

◆ send_auth_failed()

void send_auth_failed ( struct context c,
const char *  client_reason 

◆ send_push_options()

static bool send_push_options ( struct context c,
struct buffer buf,
struct push_list push_list,
int  safe_cap,
bool push_sent,
bool multi_push 

◆ send_push_reply()

static bool send_push_reply ( struct context c,
struct push_list per_client_push_list 

◆ send_push_request()

bool send_push_request ( struct context c)

◆ send_restart()

void send_restart ( struct context c,
const char *  kill_msg 

◆ server_pushed_signal()

void server_pushed_signal ( struct context c,
const struct buffer buffer,
const bool  restart,
const int  adv 

Variable Documentation

◆ push_reply_cmd

char push_reply_cmd[] = "PUSH_REPLY"

Definition at line 42 of file push.c.

Referenced by send_push_options(), and send_push_reply().