mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 10:39:49 +01:00
a32b3b68e2
This prepares us for connectd disconnecting more gently: it can wait for these to all disconnect. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
#ifndef LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H
|
|
#define LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H
|
|
#include "config.h"
|
|
#include <ccan/short_types/short_types.h>
|
|
#include <ccan/tal/tal.h>
|
|
#include <common/utils.h>
|
|
|
|
struct lightningd;
|
|
struct peer;
|
|
struct pubkey;
|
|
struct wireaddr_internal;
|
|
|
|
/* Returns fd for gossipd to talk to connectd */
|
|
int connectd_init(struct lightningd *ld);
|
|
void connectd_activate(struct lightningd *ld);
|
|
void connectd_start_shutdown(struct subd *connectd);
|
|
|
|
/* Kill subds, tell connectd to disconnect once they're drained. */
|
|
void force_peer_disconnect(struct lightningd *ld,
|
|
const struct peer *peer,
|
|
const char *why);
|
|
|
|
void try_reconnect(const tal_t *ctx,
|
|
struct peer *peer,
|
|
const struct wireaddr_internal *addrhint);
|
|
void connect_succeeded(struct lightningd *ld, const struct peer *peer,
|
|
bool incoming,
|
|
const struct wireaddr_internal *addr);
|
|
void connect_failed_disconnect(struct lightningd *ld,
|
|
const struct node_id *id,
|
|
const struct wireaddr_internal *addr);
|
|
|
|
/* 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);
|
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H */
|