NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
private.h File Reference

Shared functions that are private to Connections. More...

#include <stddef.h>
#include <time.h>
+ Include dependency graph for private.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


int raw_socket_close (struct Connection *conn)
 Close a socket - Implements Connection::close() -. More...
int raw_socket_open (struct Connection *conn)
 Open a socket - Implements Connection::open() -. More...
int raw_socket_poll (struct Connection *conn, time_t wait_secs)
 Checks whether reads would block - Implements Connection::poll() -. More...
int raw_socket_read (struct Connection *conn, char *buf, size_t len)
 Read data from a socket - Implements Connection::read() -. More...
int raw_socket_write (struct Connection *conn, const char *buf, size_t count)
 Write data to a socket - Implements Connection::write() -. More...
void mutt_tunnel_socket_setup (struct Connection *conn)
 sets up tunnel connection functions More...

Detailed Description

Shared functions that are private to Connections.

  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Definition in file private.h.

Function Documentation

◆ mutt_tunnel_socket_setup()

void mutt_tunnel_socket_setup ( struct Connection conn)

sets up tunnel connection functions

connConnection to assign functions to

Assign tunnel socket functions to the Connection conn.

Definition at line 233 of file tunnel.c.

234 {
235  conn->open = tunnel_socket_open;
236  conn->close = tunnel_socket_close;
237  conn->read = tunnel_socket_read;
238  conn->write = tunnel_socket_write;
239  conn->poll = tunnel_socket_poll;
240  /* Note we are using ssf as a boolean in this case. See the notes in
241  * conn/connection.h */
242  const bool c_tunnel_is_secure =
243  cs_subset_bool(NeoMutt->sub, "tunnel_is_secure");
244  if (c_tunnel_is_secure)
245  conn->ssf = 1;
246 }
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:73
unsigned int ssf
Security strength factor, in bits (see below)
Definition: connection.h:41
static int tunnel_socket_open(struct Connection *conn)
Open a tunnel socket - Implements Connection::open() -.
Definition: tunnel.c:57
int(* read)(struct Connection *conn, char *buf, size_t count)
Definition: connection.h:82
Container for Accounts, Notifications.
Definition: neomutt.h:36
static int tunnel_socket_write(struct Connection *conn, const char *buf, size_t count)
Write data to a tunnel socket - Implements Connection::write() -.
Definition: tunnel.c:159
int(* open)(struct Connection *conn)
Definition: connection.h:69
static int tunnel_socket_read(struct Connection *conn, char *buf, size_t count)
Read data from a tunnel socket - Implements Connection::read() -.
Definition: tunnel.c:137
int(* close)(struct Connection *conn)
Definition: connection.h:119
static int tunnel_socket_close(struct Connection *conn)
Close a tunnel socket - Implements Connection::close() -.
Definition: tunnel.c:204
static int tunnel_socket_poll(struct Connection *conn, time_t wait_secs)
Checks whether tunnel reads would block - Implements Connection::poll() -.
Definition: tunnel.c:187
int(* poll)(struct Connection *conn, time_t wait_secs)
Definition: connection.h:108
int(* write)(struct Connection *conn, const char *buf, size_t count)
Definition: connection.h:95
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
+ Here is the call graph for this function:
+ Here is the caller graph for this function: