/usr/include/VTKEdge/vtkKWEUUID.h is in libvtkedge-dev 0.2.0~20110819-2.
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 | //=============================================================================
// This file is part of VTKEdge. See vtkedge.org for more information.
//
// Copyright (c) 2010 Kitware, Inc.
//
// VTKEdge may be used under the terms of the BSD License
// Please see the file Copyright.txt in the root directory of
// VTKEdge for further information.
//
// Alternatively, you may see:
//
// http://www.vtkedge.org/vtkedge/project/license.html
//
//
// For custom extensions, consulting services, or training for
// this or any other Kitware supported open source project, please
// contact Kitware at sales@kitware.com.
//
//
//=============================================================================
//
// Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
// l'Image). All rights reserved. See Doc/License.txt or
// http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notices for more information.
//
//=============================================================================
// .NAME vtkKWEUUID - (Static) Class for generating/constructing UUIDs
// .SECTION Description
// This class provides ability to "generate" (using system/platform calls) a
// UUID, as well as to "construct" a UUID from MAC address, hostname, and
// random number generation. The main Generate/Construct methods returns the
// uuid as binary, which can be converted to the 26 character string by calling
// ConvertBinaryUUIDToString.
// Note: The MAC address code comes from gdcm (see the copyright above).
#ifndef __vtkKWEUUID_h
#define __vtkKWEUUID_h
#include "vtkObject.h"
#include "VTKEdgeConfigure.h" // include configuration header
class VTKEdge_COMMON_EXPORT vtkKWEUUID : public vtkObject
{
public:
static vtkKWEUUID* New();
vtkTypeRevisionMacro(vtkKWEUUID, vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Generate a (binary) UUID using system/platform method call. Note, it may
// fail (return value -1), in which case you can call ConstructUUID.
static int GenerateUUID(unsigned char uuid[16]);
// Description:
// Construct a (binary) UUID from MAC address (if can successfully acquire),
// hostname, and random # generation. This fn is guaranteed to create an
// "uuid" (a semi-unique number) based on random # generation, regardless of
// whether the MAC address and/or hostname is obtained.
static void ConstructUUID(unsigned char uuid[16]);
// Description:
// Convert a (16-byte) binary UUID to its string form (in hexadecimal):
// XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
static void ConvertBinaryUUIDToString(unsigned char uuid[16],
vtkstd::string &uuidString);
// Description:
// Get the 6-byte binary MAC address. Returns -1 on failure.
static int GetMACAddress(unsigned char addr[6]);
protected:
vtkKWEUUID() {};
~vtkKWEUUID() {};
private:
vtkKWEUUID(const vtkKWEUUID&); // Not implemented.
void operator=(const vtkKWEUUID&); // Not implemented.
// the main (system specific) code for determining the MAC address
static int GetMacAddrSys(unsigned char *addr);
};
#endif
|