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

32 lines
491 B
C++

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