2018-09-03 05:40:00 +02:00
|
|
|
#ifndef LIGHTNING_CONNECTD_CONNECTD_H
|
|
|
|
#define LIGHTNING_CONNECTD_CONNECTD_H
|
2018-05-10 01:18:23 +02:00
|
|
|
#include "config.h"
|
2018-09-27 23:04:19 +02:00
|
|
|
#include <bitcoin/pubkey.h>
|
|
|
|
#include <common/crypto_state.h>
|
2018-05-10 01:18:23 +02:00
|
|
|
|
|
|
|
struct io_conn;
|
2018-09-27 23:06:19 +02:00
|
|
|
struct connecting;
|
2018-09-27 23:04:19 +02:00
|
|
|
struct daemon;
|
2019-04-08 11:58:32 +02:00
|
|
|
struct node_id;
|
2019-06-03 20:14:25 +02:00
|
|
|
struct wireaddr_internal;
|
2018-05-10 01:18:23 +02:00
|
|
|
|
2018-09-27 23:04:19 +02:00
|
|
|
/* Called by io_tor_connect once it has a connection out. */
|
2018-09-27 23:06:19 +02:00
|
|
|
struct io_plan *connection_out(struct io_conn *conn, struct connecting *connect);
|
2018-05-10 01:18:23 +02:00
|
|
|
|
2020-04-14 16:03:04 +02:00
|
|
|
/* add erros to error list */
|
|
|
|
void add_errors_to_error_list(struct connecting *connect, const char *error);
|
|
|
|
|
2018-09-27 23:04:19 +02:00
|
|
|
/* Called by peer_exchange_initmsg if successful. */
|
|
|
|
struct io_plan *peer_connected(struct io_conn *conn,
|
|
|
|
struct daemon *daemon,
|
2019-06-03 20:14:25 +02:00
|
|
|
const struct node_id *id,
|
|
|
|
const struct wireaddr_internal *addr,
|
2020-04-02 06:03:47 +02:00
|
|
|
struct crypto_state *cs,
|
2021-03-24 05:37:50 +01:00
|
|
|
const u8 *their_features TAKES,
|
|
|
|
bool incoming);
|
2018-09-27 23:04:19 +02:00
|
|
|
|
2018-09-03 05:40:00 +02:00
|
|
|
#endif /* LIGHTNING_CONNECTD_CONNECTD_H */
|