Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2006 Georgia Tech Research Corporation | 3 * Copyright (c) 2006 Georgia Tech Research Corporation |
4 * 2007 INRIA | 4 * 2007 INRIA |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
642 | 642 |
643 /** | 643 /** |
644 * \brief Manually set IP Type of Service field | 644 * \brief Manually set IP Type of Service field |
645 *· | 645 *· |
646 * This method corresponds to using setsockopt () IP_TOS of | 646 * This method corresponds to using setsockopt () IP_TOS of |
647 * real network or BSD sockets. This option is for IPv4 only. | 647 * real network or BSD sockets. This option is for IPv4 only. |
648 * Setting the IP TOS should also change the socket queueing | 648 * Setting the IP TOS should also change the socket queueing |
649 * priority as stated in the man page. However, socket priority | 649 * priority as stated in the man page. However, socket priority |
650 * is not yet supported. | 650 * is not yet supported. |
651 * | 651 * |
652 * RFC 1349 specifies the following encoding of TOS in IPv4 headers: | |
Tommaso Pecorella
2015/12/05 12:18:48
RFC 1349 is obsolete, please use RFC 2474.
Moreove
Tom Henderson
2015/12/28 22:57:08
I can paste in the RFC 2474 definition of this fie
Tommaso Pecorella
2015/12/29 15:23:13
The comment was more about the fact to refer to RF
| |
653 * | |
654 * 0 1 2 3 4 5 6 7 | |
655 * +-----+-----+-----+-----+-----+-----+-----+-----+ | |
656 * | PRECEDENCE | TOS | MBZ | | |
657 * +-----+-----+-----+-----+-----+-----+-----+-----+ | |
658 * | |
659 * The combination of precedence and Tos bits will be converted into | |
660 * an IPv4 or IPv6 DSCP value encoded in the IP header. The following | |
661 * conversion applies: | |
662 * DSCP decimal DSCP class TOS value decimal | |
663 * 0 CS0 (none) 0 | |
664 * 8 CS1 32 | |
665 * 10 AF11 40 | |
666 * 12 AF12 48 | |
667 * 14 AF13 56 | |
668 * 16 CS2 64 | |
669 * 18 AF21 72 | |
670 * 20 AF22 80· | |
671 * 22 AF23 88 | |
672 * 24 CS3 96 | |
673 * 26 AF31 104 | |
674 * 28 AF32 112 | |
675 * 30 AF33 120 | |
676 * 32 CS4 128 | |
677 * 34 AF41 136 | |
678 * 36 AF42 144 | |
679 * 38 AF43 152 | |
680 * 40 CS5 160 | |
681 * 46 EF 184 | |
682 * 48 CS6 192 | |
683 * 56 CS7 224 | |
684 * | |
685 * So to use this method, pass a TOS value from the above table as the | |
686 * parameter to this method; other values passed are undefined. | |
687 *· | |
652 * \param ipTos The desired TOS value for IP headers | 688 * \param ipTos The desired TOS value for IP headers |
653 */ | 689 */ |
654 void SetIpTos (uint8_t ipTos); | 690 void SetIpTos (uint8_t ipTos); |
655 | 691 |
656 /** | 692 /** |
657 * \brief Query the value of IP Type of Service of this socket | 693 * \brief Query the value of IP Type of Service of this socket |
658 * | 694 * |
659 * This method corresponds to using getsockopt () IP_TOS of real network | 695 * This method corresponds to using getsockopt () IP_TOS of real network |
660 * or BSD sockets. | 696 * or BSD sockets. |
661 * | 697 * |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1228 | 1264 |
1229 // inherited function, no need to doc. | 1265 // inherited function, no need to doc. |
1230 virtual void Print (std::ostream &os) const; | 1266 virtual void Print (std::ostream &os) const; |
1231 private: | 1267 private: |
1232 uint8_t m_ipv6Tclass; //!< the Tclass carried by the tag | 1268 uint8_t m_ipv6Tclass; //!< the Tclass carried by the tag |
1233 }; | 1269 }; |
1234 | 1270 |
1235 } // namespace ns3 | 1271 } // namespace ns3 |
1236 | 1272 |
1237 #endif /* NS3_SOCKET_H */ | 1273 #endif /* NS3_SOCKET_H */ |
OLD | NEW |