#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;
|
}
|
|
}
|