<commit_before>/*
 * Copyright (C) 2014 Cloudius Systems, Ltd.
 */

#ifndef ETHERNET_HH_
#define ETHERNET_HH_

#include <array>
#include "byteorder.hh"

namespace net {

using ethernet_address = std::array<uint8_t, 6>;

struct eth_hdr {
    ethernet_address dst_mac;
    ethernet_address src_mac;
    packed<uint16_t> eth_proto;
    template <typename Adjuster>
    auto adjust_endianness(Adjuster a) {
        return a(eth_proto);
    }
} __attribute__((packed));

}

#endif /* ETHERNET_HH_ */<commit_msg>Make ethernet_address its own type<commit_after>/*
 * Copyright (C) 2014 Cloudius Systems, Ltd.
 */

#ifndef ETHERNET_HH_
#define ETHERNET_HH_

#include <array>
#include "byteorder.hh"

namespace net {

struct ethernet_address {
    std::array<uint8_t, 6> mac;

    template <typename Adjuster>
    void adjust_endianness(Adjuster a) {}
} __attribute__((packed));


struct eth_hdr {
    ethernet_address dst_mac;
    ethernet_address src_mac;
    packed<uint16_t> eth_proto;
    template <typename Adjuster>
    auto adjust_endianness(Adjuster a) {
        return a(eth_proto);
    }
} __attribute__((packed));

}

#endif /* ETHERNET_HH_ */
{'fraction_non_alphanumeric': 0.1082024432809773, 'fraction_numerical': 0.013961605584642234, 'mean_word_length': 4.143497757847534, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1911482', 'n_tokens_mistral': 435, 'n_tokens_neox': 401, 'n_words': 92}