TEST ONLY!

Committer:
AjK
Date:
Wed Nov 17 19:39:33 2010 +0000
Revision:
0:a3d41f923207
TEST ONLY!

Who changed what in which revision?

UserRevisionLine numberNew 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 #include "tlv_ttl.h"
AjK 0:a3d41f923207 24
AjK 0:a3d41f923207 25 int
AjK 0:a3d41f923207 26 tlv_ttl::copy(char *buf)
AjK 0:a3d41f923207 27 {
AjK 0:a3d41f923207 28 header.copy(buf);
AjK 0:a3d41f923207 29 buf[2] = (char)((ttl >> 8) & 0xFF);
AjK 0:a3d41f923207 30 buf[3] = (char)(ttl & 0xFF);
AjK 0:a3d41f923207 31 return header.getLength() + 2;
AjK 0:a3d41f923207 32 }