Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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) 2011 Adrian Sai-wah Tam | 3 * Copyright (c) 2011 Adrian Sai-wah Tam |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 24 matching lines...) Expand all Loading... | |
35 { | 35 { |
36 public: | 36 public: |
37 TcpOption (); | 37 TcpOption (); |
38 virtual ~TcpOption (); | 38 virtual ~TcpOption (); |
39 | 39 |
40 static TypeId GetTypeId (void); | 40 static TypeId GetTypeId (void); |
41 virtual TypeId GetInstanceTypeId (void) const; | 41 virtual TypeId GetInstanceTypeId (void) const; |
42 | 42 |
43 enum Kind | 43 enum Kind |
44 { | 44 { |
45 END = 0, | 45 END = 0, |
46 NOP = 1, | 46 NOP = 1, |
47 MSS = 2, | 47 MSS = 2, |
48 WINSCALE = 3, | 48 WINSCALE = 3, |
49 SACK_PERM = 4, | 49 TS = 8 |
50 SACK = 5, | |
51 TS = 8, | |
52 SNACK = 21 | |
53 }; | |
54 | |
55 enum OptionKind | |
56 { | |
57 TCP_OPTION_END = 0, | |
58 TCP_OPTION_NOP = 1, | |
59 TCP_OPTION_MSS = 2, | |
60 TCP_OPTION_WINSCALE = 3, | |
61 TCP_OPTION_SACK_PERM = 4, | |
62 TCP_OPTION_SACK = 5, | |
63 TCP_OPTION_TS = 8, | |
64 TCP_OPTION_SNACK = 21 | |
65 }; | 50 }; |
Tommaso Pecorella
2014/08/17 10:38:13
"OptionKind" and "Kind" seems to be the same stuff
Tom Henderson
2014/08/26 16:52:29
I agree to remove one of these enums.
| |
66 | 51 |
67 virtual void Print (std::ostream &os) const = 0; | 52 virtual void Print (std::ostream &os) const = 0; |
68 virtual void Serialize (Buffer::Iterator start) const = 0; | 53 virtual void Serialize (Buffer::Iterator start) const = 0; |
69 virtual uint32_t Deserialize (Buffer::Iterator start) = 0; | 54 virtual uint32_t Deserialize (Buffer::Iterator start) = 0; |
70 | 55 |
71 virtual uint8_t GetKind (void) const = 0; // Get the `kind' (as in RFC793) of this option | 56 virtual uint8_t GetKind (void) const = 0; // Get the `kind' (as in RFC793) of this option |
72 virtual uint32_t GetSerializedSize (void) const = 0; // Get the total length o f this option, >= 1 | 57 virtual uint32_t GetSerializedSize (void) const = 0; // Get the total length o f this option, >= 1 |
73 | 58 |
74 static Ptr<TcpOption> CreateOption (uint8_t kind); // Factory method for all o ptions | 59 static Ptr<TcpOption> CreateOption (uint8_t kind); // Factory method for all o ptions |
60 static bool IsKindKnown (uint8_t kind); | |
75 }; | 61 }; |
76 | 62 |
77 } // namespace ns3 | 63 } // namespace ns3 |
78 | 64 |
79 #endif /* TCP_OPTION */ | 65 #endif /* TCP_OPTION */ |
LEFT | RIGHT |