#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/base/address_tracker_linux_test_util.h"
#include <linux/if.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <stdint.h>
#include <string.h>
#include <vector>
#include "base/check_op.h"
#include "base/logging.h"
#include "net/base/ip_address.h"
bool operator==(const struct ifaddrmsg& lhs, const struct ifaddrmsg& rhs) { … }
namespace net::test {
NetlinkMessage::NetlinkMessage(uint16_t type) : … { … }
NetlinkMessage::~NetlinkMessage() = default;
void NetlinkMessage::AddPayload(const void* data, size_t length) { … }
void NetlinkMessage::AddAttribute(uint16_t type,
const void* data,
size_t length) { … }
void NetlinkMessage::AppendTo(NetlinkBuffer* output) const { … }
void NetlinkMessage::Append(const void* data, size_t length) { … }
void NetlinkMessage::Align() { … }
#define INFINITY_LIFE_TIME …
void MakeAddrMessageWithCacheInfo(uint16_t type,
uint8_t flags,
uint8_t family,
int index,
const IPAddress& address,
const IPAddress& local,
uint32_t preferred_lifetime,
NetlinkBuffer* output) { … }
void MakeAddrMessage(uint16_t type,
uint8_t flags,
uint8_t family,
int index,
const IPAddress& address,
const IPAddress& local,
NetlinkBuffer* output) { … }
void MakeLinkMessage(uint16_t type,
uint32_t flags,
uint32_t index,
NetlinkBuffer* output,
bool clear_output) { … }
void MakeWirelessLinkMessage(uint16_t type,
uint32_t flags,
uint32_t index,
NetlinkBuffer* output,
bool clear_output) { … }
}