TEST ONLY!
tlv_ttl.h@0:a3d41f923207, 2010-11-17 (annotated)
- Committer:
- AjK
- Date:
- Wed Nov 17 19:39:33 2010 +0000
- Revision:
- 0:a3d41f923207
TEST ONLY!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AjK | 0:a3d41f923207 | 1 | /* |
AjK | 0:a3d41f923207 | 2 | Copyright (c) 2010 Andy Kirkham |
AjK | 0:a3d41f923207 | 3 | |
AjK | 0:a3d41f923207 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy |
AjK | 0:a3d41f923207 | 5 | of this software and associated documentation files (the "Software"), to deal |
AjK | 0:a3d41f923207 | 6 | in the Software without restriction, including without limitation the rights |
AjK | 0:a3d41f923207 | 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
AjK | 0:a3d41f923207 | 8 | copies of the Software, and to permit persons to whom the Software is |
AjK | 0:a3d41f923207 | 9 | furnished to do so, subject to the following conditions: |
AjK | 0:a3d41f923207 | 10 | |
AjK | 0:a3d41f923207 | 11 | The above copyright notice and this permission notice shall be included in |
AjK | 0:a3d41f923207 | 12 | all copies or substantial portions of the Software. |
AjK | 0:a3d41f923207 | 13 | |
AjK | 0:a3d41f923207 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
AjK | 0:a3d41f923207 | 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
AjK | 0:a3d41f923207 | 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
AjK | 0:a3d41f923207 | 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
AjK | 0:a3d41f923207 | 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
AjK | 0:a3d41f923207 | 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
AjK | 0:a3d41f923207 | 20 | THE SOFTWARE. |
AjK | 0:a3d41f923207 | 21 | */ |
AjK | 0:a3d41f923207 | 22 | |
AjK | 0:a3d41f923207 | 23 | #ifndef TLV_TTL_H |
AjK | 0:a3d41f923207 | 24 | #define TLV_TTL_H |
AjK | 0:a3d41f923207 | 25 | |
AjK | 0:a3d41f923207 | 26 | #include "tlv.h" |
AjK | 0:a3d41f923207 | 27 | |
AjK | 0:a3d41f923207 | 28 | class tlv_ttl { |
AjK | 0:a3d41f923207 | 29 | public: |
AjK | 0:a3d41f923207 | 30 | tlv_header header; |
AjK | 0:a3d41f923207 | 31 | uint16_t ttl; |
AjK | 0:a3d41f923207 | 32 | tlv_ttl() { header.setType(3); header.setLength(2); ttl = 300; } |
AjK | 0:a3d41f923207 | 33 | |
AjK | 0:a3d41f923207 | 34 | void setTTL(int value) { ttl = (uint16_t)(value & 0xFFFF); } |
AjK | 0:a3d41f923207 | 35 | int copy (char *s); |
AjK | 0:a3d41f923207 | 36 | }; |
AjK | 0:a3d41f923207 | 37 | |
AjK | 0:a3d41f923207 | 38 | #endif |