This file is indexed.

/usr/include/uhd/transport/chdr.hpp is in libuhd-dev 3.9.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
//
// Copyright 2014 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//

#ifndef INCLUDED_UHD_TRANSPORT_CHDR_HPP
#define INCLUDED_UHD_TRANSPORT_CHDR_HPP

#include <uhd/transport/vrt_if_packet.hpp>

namespace uhd{ namespace transport{ namespace vrt{

/*! \brief CVITA/CHDR related function
 *
 * See \ref rtp_chdr for details on the CVITA/CHDR protocol.
 *
 * All packers take the host format into account. Choose the _le functions
 * if the transport uses little endian format (e.g. PCIe) and the _be
 * functions if the transport uses big endian format (e.g. Ethernet).
 *
 * Note 1: All packers assume there to be enough space at the address
 * provided by \p packet_buff. See also \ref vrt_pack_contract.
 *
 * Note 2: All these packers assume the following options without checking them:
 * - `if_packet_info.link_type == LINK_TYPE_CHDR`
 * - `if_packet_info.has_cid == false`
 * - `if_packet_info.has_sid == true`
 * - `if_packet_info.has_tsi == false`
 * - `if_packet_info.has_tlr == false`
 * This relaxes some of \ref vrt_pack_contract, but adds the additional
 * constraint that the input data must be CHDR.
 *
 * In the unpacker, these values will be set accordingly.
 */
namespace chdr{

    //! The maximum number of 64-bit words in a CVITA header
    static const size_t max_if_hdr_words64 = 2; // CHDR + tsf (fractional timestamp)

    /*!
     * Pack a CHDR header from metadata (big endian format).
     *
     * See \ref vrt_pack_contract, but `link_type` is assumed to be
     * `LINK_TYPE_CHDR`.
     *
     * \param packet_buff memory to write the packed vrt header
     * \param if_packet_info the if packet info (read/write)
     */
    UHD_API void if_hdr_pack_be(
        boost::uint32_t *packet_buff,
        if_packet_info_t &if_packet_info
    );

    /*!
     * Unpack a CHDR header to metadata (big endian format).
     *
     * See \ref vrt_unpack_contract, but `link_type` is assumed to be
     * `LINK_TYPE_CHDR`.
     *
     * \param packet_buff memory to read the packed vrt header
     * \param if_packet_info the if packet info (read/write)
     */
    UHD_API void if_hdr_unpack_be(
        const boost::uint32_t *packet_buff,
        if_packet_info_t &if_packet_info
    );

    /*!
     * Pack a CHDR header from metadata (little endian format).
     *
     * See \ref vrt_pack_contract, but `link_type` is assumed to be
     * `LINK_TYPE_CHDR`.
     *
     * \param packet_buff memory to write the packed vrt header
     * \param if_packet_info the if packet info (read/write)
     */
    UHD_API void if_hdr_pack_le(
        boost::uint32_t *packet_buff,
        if_packet_info_t &if_packet_info
    );

    /*!
     * Unpack a CHDR header to metadata (little endian format).
     *
     * See \ref vrt_unpack_contract, but `link_type` is assumed to be
     * `LINK_TYPE_CHDR`.
     *
     * \param packet_buff memory to read the packed vrt header
     * \param if_packet_info the if packet info (read/write)
     */
    UHD_API void if_hdr_unpack_le(
        const boost::uint32_t *packet_buff,
        if_packet_info_t &if_packet_info
    );

} //namespace chdr

}}} //namespace uhd::transport::vrt

#endif /* INCLUDED_UHD_TRANSPORT_CHDR_HPP */