open-license-manager
2014-10-13 bc33836f06e315005db152854ceaa199ed752820
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
#ifndef _GNU_SOURCE
#define _GNU_SOURCE     /* To get defns of NI_MAXSERV and NI_MAXHOST */
#endif
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/if_link.h>
#include <sys/socket.h>
#include <netpacket/packet.h>
 
#include <paths.h>
 
#include <stdlib.h>
#include <cstring>
#include <string>
#include <system_error>
#include <unistd.h>
#include <sstream>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include "../os-cpp.h"
#include "public-key.h"
 
#include <openssl/evp.h>
#include <openssl/bio.h>
#include <openssl/pem.h>
#include <openssl/err.h>
 
namespace license {
 
using namespace std;
 
 
 
 
 
VIRTUALIZATION getVirtualization() {
//http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
//
//bool rc = true;
    /*__asm__ (
     "push   %edx\n"
     "push   %ecx\n"
     "push   %ebx\n"
     "mov    %eax, 'VMXh'\n"
     "mov    %ebx, 0\n" // any value but not the MAGIC VALUE
     "mov    %ecx, 10\n"// get VMWare version
     "mov    %edx, 'VX'\n"// port number
     "in     %eax, dx\n"// read port on return EAX returns the VERSION
     "cmp    %ebx, 'VMXh'\n"// is it a reply from VMWare?
     "setz   [rc] \n"// set return value
     "pop    %ebx \n"
     "pop    %ecx \n"
     "pop    %edx \n"
     );*/
 
    return NONE;
}
 
}