core-lightning/lightningd/gossip_msg.h
Christian Decker 74df755a29 gossip: Added nested message types for getnodes query
Added a struct that represents a single entry in a `getnodes` reply,
so that we can append one after the other and parse them again on the
other side.
2017-03-15 21:32:55 +01:00

16 lines
461 B
C

#ifndef LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H
#define LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H
#include "config.h"
#include <bitcoin/pubkey.h>
struct gossip_getnodes_entry {
struct pubkey nodeid;
char *hostname;
u16 port;
};
void fromwire_gossip_getnodes_entry(const u8 **pptr, size_t *max, struct gossip_getnodes_entry *entry);
void towire_gossip_getnodes_entry(u8 **pptr, const struct gossip_getnodes_entry *entry);
#endif /* LIGHTNING_LIGHTGNINGD_GOSSIP_MSG_H */