You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/llarp/address_info.hpp

26 lines
484 B
C++

7 years ago
#ifndef LLARP_AI_HPP
#define LLARP_AI_HPP
7 years ago
#include <llarp/address_info.h>
7 years ago
#include <cstring>
#include <list>
7 years ago
struct llarp_ai_list {
llarp_ai *data;
llarp_ai_list *next = nullptr;
7 years ago
};
7 years ago
static std::list<llarp_ai> ai_list_to_std(struct llarp_ai_list *l) {
7 years ago
std::list<llarp_ai> list;
7 years ago
if (l && l->data) {
do {
7 years ago
llarp_ai copy;
memcpy(&copy, l->data, sizeof(llarp_ai));
list.push_back(copy);
l = l->next;
7 years ago
} while (l->next);
7 years ago
}
return list;
}
#endif