1 #ifndef SUBORDINATION_KERNEL_KERNELBUF_HH     2 #define SUBORDINATION_KERNEL_KERNELBUF_HH     6 #include <unistdx/base/packetbuf>     7 #include <unistdx/net/byte_order>    15         typedef Base base_type;
    16         using typename base_type::traits_type;
    17         using typename base_type::char_type;
    18         typedef uint32_t portable_size_type;
    20         typedef sys::basic_packetbuf<char_type,traits_type> good_base_type;
    27         typedef sys::bytes<portable_size_type, char_type> bytes_type;
    43             if (this->egptr() - this->gptr() >= this->header_size()) {
    44                 bytes_type size(this->gptr(), this->header_size());
    45                 size.to_host_format();
    46                 hs = this->header_size();
    47                 payload_size = size.value() - this->header_size();
    54         put_header()
 override {
    55             this->pbump(this->header_size());
    61             hdr.to_network_format();
    62             traits_type::copy(this->opacket_begin(), hdr.begin(), hdr.size());
    63             return this->header_size();
    68             return sizeof(portable_size_type);
    75 #endif // vim:filetype=cpp 
Definition: kernelbuf.hh:12