2018-02-20 21:59:09 +01:00
|
|
|
#ifndef LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H
|
|
|
|
#define LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H
|
|
|
|
#include "config.h"
|
2022-03-22 21:30:59 +01:00
|
|
|
#include <ccan/short_types/short_types.h>
|
|
|
|
#include <ccan/tal/tal.h>
|
2022-07-23 18:21:31 +02:00
|
|
|
#include <common/utils.h>
|
2018-02-20 21:59:09 +01:00
|
|
|
|
|
|
|
struct lightningd;
|
2022-03-22 21:30:59 +01:00
|
|
|
struct peer;
|
2018-02-20 21:59:09 +01:00
|
|
|
struct pubkey;
|
2018-08-09 02:25:29 +02:00
|
|
|
struct wireaddr_internal;
|
2018-02-20 21:59:09 +01:00
|
|
|
|
2018-07-24 08:18:58 +02:00
|
|
|
/* Returns fd for gossipd to talk to connectd */
|
2022-01-29 04:33:05 +01:00
|
|
|
int connectd_init(struct lightningd *ld);
|
2018-07-24 08:18:58 +02:00
|
|
|
void connectd_activate(struct lightningd *ld);
|
2023-02-04 06:16:24 +01:00
|
|
|
void connectd_start_shutdown(struct subd *connectd);
|
2018-07-24 08:18:58 +02:00
|
|
|
|
2022-03-22 21:30:59 +01:00
|
|
|
void try_reconnect(const tal_t *ctx,
|
|
|
|
struct peer *peer,
|
|
|
|
const struct wireaddr_internal *addrhint);
|
2021-03-16 04:44:36 +01:00
|
|
|
void connect_succeeded(struct lightningd *ld, const struct peer *peer,
|
2021-03-25 04:53:31 +01:00
|
|
|
bool incoming,
|
2021-03-16 04:44:36 +01:00
|
|
|
const struct wireaddr_internal *addr);
|
2022-07-18 14:12:28 +02:00
|
|
|
void connect_failed_disconnect(struct lightningd *ld,
|
|
|
|
const struct node_id *id,
|
|
|
|
const struct wireaddr_internal *addr);
|
2018-02-20 21:59:09 +01:00
|
|
|
|
2022-09-12 23:19:12 +02:00
|
|
|
/* Get the id of any connect cmd which applies, to feed to hooks */
|
|
|
|
const char *connect_any_cmd_id(const tal_t *ctx,
|
|
|
|
struct lightningd *ld, const struct peer *peer);
|
|
|
|
|
2018-02-20 21:59:09 +01:00
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H */
|