This file is indexed.

/usr/include/ns3.17/ns3/ipv6-header.h is in libns3-dev 3.17+dfsg-1build1.

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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2007-2008 Louis Pasteur University
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * 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, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
 */

#ifndef IPV6_HEADER_H
#define IPV6_HEADER_H

#include "ns3/header.h"
#include "ns3/ipv6-address.h"

namespace ns3 {

/**
 * \class Ipv6Header
 * \brief Packet header for IPv6
 */
class Ipv6Header : public Header
{
public:
  /**
   * \enum NextHeader_e
   * \brief IPv6 next-header value
   */
  enum NextHeader_e
  {
    IPV6_EXT_HOP_BY_HOP = 0,
    IPV6_IPV4 = 4,
    IPV6_TCP = 6,
    IPV6_UDP = 17,
    IPV6_IPV6 = 41,
    IPV6_EXT_ROUTING = 43,
    IPV6_EXT_FRAGMENTATION = 44,
    IPV6_EXT_CONFIDENTIALITY = 50,
    IPV6_EXT_AUTHENTIFICATION = 51,
    IPV6_ICMPV6 = 58,
    IPV6_EXT_END = 59,
    IPV6_EXT_DESTINATION = 60,
    IPV6_SCTP = 135,
    IPV6_EXT_MOBILITY = 135,
    IPV6_UDP_LITE = 136,
  };

  /**
   * \brief Get the type identifier.
   * \return type identifier
   */
  static TypeId GetTypeId (void);

  /**
   * \brief Return the instance type identifier.
   * \return instance type ID
   */
  virtual TypeId GetInstanceTypeId (void) const;

  /**
   * \brief Constructor.
   */
  Ipv6Header (void);

  /**
   * \brief Set the "Traffic class" field.
   * \param traffic the 8-bit value
   */
  void SetTrafficClass (uint8_t traffic);

  /**
   * \brief Get the "Traffic class" field.
   * \return the traffic value
   */
  uint8_t GetTrafficClass (void) const;

  /**
   * \brief Set the "Flow label" field.
   * \param flow the 20-bit value
   */
  void SetFlowLabel (uint32_t flow);

  /**
   * \brief Get the "Flow label" field.
   * \return the flow label value
   */
  uint32_t GetFlowLabel (void) const;

  /**
   * \brief Set the "Payload length" field.
   * \param len the length of the payload in bytes
   */
  void SetPayloadLength (uint16_t len);

  /**
   * \brief Get the "Payload length" field.
   * \return the payload length
   */
  uint16_t GetPayloadLength (void) const;

  /**
   * \brief Set the "Next header" field.
   * \param next the next header number
   */
  void SetNextHeader (uint8_t next);

  /**
   * \brief Get the next header.
   * \return the next header number
   */
  uint8_t GetNextHeader (void) const;

  /**
   * \brief Set the "Hop limit" field (TTL).
   * \param limit the 8-bit value
   */
  void SetHopLimit (uint8_t limit);

  /**
   * \brief Get the "Hop limit" field (TTL).
   * \return the hop limit value
   */
  uint8_t GetHopLimit (void) const;

  /**
   * \brief Set the "Source address" field.
   * \param src the source address
   */
  void SetSourceAddress (Ipv6Address src);

  /**
   * \brief Get the "Source address" field.
   * \return the source address
   */
  Ipv6Address GetSourceAddress (void) const;

  /**
   * \brief Set the "Destination address" field.
   * \param dst the destination address
   */
  void SetDestinationAddress (Ipv6Address dst);

  /**
   * \brief Get the "Destination address" field.
   * \return the destination address
   */
  Ipv6Address GetDestinationAddress (void) const;

  /**
   * \brief Print some informations about the packet.
   * \param os output stream
   * \return info about this packet
   */
  virtual void Print (std::ostream& os) const;

  /**
   * \brief Get the serialized size of the packet.
   * \return size
   */
  virtual uint32_t GetSerializedSize (void) const;

  /**
   * \brief Serialize the packet.
   * \param start Buffer iterator
   */
  virtual void Serialize (Buffer::Iterator start) const;

  /**
   * \brief Deserialize the packet.
   * \param start Buffer iterator
   * \return size of the packet
   */
  virtual uint32_t Deserialize (Buffer::Iterator start);

private:
  /**
   * \brief The version (always equal to 6).
   */
  uint32_t m_version : 4;
  /**
   * \brief The traffic class.
   */
  uint32_t m_trafficClass : 8;

  /**
   * \brief The flow label.
   * \note This is 20-bit value.
   */
  uint32_t m_flowLabel : 20;

  /**
   * \brief The payload length.
   */
  uint16_t m_payloadLength;

  /**
   * \brief The Next header number.
   */
  uint8_t m_nextHeader;

  /**
   * \brief The Hop limit value.
   */
  uint8_t m_hopLimit;

  /**
   * \brief The source address.
   */
  Ipv6Address m_sourceAddress;

  /**
   * \brief The destination address.
   */
  Ipv6Address m_destinationAddress;
};

} /* namespace ns3 */

#endif /* IPV6_HEADER_H */