24#if FMT_VERSION >= 90000
25#include <fmt/ostream.h>
31#include <seastar/net/byteorder.hh>
42 std::copy(eaddr, eaddr + 6, mac.begin());
46 assert(eaddr.size() == mac.size());
47 std::copy(eaddr.begin(), eaddr.end(), mac.begin());
50 std::array<uint8_t, 6> mac;
52 template <
typename Adjuster>
53 void adjust_endianness(Adjuster)
noexcept {}
57 std::copy_n(p, size(),
reinterpret_cast<char*
>(ea.mac.data()));\
65 void write(
char* p)
const noexcept {
66 std::copy_n(
reinterpret_cast<const char*
>(mac.data()), size(), p);
68 void produce(
char*& p)
const noexcept {
72 static constexpr size_t size()
noexcept {
81 static address broadcast_address() {
82 return {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
84 static constexpr uint16_t arp_hardware_type() {
return 1; }
91 template <
typename Adjuster>
92 auto adjust_endianness(Adjuster a) {
102#if FMT_VERSION >= 90000
103template <>
struct fmt::formatter<
seastar::net::ethernet_address> : fmt::ostream_formatter {};
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
Definition: ethernet.hh:87
Definition: ethernet.hh:37
Definition: ethernet.hh:79
Definition: unaligned.hh:58