UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
sysdep.hpp
Go to the documentation of this file.
1#ifndef COMPA_SYSDEP_HPP
2#define COMPA_SYSDEP_HPP
3/*
4 * Copyright (C) 2022+ GPL 3 and higher by Ingo Höft, <Ingo@Hoeft-online.de>
5 * Redistribution only with this Copyright remark. Last modified: 2025-05-04
6 * Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
7 * Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
8 * Digital Equipment Corporation, Maynard, Mass.
9 * Copyright (c) 1998 Microsoft.
10 * To anyone who acknowledges that this file is provided "AS IS"
11 * without any express or implied warranty: permission to use, copy,
12 * modify, and distribute this file for any purpose is hereby
13 * granted without fee, provided that the above copyright notices and
14 * this notice appears in all source code copies, and that none of
15 * the names of Open Software Foundation, Inc., Hewlett-Packard
16 * Company, or Digital Equipment Corporation be used in advertising
17 * or publicity pertaining to distribution of the software without
18 * specific, written prior permission. Neither Open Software
19 * Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital Equipment
20 * Corporation makes any representations about the suitability of
21 * this software for any purpose.
22 */
23// Last compare with pupnp original source file on 2023-07-08, ver 1.14.17
24
31#include <UPnPsdk/pthread.hpp>
32
33/* change to point to where MD5.hpp's live */
34/* get MD5 sample implementation from RFC 1321 */
35#include <md5.hpp>
36
37#ifdef _WIN32
38/* Do not #include <sys/time.h> */
39#else
40#include <sys/time.h>
41#endif
42
45inline constexpr int UUIDS_PER_TICK{1024};
46
48typedef uint64_t uuid_time_t;
49
52 char nodeID[6];
53};
54
61
68void get_system_time(uuid_time_t* uuid_time);
69
71void get_random_info(unsigned char seed[16]);
72
73#endif /* COMPA_SYSDEP_HPP */
This code implements the MD5 message-digest algorithm.
Additional functions to manage Posix threads with C++ to be portable.
void get_random_info(unsigned char seed[16])
Get random information.
Definition sysdep.cpp:74
char nodeID[6]
node ID
Definition sysdep.hpp:52
void get_ieee_node_identifier(uuid_node_t *node)
System dependent call to get IEEE node identifier.
Definition sysdep.cpp:41
uint64_t uuid_time_t
UUID time.
Definition sysdep.hpp:48
void get_system_time(uuid_time_t *uuid_time)
System dependent call to get the current system time.
Definition sysdep.cpp:57
constexpr int UUIDS_PER_TICK
set the following to the number of 100ns ticks of the actual resolution of your system's clock
Definition sysdep.hpp:45
node ID
Definition sysdep.hpp:51