#ifndef MKPACKET_H #define MKPACKET_H /*! \brief Represents a link from one node to another. */ struct NeighborInfo { uint16_t zsize; /*! The mac address of this node. */ uint8_t mac[6]; /*! The ip address of this node. */ uint32_t ip_addr; uint32_t metric; uint32_t inactive; uint32_t rx_bytes; uint32_t rx_packets; uint32_t tx_bytes; uint32_t tx_packets; uint16_t signal; uint8_t tx_rate; uint32_t throughput; } __attribute__((packed)); /*! Hold the information sent in each heartbeat packet. */ struct HeartBeatPacket { uint8_t pkt_vermaj; uint8_t pkt_vermin; uint16_t pkt_size; uint32_t uptime; /*! The mac address of this node. */ uint8_t mac[6]; /*! The ip address of this node. */ uint32_t ip_addr; /*! The number of NeighborInfo structures contained in this packet. */ uint8_t num_stations; /*! The nodes that this node has talked to (?) */ NeighborInfo *mp; } __attribute__((packed)); #endif