1
0
mirror of https://github.com/Wind4/vlmcsd.git synced 2025-07-02 08:47:56 +08:00

7 Commits

Author SHA1 Message Date
936811ff5c vlmcsd-svn1085-2016-10-21-Hotbird64 2016-10-24 21:32:24 +08:00
798675dc66 vlmcsd-svn1065-2016-10-12-Hotbird64 2016-10-14 13:28:23 +08:00
d413afbadf vlmcsd-svn1031-2016-10-06-Hotbird64 2016-10-08 13:35:48 +08:00
0b2c216c06 vlmcsd-svn1016-2016-09-16-Hotbird64 2016-09-18 11:30:46 +08:00
213ac7d870 vlmcsd-svn1006-2016-09-03-Hotbird64 2016-09-04 22:03:54 +08:00
032d201234 vlmcsd-svn1003-2016-08-27-Hotbird64 2016-08-31 11:50:33 +08:00
9099d5aa69 vlmcsd-svn998-2016-08-11-Hotbird64 2016-08-15 18:35:59 +08:00
609 changed files with 79184 additions and 9024 deletions

View File

@ -1,32 +1,19 @@
################################################################################
.NOTPARALLEL:
.PHONY: clean
MAX_THREADS ?= 16
PROGRAM_NAME ?= vlmcsd
CLIENT_NAME ?= vlmcs
MULTI_NAME ?= vlmcsdmulti
OBJ_NAME ?= libkms-static.o
A_NAME ?= libkms.a
CONFIG ?= config.h
COMPILER_LANGUAGE ?= c
PROGRAM_NAME ?= bin/vlmcsd
CLIENT_NAME ?= bin/vlmcs
MULTI_NAME ?= bin/vlmcsdmulti
OBJ_NAME ?= build/libkms-static.o
A_NAME ?= lib/libkms.a
# crypto library to use for standard algos, could save ~1-2kb ;)
# can be either 'openssl', 'polarssl' or anything other for internal impl
CRYPTO ?= internal
BASE_PROGRAM_NAME=$(notdir $(PROGRAM_NAME))
BASE_CLIENT_NAME=$(notdir $(CLIENT_NAME))
BASE_MULTI_NAME=$(notdir $(MULTI_NAME))
BASE_DLL_NAME=$(notdir $(DLL_NAME))
BASE_A_NAME=$(notdir $(A_NAME))
# use DNS_PARSER=internal if your OS doesn't supply the DNS parser routines
DNS_PARSER ?= OS
# You should supply your own version string here
VLMCSD_VERSION ?= $(shell test -d .svn && echo svn`svnversion`)
FEATURES ?= full
VERBOSE ?= NO
################################################################################
CC ?= gcc
TARGETPLATFORM := $(shell LANG=en_US.UTF-8 $(CC) -v 2>&1 | grep '^Target: ' | cut -f 2 -d ' ')
ifneq (,$(findstring darwin,$(TARGETPLATFORM)))
@ -106,490 +93,62 @@ endif
endif
ifeq ($(CYGWIN),1)
DLL_NAME ?= cygkms.dll
DLL_NAME ?= lib/cygkms.dll
else ifeq ($(WIN),1)
DLL_NAME ?= libkms.dll
DLL_NAME ?= lib/libkms.dll
else ifeq ($(DARWIN),1)
DLL_NAME ?= libkms.dylib
DLL_NAME ?= lib/libkms.dylib
else
DLL_NAME ?= libkms.so
DLL_NAME ?= lib/libkms.so
endif
BASECFLAGS = -DVLMCSD_COMPILER=\"$(notdir $(CC))\" -DVLMCSD_PLATFORM=\"$(TARGETPLATFORM)\" -DCONFIG=\"$(CONFIG)\" -DBUILD_TIME=$(shell date '+%s') -g -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
BASELDFLAGS =
STRIPFLAGS =
CLIENTLDFLAGS =
SERVERLDFLAGS =
.DEFAULT:
+@(test -d bin || mkdir bin) & (test -d lib || mkdir lib) & (test -d build || mkdir build)
+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
ifndef SAFE_MODE
BASECFLAGS += -fvisibility=hidden -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants
ifeq ($(ELF),1)
BASELDFLAGS += -Wl,-z,norelro
endif
ifneq (,$(findstring gcc,$(notdir $(CC))))
BASECFLAGS += -flto
endif
endif
ifeq ($(NOLIBS),1)
NOLRESOLV=1
NOLPTHREAD=1
endif
ifneq ($(NOLIBS),1)
ifeq ($(MINGW),1)
BASELDFLAGS += -lws2_32 -liphlpapi
endif
endif
ifneq ($(NO_DNS),1)
ifneq ($(ANDROID),1)
ifneq ($(NOLRESOLV),1)
ifeq ($(MINGW),1)
CLIENTLDFLAGS += -ldnsapi
endif
ifeq ($(LINUX),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(HURD),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(DARWIN),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(CYGWIN),1)
DNS_PARSER := internal
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(OPENBSD),1)
DNS_PARSER := internal
endif
ifeq ($(SOLARIS),1)
CLIENTLDFLAGS += -lresolv
endif
endif
endif
else
BASECFLAGS += -DNO_DNS
endif
ifneq ($(CAT),2)
BASECFLAGS += "-Wall"
endif
ifeq ($(DARWIN), 1)
STRIPFLAGS += -Wl,-S -Wl,-x
BASECFLAGS += -Wno-deprecated-declarations
else ifeq ($(shell uname), SunOS)
STRIPFLAGS += -s
ifeq ($(notdir $(LD_ALTEXEC)),gld)
BASELDFLAGS += -Wl,--gc-sections
endif
BASELDFLAGS += -lsocket
else
ifneq ($(CC),tcc)
BASELDFLAGS += -Wl,--gc-sections
endif
STRIPFLAGS += -s
endif
LIBRARY_CFLAGS = -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT
ifeq ($(FEATURES), embedded)
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_BASIC_PRODUCT_LIST -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), autostart)
BASECFLAGS += -DNO_HELP -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), minimum)
BASECFLAGS += $(LIBRARY_CFLAGS)
else ifeq ($(FEATURES), most)
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
else ifeq ($(FEATURES), inetd)
BASECFLAGS += -DNO_SIGHUP -DNO_SOCKETS -DNO_PID_FILE -DNO_LIMIT -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), fixedepids)
BASECFLAGS += -DNO_SIGHUP -DNO_CL_PIDS -DNO_RANDOM_EPID -DNO_INI_FILE
endif
ifdef INI
BASECFLAGS += -DINI_FILE=\"$(INI)\"
endif
ifeq ($(NO_GETIFADDRS), 1)
BASECFLAGS += -DNO_GETIFADDRS
endif
ifeq ($(THREADS), 1)
BASECFLAGS += -DUSE_THREADS
endif
ifeq ($(CHILD_HANDLER), 1)
BASECFLAGS += -DCHILD_HANDLER
endif
ifeq ($(NO_TIMEOUT), 1)
BASECFLAGS += -DNO_TIMEOUT
endif
ifdef WINDOWS
BASECFLAGS += -DEPID_WINDOWS=\"$(WINDOWS)\"
endif
ifdef OFFICE2010
BASECFLAGS += -DEPID_OFFICE2010=\"$(OFFICE2010)\"
endif
ifdef OFFICE2013
BASECFLAGS += -DEPID_OFFICE2013=\"$(OFFICE2013)\"
endif
ifdef HWID
BASECFLAGS += -DHWID=$(HWID)
endif
ifdef TERMINAL_WIDTH
BASECFLAGS += -DTERMINAL_FIXED_WIDTH=$(TERMINAL_WIDTH) -DDISPLAY_WIDTH=\"$(TERMINAL_WIDTH)\"
endif
ifeq ($(NOPROCFS), 1)
BASECFLAGS += -DNO_PROCFS
endif
ifeq ($(AUXV), 1)
BASECFLAGS += -DUSE_AUXV
endif
ifneq ($(ANDROID), 1)
ifneq ($(MINIX), 1)
ifneq ($(NOLPTHREAD), 1)
ifeq ($(THREADS), 1)
SERVERLDFLAGS += -lpthread
endif
ifeq (,$(findstring NO_LIMIT,$(CFLAGS) $(BASECFLAGS)))
SERVERLDFLAGS += -lpthread
endif
endif
endif
endif
$(MULTI_NAME): BASECFLAGS += -DMULTI_CALL_BINARY=1
all: $(CLIENT_NAME) $(PROGRAM_NAME)
#ifdef CAT
allmulti: $(CLIENT_NAME) $(PROGRAM_NAME) $(MULTI_NAME)
#endif
ifneq ($(strip $(VLMCSD_VERSION)),)
BASECFLAGS += -DVERSION=\"$(VLMCSD_VERSION),\ built\ $(shell date -u '+%Y-%m-%d %H:%M:%S' | sed -e 's/ /\\ /g')\ UTC\"
endif
ifdef CAT
BASECFLAGS += -DONE_FILE
endif
SRCS = crypto.c kms.c endian.c output.c shared_globals.c helpers.c
HEADERS = $(CONFIG) types.h rpc.h vlmcsd.h endian.h crypto.h kms.h network.h output.h shared_globals.h vlmcs.h helpers.h
DEPS = $(MULTI_SRCS:.c=.d)
VLMCSD_SRCS = vlmcsd.c $(SRCS)
VLMCSD_OBJS = $(VLMCSD_SRCS:.c=.o)
VLMCS_SRCS = vlmcs.c $(SRCS)
VLMCS_OBJS = $(VLMCS_SRCS:.c=.o)
MULTI_SRCS = vlmcsd.c vlmcs.c vlmcsdmulti.c $(SRCS)
MULTI_OBJS = $(SRCS:.c=.o) vlmcsd-m.o vlmcs-m.o vlmcsdmulti-m.o
DLL_SRCS = libkms.c $(SRCS)
DLL_OBJS = $(DLL_SRCS:.c=.o)
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf vlmcsd-floppy.7.pdf
HTMLDOCS = $(PDFDOCS:.pdf=.html)
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
ifneq ($(NO_DNS),1)
VLMCS_SRCS += dns_srv.c
MULTI_SRCS += dns_srv.c
MULTI_OBJS += dns_srv.o
ifeq ($(DNS_PARSER),internal)
ifneq ($(MINGW),1)
VLMCS_SRCS += ns_parse.c ns_name.c
MULTI_SRCS += ns_parse.c ns_name.c
MULTI_OBJS += ns_parse.o ns_name.o
BASECFLAGS += "-DDNS_PARSER_INTERNAL"
endif
endif
endif
ifeq ($(MSRPC),1)
VLMCSD_SRCS += msrpc-server.c
VLMCS_SRCS += msrpc-client.c
MULTI_SRCS += msrpc-server.c msrpc-client.c
MULTI_OBJS += msrpc-server-m.o msrpc-client-m.o
DLL_SRCS += msrpc-server.c
BASECFLAGS += -DUSE_MSRPC -Wno-unknown-pragmas
BASELDFLAGS += -lrpcrt4
else
SRCS += network.c rpc.c
endif
ifeq ($(GETIFADDRS),musl)
ifneq ($(NO_GETIFADDRS),1)
BASECFLAGS += -DGETIFADDRS_MUSL
VLMCSD_SRCS += getifaddrs-musl.c
MULTI_SRCS += getifaddrs-musl.c
VLMCS_SRCS += getifaddrs-musl.c
DLL_SRCS += getifaddrs-musl.c
MULTI_OBJS += getifaddrs-musl.o
endif
endif
ifeq ($(ANDROID),1)
ifneq ($(NO_GETIFADDRS),1)
VLMCSD_SRCS += ifaddrs-android.c
MULTI_SRCS += ifaddrs-android.c
DLL_SRCS += ifaddrs-android.c
MULTI_OBJS += ifaddrs-android.o
endif
endif
ifeq "$(WIN)" "1"
VLMCSD_SRCS += ntservice.c
MULTI_SRCS += ntservice.c
MULTI_OBJS += ntservice.o
endif
ifeq ($(CRYPTO), openssl_with_aes)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl_with_aes_soft)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL -D_OPENSSL_SOFTWARE
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl)
BASECFLAGS += -D_CRYPTO_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), polarssl)
BASECFLAGS += -D_CRYPTO_POLARSSL
BASELDFLAGS += -lpolarssl
else ifeq ($(CRYPTO), windows)
BASECFLAGS += -D_CRYPTO_WINDOWS
SRCS += crypto_windows.c
else
BASECFLAGS += -D_CRYPTO_INTERNAL
SRCS += crypto_internal.c
endif
ifneq ($(STRIP),0)
BASELDFLAGS += $(STRIPFLAGS)
endif
ifeq ($(OPENSSL_HMAC),0)
BASECFLAGS += -D_OPENSSL_NO_HMAC
endif
ifeq ($(DEPENDENCIES),2)
BASECFLAGS += -MMD
endif
ifeq ($(VERBOSE),3)
COMPILER := $(shell printf "%-40s" $(notdir $(CC)))
ARCHIVER := $(shell printf "%-40s" $(notdir $(AR)))
endif
ARCMD := AR
ifdef CAT
LDCMD := CC/LD
else
LDCMD := LD
endif
-include $(MULTI_SRCS:.c=.d)
%.o: %.c
ifeq ($(VERBOSE),1)
$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
ifeq ($(DEPENDENCIES),1)
$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
endif
else
@echo "$(COMPILER) CC $@ <- $<"
@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
ifeq ($(DEPENDENCIES),1)
@echo "$(COMPILER) DEP $*.d <- $<"
@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
endif
endif
%-m.o: %.c
ifeq ($(VERBOSE),1)
$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
endif
else
@echo "$(COMPILER) CC $@ <- $<"
@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
@echo "$(COMPILER) DEP $*.d <- $<"
@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
endif
endif
ifdef CAT
BUILDCOMMAND = cat $^ | $(CC) -x$(COMPILER_LANGUAGE) -o $@ -
VLMCSD_PREREQUISITES = $(VLMCSD_SRCS)
VLMCS_PREREQUISITES = $(VLMCS_SRCS)
MULTI_PREREQUISITES = $(MULTI_SRCS)
DLL_PREREQUISITES = $(DLL_SRCS)
OBJ_PREREQUISITES = $(DLL_SRCS)
else
BUILDCOMMAND = $(CC) -o $@ $^
VLMCSD_PREREQUISITES = $(VLMCSD_OBJS)
VLMCS_PREREQUISITES = $(VLMCS_OBJS)
MULTI_PREREQUISITES = $(MULTI_OBJS)
DLL_PREREQUISITES = $(DLL_OBJS)
OBJ_PREREQUISITES = $(DLL_OBJS)
endif
ifeq ($(VERBOSE),1)
BUILDCOMMANDPREFIX = +
else
BUILDCOMMANDPREFIX = +@
endif
INFOCOMMAND = +@echo "$(COMPILER) $(LDCMD) $@ <- $^"
ARINFOCOMMAND = +@echo "$(ARCHIVER) $(ARCMD) $@ <. $^"
VLMCSD_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS)
VLMCS_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS)
MULTI_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS) $(SERVERLDFLAGS)
DLL_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -shared -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
OBJ_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
$(PROGRAM_NAME): $(VLMCSD_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(VLMCSD_COMMAND)
$(CLIENT_NAME): $(VLMCS_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(VLMCS_COMMAND)
$(MULTI_NAME): $(MULTI_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(MULTI_COMMAND)
$(DLL_NAME): $(DLL_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(DLL_COMMAND)
ifndef CAT
$(OBJ_NAME):
+@echo Cannot make $@ without CAT defined. Please create $(A_NAME)
else
$(OBJ_NAME): $(OBJ_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(OBJ_COMMAND)
endif
ifdef CAT
$(A_NAME): $(OBJ_NAME)
else
$(A_NAME): BASECFLAGS += -fvisibility=hidden -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
$(A_NAME): $(DLL_OBJS)
endif
ifneq ($(VERBOSE),1)
$(ARINFOCOMMAND)
endif
+@rm -f $@
$(BUILDCOMMANDPREFIX)$(AR) rcs $@ $^
%.pdf : %
ifeq ($(shell uname), Darwin)
groff -Tps -mandoc -c $< | pstopdf -i -o $@
else
groff -Tpdf -mandoc -c $< > $@
endif
%.html : %
groff -Thtml -mandoc -c $< > $@
%.unix.txt : %
groff -P -c -Tutf8 -mandoc -c $< | col -bx > $@
%.dos.txt : %.unix.txt
# unix2dos -n $< $@
# sed -e 's/$$/\r/' $< > $@
awk 'sub("$$", "\r")' $< > $@
pdfdocs : $(PDFDOCS)
dosdocs : $(DOSDOCS)
unixdocs : $(UNIXDOCS)
htmldocs : $(HTMLDOCS)
alldocs : $(UNIXDOCS) $(HTMLDOCS) $(PDFDOCS) $(DOSDOCS)
all:
+@(test -d bin || mkdir bin) & (test -d lib || mkdir lib) & (test -d build || mkdir build)
+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
clean:
rm -f *.o *.d *_all.c libkms_all_*.c $(PROGRAM_NAME) $(MULTI_NAME) $(DLL_NAME) $(CLIENT_NAME) $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS) $(OBJ_NAME) $(A_NAME) *.a
+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
+@$(MAKE) -j$(MAX_THREADS) -C man $@
dnsclean:
rm -f dns_srv.o
alldocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
dosdocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
unixdocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
htmldocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
pdfdocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
GNUmakefile:
help:
@echo "Type"
@echo " ${MAKE} - to build $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo " ${MAKE} clean - to remove $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo " ${MAKE} help - to see this help"
@echo " ${MAKE} pdfdocs - Create PDF versions of the documentation (Requires groff with PDF support)."
@echo " ${MAKE} htmldocs - Create HTML versions of the documentation."
@echo " ${MAKE} unixdocs - Create Unix TXT versions of the documentation."
@echo " ${MAKE} dosdocs - Create DOS/Windows TXT versions of the documentation."
@echo " ${MAKE} alldocs - Create all versions of the documentation."
@echo " ${MAKE} -j <x> - Use <x> parallel tasks (SMP support) when compiling $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo ""
@echo " ${MAKE} $(PROGRAM_NAME) - to build the server only."
@echo " ${MAKE} $(CLIENT_NAME) - to build the client only."
@echo " ${MAKE} $(MULTI_NAME) - to build $(PROGRAM_NAME) and $(CLIENT_NAME) in a single multi-call binary"
@echo " ${MAKE} $(DLL_NAME) - to build the shared library $(DLL_NAME)"
@echo " ${MAKE} $(A_NAME) - to build the static library $(A_NAME)"
@echo " ${MAKE} - to build $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME)"
@echo " ${MAKE} clean - to remove all targets and temporary files"
@echo " ${MAKE} pdfdocs - Create PDF versions of the documentation (Requires groff with PDF support)."
@echo " ${MAKE} htmldocs - Create HTML versions of the documentation."
@echo " ${MAKE} unixdocs - Create Unix TXT versions of the documentation."
@echo " ${MAKE} dosdocs - Create DOS/Windows TXT versions of the documentation."
@echo " ${MAKE} alldocs - Create all versions of the documentation."
@echo " ${MAKE} vlmcsd - to build KMS server $(PROGRAM_NAME)"
@echo " ${MAKE} vlmcs - to build KMS client $(CLIENT_NAME)"
@echo " ${MAKE} vlmcsdmulti - to build $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME) in a single multi-call binary $(MULTI_NAME)"
@echo " ${MAKE} libkms - to build the shared library $(DLL_NAME)"
@echo " ${MAKE} libkms-static - to build the static library $(A_NAME)"
@echo ""
@echo "Options"
@echo " CONFIG=<x> Compile <x> as instead of config.h."
@echo " INI=<x> Compile $(PROGRAM_NAME) with default ini file <x>"
@echo " INI=<x> Compile $(BASE_PROGRAM_NAME) with default ini file <x>"
@echo " PROGRAM_NAME=<x> Use <x> as output file name for the KMS server. Defaults to vlmcsd."
@echo " CLIENT_NAME=<x> Use <x> as output file name for the KMS client. Defaults to vlmcs."
@echo " MULTI_NAME=<x> Use <x> as output file name for the multi-call binary. Defaults to vlmcsdmulti."
@ -601,7 +160,7 @@ help:
@echo " CRYPTO=windows Use Windows CryptoAPI instead of internal crypto code for SHA256/HMAC calculations."
@echo " MSRPC=1 Use Microsoft RPC instead of vlmcsd's internal RPC. Only works with Windows and Cygwin targets."
@echo " CC=<x> Use compiler <x>. Supported compilers are gcc, icc, tcc and clang. Others may or may not work."
@echo " AR=<x> Use <x> instead of ar to build $(A_NAME). Set to gcc-ar if you want to use gcc's LTO feature."
@echo " AR=<x> Use <x> instead of ar to build $(BASE_A_NAME). Set to gcc-ar if you want to use gcc's LTO feature."
@echo " COMPILER_LANGUAGE=<x> May be c or c++."
@echo " TERMINAL_WIDTH=<x> Assume a fixed terminal width of <x> columns. Use in case of problems only."
@echo " VLMCSD_VERSION=<x> Sets <x> as your version identifier. Defaults to \"private build\"."
@ -610,25 +169,27 @@ help:
@echo " PLATFORMFLAGS=<x> Pass <x> as additional arguments to the compiler and the linker."
@echo " BASECFLAGS=<x> Pass only <x> as arguments to the compiler (advanced users only)."
@echo " BASELDFLAGS=<x> Pass only <x> as arguments to the linker (advanced users only)."
@echo " STRIP=0 Don't strip debug information from $(PROGRAM_NAME) and $(CLIENT_NAME) (for developers)."
@echo " STRIP=0 Don't strip debug information from $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME) (for developers)."
@echo " VERBOSE=1 Be verbose when making targets."
@echo " VERBOSE=3 Show name of compiler."
@echo " THREADS=1 Use threads instead of fork(). Automatically set for native Windows. Recommended for Cygwin."
@echo " WINDOWS=<x> Use <x> as the default ePID for Windows (when using $(PROGRAM_NAME) with -r 0)."
@echo " OFFICE2010=<x> Use <x> as the default ePID for Office2010 (when using $(PROGRAM_NAME) with -r 0)."
@echo " OFFICE2013=<x> Use <x> as the default ePID for Office2013 (when using $(PROGRAM_NAME) with -r 0)."
@echo " WINDOWS=<x> Use <x> as the default ePID for Windows (when using $(BASE_PROGRAM_NAME) with -r 0)."
@echo " OFFICE2010=<x> Use <x> as the default ePID for Office2010 (when using $(BASE_PROGRAM_NAME) with -r 0)."
@echo " OFFICE2013=<x> Use <x> as the default ePID for Office2013 (when using $(BASE_PROGRAM_NAME) with -r 0)."
@echo " OFFICE2016=<x> Use <x> as the default ePID for Office2016 (when using $(BASE_PROGRAM_NAME) with -r 0)."
@echo " HWID=<x> Use <x> as the default HWID (when it can't be found in an ini file)."
@echo " FEATURES=full Compile $(PROGRAM_NAME) with all features (default)."
@echo " FEATURES=most Compile $(PROGRAM_NAME) without rarely used features."
@echo " FEATURES=embedded Compile $(PROGRAM_NAME) with typical features for embedded systems."
@echo " FEATURES=autostart Removes features typically not needed if you place $(PROGRAM_NAME) in an autostart script."
@echo " FEATURES=inetd Compile $(PROGRAM_NAME) for running through an internet superserver only."
@echo " FEATURES=minimum Compiles only basic features of $(PROGRAM_NAME)."
@echo " FEATURES=fixedepids $(PROGRAM_NAME) only uses bultin internal ePIDs."
@echo " FEATURES=full Compile $(BASE_PROGRAM_NAME) with all features (default)."
@echo " FEATURES=most Compile $(BASE_PROGRAM_NAME) without rarely used features."
@echo " FEATURES=embedded Compile $(BASE_PROGRAM_NAME) with typical features for embedded systems."
@echo " FEATURES=autostart Removes features typically not needed if you place $(BASE_PROGRAM_NAME) in an autostart script."
@echo " FEATURES=inetd Compile $(BASE_PROGRAM_NAME) for running through an internet superserver only."
@echo " FEATURES=minimum Compiles only basic features of $(BASE_PROGRAM_NAME)."
@echo " FEATURES=fixedepids $(BASE_PROGRAM_NAME) only uses bultin internal ePIDs."
@echo ""
@echo "Useful CFLAGS to save memory when running $(PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=)"
@echo "Useful CFLAGS to save memory when running $(BASE_PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=)"
@echo " -DNO_EXTENDED_PRODUCT_LIST Don't compile the detailed product list."
@echo " -DNO_BASIC_PRODUCT_LIST Don't compile the basic product list."
@echo " -DNO_STRICT_MODES Don't support enhanced emulator detection prevention."
@echo " -DNO_VERBOSE_LOG Don't support verbose logging. Removes -v option."
@echo " -DNO_LOG Don't add support for logging. Implies -DNO_VERBOSE_LOG -DNO_EXTENDED_PRODUCT_LIST and -DNO_BASIC_PRODUCT_LIST."
@echo " -DNO_RANDOM_EPID Don't support random ePIDs."
@ -638,13 +199,16 @@ help:
@echo " -DNO_HELP Don't support command line help."
@echo " -DNO_CUSTOM_INTERVALS Don't support custom intervals for retry and refresh activation. Removes -A and -R options."
@echo " -DNO_FREEBIND Don't support binding to foreign IP addresses. Removes -F0 and -F1 options. Only affects FreeBSD and Linux."
@echo " -DSIMPLE_SOCKETS Compile $(PROGRAM_NAME) with basic socket support only. Removes -L option."
@echo " -DNO_SOCKETS Don't support standalone operation. Requires an internet superserver to start $(PROGRAM_NAME)."
@echo " -DNO_CL_PIDS Don't support specifying ePIDs and HwId from the command line in $(PROGRAM_NAME)."
@echo " -DNO_LIMIT Don't support limiting concurrent clients in $(PROGRAM_NAME)."
@echo " -DNO_SIGHUP Don't support SIGHUP handling in $(PROGRAM_NAME)."
@echo " -DNO_VERSION_INFORMATION Don't support displaying version information in $(PROGRAM_NAME) and $(CLIENT_NAME). Removes -V option."
@echo " -DNO_PRIVATE_IP_DETECT Don't support protection against clients with public IP addresses in $(PROGRAM_NAME)"
@echo " -DNO_SOCKETS Don't support standalone operation. Requires an internet superserver to start $(BASE_PROGRAM_NAME)."
@echo " -DSIMPLE_SOCKETS Don't support listening on explicit IP addresses. Always listens on all IP addresses."
@echo " -DSIMPLE_RPC Don't support RPC with NDR64 and BTFN in $(BASE_PROGRAM_NAME) (but do in $(BASE_CLIENT_NAME)). Makes emulator detection easy."
@echo " -DNO_CL_PIDS Don't support specifying ePIDs and HwId from the command line in $(BASE_PROGRAM_NAME)."
@echo " -DNO_LIMIT Don't support limiting concurrent clients in $(BASE_PROGRAM_NAME)."
@echo " -DNO_SIGHUP Don't support SIGHUP handling in $(BASE_PROGRAM_NAME)."
@echo " -DNO_VERSION_INFORMATION Don't support displaying version information in $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME). Removes -V option."
@echo " -DNO_PRIVATE_IP_DETECT Don't support protection against clients with public IP addresses in $(BASE_PROGRAM_NAME)"
@echo " -DSIMPLE_SOCKETS Compile $(BASE_PROGRAM_NAME) with basic socket support only. Removes -L option."
@echo " -DSMALL_AES Use a smaller (saves about 200 bytes) but slower implementation of AES."
@echo ""
@echo "Troubleshooting options"
@echo " CAT=1 Combine all sources in a single in-memory file and compile directly to target."
@ -656,17 +220,14 @@ help:
@echo " OPENSSL_HMAC=0 Compile for openssl versions that don't have HMAC support (required on some embedded devices)."
@echo " NO_TIMEOUT=1 Do not set timeouts for sockets (for systems that don't support it)."
@echo " CHILD_HANDLER=1 Install a handler for SIGCHLD (for systems that don't support SA_NOCLDWAIT)."
@echo " NO_DNS=1 Compile $(CLIENT_NAME) without support for detecting KMS servers via DNS."
@echo " NO_GETIFADDRS=1 Compile $(PROGRAM_NAME) without using getifaddrs()."
@echo " GETIFADDRS=musl Compile $(PROGRAM_NAME) with its own implementation of getifaddrs() based on musl."
@echo " DNS_PARSER=internal Use $(CLIENT_NAME) internal DNS parsing routines. No effect on MingW (native Windows)."
@echo " NO_DNS=1 Compile $(BASE_CLIENT_NAME) without support for detecting KMS servers via DNS."
@echo " NO_GETIFADDRS=1 Compile $(BASE_PROGRAM_NAME) without using getifaddrs()."
@echo " GETIFADDRS=musl Compile $(BASE_PROGRAM_NAME) with its own implementation of getifaddrs() based on musl."
@echo " DNS_PARSER=internal Use $(BASE_CLIENT_NAME) internal DNS parsing routines. No effect on MingW (native Windows)."
@echo ""
@echo "Other useful CFLAGS"
@echo " -DSUPPORT_WINE Add code that the Windows version of $(PROGRAM_NAME) runs on Wine if MSRPC=1"
@echo " -DSUPPORT_WINE Add code that the Windows version of $(BASE_PROGRAM_NAME) runs on Wine if MSRPC=1"
@echo " -D_PEDANTIC Report rare error/warning conditions instead of silently ignoring them."
@echo " -DINCLUDE_BETAS Include SKU / activation IDs for obsolete beta/preview products."
@echo " -DFD_SETSIZE=<x> Allow <x> -L statements in $(PROGRAM_NAME) (default: 64 on Windows, 1024 on most Unixes)."
@echo " -flto Use link time optimization. Not supported by old compilers (gcc < 4.7). Use whenever supported."
@echo " -flto=jobserver Utilize all CPUs during link time optimization. Requires ${MAKE} -j <cpus>"
@echo " -fno-stack-protector No stack checking. Smaller binaries."
@echo " -pipe Use pipes instead of temporary files (faster compilation, extends the life of your SSD)."
@echo " -DFD_SETSIZE=<x> Allow <x> -L statements in $(BASE_PROGRAM_NAME) (default: 64 on Windows, 1024 on most Unixes)."

7
README
View File

@ -1,13 +1,14 @@
To view the documentation cd to the directory containing the distribution
files and type
man ./vlmcsd.8
man man/vlmcsd.8
to see documentation for vlmcsd
man ./vlmcs.1
man man/vlmcs.1
to see documentation for vlmcs
man ./vlmcsd.7
man man/vlmcsd.7
to see general documentation for kms
If you don't have man, you may also use the .txt, .html and .pdf files
in the man directory

View File

@ -0,0 +1,239 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2A0FC04D-C3C0-43E2-8812-53AE901C5395}</ProjectGuid>
<RootNamespace>vlmcsdmulti-Windows</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>libkms-Windows</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)..\bin\</OutDir>
<TargetName>libkms32</TargetName>
<GenerateManifest>false</GenerateManifest>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)..\bin\</OutDir>
<TargetName>libkms64</TargetName>
<GenerateManifest>false</GenerateManifest>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
<TargetName>$(ProjectName)64</TargetName>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<TargetExt>.dll</TargetExt>
<TargetName>$(ProjectName)32</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>_USING_V110_SDK71_;_MBCS;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC;SIMPLE_SOCKETS;NO_TIMEOUT;NO_SIGHUP;NO_CL_PIDS;NO_EXTENDED_PRODUCT_LIST;NO_BASIC_PRODUCT_LIST;NO_LOG;NO_RANDOM_EPID;NO_INI_FILE;NO_HELP;NO_CUSTOM_INTERVALS;NO_PID_FILE;NO_USER_SWITCH;NO_VERBOSE_LOG;NO_LIMIT;NO_VERSION_INFORMATION;NO_PRIVATE_IP_DETECT;IS_LIBRARY=1</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>NotSet</SubSystem>
<MinimumRequiredVersion />
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC;SIMPLE_SOCKETS;NO_TIMEOUT;NO_SIGHUP;NO_CL_PIDS;NO_EXTENDED_PRODUCT_LIST;NO_BASIC_PRODUCT_LIST;NO_LOG;NO_RANDOM_EPID;NO_INI_FILE;NO_HELP;NO_CUSTOM_INTERVALS;NO_PID_FILE;NO_USER_SWITCH;NO_VERBOSE_LOG;NO_LIMIT;NO_VERSION_INFORMATION;NO_PRIVATE_IP_DETECT;IS_LIBRARY=1</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>NotSet</SubSystem>
<MinimumRequiredVersion />
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<CallingConvention>Cdecl</CallingConvention>
<DebugInformationFormat>None</DebugInformationFormat>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointExceptions>false</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;SIMPLE_SOCKETS;NO_TIMEOUT;NO_SIGHUP;NO_CL_PIDS;NO_EXTENDED_PRODUCT_LIST;NO_BASIC_PRODUCT_LIST;NO_LOG;NO_RANDOM_EPID;NO_INI_FILE;NO_HELP;NO_CUSTOM_INTERVALS;NO_PID_FILE;NO_USER_SWITCH;NO_VERBOSE_LOG;NO_LIMIT;NO_VERSION_INFORMATION;NO_PRIVATE_IP_DETECT;IS_LIBRARY=1</PreprocessorDefinitions>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)\msvcrt.lib;Shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>NotSet</SubSystem>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<LargeAddressAware>true</LargeAddressAware>
<TerminalServerAware>
</TerminalServerAware>
<SwapRunFromCD>true</SwapRunFromCD>
<SwapRunFromNET>true</SwapRunFromNET>
<MinimumRequiredVersion />
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;SIMPLE_SOCKETS;NO_TIMEOUT;NO_SIGHUP;NO_CL_PIDS;NO_EXTENDED_PRODUCT_LIST;NO_BASIC_PRODUCT_LIST;NO_LOG;NO_RANDOM_EPID;NO_INI_FILE;NO_HELP;NO_CUSTOM_INTERVALS;NO_PID_FILE;NO_USER_SWITCH;NO_VERBOSE_LOG;NO_LIMIT;NO_VERSION_INFORMATION;NO_PRIVATE_IP_DETECT;IS_LIBRARY=1</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<TreatWarningAsError>false</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointExceptions>false</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)\msvcrt64.lib;Shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>NotSet</SubSystem>
<LargeAddressAware>true</LargeAddressAware>
<TerminalServerAware>
</TerminalServerAware>
<SwapRunFromCD>true</SwapRunFromCD>
<SwapRunFromNET>true</SwapRunFromNET>
<MinimumRequiredVersion />
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\crypto.c" />
<ClCompile Include="..\..\src\crypto_windows.c" />
<ClCompile Include="..\..\src\endian.c" />
<ClCompile Include="..\..\src\helpers.c" />
<ClCompile Include="..\..\src\kms.c" />
<ClCompile Include="..\..\src\libkms.c" />
<ClCompile Include="..\..\src\network.c" />
<ClCompile Include="..\..\src\output.c" />
<ClCompile Include="..\..\src\rpc.c" />
<ClCompile Include="..\..\src\shared_globals.c" />
<ClCompile Include="..\..\src\vlmcs.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\config.h" />
<ClInclude Include="..\..\src\crypto.h" />
<ClInclude Include="..\..\src\crypto_windows.h" />
<ClInclude Include="..\..\src\endian.h" />
<ClInclude Include="..\..\src\helpers.h" />
<ClInclude Include="..\..\src\kms.h" />
<ClInclude Include="..\..\src\libkms.h" />
<ClInclude Include="..\..\src\network.h" />
<ClInclude Include="..\..\src\output.h" />
<ClInclude Include="..\..\src\rpc.h" />
<ClInclude Include="..\..\src\shared_globals.h" />
<ClInclude Include="..\..\src\types.h" />
<ClInclude Include="..\..\src\vlmcs.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\crypto.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\crypto_windows.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\endian.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\helpers.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\kms.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\network.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\output.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\rpc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\shared_globals.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\vlmcs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\libkms.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto_windows.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\endian.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\helpers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\kms.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\network.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\output.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\rpc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\shared_globals.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\vlmcs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\libkms.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

BIN
VisualStudio/msvcrt.lib Executable file

Binary file not shown.

BIN
VisualStudio/msvcrt64.lib Executable file

Binary file not shown.

View File

@ -0,0 +1,230 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}</ProjectGuid>
<RootNamespace>vlmcs-Windows</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>vlmcs-Windows</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)..\bin\</OutDir>
<TargetName>vlmcs-Windows-x86</TargetName>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)..\bin\</OutDir>
<TargetName>vlmcs-Windows-x64</TargetName>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>_USING_V110_SDK71_;_MBCS;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<CallingConvention>Cdecl</CallingConvention>
<DebugInformationFormat>None</DebugInformationFormat>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointExceptions>false</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions);_CRYPTO_WINDOWS</PreprocessorDefinitions>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)\msvcrt.lib;Shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<LargeAddressAware>true</LargeAddressAware>
<TerminalServerAware>true</TerminalServerAware>
<SwapRunFromCD>true</SwapRunFromCD>
<SwapRunFromNET>true</SwapRunFromNET>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<TreatWarningAsError>false</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointExceptions>false</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)\msvcrt64.lib;Shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<LargeAddressAware>true</LargeAddressAware>
<TerminalServerAware>true</TerminalServerAware>
<SwapRunFromCD>true</SwapRunFromCD>
<SwapRunFromNET>true</SwapRunFromNET>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\crypto.c" />
<ClCompile Include="..\..\src\crypto_windows.c" />
<ClCompile Include="..\..\src\dns_srv.c" />
<ClCompile Include="..\..\src\endian.c" />
<ClCompile Include="..\..\src\helpers.c" />
<ClCompile Include="..\..\src\kms.c" />
<ClCompile Include="..\..\src\network.c" />
<ClCompile Include="..\..\src\output.c" />
<ClCompile Include="..\..\src\rpc.c" />
<ClCompile Include="..\..\src\shared_globals.c" />
<ClCompile Include="..\..\src\vlmcs.c" />
<ClCompile Include="..\..\src\wingetopt.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\config.h" />
<ClInclude Include="..\..\src\crypto.h" />
<ClInclude Include="..\..\src\crypto_internal.h" />
<ClInclude Include="..\..\src\crypto_windows.h" />
<ClInclude Include="..\..\src\dns_srv.h" />
<ClInclude Include="..\..\src\endian.h" />
<ClInclude Include="..\..\src\helpers.h" />
<ClInclude Include="..\..\src\kms.h" />
<ClInclude Include="..\..\src\network.h" />
<ClInclude Include="..\..\src\output.h" />
<ClInclude Include="..\..\src\rpc.h" />
<ClInclude Include="..\..\src\shared_globals.h" />
<ClInclude Include="..\..\src\types.h" />
<ClInclude Include="..\..\src\vlmcs.h" />
<ClInclude Include="..\..\src\wingetopt.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\crypto.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\crypto_windows.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\dns_srv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\endian.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\helpers.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\kms.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\network.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\output.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\rpc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\shared_globals.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\vlmcs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\wingetopt.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto_internal.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto_windows.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\dns_srv.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\endian.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\helpers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\kms.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\network.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\output.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\rpc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\shared_globals.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\vlmcs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\wingetopt.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

100
VisualStudio/vlmcsd.sln Executable file
View File

@ -0,0 +1,100 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vlmcsd-Windows", "vlmcsd\vlmcsd.vcxproj", "{918B4F5B-6356-451E-998C-5FCB29988170}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vlmcs-Windows", "vlmcs\vlmcs.vcxproj", "{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vlmcsdmulti-Windows", "vlmcsdmulti\vlmcsdmulti.vcxproj", "{7F07671D-1432-43E9-9D72-08435F216B5E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libkms-Windows", "libkms\libkms.vcxproj", "{2A0FC04D-C3C0-43E2-8812-53AE901C5395}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vlmcsd-gcc5", "..\src\vlmcsd-linux-remote.vcxproj", "{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vlmcs-gcc5", "..\src\vlmcs-linux-remote.vcxproj", "{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
publish|x64 = publish|x64
publish|x86 = publish|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{918B4F5B-6356-451E-998C-5FCB29988170}.Debug|x64.ActiveCfg = Debug|x64
{918B4F5B-6356-451E-998C-5FCB29988170}.Debug|x64.Build.0 = Debug|x64
{918B4F5B-6356-451E-998C-5FCB29988170}.Debug|x86.ActiveCfg = Debug|Win32
{918B4F5B-6356-451E-998C-5FCB29988170}.Debug|x86.Build.0 = Debug|Win32
{918B4F5B-6356-451E-998C-5FCB29988170}.publish|x64.ActiveCfg = Release|x64
{918B4F5B-6356-451E-998C-5FCB29988170}.publish|x64.Build.0 = Release|x64
{918B4F5B-6356-451E-998C-5FCB29988170}.publish|x86.ActiveCfg = Release|Win32
{918B4F5B-6356-451E-998C-5FCB29988170}.publish|x86.Build.0 = Release|Win32
{918B4F5B-6356-451E-998C-5FCB29988170}.Release|x64.ActiveCfg = Release|x64
{918B4F5B-6356-451E-998C-5FCB29988170}.Release|x64.Build.0 = Release|x64
{918B4F5B-6356-451E-998C-5FCB29988170}.Release|x86.ActiveCfg = Release|Win32
{918B4F5B-6356-451E-998C-5FCB29988170}.Release|x86.Build.0 = Release|Win32
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.Debug|x64.ActiveCfg = Debug|x64
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.Debug|x64.Build.0 = Debug|x64
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.Debug|x86.ActiveCfg = Debug|Win32
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.Debug|x86.Build.0 = Debug|Win32
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.publish|x64.ActiveCfg = Release|x64
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.publish|x64.Build.0 = Release|x64
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.publish|x86.ActiveCfg = Release|Win32
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.publish|x86.Build.0 = Release|Win32
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.Release|x64.ActiveCfg = Release|x64
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.Release|x64.Build.0 = Release|x64
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.Release|x86.ActiveCfg = Release|Win32
{2B3F305D-6351-4F4A-A7F2-1F9B1988CDEE}.Release|x86.Build.0 = Release|Win32
{7F07671D-1432-43E9-9D72-08435F216B5E}.Debug|x64.ActiveCfg = Debug|x64
{7F07671D-1432-43E9-9D72-08435F216B5E}.Debug|x64.Build.0 = Debug|x64
{7F07671D-1432-43E9-9D72-08435F216B5E}.Debug|x86.ActiveCfg = Debug|Win32
{7F07671D-1432-43E9-9D72-08435F216B5E}.Debug|x86.Build.0 = Debug|Win32
{7F07671D-1432-43E9-9D72-08435F216B5E}.publish|x64.ActiveCfg = Release|x64
{7F07671D-1432-43E9-9D72-08435F216B5E}.publish|x64.Build.0 = Release|x64
{7F07671D-1432-43E9-9D72-08435F216B5E}.publish|x86.ActiveCfg = Release|Win32
{7F07671D-1432-43E9-9D72-08435F216B5E}.publish|x86.Build.0 = Release|Win32
{7F07671D-1432-43E9-9D72-08435F216B5E}.Release|x64.ActiveCfg = Release|x64
{7F07671D-1432-43E9-9D72-08435F216B5E}.Release|x64.Build.0 = Release|x64
{7F07671D-1432-43E9-9D72-08435F216B5E}.Release|x86.ActiveCfg = Release|Win32
{7F07671D-1432-43E9-9D72-08435F216B5E}.Release|x86.Build.0 = Release|Win32
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.Debug|x64.ActiveCfg = Debug|x64
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.Debug|x64.Build.0 = Debug|x64
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.Debug|x86.ActiveCfg = Debug|Win32
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.Debug|x86.Build.0 = Debug|Win32
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.publish|x64.ActiveCfg = Release|x64
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.publish|x64.Build.0 = Release|x64
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.publish|x86.ActiveCfg = Release|Win32
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.publish|x86.Build.0 = Release|Win32
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.Release|x64.ActiveCfg = Release|x64
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.Release|x64.Build.0 = Release|x64
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.Release|x86.ActiveCfg = Release|Win32
{2A0FC04D-C3C0-43E2-8812-53AE901C5395}.Release|x86.Build.0 = Release|Win32
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.Debug|x64.ActiveCfg = Debug|x64
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.Debug|x64.Build.0 = Debug|x64
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.Debug|x86.ActiveCfg = Debug|x86
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.Debug|x86.Build.0 = Debug|x86
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.publish|x64.ActiveCfg = Release|x64
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.publish|x86.ActiveCfg = Release|x86
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.Release|x64.ActiveCfg = Release|x64
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.Release|x64.Build.0 = Release|x64
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.Release|x86.ActiveCfg = Release|x86
{CC2FBE0B-B9DF-4306-88A1-20706BBD2B0C}.Release|x86.Build.0 = Release|x86
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.Debug|x64.ActiveCfg = Debug|x64
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.Debug|x64.Build.0 = Debug|x64
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.Debug|x86.ActiveCfg = Debug|x86
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.Debug|x86.Build.0 = Debug|x86
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.publish|x64.ActiveCfg = Release|x64
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.publish|x86.ActiveCfg = Release|x86
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.Release|x64.ActiveCfg = Release|x64
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.Release|x64.Build.0 = Release|x64
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.Release|x86.ActiveCfg = Release|x86
{1ED83566-8AE1-4EE8-9B62-37188A7AC7CA}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,234 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{918B4F5B-6356-451E-998C-5FCB29988170}</ProjectGuid>
<RootNamespace>vlmcsd-Windows</RootNamespace>
<WindowsTargetPlatformVersion>
</WindowsTargetPlatformVersion>
<ProjectName>vlmcsd-Windows</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateManifest>false</GenerateManifest>
<OutDir>$(SolutionDir)..\bin\</OutDir>
<TargetName>vlmcsd-Windows-x64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
<TargetName>vlmcsd-Windows-x86</TargetName>
<OutDir>$(SolutionDir)..\bin\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>Iphlpapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>Iphlpapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<ControlFlowGuard>false</ControlFlowGuard>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<CallingConvention>Cdecl</CallingConvention>
<CompileAs>Default</CompileAs>
<DebugInformationFormat>None</DebugInformationFormat>
<CompileAsManaged>false</CompileAsManaged>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointExceptions>false</FloatingPointExceptions>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWarningAsError>false</TreatWarningAsError>
<PreprocessorDefinitions>_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions);_CRYPTO_WINDOWS</PreprocessorDefinitions>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>$(SolutionDir)\msvcrt.lib;Iphlpapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile />
<LargeAddressAware>true</LargeAddressAware>
<TerminalServerAware>true</TerminalServerAware>
<SwapRunFromCD>true</SwapRunFromCD>
<SwapRunFromNET>true</SwapRunFromNET>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<DebugInformationFormat>None</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<ControlFlowGuard>false</ControlFlowGuard>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<CompileAsManaged>false</CompileAsManaged>
<TreatWarningAsError>false</TreatWarningAsError>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>$(SolutionDir)\msvcrt64.lib;Iphlpapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<ProgramDatabaseFile />
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
<TerminalServerAware>true</TerminalServerAware>
<SwapRunFromCD>true</SwapRunFromCD>
<SwapRunFromNET>true</SwapRunFromNET>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\src\config.h" />
<ClInclude Include="..\..\src\crypto.h" />
<ClInclude Include="..\..\src\crypto_internal.h" />
<ClInclude Include="..\..\src\crypto_windows.h" />
<ClInclude Include="..\..\src\endian.h" />
<ClInclude Include="..\..\src\helpers.h" />
<ClInclude Include="..\..\src\kms.h" />
<ClInclude Include="..\..\src\network.h" />
<ClInclude Include="..\..\src\ntservice.h" />
<ClInclude Include="..\..\src\output.h" />
<ClInclude Include="..\..\src\rpc.h" />
<ClInclude Include="..\..\src\shared_globals.h" />
<ClInclude Include="..\..\src\types.h" />
<ClInclude Include="..\..\src\vlmcsd.h" />
<ClInclude Include="..\..\src\wingetopt.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\crypto.c" />
<ClCompile Include="..\..\src\crypto_windows.c" />
<ClCompile Include="..\..\src\endian.c" />
<ClCompile Include="..\..\src\helpers.c" />
<ClCompile Include="..\..\src\kms.c" />
<ClCompile Include="..\..\src\network.c" />
<ClCompile Include="..\..\src\ntservice.c" />
<ClCompile Include="..\..\src\output.c" />
<ClCompile Include="..\..\src\rpc.c" />
<ClCompile Include="..\..\src\shared_globals.c" />
<ClCompile Include="..\..\src\vlmcsd.c" />
<ClCompile Include="..\..\src\wingetopt.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto_internal.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto_windows.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\endian.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\helpers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\kms.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\network.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ntservice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\output.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\rpc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\shared_globals.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\vlmcsd.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\wingetopt.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\crypto.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\crypto_windows.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\endian.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\helpers.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\kms.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\network.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ntservice.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\output.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\rpc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\shared_globals.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\vlmcsd.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\wingetopt.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7F07671D-1432-43E9-9D72-08435F216B5E}</ProjectGuid>
<RootNamespace>vlmcsdmulti-Windows</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>vlmcsdmulti-Windows</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)..\bin\</OutDir>
<TargetName>vlmcsdmulti-Windows-x86</TargetName>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)..\bin\</OutDir>
<TargetName>vlmcsdmulti-Windows-x64</TargetName>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>_USING_V110_SDK71_;_MBCS;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC;MULTI_CALL_BINARY=1</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC;MULTI_CALL_BINARY=1</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<CallingConvention>Cdecl</CallingConvention>
<DebugInformationFormat>None</DebugInformationFormat>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointExceptions>false</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;MULTI_CALL_BINARY=1</PreprocessorDefinitions>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)\msvcrt.lib;Shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<LargeAddressAware>true</LargeAddressAware>
<TerminalServerAware>true</TerminalServerAware>
<SwapRunFromCD>true</SwapRunFromCD>
<SwapRunFromNET>true</SwapRunFromNET>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;MULTI_CALL_BINARY=1</PreprocessorDefinitions>
<DebugInformationFormat>None</DebugInformationFormat>
<TreatWarningAsError>false</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<FloatingPointExceptions>false</FloatingPointExceptions>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)\msvcrt64.lib;Shlwapi.lib;Iphlpapi.lib;Dnsapi.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<LargeAddressAware>true</LargeAddressAware>
<TerminalServerAware>true</TerminalServerAware>
<SwapRunFromCD>true</SwapRunFromCD>
<SwapRunFromNET>true</SwapRunFromNET>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\crypto.c" />
<ClCompile Include="..\..\src\crypto_windows.c" />
<ClCompile Include="..\..\src\dns_srv.c" />
<ClCompile Include="..\..\src\endian.c" />
<ClCompile Include="..\..\src\helpers.c" />
<ClCompile Include="..\..\src\kms.c" />
<ClCompile Include="..\..\src\network.c" />
<ClCompile Include="..\..\src\ntservice.c" />
<ClCompile Include="..\..\src\output.c" />
<ClCompile Include="..\..\src\rpc.c" />
<ClCompile Include="..\..\src\shared_globals.c" />
<ClCompile Include="..\..\src\vlmcs.c" />
<ClCompile Include="..\..\src\vlmcsd.c" />
<ClCompile Include="..\..\src\vlmcsdmulti.c" />
<ClCompile Include="..\..\src\wingetopt.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\config.h" />
<ClInclude Include="..\..\src\crypto.h" />
<ClInclude Include="..\..\src\crypto_windows.h" />
<ClInclude Include="..\..\src\dns_srv.h" />
<ClInclude Include="..\..\src\endian.h" />
<ClInclude Include="..\..\src\helpers.h" />
<ClInclude Include="..\..\src\kms.h" />
<ClInclude Include="..\..\src\network.h" />
<ClInclude Include="..\..\src\ntservice.h" />
<ClInclude Include="..\..\src\output.h" />
<ClInclude Include="..\..\src\rpc.h" />
<ClInclude Include="..\..\src\shared_globals.h" />
<ClInclude Include="..\..\src\types.h" />
<ClInclude Include="..\..\src\vlmcs.h" />
<ClInclude Include="..\..\src\vlmcsd.h" />
<ClInclude Include="..\..\src\wingetopt.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\crypto.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\crypto_windows.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\dns_srv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\endian.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\helpers.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\kms.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\network.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\output.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\rpc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\shared_globals.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\vlmcs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\wingetopt.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ntservice.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\vlmcsd.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\vlmcsdmulti.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\crypto_windows.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\dns_srv.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\endian.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\helpers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\kms.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\network.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\output.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\rpc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\shared_globals.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\vlmcs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\wingetopt.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ntservice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\vlmcsd.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -12,13 +12,16 @@
#
# Set ePID/HwId for Windows explicitly
;55c92734-d682-4d71-983e-d6ec3f16059f = 06401-00206-271-392041-03-1033-9600.0000-3622014 / 01 02 03 04 05 06 07 08
;Windows = 06401-00206-471-111111-03-1033-9600.0000-3622014 / 01 02 03 04 05 06 07 08
# Set ePID for Office 2010 (including Visio and Project) explicitly
;59a52881-a989-479d-af46-f275c6370663 = 06401-00096-199-496023-03-1033-9600.0000-3622014
;Office2010 = 06401-00096-199-222222-03-1033-9600.0000-3622014
# Set ePID for Office 2013 (including Visio and Project) explicitly
;0ff1ce15-a989-479d-af46-f275c6370663 = 06401-00206-234-409313-03-1033-9600.0000-3622014
# Set ePID/HwId for Office 2013 (including Visio and Project) explicitly
;Office2013 = 06401-00206-234-333333-03-1033-9600.0000-3622014 / 01 02 03 04 05 06 07 08
# Set ePID/HwId for Office 2016 (including Visio and Project) explicitly
;Office2016 = 06401-00206-437-444444-03-1033-9600.0000-3622014 / 01 02 03 04 05 06 07 08
# Use custom TCP port
# Command line: -P
@ -79,6 +82,14 @@
# Command line: -v and -q
;LogVerbose = true
# Whitelist known products
# Command line: -K0, -K1, -K2, -K3
;WhiteListingLevel = 0
# Check that the client time is within +/- 4 hours of the system time
# Command Line: -c0, -c1
;CheckClientTime = false
# Set activation interval to 2 hours
# Command line: -A
;ActivationInterval = 2h

View File

@ -1,11 +1,16 @@
#!/usr/local/bin/bash
export VLMCSD_VERSION="svn`svnversion`"
cd "$( dirname "$0" )"
gmake -C .. clean
cd ../src
BINDIR="../bin"
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-Dragon* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
@ -14,11 +19,11 @@ CF45="-static-libgcc -pipe -fno-common -fno-exceptions -fno-stack-protector -fno
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-Wl,-z,norelro -Wl,--hash-style=sysv -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=sysv"
export CC=gcc5
export CC=gcc6
gmake $MAKEFLAGS MULTI_NAME=vlmcsdmulti-DragonFly-x64 PROGRAM_NAME=vlmcsd-DragonFly-x64 CLIENT_NAME=vlmcs-DragonFly-x64 CFLAGS="$CF" LDFLAGS="$LF" allmulti
gmake $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-DragonFly-x64 PROGRAM_NAME=$BINDIR/vlmcsd-DragonFly-x64 CLIENT_NAME=$BINDIR/vlmcs-DragonFly-x64 CFLAGS="$CF" LDFLAGS="$LF" allmulti
rm *.o
cd $BINDIR
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*

View File

@ -0,0 +1,45 @@
#!/usr/local/bin/bash
export VLMCSD_VERSION="svn`svnversion`"
export VERBOSE=3
export DNS_PARSER=OS
cd "$( dirname "$0" )"
gmake -C .. clean
cd ../src
VERSION="$(uname -r | sed -e 's/-.*//')"
MAKE="gmake"
BINDIR="../bin"
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
CF="-flto=12 -static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=gnu"
$MAKE $MAKEFLAGS allmulti CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x64-gcc CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64-gcc PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-gcc CC=gcc6 CFLAGS="$CF" LDFLAGS="$LF"
$MAKE $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x64 CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64 PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF" allmulti
$MAKE $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x86 CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86 PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
$MAKE $MAKEFLAGS allmulti CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x86-gcc CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86-gcc PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-gcc CC=gcc6 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
$MAKE $MAKEFLAGS CAT=2 vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-threads-gcc THREADS=1 CC=gcc6 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
$MAKE $MAKEFLAGS vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
$MAKE $MAKEFLAGS vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
$MAKE $MAKEFLAGS CAT=2 vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-threads-gcc THREADS=1 CC=gcc6 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
$MAKE $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF"
$MAKE $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
cd ../bin
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
sudo cp -af vlmcsd-FreeBSD-$VERSION-x64-gcc /usr/local/sbin/vlmcsd
sudo cp -af vlmcs-FreeBSD-$VERSION-x64-gcc /usr/local/bin/vlmcs
# Copy everything to distribution server
scp -p * root@ubuntu64:x/binaries/FreeBSD/intel/

View File

@ -1,10 +1,15 @@
#!/bin/bash
export VLMCSD_VERSION="svn`svnversion`"
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-hurd* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
cd "$( dirname "$0" )"
make -C .. clean
BINDIR="../bin"
MANDIR="../man"
cd ../src
MAKEFLAGS="-B -j1"
@ -12,15 +17,17 @@ export CC=gcc
CF="-flto=jobserver -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-fuse-ld=gold -lresolv -Wl,-z,norelro,--hash-style=gnu,--build-id=none"
make $MAKEFLAGS MULTI_NAME=vlmcsdmulti-hurd-x86-glibc vlmcsdmulti-hurd-x86-glibc PROGRAM_NAME=vlmcsd-hurd-x86-glibc CLIENT_NAME=vlmcs-hurd-x86-glibc CFLAGS="$CF" LDFLAGS="$LF" allmulti
make $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-hurd-x86-glibc PROGRAM_NAME=$BINDIR/vlmcsd-hurd-x86-glibc CLIENT_NAME=$BINDIR/vlmcs-hurd-x86-glibc CFLAGS="$CF" LDFLAGS="$LF" allmulti
make clean
cd $BINDIR
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
cp -af vlmcsd-hurd-x86-glibc /usr/local/sbin/vlmcsd
cp -af vlmcs-hurd-x86-glibc /usr/local/bin/vlmcs
cd $MANDIR
# Copy man pages
mkdir -p /usr/local/man/man1 2>/dev/null
mkdir -p /usr/local/man/man5 2>/dev/null
@ -29,9 +36,12 @@ mkdir -p /usr/local/man/man7 2>/dev/null
cp -af vlmcs.1 vlmcsdmulti.1 /usr/local/man/man1/
cp -af vlmcsd.7 /usr/local/man/man7/
cp -af vlmcsd.8 /usr/local/man/man8/
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
cp -af vlmcsd.ini.5 /usr/local/man/man5/
bzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
# Copy everything to distribution server
scp -p vlmcsdmulti-* vlmcsd-hurd* vlmcs-* root@ubuntu64.internal:x/binaries/Hurd/intel/
cd $BINDIR
# Copy everything to distribution server
scp -p * root@ubuntu64.internal:x/binaries/Hurd/intel/

View File

@ -1,10 +1,15 @@
#!/bin/bash
export VLMCSD_VERSION="svn`svnversion`"
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-Free* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
cd "$( dirname "$0" )"
make -C .. clean
BINDIR="../bin"
MANDIR="../man"
cd ../src
MAKEFLAGS="-B -j`nproc`"
@ -12,22 +17,26 @@ export CC=gcc
CF="-flto=jobserver -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-lresolv -Wl,-z,norelro,--hash-style=gnu,--build-id=none"
export PROGRAM_NAME=vlmcsd-FreeBSD-10.1-x64-glibc
export CLIENT_NAME=vlmcs-FreeBSD-10.1-x64-glibc
export MULTI_NAME=vlmcsdmulti-FreeBSD-10.1-x64-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-10.1-x64-glibc
export CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-10.1-x64-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-10.1-x64-glibc
make $MAKEFLAGS CFLAGS="$CF -m64" LDFLAGS="$LF" CAT=2 allmulti
cp -af $PROGRAM_NAME /usr/local/sbin/vlmcsd
cp -af $CLIENT_NAME /usr/local/bin/vlmcs
export PROGRAM_NAME=vlmcsd-FreeBSD-10.1-x86-glibc
export CLIENT_NAME=vlmcs-FreeBSD-10.1-x86-glibc
export MULTI_NAME=vlmcsdmulti-FreeBSD-10.1-x86-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-10.1-x86-glibc
export CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-10.1-x86-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-10.1-x86-glibc
make $MAKEFLAGS CFLAGS="$CF -m32" LDFLAGS="$LF" CAT=2 allmulti
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
cd $BINDIR
sstrip -z *
cd $MANDIR
# Copy man pages
mkdir -p /usr/local/man/man1 2>/dev/null
@ -40,6 +49,8 @@ cp -af vlmcsd.8 /usr/local/man/man8/
cp -af vlmcsd.ini.5 /usr/local/man/man5/
bzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
# Copy everything to distribution server
scp -p vlmcsdmulti-* vlmcsd-Free* vlmcs-* root@ubuntu64.internal:x/binaries/FreeBSD/intel/
cd $BINDIR
# Copy everything to distribution server
scp -p * root@ubuntu64.internal:x/binaries/FreeBSD/intel/

File diff suppressed because it is too large Load Diff

27
hotbird64-mass-build/make_minix Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
cd ~/vlmcsd/hotbird64-mass-build
export VLMCSD_VERSION=svn$(ssh root@ubuntu64.internal "cd x; svnversion")
scp -p make_minix root@ubuntu64.internal:x/hotbird64-mass-build
scp -pr root@ubuntu64.internal:x/* ..
BINDIR="bin"
cd ..
# Compile vlmcsd binaries for Minix 3
SUFFIX=-minix-$(uname -r)-x86
export CC=clang
export CFLAGS="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
export LDFLAGS="-Wl,--hash-style=sysv -Wl,-z,norelro -Wl,--build-id=none"
export PROGRAM_NAME=$BINDIR/vlmcsd$SUFFIX
export CLIENT_NAME=$BINDIR/vlmcs$SUFFIX
export MULTI_NAME=$BINDIR/vlmcsdmulti$SUFFIX
gmake clean
gmake -B allmulti
#strip -s --strip-unneeded --remove-section .eh_frame_hdr --remove-section .eh_frame --remove-section .ident --remove-section .note.minix.ident --remove-section .note.netbsd.pax --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag $BINDIR/*$SUFFIX
scp -p $BINDIR/* root@ubuntu64.internal:x/binaries/Minix/intel/

View File

@ -1,10 +1,16 @@
#!/bin/bash
export VLMCSD_VERSION="svn`svnversion`"
SMALLCC="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
SMALLLD="-pipe -Wl,--hash-style=sysv -Wl,-z,norelro -Wl,--build-id=none"
SMALL="$SMALLCC $SMALLLD"
rm -f vlmcsd vlmcs vlmcsdmulti vlmcsd-s390* vlmcsd-sparc64* vlmcsd-mips64* vlmcs-* vlmcsdmulti-*
cd "$( dirname "$0" )"
gmake -C .. clean
BINDIR="../bin"
MANDIR="../man"
cd ../src
## IBM S/390
@ -16,21 +22,19 @@ export FEATURES=full
export CC=s390x-linux-gnu-gcc
export VERBOSE=3
export MULTI_NAME=vlmcsdmulti-s390-glibc
export CLIENT_NAME=vlmcs-s390-glibc
export PROGRAM_NAME=vlmcsd-s390-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-s390-glibc
export CLIENT_NAME=$BINDIR/vlmcs-s390-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-s390-glibc
make -B -j`nproc` allmulti
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
export MULTI_NAME=vlmcsdmulti-s390x-glibc
export CLIENT_NAME=vlmcs-s390x-glibc
export PROGRAM_NAME=vlmcsd-s390x-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-s390x-glibc
export CLIENT_NAME=$BINDIR/vlmcs-s390x-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-s390x-glibc
make -B -j`nproc` allmulti
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
@ -40,13 +44,12 @@ export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mcpu=v7"
export LDFLAGS="$SMALLLD"
export CC=sparc64-linux-gnu-gcc
export MULTI_NAME=vlmcsdmulti-sparc64v9-glibc
export CLIENT_NAME=vlmcs-sparc64v9-glibc
export PROGRAM_NAME=vlmcsd-sparc64v9-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-sparc64v9-glibc
export CLIENT_NAME=$BINDIR/vlmcs-sparc64v9-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-sparc64v9-glibc
make -B -j`nproc` allmulti
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
@ -56,22 +59,19 @@ export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
export LDFLAGS="$SMALLLD"
export CC=mips64-linux-gnuabi64-gcc
export MULTI_NAME=vlmcsdmulti-mips64-glibc
export CLIENT_NAME=vlmcs-mips64-glibc
export PROGRAM_NAME=vlmcsd-mips64-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64-glibc
export CLIENT_NAME=$BINDIR/vlmcs-mips64-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64-glibc
make -B -j`nproc` allmulti
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
export MULTI_NAME=vlmcsdmulti-mips64mm-glibc
export CLIENT_NAME=vlmcs-mips64mm-glibc
export PROGRAM_NAME=vlmcsd-mips64mm-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64mm-glibc
export CLIENT_NAME=$BINDIR/vlmcs-mips64mm-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64mm-glibc
make -B -j`nproc` allmulti
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
## MIPS64 LITTLE-ENDIAN
@ -80,22 +80,21 @@ export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
export LDFLAGS="$SMALLLD"
export CC=mips64el-linux-gnuabi64-gcc
export MULTI_NAME=vlmcsdmulti-mips64el-glibc
export CLIENT_NAME=vlmcs-mips64el-glibc
export PROGRAM_NAME=vlmcsd-mips64el-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64el-glibc
export CLIENT_NAME=$BINDIR/vlmcs-mips64el-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64el-glibc
make -B -j`nproc` allmulti
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
export MULTI_NAME=vlmcsdmulti-mips64elmm-glibc
export CLIENT_NAME=vlmcs-mips64elmm-glibc
export PROGRAM_NAME=vlmcsd-mips64elmm-glibc
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64elmm-glibc
export CLIENT_NAME=$BINDIR/vlmcs-mips64elmm-glibc
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64elmm-glibc
make -B -j`nproc` allmulti
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
cd $BINDIR
sstrip -z *
@ -103,6 +102,8 @@ if [ "$1" == "nocopy" ]; then
exit 0
fi
cd $MANDIR
mkdir -p /usr/local/man/man1 2>/dev/null
mkdir -p /usr/local/man/man5 2>/dev/null
mkdir -p /usr/local/man/man8 2>/dev/null
@ -113,6 +114,8 @@ cp -a vlmcsd.8 /usr/local/man/man8/
cp -a vlmcsd.ini.5 /usr/local/man/man5/
pbzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
cd $BINDIR
scp -p vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc ubuntu64.internal:x/binaries/Linux/s390/glibc
scp -p vlmcsdmulti-sparc64v9-glibc vlmcs-sparc64v9-glibc vlmcsd-sparc64v9-glibc ubuntu64.internal:x/binaries/Linux/sparc/glibc
scp -p vlmcsdmulti-mips64-glibc vlmcs-mips64-glibc vlmcsd-mips64-glibc vlmcsdmulti-mips64mm-glibc vlmcs-mips64mm-glibc vlmcsd-mips64mm-glibc ubuntu64.internal:x/binaries/Linux/mips/big-endian/glibc

View File

@ -1,10 +1,14 @@
#!/usr/pkg/bin/bash
export VLMCSD_VERSION="svn`svnversion`"
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-NetBSD* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
gmake clean
cd "$( dirname "$0" )"
gmake -C .. clean
BINDIR="../bin"
cd ../src
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
@ -15,13 +19,13 @@ CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tabl
LF="-Wl,-z,norelro -Wl,--hash-style=sysv -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=sysv"
gmake $MAKEFLAGS CC=/usr/pkg/gcc5/bin/gcc PROGRAM_NAME=vlmcsd-NetBSD-x64 CLIENT_NAME=vlmcs-NetBSD-x64 MULTI_NAME=vlmcsdmulti-NetBSD-x64 allmulti CFLAGS="$CF" LDFLAGS="$LF"
gmake $MAKEFLAGS CC=/usr/pkg/gcc6/bin/gcc PROGRAM_NAME=$BINDIR/vlmcsd-NetBSD-x64 CLIENT_NAME=$BINDIR/vlmcs-NetBSD-x64 MULTI_NAME=$BINDIR/vlmcsdmulti-NetBSD-x64 allmulti CFLAGS="$CF" LDFLAGS="$LF"
gmake allmulti CC=gcc $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-NetBSD-x86 PROGRAM_NAME=vlmcsd-NetBSD-x86 CLIENT_NAME=vlmcs-NetBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
gmake allmulti CC=gcc $MAKEFLAGS CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-NetBSD-x86 PROGRAM_NAME=$BINDIR/vlmcsd-NetBSD-x86 CLIENT_NAME=$BINDIR/vlmcs-NetBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
#gmake $MAKEFLAGS CC=clang PROGRAM_NAME=vlmcsd-NetBSD-x64-clang CLIENT_NAME=vlmcs-NetBSD-x64-clang CFLAGS="$CFCLANG" LDFLAGS="$LFCLANG"
rm *.o
cd $BINDIR
strip -s --strip-unneeded -R .ident -R .got -R .note.netbsd.pax -R .gnu.version -R .eh_frame -R .note.gnu.gold-version -R .comment -R .note -R .note.gnu.build-id -R .note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
#sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*

View File

@ -1,10 +1,14 @@
#!/usr/local/bin/bash
export VLMCSD_VERSION="svn`svnversion`"
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-Open* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
cd "$( dirname "$0" )"
gmake -C .. clean
cd ../src
BINDIR="../bin"
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
@ -15,13 +19,13 @@ CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tabl
LF="-Wl,-z,norelro"
LFCLANG="-Wl,-z,norelro"
gmake -Bj12 allmulti $MAKEFLAGS CC=egcc MULTI_NAME=vlmcsdmulti-OpenBSD-x64 PROGRAM_NAME=vlmcsd-OpenBSD-x64 CLIENT_NAME=vlmcs-OpenBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
gmake -Bj12 allmulti $MAKEFLAGS CC=egcc MULTI_NAME=$BINDIR/vlmcsdmulti-OpenBSD-x64 PROGRAM_NAME=$BINDIR/vlmcsd-OpenBSD-x64 CLIENT_NAME=$BINDIR/vlmcs-OpenBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
#gmake allmulti $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-OpenBSD-x86 PROGRAM_NAME=vlmcsd-OpenBSD-x86 CLIENT_NAME=vlmcs-OpenBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
#gmake $MAKEFLAGS CC=clang PROGRAM_NAME=vlmcsd-OpenBSD-x64-clang CLIENT_NAME=vlmcs-OpenBSD-x64-clang CFLAGS="$CFCLANG" LDFLAGS="$LFCLANG"
rm *.o
cd $BINDIR
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
#sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*

View File

@ -1,10 +1,11 @@
#!/bin/bash
export VLMCSD_VERSION="svn`svnversion`"
export VERBOSE=3
export DNS_PARSER=OS
rm vlmcsd-Mac* vlmcsd-iOS* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm vlmcsd vlmcs vlmcsdmulti 2>/dev/null
cd "$( dirname "$0" )"
make -C .. clean
MAKEFLAGS="-Bj"
REUSEOBJFLAGS="-j"
@ -12,10 +13,13 @@ CFGCC="-static-libgcc -mdynamic-no-pic -Os -flto=jobserver -fwhole-program -fno-
CFCLANG="-mdynamic-no-pic -Os -flto -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFGCC42="-static-libgcc -mdynamic-no-pic -Os -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-MacOSX-x86 CLIENT_NAME=vlmcs-MacOSX-x86 PROGRAM_NAME=vlmcsd-MacOSX-x86 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS vlmcsd-MacOSX-x86-threads THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x86-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-MacOSX-x64 CLIENT_NAME=vlmcs-MacOSX-x64 PROGRAM_NAME=vlmcsd-MacOSX-x64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS vlmcsd-MacOSX-x64-threads THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x64-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
cd ../src
BINDIR="../bin"
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x86 CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x86 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x64 CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x64 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
#make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x86-openssl-EXPERIMENTAL PROGRAM_NAME=vlmcsd-MacOSX-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes_soft CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.4" && \
#make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x64-openssl-EXPERIMENTAL PROGRAM_NAME=vlmcsd-MacOSX-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes_soft CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.4" && \
@ -23,15 +27,15 @@ make $MAKEFLAGS vlmcsd-MacOSX-x64-threads THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
#make $REUSEOBJFLAGS vlmcsdmulti-iOS-7.1-armv7 MULTI_NAME=vlmcsdmulti-iOS-7.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" && \
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-armv7 CLIENT_NAME=vlmcs-iOS-armv7 PROGRAM_NAME=vlmcsd-iOS-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot ~/toolchains/iPhoneOS.sdk" && \
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-armv8-aarch64 CLIENT_NAME=vlmcs-iOS-armv8-aarch64 PROGRAM_NAME=vlmcsd-iOS-armv8-aarch64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -arch arm64 -miphoneos-version-min=7.0 -isysroot ~/toolchains/iPhoneOS.sdk" && \
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-armv7 CLIENT_NAME=$BINDIR/vlmcs-iOS-armv7 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot ~/toolchains/iPhoneOS.sdk" && \
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-armv8-aarch64 CLIENT_NAME=$BINDIR/vlmcs-iOS-armv8-aarch64 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-armv8-aarch64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -arch arm64 -miphoneos-version-min=7.0 -isysroot ~/toolchains/iPhoneOS.sdk" && \
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-6.1-armv7 CLIENT_NAME=vlmcs-iOS-6.1-armv7 PROGRAM_NAME=vlmcsd-iOS-6.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS6.1.sdk -isysroot ~/toolchains/iPhoneOS6.1.sdk" && \
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-6.1-armv7 CLIENT_NAME=$BINDIR/vlmcs-iOS-6.1-armv7 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-6.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS6.1.sdk -isysroot ~/toolchains/iPhoneOS6.1.sdk" && \
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-5.1-armv7-clang3.4 CLIENT_NAME=vlmcs-iOS-5.1-armv7-clang3.4 PROGRAM_NAME=vlmcsd-iOS-5.1-armv7-clang3.4 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-5.1-armv7-clang3.4 CLIENT_NAME=$BINDIR/vlmcs-iOS-5.1-armv7-clang3.4 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-5.1-armv7-clang3.4 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
#PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH clang --version
PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-5.1-armv6-clang3.1 CLIENT_NAME=vlmcs-iOS-5.1-armv6-clang3.1 PROGRAM_NAME=vlmcsd-iOS-5.1-armv6-clang3.1 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-iOS-5.1-armv6-clang3.1 CLIENT_NAME=$BINDIR/vlmcs-iOS-5.1-armv6-clang3.1 PROGRAM_NAME=$BINDIR/vlmcsd-iOS-5.1-armv6-clang3.1 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
#PATH=~/toolchains/gcc4.2/usr/bin/bin:$PATH make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-4.1-armv6-llvm-gcc4.2 PROGRAM_NAME=vlmcsd-iOS-4.1-armv6-llvm-gcc4.2 CC=llvm-g++-4.2 CFLAGS="$CFGCC42" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS4.1.sdk -isysroot ~/toolchains/iPhoneOS4.1.sdk" && \
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
@ -42,20 +46,22 @@ PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $MAKEFLAGS allmulti MULTI
#PATH=~/toolchains/gcc4.2/usr/bin:$PATH make $REUSEOBJFLAGS vlmcsdmulti-iOS-4.1-armv7-llvm-clang MULTI_NAME=vlmcsdmulti-iOS-4.1-armv7-llvm-clang CC=~/toolchains/gcc4.2/usr/bin/bin/clang CFLAGS="$CFGCC42" PLATFORMFLAGS="-mthumb -arch armv7 -miphoneos-version-min=4.1 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk" && \
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -Bj allmulti SAFE_MODE=1 MULTI_NAME=vlmcsdmulti-MacOSX-ppc PROGRAM_NAME=vlmcsd-MacOSX-ppc CLIENT_NAME=vlmcs-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0" && \
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -Bj allmulti SAFE_MODE=1 MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-ppc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-ppc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0" && \
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-MacOSX-x86-gcc CLIENT_NAME=vlmcs-MacOSX-x86-gcc PROGRAM_NAME=vlmcsd-MacOSX-x86-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS vlmcsd-MacOSX-x86-threads-gcc THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x86-threads-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-MacOSX-x64-gcc CLIENT_NAME=vlmcs-MacOSX-x64-gcc PROGRAM_NAME=vlmcsd-MacOSX-x64-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS vlmcsd-MacOSX-x64-threads-gcc THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x64-threads-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x86-gcc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x86-gcc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-threads-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x64-gcc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x64-gcc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-threads-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
# Sign the iOS binaries
#ldid -S *iOS*
#strip vlmcs-* vlmcsd-* vlmcsdmulti-*
rm -f *.o *_all.*
cd $BINDIR
MANDIR="../man"
rm -fr *.dSYM
sudo cp -p vlmcs-MacOSX-x86-gcc /usr/local/bin/vlmcs
@ -66,10 +72,10 @@ sudo mkdir -p /usr/local/share/man/man1
sudo mkdir -p /usr/local/share/man/man7
sudo mkdir -p /usr/local/share/man/man5
sudo cp -p vlmcsd.8 /usr/local/share/man/man8
sudo cp -p vlmcs.1 vlmcsdmulti.1 /usr/local/share/man/man1
sudo cp -p vlmcsd-floppy.7 vlmcsd.7 /usr/local/share/man/man7
sudo cp -p vlmcsd.ini.5 //usr/local/share/man/man5
sudo cp -p $MANDIR/vlmcsd.8 /usr/local/share/man/man8
sudo cp -p $MANDIR/vlmcs.1 $MANDIR/vlmcsdmulti.1 /usr/local/share/man/man1
sudo cp -p $MANDIR/vlmcsd-floppy.7 $MANDIR/vlmcsd.7 /usr/local/share/man/man7
sudo cp -p $MANDIR/vlmcsd.ini.5 //usr/local/share/man/man5
# Copy the stuff to distribution server
scp -p vlmcsd-MacOSX-x* vlmcs-MacOSX-x* vlmcsdmulti-MacOSX-x* root@ubuntu64:x/binaries/MacOSX/intel

View File

@ -0,0 +1,61 @@
#!/bin/sh
export VLMCSD_VERSION="svn`svnversion`"
export VERBOSE=3
export CAT=2
if [ `uname -s` != "SunOS" ]; then
echo "This is no SunOS operating system."
exit 3
fi
cd "$( dirname "$0" )"
make -C .. clean
SOLARIS_VERSION=`uname -v`
MAKEFLAGS="-Bj"
REUSEOBJFLAGS="-j"
cd ../src
BINDIR="../bin"
MANDIR="../man"
CF="-fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants -Wno-char-subscripts"
LF="-fwhole-program -Wl,--hash-style=sysv -Wl,--build-id=none"
# 32 bit
if [ "$CAT" != "" ]; then
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld allmulti CLIENT_NAME=$BINDIR/vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=$BINDIR/vlmcsd-Solaris$SOLARIS_VERSION-x86 MULTI_NAME=$BINDIR/vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
else
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld MULTI_NAME=$BINDIR/vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CLIENT_NAME=$BINDIR/vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=$BINDIR/vlmcsd-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" allmulti
fi
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-Solaris$SOLARIS_VERSION-x86-threads CC=gcc THREADS=1 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=$BINDIR/vlmcs-Solaris$SOLARIS_VERSION-x86-openssl1.0-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=$BINDIR/vlmcsd-Solaris$SOLARIS_VERSION-x86-openssl1.0-EXPERIMENTAL CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
# 64 bit
LF="$LF -Wl,-melf_x86_64_sol2"
if [ "$CAT" != "" ]; then
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CLIENT_NAME=$BINDIR/vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=$BINDIR/vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
else
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CLIENT_NAME=$BINDIR/vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=$BINDIR/vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64" allmulti
fi
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-Solaris$SOLARIS_VERSION-x64-threads CC=gcc THREADS=1 CFLAGS="$CF" LDFLAGS="$LF -lpthread" PLATFORMFLAGS="-m64"
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=$BINDIR/vlmcs-Solaris$SOLARIS_VERSION-x64-openssl1.0-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=$BINDIR/vlmcsd-Solaris$SOLARIS_VERSION-x64-openssl1.0-EXPERIMENTAL CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
rm -f *.o *_all.*
cd $BINDIR
gstrip -s --strip-unneeded --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-*
#gstrip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-*
#sstrip -z vlmcs-* vlmcsd-*
# Copy stuff to distribution server
scp -p vlmcsd-Sola* vlmcs-* vlmcsdmulti-* root@ubuntu64:x/binaries/Solaris/intel

View File

@ -0,0 +1,97 @@
#!/bin/bash
cd "$( dirname "$0" )"
export VLMCSD_VERSION="svn`svnversion`"
msbuild='/cygdrive/c/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe'
version="$VLMCSD_VERSION, built $(date -u '+%Y-%m-%d %H:%M:%S') UTC"
make -C .. clean
export ExternalCompilerOptions="/D VERSION=\"\\\"$version\\\"\" /D BUILD_TIME=$(date '+%s')"
"$msbuild" ../VisualStudio/vlmcsd.sln /t:Rebuild /p:Configuration=publish /p:Platform=x86 /m /v:m
"$msbuild" ../VisualStudio/vlmcsd.sln /t:Rebuild /p:Configuration=publish /p:Platform=x64 /m /v:m
export CAT=2
export VERBOSE=3
NUMCPU=`cat /proc/cpuinfo | grep "processor" | wc -l`
CF="-Wno-missing-braces -fno-common -fno-exceptions -fno-non-call-exceptions -fno-stack-protector -fmerge-all-constants -fno-unwind-tables -fno-asynchronous-unwind-tables -pipe"
CFMSRPC="-Wno-missing-braces -Wno-unused-variable $CF" # -fno-common -fno-stack-protector -fmerge-all-constants -pipe"
PF32=""
PF64="-mpreferred-stack-boundary=4 -march=nocona -mtune=generic"
LFCYG32="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware,--disable-long-section-names"
LFWIN32="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware,--disable-long-section-names,--no-seh"
LFCYG64="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--disable-long-section-names,--high-entropy-va"
LFWIN64="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--disable-long-section-names,--high-entropy-va,--no-seh"
MAKEFLAGS="-j$NUMCPU -B"
REUSEFLAGS="-j$NUMCPU"
cd ../src
make $MAKEFLAGS libkms FEATURES=minimum THREADS=1 DLL_NAME=../bin/cygkms32.dll DNS_PARSER=internal CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32 -Wl,--no-seh"
make $MAKEFLAGS libkms FEATURES=minimum THREADS=1 DLL_NAME=../bin/cygkms64.dll DNS_PARSER=internal CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64 -Wl,--no-seh"
make $MAKEFLAGS allmulti THREADS=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-x86 PROGRAM_NAME=../bin/vlmcsd-cygwin-x86 MULTI_NAME=../bin/vlmcsdmulti-cygwin-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32 -Wl,--no-seh"
make $MAKEFLAGS allmulti THREADS=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-x64 PROGRAM_NAME=../bin/vlmcsd-cygwin-x64 MULTI_NAME=../bin/vlmcsdmulti-cygwin-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64 -Wl,--no-seh"
make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-msrpc-x86 PROGRAM_NAME=../bin/vlmcsd-cygwin-msrpc-x86 MULTI_NAME=../bin/vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -fasynchronous-unwind-tables" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-msrpc-x64 PROGRAM_NAME=../bin/vlmcsd-cygwin-msrpc-x64 MULTI_NAME=../bin/vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
make $MAKEFLAGS vlmcsdmulti MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=../bin/vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
make $MAKEFLAGS vlmcsdmulti MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=../bin/vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-msrpc-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=../bin/vlmcsd-cygwin-x86-openssl-EXPERIMENTAL CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-msrpc-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=../bin/vlmcsd-cygwin-x64-openssl-EXPERIMENTAL CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
export CAT=2
#unset CAT
make $MAKEFLAGS libkms CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=../bin/libkms32-gcc.dll CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="-static-libgcc $LFWIN32"
make $MAKEFLAGS libkms CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=../bin/libkms64-gcc.dll CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="-static-libgcc $LFWIN64"
make $MAKEFLAGS allmulti THREADS=1 CRYPTO=internal CLIENT_NAME=../bin/vlmcs-Windows-x86-gcc PROGRAM_NAME=../bin/vlmcsd-Windows-x86-gcc MULTI_NAME=../bin/vlmcsdmulti-Windows-x86-gcc CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF -fno-lto" PLATFORMFLAGS="$PF32" LDFLAGS="$LFWIN32"
make $MAKEFLAGS allmulti THREADS=1 CRYPTO=internal CLIENT_NAME=../bin/vlmcs-Windows-x64-gcc PROGRAM_NAME=../bin/vlmcsd-Windows-x64-gcc MULTI_NAME=../bin/vlmcsdmulti-Windows-x64-gcc CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF -fno-lto" PLATFORMFLAGS="$PF64" LDFLAGS="$LFWIN64"
unset CAT
make -Bj allmulti CAT=2 MSRPC=1 CRYPTO=windows CLIENT_NAME=../bin/vlmcs-Windows-msrpc-x86 PROGRAM_NAME=../bin/vlmcsd-Windows-msrpc-x86 MULTI_NAME=../bin/vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC -fno-lto" PLATFORMFLAGS="$PF32" LDFLAGS="$LFWIN32"
make $MAKEFLAGS allmulti CAT=2 THREADS=1 MSRPC=1 CRYPTO=windows CLIENT_NAME=../bin/vlmcs-Windows-msrpc-x64 PROGRAM_NAME=../bin/vlmcsd-Windows-msrpc-x64 MULTI_NAME=../bin/vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC -fno-lto" PLATFORMFLAGS="$PF64" LDFLAGS="$LFWIN64"
#unset CAT
#make $MAKEFLAGS CAT=2 vlmcsdmulti-Windows-msrpc-x86 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
#make $MAKEFLAGS CAT=2 vlmcsdmulti-Windows-msrpc-x64 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
export CAT=2
#echo ""
#echo "Copying MingW binaries from distribution server"
#scp -p root@ubuntu64:x/binaries/Windows/intel/*Windows* root@ubuntu64:x/binaries/Windows/intel/libkms* .
cd ..
echo ""
echo "Installing binaries"
cp -p bin/vlmcs-cygwin-x64.exe /usr/local/bin/vlmcs &
cp -p bin/vlmcsd-cygwin-x64.exe /usr/local/bin/vlmcsd &
cp -p bin/cygkms64.dll /usr/local/bin/cygkms.dll &
cp -p bin/libkms32.dll /cygdrive/c/nttools/x86 &
cp -p bin/libkms64.dll /cygdrive/c/nttools/x64 &
cp -p bin/vlmcsd-Windows-x86.exe /cygdrive/c/nttools/x86/vlmcsd.exe
cp -p bin/vlmcs-Windows-x86.exe /cygdrive/c/nttools/x86/vlmcs.exe
#cmd /C mklink c:\\nttools\\x86\\vlmcsd.exe vlmcsdmulti.exe 2> /dev/null &
#cmd /C mklink c:\\nttools\\x86\\vlmcs.exe vlmcsdmulti.exe 2> /dev/null &
echo "Installing man pages"
mkdir -p /usr/share/man/man8
mkdir -p /usr/share/man/man1
mkdir -p /usr/share/man/man7
mkdir -p /usr/share/man/man5
cp -p man/vlmcsd.7 man/vlmcsd-floppy.7 /usr/share/man/man7
cp -p man/vlmcsd.8 /usr/share/man/man8
cp -p man/vlmcsd.ini.5 /usr/share/man/man5
cp -p man/vlmcs.1 man/vlmcsdmulti.1 /usr/share/man/man1
bzip2 -f /usr/share/man/man7/vlmcsd-floppy.7 /usr/share/man/man5/vlmcsd.ini.5 /usr/share/man/man7/vlmcsd.7 /usr/share/man/man8/vlmcsd.8 /usr/share/man/man1/vlmcs.1 /usr/share/man/man1/vlmcsdmulti.1 &
# Copy stuff to distribution server
scp -p bin/*.exe bin/*.dll root@ubuntu64:x/binaries/Windows/intel

View File

@ -0,0 +1,5 @@
#!/bin/bash
cd "$( dirname "${BASH_SOURCE[0]}" )"
find ../binaries/ -xdev -name 'vlmcs*' ! -name '*-NetBSD-*' ! -name '*-Windows-*' ! -name '*-cygwin-*' ! -name '*-MacOSX-*' ! -name '*-iOS-*' -exec sstrip -z {} \;

1130
kms.c

File diff suppressed because it is too large Load Diff

169
libkms.c
View File

@ -1,169 +0,0 @@
/*
* libkms.c
*/
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#ifdef EXTERNAL
#undef EXTERNAL
#endif
#define EXTERNAL dllexport
#define DLLVERSION 0x30001
#include "libkms.h"
#include "shared_globals.h"
#include "network.h"
#include "helpers.h"
#ifndef _WIN32
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <netinet/in.h>
#endif // WIN32
#ifdef IS_LIBRARY
char ErrorMessage[MESSAGE_BUFFER_SIZE];
#endif // IS_LIBRARY
static int_fast8_t IsServerStarted = FALSE;
EXTERNC __declspec(EXTERNAL) DWORD __cdecl SendActivationRequest
(
const char* const hostname,
const int port,
RESPONSE* baseResponse,
const REQUEST* const baseRequest,
RESPONSE_RESULT* result, BYTE *hwid
)
{
return !0; // not yet implemented
}
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StartKmsServer(const int port, RequestCallback_t requestCallback)
{
#ifndef SIMPLE_SOCKETS
char listenAddress[64];
if (IsServerStarted) return !0;
# ifdef _WIN32
# ifndef USE_MSRPC
// Windows Sockets must be initialized
WSADATA wsadata;
int error;
if ((error = WSAStartup(0x0202, &wsadata)))
{
return error;
}
# endif // USE_MSRPC
# endif // _WIN32
CreateResponseBase = requestCallback;
int maxsockets = 0;
int_fast8_t haveIPv4 = FALSE;
int_fast8_t haveIPv6 = FALSE;
if (checkProtocolStack(AF_INET)) { haveIPv4 = TRUE; maxsockets++; }
if (checkProtocolStack(AF_INET6)) { haveIPv6 = TRUE; maxsockets++; }
if(!maxsockets) return !0;
SocketList = (SOCKET*)vlmcsd_malloc(sizeof(SOCKET) * (size_t)maxsockets);
numsockets = 0;
if (haveIPv4)
{
snprintf(listenAddress, 64, "0.0.0.0:%u", (unsigned int)port);
addListeningSocket(listenAddress);
}
if (haveIPv6)
{
snprintf(listenAddress, 64, "[::]:%u", (unsigned int)port);
addListeningSocket(listenAddress);
}
if (!numsockets)
{
free(SocketList);
return !0;
}
IsServerStarted = TRUE;
runServer();
IsServerStarted = FALSE;
return 0;
# else // SIMPLE_SOCKETS
if (IsServerStarted) return !0;
int error;
# ifdef _WIN32
# ifndef USE_MSRPC
// Windows Sockets must be initialized
WSADATA wsadata;
if ((error = WSAStartup(0x0202, &wsadata)))
{
return error;
}
# endif // USE_MSRPC
# endif // _WIN32
defaultport = vlmcsd_malloc(16);
snprintf((char*)defaultport, (size_t)16, "%i", port);
CreateResponseBase = requestCallback;
error = listenOnAllAddresses();
if (error) return error;
IsServerStarted = TRUE;
runServer();
IsServerStarted = FALSE;
return 0;
# endif // SIMPLE_SOCKETS
}
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StopKmsServer()
{
if (!IsServerStarted) return !0;
closeAllListeningSockets();
# ifndef SIMPLE_SOCKETS
if (SocketList) free(SocketList);
# endif
return 0;
}
EXTERNC __declspec(EXTERNAL) int __cdecl GetLibKmsVersion()
{
return DLLVERSION;
}
EXTERNC __declspec(EXTERNAL) const char* const __cdecl GetEmulatorVersion()
{
return VERSION;
}

View File

@ -1,28 +0,0 @@
/*
* libkms.h
*/
#ifndef LIBKMS_H_
#define LIBKMS_H_
#include "types.h"
#include "kms.h"
#include "rpc.h"
#ifndef EXTERNC
#ifdef __cplusplus
#define EXTERNC EXTERN "C"
#else
#define EXTERNC
#endif
#endif
EXTERNC __declspec(EXTERNAL) DWORD __cdecl SendActivationRequest(const char* const hostname, const int port, RESPONSE* baseResponse, const REQUEST* const baseRequest, RESPONSE_RESULT* result, BYTE *hwid);
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StartKmsServer(const int port, RequestCallback_t requestCallback);
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StopKmsServer();
EXTERNC __declspec(EXTERNAL) int __cdecl GetLibKmsVersion();
EXTERNC __declspec(EXTERNAL) const char* const __cdecl GetEmulatorVersion();
//EXTERN_C __declspec(EXTERNAL) unsigned int __cdecl GetRandom32();
#endif /* LIBKMS_H_ */

View File

@ -1,37 +0,0 @@
#!/usr/local/bin/bash
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-Free* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
CF="-flto=12 -static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=gnu"
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x64-gcc CLIENT_NAME=vlmcs-FreeBSD-10.3-x64-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-gcc CC=gcc5 CFLAGS="$CF" LDFLAGS="$LF"
gmake $MAKEFLAGS MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x64 CLIENT_NAME=vlmcs-FreeBSD-10.3-x64 PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF" allmulti
gmake $MAKEFLAGS MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x86 CLIENT_NAME=vlmcs-FreeBSD-10.3-x86 PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x86-gcc CLIENT_NAME=vlmcs-FreeBSD-10.3-x86-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-gcc CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.3-x64-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.3-x64-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.3-x86-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.3-x86-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.3-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF"
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.3-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
rm *.o
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
sudo cp -af vlmcsd-FreeBSD-10.3-x64-gcc /usr/local/sbin/vlmcsd
sudo cp -af vlmcs-FreeBSD-10.3-x64-gcc /usr/local/bin/vlmcs
# Copy everything to distribution server
scp -p vlmcsdmulti-* vlmcsd-Free* vlmcs-* root@ubuntu64:x/binaries/FreeBSD/intel/

3507
make_lxss

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +0,0 @@
#!/bin/sh
export VLMCSD_VERSION=svn$(ssh root@ubuntu64.internal "cd x; svnversion")
scp -p make_minix root@ubuntu64.internal:x
scp -pr root@ubuntu64.internal:x/* .
# Compile vlmcsd binaries for Minix 3
SUFFIX=-minix-$(uname -r)-x86
export CC=clang
export CFLAGS="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
export LDFLAGS="-Wl,--hash-style=sysv -Wl,-z,norelro -Wl,--build-id=none"
export PROGRAM_NAME=vlmcsd$SUFFIX
export CLIENT_NAME=vlmcs$SUFFIX
export MULTI_NAME=vlmcsdmulti$SUFFIX
gmake clean
gmake -B allmulti
strip -s --strip-unneeded --remove-section .eh_frame_hdr --remove-section .eh_frame --remove-section .ident --remove-section .note.minix.ident --remove-section .note.netbsd.pax --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag *$SUFFIX
scp -p *$SUFFIX root@ubuntu64.internal:x/binaries/Minix/intel/

View File

@ -1,53 +0,0 @@
#!/bin/sh
export VERBOSE=3
export CAT=2
if [ `uname -s` != "SunOS" ]; then
echo "This is no SunOS operating system."
exit 3
fi
SOLARIS_VERSION=`uname -v`
rm -f vlmcsd-Solaris* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j`nproc`"
REUSEOBJFLAGS="-j`nproc`"
CF="-fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants -Wno-char-subscripts"
LF="-fwhole-program -Wl,-z,norelro -Wl,--hash-style=sysv -Wl,--build-id=none"
# 32 bit
if [ "$CAT" != "" ]; then
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcs-Solaris$SOLARIS_VERSION-x86 vlmcsd-Solaris$SOLARIS_VERSION-x86 vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
else
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" allmulti
fi
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsd-Solaris$SOLARIS_VERSION-x86-threads PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86-threads CC=gcc THREADS=1 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86-openssl1.0-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86-openssl1.0-EXPERIMENTAL CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
# 64 bit
LF="$LF -Wl,-melf_x86_64_sol2"
if [ "$CAT" != "" ]; then
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 vlmcs-Solaris$SOLARIS_VERSION-x64 vlmcsd-Solaris$SOLARIS_VERSION-x64 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
else
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64" allmulti
fi
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsd-Solaris$SOLARIS_VERSION-x64-threads PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64-threads CC=gcc THREADS=1 CFLAGS="$CF" LDFLAGS="$LF -lpthread" PLATFORMFLAGS="-m64"
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64-openssl1.0-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64-openssl1.0-EXPERIMENTAL CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
rm -f *.o *_all.*
gstrip -s --strip-unneeded --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-*
#gstrip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-*
#sstrip -z vlmcs-* vlmcsd-*
# Copy stuff to distribution server
scp -p vlmcsd-Sola* vlmcs-* vlmcsdmulti-* root@ubuntu64:x/binaries/Solaris/intel

View File

@ -1,84 +0,0 @@
#!/bin/bash
rm -f cygkms*.dll libkms*.dll vlmcs-* vlmcsd-win* vlmcsd-cyg* vlmcsdmulti-* *_all.* vlmcsd.exe vlmcs.exe vlmcsdmulti.exe 2> /dev/null
export CAT=2
export VERBOSE=3
NUMCPU=`cat /proc/cpuinfo | grep "processor" | wc -l`
CF="-Wno-missing-braces -fno-common -fno-exceptions -fno-non-call-exceptions -fno-stack-protector -fmerge-all-constants -fno-unwind-tables -fno-asynchronous-unwind-tables -pipe"
CFMSRPC="-Wno-missing-braces -Wno-unused-variable $CF" # -fno-common -fno-stack-protector -fmerge-all-constants -pipe"
PF32=""
PF64="-mpreferred-stack-boundary=4 -march=nocona -mtune=generic"
LFCYG32="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware,--disable-long-section-names"
LFWIN32="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware,--disable-long-section-names"
LFCYG64="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--disable-long-section-names,--high-entropy-va"
LFWIN64="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--disable-long-section-names,--high-entropy-va"
MAKEFLAGS="-j$NUMCPU -B"
REUSEFLAGS="-j$NUMCPU"
make $MAKEFLAGS cygkms32.dll FEATURES=minimum THREADS=1 DLL_NAME=cygkms32.dll DNS_PARSER=internal CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32 -Wl,--no-seh"
make $MAKEFLAGS cygkms64.dll FEATURES=minimum THREADS=1 DLL_NAME=cygkms64.dll DNS_PARSER=internal CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64 -Wl,--no-seh"
make $MAKEFLAGS allmulti THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-x86 PROGRAM_NAME=vlmcsd-cygwin-x86 MULTI_NAME=vlmcsdmulti-cygwin-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32 -Wl,--no-seh"
make $MAKEFLAGS allmulti THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-x64 PROGRAM_NAME=vlmcsd-cygwin-x64 MULTI_NAME=vlmcsdmulti-cygwin-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64 -Wl,--no-seh"
make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x86 PROGRAM_NAME=vlmcsd-cygwin-msrpc-x86 MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -fasynchronous-unwind-tables" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x64 PROGRAM_NAME=vlmcsd-cygwin-msrpc-x64 MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
unset CAT
make $MAKEFLAGS vlmcsdmulti-cygwin-msrpc-x64 MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
make $MAKEFLAGS vlmcsdmulti-cygwin-msrpc-x86 MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
export CAT=2
make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-cygwin-x86-openssl-EXPERIMENTAL CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-cygwin-x64-openssl-EXPERIMENTAL CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
export CAT=2
#make $MAKEFLAGS libkms32.dll CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=libkms32.dll CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="-static-libgcc $LFWIN32"
#make $MAKEFLAGS libkms64.dll CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=libkms64.dll CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="-static-libgcc $LFWIN64"
#make $MAKEFLAGS all vlmcsdmulti-Windows-x86 THREADS=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-x86 PROGRAM_NAME=vlmcsd-Windows-x86 MULTI_NAME=vlmcsdmulti-Windows-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFWIN32"
#make $MAKEFLAGS all vlmcsdmulti-Windows-x64 THREADS=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-x64 PROGRAM_NAME=vlmcsd-Windows-x64 MULTI_NAME=vlmcsdmulti-Windows-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFWIN64"
#make -Bj MSRPC=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-msrpc-x86 PROGRAM_NAME=vlmcsd-Windows-msrpc-x86 MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
#make $MAKEFLAGS THREADS=1 MSRPC=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-msrpc-x64 PROGRAM_NAME=vlmcsd-Windows-msrpc-x64 MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
#unset CAT
#make $MAKEFLAGS vlmcsdmulti-Windows-msrpc-x86 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
#make $MAKEFLAGS vlmcsdmulti-Windows-msrpc-x64 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
export CAT=2
rm -f *_all.* *.o 2> /dev/null &
echo ""
echo "Copying MingW binaries from distribution server"
scp -p root@ubuntu64:x/binaries/Windows/intel/*Windows* root@ubuntu64:x/binaries/Windows/intel/libkms* .
echo ""
echo "Installing binaries"
cp -p vlmcs-cygwin-x64.exe /usr/local/bin/vlmcs &
cp -p vlmcsd-cygwin-x64.exe /usr/local/bin/vlmcsd &
cp -p cygkms64.dll /usr/local/bin/cygkms.dll &
cp -p libkms32.dll /cygdrive/c/nttools/x86 &
cp -p libkms64.dll /cygdrive/c/nttools/x64 &
cp -p vlmcsdmulti-Windows-x86.exe /cygdrive/c/nttools/x86/vlmcsdmulti.exe
cmd /C mklink c:\\nttools\\x86\\vlmcsd.exe vlmcsdmulti.exe 2> /dev/null &
cmd /C mklink c:\\nttools\\x86\\vlmcs.exe vlmcsdmulti.exe 2> /dev/null &
echo "Installing man pages"
mkdir -p /usr/share/man/man8
mkdir -p /usr/share/man/man1
mkdir -p /usr/share/man/man7
mkdir -p /usr/share/man/man5
cp -p vlmcsd.7 vlmcsd-floppy.7 /usr/share/man/man7
cp -p vlmcsd.8 /usr/share/man/man8
cp -p vlmcsd.ini.5 /usr/share/man/man5
cp -p vlmcs.1 vlmcsdmulti.1 /usr/share/man/man1
bzip2 -f /usr/share/man/man7/vlmcsd-floppy.7 /usr/share/man/man5/vlmcsd.ini.5 /usr/share/man/man7/vlmcsd.7 /usr/share/man/man8/vlmcsd.8 /usr/share/man/man1/vlmcs.1 /usr/share/man/man1/vlmcsdmulti.1 &
# Copy stuff to distribution server
scp -p vlmcsd-cyg* vlmcsd-Win* vlmcs-* vlmcsdmulti-* *.dll root@ubuntu64:x/binaries/Windows/intel

View File

@ -1,17 +0,0 @@
#!/bin/bash
#
# To use on x64 hosted native multilib compiler toolchain
#
rm vlmcsd-*
rm vlmcsd
MAKEFLAGS="-j -B"
make $MAKEFLAGS PROGRAM_NAME=vlmcsd-mingw64-x86 CC=x86_64-w64-mingw32-gcc.exe CFLAGS="-flto -m32" "PLATFORMFLAGS=-march=i686 -mtune=generic" "LDFLAGS=-lcrypto -lz -lkernel32 -ladvapi32 -lws2_32 -lgdi32"
make $MAKEFLAGS PROGRAM_NAME=vlmcsd-mingw64-x64 CC=x86_64-w64-mingw32-gcc.exe CFLAGS="-flto" "PLATFORMFLAGS=-mtune=generic" "LDFLAGS=-lcrypto -lz -lkernel32 -ladvapi32 -lws2_32 -lgdi32"
make $MAKEFLAGS CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-mingw64-x86-openssl CC=x86_64-w64-mingw32-gcc.exe CFLAGS="-flto -m32" "PLATFORMFLAGS=-march=i686 -mtune=generic" "LDFLAGS=-lcrypto -lz -lkernel32 -ladvapi32 -lws2_32 -lgdi32"
make $MAKEFLAGS CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-mingw64-x64-openssl CC=x86_64-w64-mingw32-gcc.exe CFLAGS="-flto" "PLATFORMFLAGS=-mtune=generic" "LDFLAGS=-lcrypto -lz -lkernel32 -ladvapi32 -lws2_32 -lgdi32"
rm *.o

44
man/GNUmakefile Normal file
View File

@ -0,0 +1,44 @@
################################################################################
.PHONY: clean
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf vlmcsd-floppy.7.pdf
HTMLDOCS = $(PDFDOCS:.pdf=.html)
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
%.pdf : %
ifeq ($(shell uname), Darwin)
groff -Tps -mandoc -c $< | pstopdf -i -o $@
else
groff -Tpdf -mandoc -c $< > $@
endif
%.html : %
groff -Thtml -mandoc -c $< > $@
%.unix.txt : %
groff -P -c -Tutf8 -mandoc -c $< | col -bx > $@
%.dos.txt : %.unix.txt
# unix2dos -n $< $@
# sed -e 's/$$/\r/' $< > $@
awk 'sub("$$", "\r")' $< > $@
alldocs : $(UNIXDOCS) $(HTMLDOCS) $(PDFDOCS) $(DOSDOCS)
pdfdocs : $(PDFDOCS)
dosdocs : $(DOSDOCS)
unixdocs : $(UNIXDOCS)
htmldocs : $(HTMLDOCS)
clean:
rm -f $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS)
help:
@echo "Help is available by typing 'make help' in directory $(shell realpath `pwd`/..). Use 'cd ..' to get there."

View File

@ -1,5 +1,5 @@
.mso www.tmac
.TH VLMCS 1 "May 2016" "Hotbird64" "KMS Activation Manual"
.TH VLMCS 1 "October 2016" "Hotbird64" "KMS Activation Manual"
.LO 1
.SH NAME
@ -75,11 +75,11 @@ to specify applications that are not listed with \fB-x\fR. The
.B -l
option is used as a shortcut for the most common applications.
.IP "\fB-K\fR \fIprotocol-version\fR"
Force a specific version of the KMS protocol. Valid versions are 4.0, 5.0 and 6.0. The default is to select a suitable version according to the \fIapplication\fR selected. You may use \fB-K\fR to send an incorrect protocol version to the KMS server and see how it behaves. Genuine KMS servers return HRESULT 0x8007000D if the KMS protocol is not 4.0, 5.0 or 6.0. Emulators should do the same. When sending a request with an incorrect protocol number, vlmcs ignores the minor protocol number (e.g. sends a v4 request for version 4.1). If the major version number is less then 4, it sends a v4 request. If the major version is greater then 6, it sends a v6 request. In any case the \fIprotocol-version\fR as specified by \fB-K\fR is put in the version fields of the request.
.IP "\fB-4\fR, \fB-5\fR and \fB-6"
Force version 4, 5 or 6 of the KMS protocol. The default is to select a suitable
version according to the
.IR "application"
selected. Plese note that some products (e.g. Office 2013) may use different protocols with different versions of Windows.
Force version 4, 5 or 6 of the KMS protocol. These options are actually shortcuts of \fB-K 4.0\fR, \fB-K 5.0\fR and \fB-K 6.0\fR.
.IP "\fB-m"
Let the client pretend to be a virtual machine. Early versions of Microsoft's

326
man/vlmcs.1.dos.txt Normal file
View File

@ -0,0 +1,326 @@
VLMCS(1) KMS Activation Manual VLMCS(1)
NAME
vlmcs - a client for testing and/or charging KMS servers
SYNOPSIS
vlmcs [ options ] [ target ] [ options ]
target can be one of the following:
hostname|ipaddress[:tcp-port] to query a specific KMS server
(example: vlmcs kms.example.com:1688).
.domain to automatically detect KMS servers via DNS for domain
(example: vlmcs .example.com). Please note the dot before
domain.
- (a single dash) to detect KMS servers in your own domain.
If you use ipaddress:port as the target, the ipaddress must be enclosed
in brackets if it contains colons, e.g. [2001:db8:dead:beef::1]:1688.
If you use a link-local IPv6 address on Unix systems, you must append a
percent sign and the interface identifier of the source interface, for
example fe80::dead:beef%eth0.
If you omit the target, 127.0.0.1:1688 will be used except if you use
-i6. In this case the default target is [::1]:1688.
DESCRIPTION
vlmcs is a program that can be used to test a KMS server that provides
activation for several Microsoft products. The KMS server may also be
an emulator. It supports KMS protocol versions 4, 5 and 6.
vlmcs generates one or more activation requests for a Microsoft KMS
product and sends it to a KMS server. It then analyzes and displays the
responses of the KMS server.
vlcms checks both the DCE-RPC protocol and the activation message for
correctness and reports any errors that it finds.
vlmcs can also be used to "charge" a KMS server. A Microsoft KMS server
sends correct activation messages only if it detects a certain minimum
of clients (25 for Windows client OSses, 5 otherwise) on the network.
This is Microsoft's futile attempt to prevent running a KMS server in a
home environment.
OPTIONS
-h or -?
Show help.
-V Displays extended version information. This includes the com
piler used to build vlmcs, the intended platform and flags (com
pile time options) to build vlmcs. If you have the source code
of vlmcsd, you can type make help (or gmake help on systems that
do not use the GNU version of make(1) by default) to see the
meaning of those flags.
-x Show valid applications that can be used with -l.
-e Show some examples how to use vlmcs correctly.
-v Be verbose. Instead of just displaying the returned ePID and the
HwId (protocol v6 only) vlmcsd shows all details of the query
and the response.
-l application
Request activation for a specific application. Valid applica
tions can be displayed by using -x. The default application is
Windows Vista Business. The list of available applications is
not complete. You may supply GUIDs with -a, -k and -s to specify
applications that are not listed with -x. The -l option is used
as a shortcut for the most common applications.
-K protocol-version
Force a specific version of the KMS protocol. Valid versions are
4.0, 5.0 and 6.0. The default is to select a suitable version
according to the application selected. You may use -K to send an
incorrect protocol version to the KMS server and see how it
behaves. Genuine KMS servers return HRESULT 0x8007000D if the
KMS protocol is not 4.0, 5.0 or 6.0. Emulators should do the
same. When sending a request with an incorrect protocol number,
vlmcs ignores the minor protocol number (e.g. sends a v4 request
for version 4.1). If the major version number is less then 4, it
sends a v4 request. If the major version is greater then 6, it
sends a v6 request. In any case the protocol-version as speci
fied by -K is put in the version fields of the request.
-4, -5 and -6
Force version 4, 5 or 6 of the KMS protocol. These options are
actually shortcuts of -K 4.0, -K 5.0 and -K 6.0.
-m Let the client pretend to be a virtual machine. Early versions
of Microsoft's KMS server did not increase the client count if
the request came from a virtual machine. Newer versions ignore
this flag.
-d Use NetBIOS names instead of DNS names. By default vlmcsd gener
ates some random DNS names for each request. If you prefer Net
BIOS names, you may use -d. A real Microsoft activation client
uses DNS names or NetBIOS depending on the client name configu
ration. KMS servers treat the workstation name as a comment that
affects logging only. Clients will be identified by a GUID that
can be specified using -c. -d has no effect if you also specify
-w.
-a application-guid
Send requests with a specific application-guid. There are cur
rently only three known valid application-guids:
55c92734-d682-4d71-983e-d6ec3f16059f (Windows)
59a52881-a989-479d-af46-f275c6370663 (Office 2010)
0ff1ce15-a989-479d-af46-f275c6370663 (Office 2013)
A Microsoft KMS server uses these GUIDs to have seperate coun
ters for the already activated clients. A client that does not
contact the KMS server within 30 days will be deleted from the
database. Emulated KMS servers are always fully charged.
-k kms-guid
Send requests with a specific kms-guid. A Microsoft KMS server
uses these GUIDs as a product id to decide whether to grant
activation or not. A list of current kms-guids can be found in
kms.c (table KmsIdList). Emulated KMS servers grant activation
unconditionally and do not check the kms-guid.
-s activation-guid
The activation-guid defines the actual product, e.g. "Windows
8.1 Professional WMC KMSCLIENT edition". A activation-guid maps
1:1 to a product key. However, neither a Microsoft KMS server
nor emulated servers check this id. The activation-guid is use
ful in logging to get a specific product description like "Win
dows 8.1 Professional WMC". A list of current activation-guids
can be found in kms.c (table ExtendedProductList).
-n requests
Send requests requests to the server. The default is to send at
least one request and enough subsequent requests that the server
is fully charged afterwards for the application-guid you
selected (explicitly with -a or implicitly by using -l).
-T Causes to use a new TCP connection for each request if multiple
requests are sent with vlmcsd. This is useful when you want to
test an emulated KMS server whether it suffers from memory
leaks. To test for memory leaks use -n with a large number of
requests (> 100000) and then test twice (with and without -T).
This option may become neccessary for future versions of Micro
soft's KMS server because multiple requests with different
clients-guids for the same kms-id-guid are impossible in a real
KMS szenario over the same TCP connection.
-c client-machine-guid
Normally vlmcs generates a random client-machine-guid for each
request. By using this option you can specify a fixed client-
machine-guid This causes a Microsoft KMS not to increment its
client count because it receives multiple requests for the same
client. Thus do not use -c if you want to charge a real KMS
server.
-o previous-client-machine-guid
If the client-machine-guid changes for some reason, the real KMS
client stores a previous-client-machine-guid which is sent to
the KMS server. This happens rarely and usually
00000000-0000-0000-0000-000000000000 is used. You can use -o to
specify a different previous-client-machine-guid.
-G filename
Grabs ePIDs and HWIDs from a KMS server and writes the informa
tion to filename in format suitable to be used as a configura
tion file (aka ini file) for vlmcsd(8). This is especially use
ful if you have access to a genuine KMS server and want to use
the same data with vlmcsd(8).
If filename does not exist, it will be created. If you specify
an existing filename, it will be updated to use the information
received from the remote KMS server and a backup filename~ will
be created.
-G cannot be used with -l, -4, -5, -6, -a, -s, -k, -r and -n
-w workstation-name
Send requests with a specific workstation-name. This disables
the random generator for the workstation name. Since it is a
comment only, this option does not have much effect.
-r required-client-count
Also known as the "N count policy". Tells the KMS server that
successful activation requires required-client-count clients.
The default is the required-client-count that the product would
need if the request was a real activation. A Microsoft KMS
server counts clients up to the double amount what was specified
with -r. This option can be used to "overcharge" a Microsoft KMS
server.
-t status
Reports a specific license status to the KMS server. status is a
number that can be from 0 to 6. 0=unlicensed, 1=licensed, 2=OOB
grace, 3=OOT grace, 4=Non-genuinue grace, 5=notification,
6=extended grace. Refer to TechNet ⟨http://
technet.microsoft.com/en-us/library/ff686879.aspx#_Toc257201371⟩
for more information. A Microsoft KMS server collects this
information for statistics only.
-g binding-expiration
This tells the KMS server how long a client will stay in its
current license status. This can be the remaining OOB time (the
grace peroid that is granted between installation of a product
and when activation is actuall required) or the remaining time
when KMS activation must be renewed. binding-expiration is
specified in minutes. A Microsoft KMS server apparantly does not
use this information.
-i protocol-version
Force the use of Internet protocol protocol-version. Allowed
values are 4 (IPv4) and 6 (IPv6). This option is useful only if
you specfiy a hostname and not an ip-address on the command
line.
-p Do not set the RPC_PF_MULTIPLEX flag in the RPC bind request.
This can be used to test if the KMS server uses the same setting
of this flag in the RPC bind respone. Some KMS emulators don't
set this correctly.
-N0 and -N1
Disables (-N0) or enables (-N1) the NDR64 transfer syntax in the
RPC protocol. Disable NDR64 only in case of problems. If NDR64
is not used, vlmcs cannot detect many RPC protocol errors in KMS
emulators. If you want to test whether a KMS emulator fully sup
ports NDR64, you must use the -n option to send at least two
requests. This is because Microsoft's client always sends the
first request using NDR32 syntax and subsequent requests using
NDR64 syntax.
-B0 and -B1
Disables (-B0) or enables (-B1) bind time feature negotiation
(BTFN) in the RPC protocol. Disable BTFN only in case of prob
lems. If BTFN is not used, vlmcs cannot detect many RPC protocol
errors in KMS emulators.
Options that do not require an argument can be specified together with
a single dash, e.g. vlmcs -6mvT. If you specify an option more than
once, the last occurence will be in effect.
FILES
vlmcsd.ini(5)
EXAMPLES
vlmcs kms.example.com
Request activation for Windows Vista using v4 protocol from
kms.example.com. Repeat activation requests until server is
charged for all Windows products.
vlmcs -
Request activation for Windows Vista using v4 protocol from a
KMS server that is published via DNS for the current domain.
vlmcs .example.com
Request activation for Windows Vista using v4 protocol from a
KMS server that is published via DNS for domain example.com.
vlmcs -6 -l Office2013 -v -n 1
Request exactly one activation for Office2013 using v6 protocol
from localhost. Display verbose results.
vlmcs kms.bigcompany.com -G /etc/vlmcsd.ini
Get ePIDs and HWIDs from kms.bigcompany.com and create/update
/etc/vlmcsd.ini accordingly.
BUGS
Some platforms (e.g. Solaris) may have a man(7) system that does not
handle URLs. URLs may be omitted in the documentation on those plat
forms. Cygwin, Linux, FreeBSD and Mac OS X are known to work correctly.
AUTHOR
Written by Hotbird64
CREDITS
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos
ferati87, qad, Ratiborus, vityan666, ...
SEE ALSO
vlmcsd(7), vlmcsd(8), vlmcsdmulti(1)
Hotbird64 October 2016 VLMCS(1)

View File

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Wed Jul 13 12:34:01 2016 -->
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -39,7 +39,7 @@
</h2>
<p style="margin-left:11%; margin-top: 1em">vlmcs &minus; a
<p style="margin-left:11%; margin-top: 1em">vlmcs - a
client for testing and/or charging KMS servers</p>
<h2>SYNOPSIS
@ -183,14 +183,30 @@ applications is not complete. You may supply GUIDs with
that are not listed with <b>-x</b>. The <b>-l</b> option is
used as a shortcut for the most common applications.</p>
<p style="margin-left:11%;"><b>-K</b>
<i>protocol-version</i></p>
<p style="margin-left:22%;">Force a specific version of the
KMS protocol. Valid versions are 4.0, 5.0 and 6.0. The
default is to select a suitable version according to the
<i>application</i> selected. You may use <b>-K</b> to send
an incorrect protocol version to the KMS server and see how
it behaves. Genuine KMS servers return HRESULT 0x8007000D if
the KMS protocol is not 4.0, 5.0 or 6.0. Emulators should do
the same. When sending a request with an incorrect protocol
number, vlmcs ignores the minor protocol number (e.g. sends
a v4 request for version 4.1). If the major version number
is less then 4, it sends a v4 request. If the major version
is greater then 6, it sends a v6 request. In any case the
<i>protocol-version</i> as specified by <b>-K</b> is put in
the version fields of the request.</p>
<p style="margin-left:11%;"><b>-4</b>, <b>-5</b> and
<b>-6</b></p>
<p style="margin-left:22%;">Force version 4, 5 or 6 of the
KMS protocol. The default is to select a suitable version
according to the <i>application</i> selected. Plese note
that some products (e.g. Office 2013) may use different
protocols with different versions of Windows.</p>
KMS protocol. These options are actually shortcuts of <b>-K
4.0</b>, <b>-K 5.0</b> and <b>-K 6.0</b>.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
@ -276,7 +292,7 @@ ExtendedProductList).</p>
<p style="margin-left:22%;">Send <i>requests</i> requests
to the server. The default is to send at least one request
and enough subsequent requests that the server is fully
charged afterwards for the <i>application&minus;guid</i> you
charged afterwards for the <i>application-guid</i> you
selected (explicitly with <b>-a</b> or implicitly by using
<b>-l</b>).</p>
@ -368,7 +384,7 @@ what was specified with <b>-r</b>. This option can be used
to &quot;overcharge&quot; a Microsoft KMS server.</p>
<p style="margin-left:11%;"><b>&minus;t&nbsp;</b><i>status</i></p>
<p style="margin-left:11%;"><b>-t&nbsp;</b><i>status</i></p>
<p style="margin-left:22%;">Reports a specific license
status to the KMS server. <i>status</i> is a number that can

Binary file not shown.

326
man/vlmcs.1.unix.txt Normal file
View File

@ -0,0 +1,326 @@
VLMCS(1) KMS Activation Manual VLMCS(1)
NAME
vlmcs - a client for testing and/or charging KMS servers
SYNOPSIS
vlmcs [ options ] [ target ] [ options ]
target can be one of the following:
hostname|ipaddress[:tcp-port] to query a specific KMS server
(example: vlmcs kms.example.com:1688).
.domain to automatically detect KMS servers via DNS for domain
(example: vlmcs .example.com). Please note the dot before
domain.
- (a single dash) to detect KMS servers in your own domain.
If you use ipaddress:port as the target, the ipaddress must be enclosed
in brackets if it contains colons, e.g. [2001:db8:dead:beef::1]:1688.
If you use a link-local IPv6 address on Unix systems, you must append a
percent sign and the interface identifier of the source interface, for
example fe80::dead:beef%eth0.
If you omit the target, 127.0.0.1:1688 will be used except if you use
-i6. In this case the default target is [::1]:1688.
DESCRIPTION
vlmcs is a program that can be used to test a KMS server that provides
activation for several Microsoft products. The KMS server may also be
an emulator. It supports KMS protocol versions 4, 5 and 6.
vlmcs generates one or more activation requests for a Microsoft KMS
product and sends it to a KMS server. It then analyzes and displays the
responses of the KMS server.
vlcms checks both the DCE-RPC protocol and the activation message for
correctness and reports any errors that it finds.
vlmcs can also be used to "charge" a KMS server. A Microsoft KMS server
sends correct activation messages only if it detects a certain minimum
of clients (25 for Windows client OSses, 5 otherwise) on the network.
This is Microsoft's futile attempt to prevent running a KMS server in a
home environment.
OPTIONS
-h or -?
Show help.
-V Displays extended version information. This includes the com
piler used to build vlmcs, the intended platform and flags (com
pile time options) to build vlmcs. If you have the source code
of vlmcsd, you can type make help (or gmake help on systems that
do not use the GNU version of make(1) by default) to see the
meaning of those flags.
-x Show valid applications that can be used with -l.
-e Show some examples how to use vlmcs correctly.
-v Be verbose. Instead of just displaying the returned ePID and the
HwId (protocol v6 only) vlmcsd shows all details of the query
and the response.
-l application
Request activation for a specific application. Valid applica
tions can be displayed by using -x. The default application is
Windows Vista Business. The list of available applications is
not complete. You may supply GUIDs with -a, -k and -s to specify
applications that are not listed with -x. The -l option is used
as a shortcut for the most common applications.
-K protocol-version
Force a specific version of the KMS protocol. Valid versions are
4.0, 5.0 and 6.0. The default is to select a suitable version
according to the application selected. You may use -K to send an
incorrect protocol version to the KMS server and see how it
behaves. Genuine KMS servers return HRESULT 0x8007000D if the
KMS protocol is not 4.0, 5.0 or 6.0. Emulators should do the
same. When sending a request with an incorrect protocol number,
vlmcs ignores the minor protocol number (e.g. sends a v4 request
for version 4.1). If the major version number is less then 4, it
sends a v4 request. If the major version is greater then 6, it
sends a v6 request. In any case the protocol-version as speci
fied by -K is put in the version fields of the request.
-4, -5 and -6
Force version 4, 5 or 6 of the KMS protocol. These options are
actually shortcuts of -K 4.0, -K 5.0 and -K 6.0.
-m Let the client pretend to be a virtual machine. Early versions
of Microsoft's KMS server did not increase the client count if
the request came from a virtual machine. Newer versions ignore
this flag.
-d Use NetBIOS names instead of DNS names. By default vlmcsd gener
ates some random DNS names for each request. If you prefer Net
BIOS names, you may use -d. A real Microsoft activation client
uses DNS names or NetBIOS depending on the client name configu
ration. KMS servers treat the workstation name as a comment that
affects logging only. Clients will be identified by a GUID that
can be specified using -c. -d has no effect if you also specify
-w.
-a application-guid
Send requests with a specific application-guid. There are cur
rently only three known valid application-guids:
55c92734-d682-4d71-983e-d6ec3f16059f (Windows)
59a52881-a989-479d-af46-f275c6370663 (Office 2010)
0ff1ce15-a989-479d-af46-f275c6370663 (Office 2013)
A Microsoft KMS server uses these GUIDs to have seperate coun
ters for the already activated clients. A client that does not
contact the KMS server within 30 days will be deleted from the
database. Emulated KMS servers are always fully charged.
-k kms-guid
Send requests with a specific kms-guid. A Microsoft KMS server
uses these GUIDs as a product id to decide whether to grant
activation or not. A list of current kms-guids can be found in
kms.c (table KmsIdList). Emulated KMS servers grant activation
unconditionally and do not check the kms-guid.
-s activation-guid
The activation-guid defines the actual product, e.g. "Windows
8.1 Professional WMC KMSCLIENT edition". A activation-guid maps
1:1 to a product key. However, neither a Microsoft KMS server
nor emulated servers check this id. The activation-guid is use
ful in logging to get a specific product description like "Win
dows 8.1 Professional WMC". A list of current activation-guids
can be found in kms.c (table ExtendedProductList).
-n requests
Send requests requests to the server. The default is to send at
least one request and enough subsequent requests that the server
is fully charged afterwards for the application-guid you
selected (explicitly with -a or implicitly by using -l).
-T Causes to use a new TCP connection for each request if multiple
requests are sent with vlmcsd. This is useful when you want to
test an emulated KMS server whether it suffers from memory
leaks. To test for memory leaks use -n with a large number of
requests (> 100000) and then test twice (with and without -T).
This option may become neccessary for future versions of Micro
soft's KMS server because multiple requests with different
clients-guids for the same kms-id-guid are impossible in a real
KMS szenario over the same TCP connection.
-c client-machine-guid
Normally vlmcs generates a random client-machine-guid for each
request. By using this option you can specify a fixed client-
machine-guid This causes a Microsoft KMS not to increment its
client count because it receives multiple requests for the same
client. Thus do not use -c if you want to charge a real KMS
server.
-o previous-client-machine-guid
If the client-machine-guid changes for some reason, the real KMS
client stores a previous-client-machine-guid which is sent to
the KMS server. This happens rarely and usually
00000000-0000-0000-0000-000000000000 is used. You can use -o to
specify a different previous-client-machine-guid.
-G filename
Grabs ePIDs and HWIDs from a KMS server and writes the informa
tion to filename in format suitable to be used as a configura
tion file (aka ini file) for vlmcsd(8). This is especially use
ful if you have access to a genuine KMS server and want to use
the same data with vlmcsd(8).
If filename does not exist, it will be created. If you specify
an existing filename, it will be updated to use the information
received from the remote KMS server and a backup filename~ will
be created.
-G cannot be used with -l, -4, -5, -6, -a, -s, -k, -r and -n
-w workstation-name
Send requests with a specific workstation-name. This disables
the random generator for the workstation name. Since it is a
comment only, this option does not have much effect.
-r required-client-count
Also known as the "N count policy". Tells the KMS server that
successful activation requires required-client-count clients.
The default is the required-client-count that the product would
need if the request was a real activation. A Microsoft KMS
server counts clients up to the double amount what was specified
with -r. This option can be used to "overcharge" a Microsoft KMS
server.
-t status
Reports a specific license status to the KMS server. status is a
number that can be from 0 to 6. 0=unlicensed, 1=licensed, 2=OOB
grace, 3=OOT grace, 4=Non-genuinue grace, 5=notification,
6=extended grace. Refer to TechNet ⟨http://
technet.microsoft.com/en-us/library/ff686879.aspx#_Toc257201371⟩
for more information. A Microsoft KMS server collects this
information for statistics only.
-g binding-expiration
This tells the KMS server how long a client will stay in its
current license status. This can be the remaining OOB time (the
grace peroid that is granted between installation of a product
and when activation is actuall required) or the remaining time
when KMS activation must be renewed. binding-expiration is
specified in minutes. A Microsoft KMS server apparantly does not
use this information.
-i protocol-version
Force the use of Internet protocol protocol-version. Allowed
values are 4 (IPv4) and 6 (IPv6). This option is useful only if
you specfiy a hostname and not an ip-address on the command
line.
-p Do not set the RPC_PF_MULTIPLEX flag in the RPC bind request.
This can be used to test if the KMS server uses the same setting
of this flag in the RPC bind respone. Some KMS emulators don't
set this correctly.
-N0 and -N1
Disables (-N0) or enables (-N1) the NDR64 transfer syntax in the
RPC protocol. Disable NDR64 only in case of problems. If NDR64
is not used, vlmcs cannot detect many RPC protocol errors in KMS
emulators. If you want to test whether a KMS emulator fully sup
ports NDR64, you must use the -n option to send at least two
requests. This is because Microsoft's client always sends the
first request using NDR32 syntax and subsequent requests using
NDR64 syntax.
-B0 and -B1
Disables (-B0) or enables (-B1) bind time feature negotiation
(BTFN) in the RPC protocol. Disable BTFN only in case of prob
lems. If BTFN is not used, vlmcs cannot detect many RPC protocol
errors in KMS emulators.
Options that do not require an argument can be specified together with
a single dash, e.g. vlmcs -6mvT. If you specify an option more than
once, the last occurence will be in effect.
FILES
vlmcsd.ini(5)
EXAMPLES
vlmcs kms.example.com
Request activation for Windows Vista using v4 protocol from
kms.example.com. Repeat activation requests until server is
charged for all Windows products.
vlmcs -
Request activation for Windows Vista using v4 protocol from a
KMS server that is published via DNS for the current domain.
vlmcs .example.com
Request activation for Windows Vista using v4 protocol from a
KMS server that is published via DNS for domain example.com.
vlmcs -6 -l Office2013 -v -n 1
Request exactly one activation for Office2013 using v6 protocol
from localhost. Display verbose results.
vlmcs kms.bigcompany.com -G /etc/vlmcsd.ini
Get ePIDs and HWIDs from kms.bigcompany.com and create/update
/etc/vlmcsd.ini accordingly.
BUGS
Some platforms (e.g. Solaris) may have a man(7) system that does not
handle URLs. URLs may be omitted in the documentation on those plat
forms. Cygwin, Linux, FreeBSD and Mac OS X are known to work correctly.
AUTHOR
Written by Hotbird64
CREDITS
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos
ferati87, qad, Ratiborus, vityan666, ...
SEE ALSO
vlmcsd(7), vlmcsd(8), vlmcsdmulti(1)
Hotbird64 October 2016 VLMCS(1)

View File

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Wed Jul 13 12:34:02 2016 -->
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -42,9 +42,8 @@
</h2>
<p style="margin-left:11%; margin-top: 1em">floppy144.vfd
&minus; a bootable floppy disk with Linux and
<b>vlmcsd</b>(8)</p>
<p style="margin-left:11%; margin-top: 1em">floppy144.vfd -
a bootable floppy disk with Linux and <b>vlmcsd</b>(8)</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
@ -549,9 +548,9 @@ addresses and all user names and passwords.</p>
<p style="margin-left:11%; margin-top: 1em"><b>Logging into
the system</b> <br>
There are 5 local logins provided on /dev/tty2 to /dev/tty6.
To switch to these logins, simply press ALT&minus;F2 to
ALT&minus;F6. To return to the console on /dev/tty1, press
ALT&minus;F1. If <b>inetd</b>(8) is running you can also use
To switch to these logins, simply press ALT-F2 to ALT-F6. To
return to the console on /dev/tty1, press ALT-F1. If
<b>inetd</b>(8) is running you can also use
<b>telnet</b>(1). This allows you use a terminal program
(e.g. putty) that can utilize your keyboard layout, can be
resized and has full UTF-8 support. The local terminals
@ -571,11 +570,11 @@ editor of your choice and transfer them back to the
<p style="margin-left:11%; margin-top: 1em"><b>The menu
system</b> <br>
You&rsquo;ll find a menu system on /dev/tty8 (press
ALT&minus;F8 to see it). It allows you performing some
administrative tasks and to view various system information.
It is mainly for users that do not have much experience with
Unix commands. <b><br>
You&rsquo;ll find a menu system on /dev/tty8 (press ALT-F8
to see it). It allows you performing some administrative
tasks and to view various system information. It is mainly
for users that do not have much experience with Unix
commands. <b><br>
1) (Re)start vlmcsd</b></p>
<p style="margin-left:22%;">Starts or restarts

View File

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Wed Jul 13 12:34:01 2016 -->
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -35,7 +35,7 @@
<p style="margin-left:11%; margin-top: 1em">vlmcsd&nbsp;&minus;&nbsp;a
<p style="margin-left:11%; margin-top: 1em">vlmcsd&nbsp;-&nbsp;a
guide to KMS activation using vlmcsd</p>
<h2>SYNOPSIS
@ -169,34 +169,29 @@ inofficial GVLKs that work with consumer-only versions of
Windows. Here is a list:</p>
<p style="margin-left:11%; margin-top: 1em">TX9XD&minus;98N7V&minus;6WMQ6&minus;BX7FG&minus;H8Q99
<p style="margin-left:11%; margin-top: 1em">TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
- Windows 10 Home <br>
3KHY7&minus;WNT83&minus;DGQKR&minus;F7HPR&minus;844BM -
Windows 10 Home N <br>
7HNRX&minus;D7KGG&minus;3K4RQ&minus;4WPJ4&minus;YTDFH -
Windows 10 Home Single Language <br>
PVMJN&minus;6DFY6&minus;9CCP6&minus;7BKTT&minus;D3WVR -
Windows 10 Home Country Specific <br>
789NJ&minus;TQK6T&minus;6XTH8&minus;J39CJ&minus;J8D3P -
Windows 8.1 Professional with Media Center <br>
M9Q9P&minus;WNJJT&minus;6PXPY&minus;DWX8H&minus;6XWKK -
Windows 8.1 Core <br>
7B9N3&minus;D94CG&minus;YTVHR&minus;QBPX3&minus;RJP64 -
Windows 8.1 Core N <br>
BB6NG&minus;PQ82V&minus;VRDPW&minus;8XVD2&minus;V8P66 -
Windows 8.1 Core Single Language <br>
NCTT7&minus;2RGK8&minus;WMHRF&minus;RY7YQ&minus;JTXG3 -
Windows 8.1 Core Country Specific <br>
GNBB8&minus;YVD74&minus;QJHX6&minus;27H4K&minus;8QHDG -
Windows 8 Professional with Media Center <br>
BN3D2&minus;R7TKB&minus;3YPBD&minus;8DRP2&minus;27GG4 -
Windows 8 Core <br>
8N2M2&minus;HWPGY&minus;7PGT9&minus;HGDD8&minus;GVGGY -
Windows 8 Core N <br>
2WN2H&minus;YGCQR&minus;KFX6K&minus;CD6TF&minus;84YXQ -
Windows 8 Core Single Language <br>
4K36P&minus;JN4VD&minus;GDC6V&minus;KDT89&minus;DYFKP -
Windows 8 Core Country Specific</p>
3KHY7-WNT83-DGQKR-F7HPR-844BM - Windows 10 Home N <br>
7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH - Windows 10 Home Single
Language <br>
PVMJN-6DFY6-9CCP6-7BKTT-D3WVR - Windows 10 Home Country
Specific <br>
789NJ-TQK6T-6XTH8-J39CJ-J8D3P - Windows 8.1 Professional
with Media Center <br>
M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK - Windows 8.1 Core <br>
7B9N3-D94CG-YTVHR-QBPX3-RJP64 - Windows 8.1 Core N <br>
BB6NG-PQ82V-VRDPW-8XVD2-V8P66 - Windows 8.1 Core Single
Language <br>
NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3 - Windows 8.1 Core Country
Specific <br>
GNBB8-YVD74-QJHX6-27H4K-8QHDG - Windows 8 Professional with
Media Center <br>
BN3D2-R7TKB-3YPBD-8DRP2-27GG4 - Windows 8 Core <br>
8N2M2-HWPGY-7PGT9-HGDD8-GVGGY - Windows 8 Core N <br>
2WN2H-YGCQR-KFX6K-CD6TF-84YXQ - Windows 8 Core Single
Language <br>
4K36P-JN4VD-GDC6V-KDT89-DYFKP - Windows 8 Core Country
Specific</p>
<p style="margin-left:11%; margin-top: 1em">The above keys
require activation renewal every 45 days (Win 8.1) or 30
@ -240,9 +235,9 @@ turned out to be non-working, you can use
Examples</b></p>
<p style="margin-left:22%;">slmgr&nbsp;/ipk
GCRJD&minus;8NW9H&minus;F2CDX&minus;CCM8D&minus;9D6T9 <br>
GCRJD-8NW9H-F2CDX-CCM8D-9D6T9 <br>
cscript
ospp.vbs&nbsp;/inpkey:YC7DK&minus;G2NP3&minus;2QQC3&minus;J6H88&minus;GVGXT</p>
ospp.vbs&nbsp;/inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT</p>
<p style="margin-left:11%; margin-top: 1em"><b>Why
doesn&rsquo;t Office accpet a GVLK?</b> <br>
@ -306,7 +301,7 @@ automatically. This may take a while. <br>
You may type</p>
<p style="margin-left:22%;">slmgr&nbsp;/ato <br>
&minus;or&minus; <br>
-or- <br>
cscript ospp.vbs&nbsp;/act</p>
<p style="margin-left:11%; margin-top: 1em">at any time to
@ -325,8 +320,8 @@ like this:</p>
<p style="margin-left:22%; margin-top: 1em">Connecting to
127.0.0.1:1688 ... successful <br>
Sending&nbsp;activation&nbsp;request&nbsp;(KMS&nbsp;V4)&nbsp;1&nbsp;of&nbsp;1&nbsp;&minus;&gt;
06401&minus;00206&minus;296&minus;206344&minus;03&minus;5179&minus;9600.0000&minus;3432013</p>
Sending&nbsp;activation&nbsp;request&nbsp;(KMS&nbsp;V4)&nbsp;1&nbsp;of&nbsp;1&nbsp;-&gt;
06401-00206-296-206344-03-5179-9600.0000-3432013</p>
<p style="margin-left:11%; margin-top: 1em">If anything
goes wrong, you&rsquo;ll see an error message. Next try

Binary file not shown.

View File

@ -1,5 +1,5 @@
.mso www.tmac
.TH VLMCSD 8 "July 2016" "Hotbird64" "KMS Activation Manual"
.TH VLMCSD 8 "October 2016" "Hotbird64" "KMS Activation Manual"
.LO 8
.SH NAME
@ -50,6 +50,8 @@ Using \fB-o1\fR does not protect you if you enable NAT port forwarding on your r
\fB-o2\fR does not affect the interfaces, vlmcsd is listening on. When a clients connects, vlmcsd immediately drops the connection if the client has a public IP address. Unlike \fB-o1\fR clients will be able to establish a TCP connection but it will be closed without a single byte sent over the connection. This protects against clients with public IP addresses even if NAT port forwarding is used. While \fB-o2\fR offers a higher level of protection than \fB-o1\fR, the client sees that the KMS TCP port (1688 by default) is actually accepting connections.
If vlmcsd is compiled to use MS RPC, \fB-o2\fR can only offer very poor protection. Control is passed from MS RPC to vlmcsd after the KMS protocol has already been negotiated. Thus a client can always verify that the KMS protocol is available even though it receives an RPC_S_ACCESS_DENIED error message. vlmcsd will issue a warning if \fB-o2\fR is used with MS RPC. \fBFor adaequate protection do not use a MS RPC build of vlmcsd with -o2\fR.
\fB-o3\fR combines \fB-o1\fR and \fB-o2\fR. vlmcsd listens on private interfaces only and if a public client manages to connect anyway due to NAT port forwarding, it will be immediately dropped.
If you use any form of TCP level port forwarding (e.g. \fBnc\fR(1), \fBnetcat\fR(1), \fBssh\fR(1) port forwarding or similar) to redirect KMS requests to vlmcsd, there will be no protection even if you use \fB-o2\fR or \fB-o3\fR. This is due to the simple fact that vlmcsd sees the IP address of the redirector and not the IP address of the client.
@ -133,7 +135,10 @@ Use \fIePID\fR as Windows ePID. If specified, \fB-r\fR is disregarded for Window
Use \fIePID\fR as Office 2010 ePID (including Project and Visio). If specified, \fB-r\fR is disregarded for Office 2010.
.IP "\fB-3\fR \fIePID\fR"
Use \fIePID\fR as Office 2013/2016 ePID (including Project and Visio). If specified, \fB-r\fR is disregarded for Office 2013/2016.
Use \fIePID\fR as Office 2013 ePID (including Project and Visio). If specified, \fB-r\fR is disregarded for Office 2013.
.IP "\fB-6\fR \fIePID\fR"
Use \fIePID\fR as Office 2016 ePID (including Project and Visio). If specified, \fB-r\fR is disregarded for Office 2016.
.IP "\fB-H\fR \fIHwId\fR"
Use \fIHwId\fR for all products. All HWIDs in the ini file (see \fB-i\fR) will not be used. In an ini file you can specify a seperate HWID for each \fIapplication-guid\fR. This is not possible when entering a HWID from the command line.
@ -160,15 +165,15 @@ These options determine how ePIDs are generated if
.br
- the file specified by \fB-i\fR cannot be opened or
.br
- the file specified by \fB-i\fR does not contain the \fIapplication-guid\fR for the KMS request
- the file specified by \fB-i\fR does not contain an ePID for the KMS request
\fB-r0\fR means there are no random ePIDs. vlmcsd simply issues default ePIDs that are built into the binary at compile time. \fBPro:\fR behaves like real KMS server that also always issues the same ePID. \fBCon\fR: Microsoft may start blacklisting again and the default ePID may not work any longer.
\fB-r0\fR means there are no random ePIDs. vlmcsd simply issues default ePIDs that are built into the binary at compile time. \fBPro:\fR behaves like real KMS server that also always issues the same ePID. \fBCon:\fR Microsoft may start blacklisting again and the default ePID may not work any longer.
\fB-r1\fR instructs vlmcsd to generate random ePIDs when the program starts or receives a SIGHUP signal and uses these ePIDs until it is stopped or receives another SIGHUP. Most other KMS emulators generate a new ePID on every KMS request. This is easily detectable. Microsoft could just modify sppsvc.exe in a way that it always sends two identical KMS requests in two RPC requests but over the same TCP connection. If both KMS responses contain the different ePIDs, the KMS server is not genuine. \fB-r1\fR is the default mode. \fB-r1\fR also ensures that all three ePIDs (Windows, Office 2010 and Office 2013) use the same OS build number and LCID (language id).
If vlmcsd has been started by an internet superserver, \fB-r1\fR works identically to \fB-r2\fR. This is simply due to the fact that vlmcsd is started upon a connection request and does not stay in memory after servicing a KMS request.
If vlmcsd has been started by an internet superserver, \fB-r1\fR works almost identically to \fB-r2\fR. The only exception occurs if you send more than one activation request over the same TCP connection. This is simply due to the fact that vlmcsd is started upon a connection request and does not stay in memory after servicing a KMS request. Consider using \fB-r0\fR or \fB-w\fR, \fB-0\fR, \fB-3\fR and \fB-6\fB when starting vlmcsd by an internet superserver.
\fB-r2\fR behaves like most other KMS server emulators with random support and generates a new random ePID on every request. Use this mode with "care". However since Microsoft currently does not seem to do any verification of the ePID, you currently don't need to pay attention to ePIDs at all.
\fB-r2\fR behaves like most other KMS server emulators with random support and generates a new random ePID on every request. \fB-r2\fR should be treated as debugging option only because it allows very easy emulator detection.
.IP "\fB-C\fR \fILCID\fR"
Do not randomize the locale id part of the ePID and use \fILCID\fR instead. The \fILCID\fR must be specified as a decimal number, e.g. 1049 for "Russian - Russia". This option has no effect if the ePID is not randomized at all, e.g. if it is selected from the command line or an ini file.
@ -179,6 +184,25 @@ for a list of valid \fILCID\fRs. Please note that some of them are not recognize
Most other KMS emulators use a fixed \fILCID\fR of 1033 (English - US). To achive the same behavior in vlmcsd use \fB-C 1033\fR.
.IP "\fB-K0\fR, \fB-K1\fR, \fB-K2\fR and \fB-K3\fR"
Sets the whitelisting level to determine which products vlmcsd activates or refuses. The default is \fB-K0\fR.
.RS 12
\fB-K0\fR: activate all products with an unknown, retail or beta/preview KMS ID.
.br
\fB-K1\fR: activate products with a retail or beta/preview KMS ID but refuse to activate products with an unknown KMS ID.
.br
\fB-K2\fR: activate products with an unknown KMS ID but refuse products with a retail or beta/preview KMS ID.
.br
\fB-K3\fR: activate only products with a known volume license RTM KMS ID and refuse all others.
.RE
.IP ""
The SKU ID is not checked. Like a genuine KMS server vlmcsd activates a product that has a random or unknown SKU ID. If you select \fB-K1\fR or \fB-K3\fR, vlmcsd also checks the Application ID for correctness. If Microsoft introduces a new KMS ID for a new product, you cannot activate it if you used \fB-K1\fR or \fB-K3\fR until a new version of vlmcsd is available.
.IP "\fB-c0\fR and \fB-c1\fR"
\fB-c1\fR causes vlmcsd to check if the client time differs no more than four hours from the system time. \fB-c0\fR (the default) disables this check. \fB-c1\fR is useful to prevent emulator detection. A client that tries to detect an emulator could simply send two subsequent request with two time stamps that differ more than four hours from each other. If both requests succeed, the server is an emulator. If you specify \fB-c1\fR on a system with no reliable time source, activations will fail. It is ok to set the correct system time after you started vlmcsd.
.IP "\fB-R\fR \fIrenewal-interval\fR"
Instructs clients to renew activation every \fIrenewal-interval\fR. The \fIrenewal-interval\fR is a number optionally immediately followed by a letter indicating the unit. Valid unit letters are s (seconds), m (minutes), h (hours), d (days) and w (weeks). If you do not specify a letter, minutes is assumed.
@ -245,7 +269,7 @@ Signaling is not available in the native Windows version and in the Cygwin versi
\fBvlmcsd\fR compiles and runs on Linux, Windows (no Cygwin required but explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or unixoid OSses may work with unmodified sources or may require minor porting efforts.
.SH SUPPORTED PRODUCTS
\fBvlmcsd\fR can answer activation requests for the following products: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Office 2010, Project 2010, Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project 2016, Visio 2016.
\fBvlmcsd\fR can answer activation requests for the following products: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1607), Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010, Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project 2016, Visio 2016. Newer version may work as long as the KMS protocol does not change. A complete list of fully supported products can be obtained using the \fB-x\fR option of \fBvlmcs\fR(1).
.PP
Office, Project and Visio must be volume license versions.
@ -268,7 +292,8 @@ Installs \fBvlmcsd\fR as a Windows service with low privileges and logs everythi
.SH BUGS
An ePID specified in an ini file must not contain spaces.
The maximum number of \fB-L\fR options in the command line or listen statements in the inifile is the platform default for \fIFD_SETSIZE\fR. This is 64 on Windows and 1024 on most Unixes.
.SH INTENTIONAL BUGS
vlmcsd always reports enough active clients to satisfy the N count policy of the request.
.SH AUTHOR
Written by crony12, Hotbird64 and vityan666.

View File

@ -117,6 +117,14 @@ OPTIONS
the client sees that the KMS TCP port (1688 by default) is actu
ally accepting connections.
If vlmcsd is compiled to use MS RPC, -o2 can only offer very
poor protection. Control is passed from MS RPC to vlmcsd after
the KMS protocol has already been negotiated. Thus a client can
always verify that the KMS protocol is available even though it
receives an RPC_S_ACCESS_DENIED error message. vlmcsd will issue
a warning if -o2 is used with MS RPC. For adaequate protection
do not use a MS RPC build of vlmcsd with -o2.
-o3 combines -o1 and -o2. vlmcsd listens on private interfaces
only and if a public client manages to connect anyway due to NAT
port forwarding, it will be immediately dropped.
@ -310,19 +318,24 @@ OPTIONS
-3 ePID
Use ePID as Office 2013/2016 ePID (including Project and Visio).
If specified, -r is disregarded for Office 2013/2016.
Use ePID as Office 2013 ePID (including Project and Visio). If
specified, -r is disregarded for Office 2013.
-6 ePID
Use ePID as Office 2016 ePID (including Project and Visio). If
specified, -r is disregarded for Office 2016.
-H HwId
Use HwId for all products. All HWIDs in the ini file (see -i)
Use HwId for all products. All HWIDs in the ini file (see -i)
will not be used. In an ini file you can specify a seperate HWID
for each application-guid. This is not possible when entering a
for each application-guid. This is not possible when entering a
HWID from the command line.
HwId must be specified as 16 hex digits that are interpreted as
a series of 8 bytes (big endian). Any character that is not a
hex digit will be ignored. This is for better readability. The
HwId must be specified as 16 hex digits that are interpreted as
a series of 8 bytes (big endian). Any character that is not a
hex digit will be ignored. This is for better readability. The
following commands are identical:
vlmcsd -H 0123456789ABCDEF
@ -331,14 +344,14 @@ OPTIONS
-i filename
Use configuration file (aka ini file) filename. Most configura
Use configuration file (aka ini file) filename. Most configura
tion parameters can be set either via the command line or an ini
file. The command line always has precedence over configuration
items in the ini file. See vlmcsd.ini(5) for the format of the
file. The command line always has precedence over configuration
items in the ini file. See vlmcsd.ini(5) for the format of the
configuration file.
If vlmcsd has been compiled to use a default configuration file
(often /etc/vlmcsd.ini), you may use -i- to ignore the default
If vlmcsd has been compiled to use a default configuration file
(often /etc/vlmcsd.ini), you may use -i- to ignore the default
configuration file.
@ -348,121 +361,157 @@ OPTIONS
- you did not sprecify an ePID in the command line and
- you haven't used -i or
- the file specified by -i cannot be opened or
- the file specified by -i does not contain the application-guid
for the KMS request
- the file specified by -i does not contain an ePID for the KMS
request
-r0 means there are no random ePIDs. vlmcsd simply issues
default ePIDs that are built into the binary at compile time.
Pro: behaves like real KMS server that also always issues the
same ePID. Con: Microsoft may start blacklisting again and the
-r0 means there are no random ePIDs. vlmcsd simply issues
default ePIDs that are built into the binary at compile time.
Pro: behaves like real KMS server that also always issues the
same ePID. Con: Microsoft may start blacklisting again and the
default ePID may not work any longer.
-r1 instructs vlmcsd to generate random ePIDs when the program
-r1 instructs vlmcsd to generate random ePIDs when the program
starts or receives a SIGHUP signal and uses these ePIDs until it
is stopped or receives another SIGHUP. Most other KMS emulators
generate a new ePID on every KMS request. This is easily
is stopped or receives another SIGHUP. Most other KMS emulators
generate a new ePID on every KMS request. This is easily
detectable. Microsoft could just modify sppsvc.exe in a way that
it always sends two identical KMS requests in two RPC requests
but over the same TCP connection. If both KMS responses contain
the different ePIDs, the KMS server is not genuine. -r1 is the
default mode. -r1 also ensures that all three ePIDs (Windows,
Office 2010 and Office 2013) use the same OS build number and
it always sends two identical KMS requests in two RPC requests
but over the same TCP connection. If both KMS responses contain
the different ePIDs, the KMS server is not genuine. -r1 is the
default mode. -r1 also ensures that all three ePIDs (Windows,
Office 2010 and Office 2013) use the same OS build number and
LCID (language id).
If vlmcsd has been started by an internet superserver, -r1 works
identically to -r2. This is simply due to the fact that vlmcsd
is started upon a connection request and does not stay in memory
after servicing a KMS request.
almost identically to -r2. The only exception occurs if you send
more than one activation request over the same TCP connection.
This is simply due to the fact that vlmcsd is started upon a
connection request and does not stay in memory after servicing a
KMS request. Consider using -r0 or -w, -0, -3 and -6 when start
ing vlmcsd by an internet superserver.
-r2 behaves like most other KMS server emulators with random
support and generates a new random ePID on every request. Use
this mode with "care". However since Microsoft currently does
not seem to do any verification of the ePID, you currently don't
need to pay attention to ePIDs at all.
support and generates a new random ePID on every request. -r2
should be treated as debugging option only because it allows
very easy emulator detection.
-C LCID
Do not randomize the locale id part of the ePID and use LCID
instead. The LCID must be specified as a decimal number, e.g.
1049 for "Russian - Russia". This option has no effect if the
ePID is not randomized at all, e.g. if it is selected from the
Do not randomize the locale id part of the ePID and use LCID
instead. The LCID must be specified as a decimal number, e.g.
1049 for "Russian - Russia". This option has no effect if the
ePID is not randomized at all, e.g. if it is selected from the
command line or an ini file.
By default vlmcsd generates a valid locale id that is recognized
by .NET Framework 4.0. This may lead to a locale id which is
by .NET Framework 4.0. This may lead to a locale id which is
unlikely to occur in your country, for instance 2155 for "Quecha
- Ecuador". You may want to select the locale id of your country
instead. See MSDN ⟨http://msdn.microsoft.com/en-us/goglobal/
bb964664.aspx⟩ for a list of valid LCIDs. Please note that some
bb964664.aspx⟩ for a list of valid LCIDs. Please note that some
of them are not recognized by .NET Framework 4.0.
Most other KMS emulators use a fixed LCID of 1033 (English -
Most other KMS emulators use a fixed LCID of 1033 (English -
US). To achive the same behavior in vlmcsd use -C 1033.
-K0, -K1, -K2 and -K3
Sets the whitelisting level to determine which products vlmcsd
activates or refuses. The default is -K0.
-K0: activate all products with an unknown, retail or
beta/preview KMS ID.
-K1: activate products with a retail or beta/preview KMS ID
but refuse to activate products with an unknown KMS ID.
-K2: activate products with an unknown KMS ID but refuse
products with a retail or beta/preview KMS ID.
-K3: activate only products with a known volume license RTM
KMS ID and refuse all others.
The SKU ID is not checked. Like a genuine KMS server vlmcsd
activates a product that has a random or unknown SKU ID. If you
select -K1 or -K3, vlmcsd also checks the Application ID for
correctness. If Microsoft introduces a new KMS ID for a new
product, you cannot activate it if you used -K1 or -K3 until a
new version of vlmcsd is available.
-c0 and -c1
-c1 causes vlmcsd to check if the client time differs no more
than four hours from the system time. -c0 (the default) disables
this check. -c1 is useful to prevent emulator detection. A
client that tries to detect an emulator could simply send two
subsequent request with two time stamps that differ more than
four hours from each other. If both requests succeed, the server
is an emulator. If you specify -c1 on a system with no reliable
time source, activations will fail. It is ok to set the correct
system time after you started vlmcsd.
-R renewal-interval
Instructs clients to renew activation every renewal-interval.
Instructs clients to renew activation every renewal-interval.
The renewal-interval is a number optionally immediately followed
by a letter indicating the unit. Valid unit letters are s (sec
by a letter indicating the unit. Valid unit letters are s (sec
onds), m (minutes), h (hours), d (days) and w (weeks). If you do
not specify a letter, minutes is assumed.
-R3d for instance instructs clients to renew activation every 3
-R3d for instance instructs clients to renew activation every 3
days. The default renewal-interval is 10080 (identical to 7d and
1w).
Due to poor implementation of Microsofts KMS Client it cannot be
guaranteed that activation is renewed on time as specfied by the
-R option. Don't care about that. Renewal will happen well
-R option. Don't care about that. Renewal will happen well
before your activation expires (usually 180 days).
Even though you can specify seconds, the granularity of this
option is 1 minute. Seconds are rounded down to the next multi
Even though you can specify seconds, the granularity of this
option is 1 minute. Seconds are rounded down to the next multi
ple of 60.
-A activation-interval
Instructs clients to retry activation every activation-interval
if it was unsuccessful, e.g. because it could not reach the
server. The default is 120 (identical to 2h). activation-inter
val follows the same syntax as renewal-interval in the -R
Instructs clients to retry activation every activation-interval
if it was unsuccessful, e.g. because it could not reach the
server. The default is 120 (identical to 2h). activation-inter
val follows the same syntax as renewal-interval in the -R
option.
-s Installs vlmcsd as a Windows service. This option only works
with the native Windows version and Cygwin. Combine -s with
other command line options. These will be in effect when you
start the service. The service automatically starts when you
reboot your machine. To start it manually, type "net start vlm
-s Installs vlmcsd as a Windows service. This option only works
with the native Windows version and Cygwin. Combine -s with
other command line options. These will be in effect when you
start the service. The service automatically starts when you
reboot your machine. To start it manually, type "net start vlm
csd".
If you use Cygwin, you must include your Cygwin system DLL
directory (usually C:\Cygwin\bin or C:\Cygwin64\bin) into the
If you use Cygwin, you must include your Cygwin system DLL
directory (usually C:\Cygwin\bin or C:\Cygwin64\bin) into the
PATH environment variable or the service will not start.
You can reinstall the service anytime using vlmcsd -s again,
e.g. with a different command line. If the service is running,
You can reinstall the service anytime using vlmcsd -s again,
e.g. with a different command line. If the service is running,
it will be restarted with the new command line.
When using -s the command line is checked for basic syntax
When using -s the command line is checked for basic syntax
errors only. For example "vlmcsd -s -L 1.2.3.4" reports no error
but the service will not start if 1.2.3.4 is not an IP address
but the service will not start if 1.2.3.4 is not an IP address
on your system.
-S Uninstalls the vlmcsd service. Works only with the native Win
dows version and Cygwin. All other options will be ignored if
-S Uninstalls the vlmcsd service. Works only with the native Win
dows version and Cygwin. All other options will be ignored if
you include -S in the command line.
-U [domain\]username
Can only be used together with -s. Starts the service as a dif
ferent user than the local SYSTEM account. This is used to run
the service under an account with low privileges. If you omit
Can only be used together with -s. Starts the service as a dif
ferent user than the local SYSTEM account. This is used to run
the service under an account with low privileges. If you omit
the domain, an account from the local computer will be used.
You may use "NT AUTHORITY\NetworkService". This is a pseudo user
with low privileges. You may also use "NT AUTHORITY\LocalSer
with low privileges. You may also use "NT AUTHORITY\LocalSer
vice" which has more privileges but these are of no use for run
ning vlmcsd.
@ -470,20 +519,20 @@ OPTIONS
sion for your executable. "NT AUTHORITY\NetworkService" normally
has no permission to run binaries from your home directory.
For your convenience you can use the special username "/l" as a
For your convenience you can use the special username "/l" as a
shortcut for "NT AUTHORITY\LocalService" and "/n" for "NT
AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser
AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser
vice to run as "NT AUTHORITY\NetworkService".
-W password
Can only be used together with -s. Specifies a password for the
corresponding username you use with -U. SYSTEM, "NT AUTHOR
ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
Can only be used together with -s. Specifies a password for the
corresponding username you use with -U. SYSTEM, "NT AUTHOR
ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
a password.
If you specify a user with even lower privileges than "NT
AUTHORITY\NetworkService", you must specify its password. You
If you specify a user with even lower privileges than "NT
AUTHORITY\NetworkService", you must specify its password. You
also have to grant the "Log on as a service" right to that user.
@ -492,51 +541,54 @@ SIGNALS
SIGTERM, SIGINT
These signals cause vlmcsd to exit gracefully. All global sema
phores and shared memory pages will be released, the pid file
will be unlinked (deleted) and a shutdown message will be
These signals cause vlmcsd to exit gracefully. All global sema
phores and shared memory pages will be released, the pid file
will be unlinked (deleted) and a shutdown message will be
logged.
SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
started vlmcsd with an ini file. You can modify the ini file
while vlmcsd is running and then sending SIGHUP, e.g. by typing
"killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm
SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
started vlmcsd with an ini file. You can modify the ini file
while vlmcsd is running and then sending SIGHUP, e.g. by typing
"killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm
csd.pid`".
The SIGHUP handler has been implemented relatively simple. It is
virtually the same as stopping vlmcsd and starting it again
virtually the same as stopping vlmcsd and starting it again
immediately with the following exceptions:
— The new process does not get a new process id.
— If you used a pid file, it is not deleted and recreated
— If you used a pid file, it is not deleted and recreated
because the process id stays the same.
— If you used the 'user' and/or 'group' directive in an ini
file these are ignored. This is because once you switched to
— If you used the 'user' and/or 'group' directive in an ini
file these are ignored. This is because once you switched to
lower privileged users and groups, there is no way back. Any
thing else would be a severe security flaw in the OS.
Signaling is not available in the native Windows version and in the
Signaling is not available in the native Windows version and in the
Cygwin version when it runs as Windows service.
SUPPORTED OPERATING SYSTEMS
vlmcsd compiles and runs on Linux, Windows (no Cygwin required but
explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly
BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or
unixoid OSses may work with unmodified sources or may require minor
vlmcsd compiles and runs on Linux, Windows (no Cygwin required but
explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly
BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or
unixoid OSses may work with unmodified sources or may require minor
porting efforts.
SUPPORTED PRODUCTS
vlmcsd can answer activation requests for the following products: Win
dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows
Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows
Server 2012 R2, Office 2010, Project 2010, Visio 2010, Office 2013,
Project 2013, Visio 2013, Office 2016, Project 2016, Visio 2016.
vlmcsd can answer activation requests for the following products: Win
dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1607),
Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Win
dows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010,
Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project
2016, Visio 2016. Newer version may work as long as the KMS protocol
does not change. A complete list of fully supported products can be
obtained using the -x option of vlmcs(1).
Office, Project and Visio must be volume license versions.
@ -572,18 +624,19 @@ EXAMPLES
BUGS
An ePID specified in an ini file must not contain spaces.
The maximum number of -L options in the command line or listen state
ments in the inifile is the platform default for FD_SETSIZE. This is 64
on Windows and 1024 on most Unixes.
INTENTIONAL BUGS
vlmcsd always reports enough active clients to satisfy the N count pol
icy of the request.
AUTHOR
Written by crony12, Hotbird64 and vityan666. With contributions from
Written by crony12, Hotbird64 and vityan666. With contributions from
DougQaid.
CREDITS
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati
borus, ...
@ -592,4 +645,4 @@ SEE ALSO
Hotbird64 July 2016 VLMCSD(8)
Hotbird64 October 2016 VLMCSD(8)

View File

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Wed Jul 13 12:34:01 2016 -->
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -30,6 +30,7 @@
<a href="#FILES">FILES</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#INTENTIONAL BUGS">INTENTIONAL BUGS</a><br>
<a href="#AUTHOR">AUTHOR</a><br>
<a href="#CREDITS">CREDITS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
@ -42,8 +43,8 @@
</h2>
<p style="margin-left:11%; margin-top: 1em">vlmcsd &minus;
a fully Microsoft compatible KMS server</p>
<p style="margin-left:11%; margin-top: 1em">vlmcsd - a
fully Microsoft compatible KMS server</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
@ -204,6 +205,16 @@ addresses even if NAT port forwarding is used. While
<b>-o1</b>, the client sees that the KMS TCP port (1688 by
default) is actually accepting connections.</p>
<p style="margin-left:22%; margin-top: 1em">If vlmcsd is
compiled to use MS RPC, <b>-o2</b> can only offer very poor
protection. Control is passed from MS RPC to vlmcsd after
the KMS protocol has already been negotiated. Thus a client
can always verify that the KMS protocol is available even
though it receives an RPC_S_ACCESS_DENIED error message.
vlmcsd will issue a warning if <b>-o2</b> is used with MS
RPC. <b>For adaequate protection do not use a MS RPC build
of vlmcsd with -o2</b>.</p>
<p style="margin-left:22%; margin-top: 1em"><b>-o3</b>
combines <b>-o1</b> and <b>-o2</b>. vlmcsd listens on
private interfaces only and if a public client manages to
@ -491,9 +502,15 @@ is disregarded for Office 2010.</p>
<p style="margin-left:11%;"><b>-3</b> <i>ePID</i></p>
<p style="margin-left:22%;">Use <i>ePID</i> as Office
2013/2016 ePID (including Project and Visio). If specified,
<b>-r</b> is disregarded for Office 2013/2016.</p>
<p style="margin-left:22%;">Use <i>ePID</i> as Office 2013
ePID (including Project and Visio). If specified, <b>-r</b>
is disregarded for Office 2013.</p>
<p style="margin-left:11%;"><b>-6</b> <i>ePID</i></p>
<p style="margin-left:22%;">Use <i>ePID</i> as Office 2016
ePID (including Project and Visio). If specified, <b>-r</b>
is disregarded for Office 2016.</p>
<p style="margin-left:11%;"><b>-H</b> <i>HwId</i></p>
@ -538,14 +555,14 @@ ePIDs are generated if</p>
sprecify an ePID in the command line and <br>
- you haven&rsquo;t used <b>-i</b> or <br>
- the file specified by <b>-i</b> cannot be opened or <br>
- the file specified by <b>-i</b> does not contain the
<i>application-guid</i> for the KMS request</p>
- the file specified by <b>-i</b> does not contain an ePID
for the KMS request</p>
<p style="margin-left:22%; margin-top: 1em"><b>-r0</b>
means there are no random ePIDs. vlmcsd simply issues
default ePIDs that are built into the binary at compile
time. <b>Pro:</b> behaves like real KMS server that also
always issues the same ePID. <b>Con</b>: Microsoft may start
always issues the same ePID. <b>Con:</b> Microsoft may start
blacklisting again and the default ePID may not work any
longer.</p>
@ -565,17 +582,19 @@ id).</p>
<p style="margin-left:22%; margin-top: 1em">If vlmcsd has
been started by an internet superserver, <b>-r1</b> works
identically to <b>-r2</b>. This is simply due to the fact
that vlmcsd is started upon a connection request and does
not stay in memory after servicing a KMS request.</p>
almost identically to <b>-r2</b>. The only exception occurs
if you send more than one activation request over the same
TCP connection. This is simply due to the fact that vlmcsd
is started upon a connection request and does not stay in
memory after servicing a KMS request. Consider using
<b>-r0</b> or <b>-w</b>, <b>-0</b>, <b>-3</b> and <b>-6 when
starting vlmcsd by an internet superserver.</b></p>
<p style="margin-left:22%; margin-top: 1em"><b>-r2</b>
behaves like most other KMS server emulators with random
support and generates a new random ePID on every request.
Use this mode with &quot;care&quot;. However since Microsoft
currently does not seem to do any verification of the ePID,
you currently don&rsquo;t need to pay attention to ePIDs at
all.</p>
<b>-r2</b> should be treated as debugging option only
because it allows very easy emulator detection.</p>
<p style="margin-left:11%;"><b>-C</b> <i>LCID</i></p>
@ -600,6 +619,54 @@ them are not recognized by .NET Framework 4.0.</p>
emulators use a fixed <i>LCID</i> of 1033 (English - US). To
achive the same behavior in vlmcsd use <b>-C 1033</b>.</p>
<p style="margin-left:11%;"><b>-K0</b>, <b>-K1</b>,
<b>-K2</b> and <b>-K3</b></p>
<p style="margin-left:22%;">Sets the whitelisting level to
determine which products vlmcsd activates or refuses. The
default is <b>-K0</b>.</p>
<p style="margin-left:29%; margin-top: 1em"><b>-K0</b>:
activate all products with an unknown, retail or
beta/preview KMS ID. <b><br>
-K1</b>: activate products with a retail or beta/preview KMS
ID but refuse to activate products with an unknown KMS ID.
<b><br>
-K2</b>: activate products with an unknown KMS ID but refuse
products with a retail or beta/preview KMS ID. <b><br>
-K3</b>: activate only products with a known volume license
RTM KMS ID and refuse all others.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="78%">
<p>The SKU ID is not checked. Like a genuine KMS server
vlmcsd activates a product that has a random or unknown SKU
ID. If you select <b>-K1</b> or <b>-K3</b>, vlmcsd also
checks the Application ID for correctness. If Microsoft
introduces a new KMS ID for a new product, you cannot
activate it if you used <b>-K1</b> or <b>-K3</b> until a new
version of vlmcsd is available.</p></td></tr>
</table>
<p style="margin-left:11%;"><b>-c0</b> and <b>-c1</b></p>
<p style="margin-left:22%;"><b>-c1</b> causes vlmcsd to
check if the client time differs no more than four hours
from the system time. <b>-c0</b> (the default) disables this
check. <b>-c1</b> is useful to prevent emulator detection. A
client that tries to detect an emulator could simply send
two subsequent request with two time stamps that differ more
than four hours from each other. If both requests succeed,
the server is an emulator. If you specify <b>-c1</b> on a
system with no reliable time source, activations will fail.
It is ok to set the correct system time after you started
vlmcsd.</p>
<p style="margin-left:11%;"><b>-R</b>
<i>renewal-interval</i></p>
@ -717,8 +784,8 @@ directory.</p>
convenience you can use the special username &quot;/l&quot;
as a shortcut for &quot;NT AUTHORITY\LocalService&quot; and
&quot;/n&quot; for &quot;NT AUTHORITY\NetworkService&quot;.
&quot;vlmcsd&nbsp;&minus;s&nbsp;&minus;U&nbsp;/n&quot;
installs the service to run as &quot;NT
&quot;vlmcsd&nbsp;-s&nbsp;-U&nbsp;/n&quot; installs the
service to run as &quot;NT
AUTHORITY\NetworkService&quot;.</p>
<p style="margin-left:11%;"><b>-W</b> <i>password</i></p>
@ -840,11 +907,15 @@ sources or may require minor porting efforts.</p>
<p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>
can answer activation requests for the following products:
Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows
10, Windows Server 2008, Windows Server 2008 R2, Windows
Server 2012, Windows Server 2012 R2, Office 2010, Project
2010, Visio 2010, Office 2013, Project 2013, Visio 2013,
Office 2016, Project 2016, Visio 2016.</p>
Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10
(up to 1607), Windows Server 2008, Windows Server 2008 R2,
Windows Server 2012, Windows Server 2012 R2, Windows Server
2016, Office 2010, Project 2010, Visio 2010, Office 2013,
Project 2013, Visio 2013, Office 2016, Project 2016, Visio
2016. Newer version may work as long as the KMS protocol
does not change. A complete list of fully supported products
can be obtained using the <b>-x</b> option of
<b>vlmcs</b>(1).</p>
<p style="margin-left:11%; margin-top: 1em">Office, Project
and Visio must be volume license versions.</p>
@ -900,11 +971,14 @@ C:\logs\vlmcsd.log when the service is started with
<p style="margin-left:11%; margin-top: 1em">An ePID
specified in an ini file must not contain spaces.</p>
<p style="margin-left:11%; margin-top: 1em">The maximum
number of <b>-L</b> options in the command line or listen
statements in the inifile is the platform default for
<i>FD_SETSIZE</i>. This is 64 on Windows and 1024 on most
Unixes.</p>
<h2>INTENTIONAL BUGS
<a name="INTENTIONAL BUGS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">vlmcsd always
reports enough active clients to satisfy the N count policy
of the request.</p>
<h2>AUTHOR
<a name="AUTHOR"></a>

BIN
man/vlmcsd.8.pdf Normal file

Binary file not shown.

View File

@ -117,6 +117,14 @@ OPTIONS
the client sees that the KMS TCP port (1688 by default) is actu
ally accepting connections.
If vlmcsd is compiled to use MS RPC, -o2 can only offer very
poor protection. Control is passed from MS RPC to vlmcsd after
the KMS protocol has already been negotiated. Thus a client can
always verify that the KMS protocol is available even though it
receives an RPC_S_ACCESS_DENIED error message. vlmcsd will issue
a warning if -o2 is used with MS RPC. For adaequate protection
do not use a MS RPC build of vlmcsd with -o2.
-o3 combines -o1 and -o2. vlmcsd listens on private interfaces
only and if a public client manages to connect anyway due to NAT
port forwarding, it will be immediately dropped.
@ -310,19 +318,24 @@ OPTIONS
-3 ePID
Use ePID as Office 2013/2016 ePID (including Project and Visio).
If specified, -r is disregarded for Office 2013/2016.
Use ePID as Office 2013 ePID (including Project and Visio). If
specified, -r is disregarded for Office 2013.
-6 ePID
Use ePID as Office 2016 ePID (including Project and Visio). If
specified, -r is disregarded for Office 2016.
-H HwId
Use HwId for all products. All HWIDs in the ini file (see -i)
Use HwId for all products. All HWIDs in the ini file (see -i)
will not be used. In an ini file you can specify a seperate HWID
for each application-guid. This is not possible when entering a
for each application-guid. This is not possible when entering a
HWID from the command line.
HwId must be specified as 16 hex digits that are interpreted as
a series of 8 bytes (big endian). Any character that is not a
hex digit will be ignored. This is for better readability. The
HwId must be specified as 16 hex digits that are interpreted as
a series of 8 bytes (big endian). Any character that is not a
hex digit will be ignored. This is for better readability. The
following commands are identical:
vlmcsd -H 0123456789ABCDEF
@ -331,14 +344,14 @@ OPTIONS
-i filename
Use configuration file (aka ini file) filename. Most configura
Use configuration file (aka ini file) filename. Most configura
tion parameters can be set either via the command line or an ini
file. The command line always has precedence over configuration
items in the ini file. See vlmcsd.ini(5) for the format of the
file. The command line always has precedence over configuration
items in the ini file. See vlmcsd.ini(5) for the format of the
configuration file.
If vlmcsd has been compiled to use a default configuration file
(often /etc/vlmcsd.ini), you may use -i- to ignore the default
If vlmcsd has been compiled to use a default configuration file
(often /etc/vlmcsd.ini), you may use -i- to ignore the default
configuration file.
@ -348,121 +361,157 @@ OPTIONS
- you did not sprecify an ePID in the command line and
- you haven't used -i or
- the file specified by -i cannot be opened or
- the file specified by -i does not contain the application-guid
for the KMS request
- the file specified by -i does not contain an ePID for the KMS
request
-r0 means there are no random ePIDs. vlmcsd simply issues
default ePIDs that are built into the binary at compile time.
Pro: behaves like real KMS server that also always issues the
same ePID. Con: Microsoft may start blacklisting again and the
-r0 means there are no random ePIDs. vlmcsd simply issues
default ePIDs that are built into the binary at compile time.
Pro: behaves like real KMS server that also always issues the
same ePID. Con: Microsoft may start blacklisting again and the
default ePID may not work any longer.
-r1 instructs vlmcsd to generate random ePIDs when the program
-r1 instructs vlmcsd to generate random ePIDs when the program
starts or receives a SIGHUP signal and uses these ePIDs until it
is stopped or receives another SIGHUP. Most other KMS emulators
generate a new ePID on every KMS request. This is easily
is stopped or receives another SIGHUP. Most other KMS emulators
generate a new ePID on every KMS request. This is easily
detectable. Microsoft could just modify sppsvc.exe in a way that
it always sends two identical KMS requests in two RPC requests
but over the same TCP connection. If both KMS responses contain
the different ePIDs, the KMS server is not genuine. -r1 is the
default mode. -r1 also ensures that all three ePIDs (Windows,
Office 2010 and Office 2013) use the same OS build number and
it always sends two identical KMS requests in two RPC requests
but over the same TCP connection. If both KMS responses contain
the different ePIDs, the KMS server is not genuine. -r1 is the
default mode. -r1 also ensures that all three ePIDs (Windows,
Office 2010 and Office 2013) use the same OS build number and
LCID (language id).
If vlmcsd has been started by an internet superserver, -r1 works
identically to -r2. This is simply due to the fact that vlmcsd
is started upon a connection request and does not stay in memory
after servicing a KMS request.
almost identically to -r2. The only exception occurs if you send
more than one activation request over the same TCP connection.
This is simply due to the fact that vlmcsd is started upon a
connection request and does not stay in memory after servicing a
KMS request. Consider using -r0 or -w, -0, -3 and -6 when start
ing vlmcsd by an internet superserver.
-r2 behaves like most other KMS server emulators with random
support and generates a new random ePID on every request. Use
this mode with "care". However since Microsoft currently does
not seem to do any verification of the ePID, you currently don't
need to pay attention to ePIDs at all.
support and generates a new random ePID on every request. -r2
should be treated as debugging option only because it allows
very easy emulator detection.
-C LCID
Do not randomize the locale id part of the ePID and use LCID
instead. The LCID must be specified as a decimal number, e.g.
1049 for "Russian - Russia". This option has no effect if the
ePID is not randomized at all, e.g. if it is selected from the
Do not randomize the locale id part of the ePID and use LCID
instead. The LCID must be specified as a decimal number, e.g.
1049 for "Russian - Russia". This option has no effect if the
ePID is not randomized at all, e.g. if it is selected from the
command line or an ini file.
By default vlmcsd generates a valid locale id that is recognized
by .NET Framework 4.0. This may lead to a locale id which is
by .NET Framework 4.0. This may lead to a locale id which is
unlikely to occur in your country, for instance 2155 for "Quecha
- Ecuador". You may want to select the locale id of your country
instead. See MSDN ⟨http://msdn.microsoft.com/en-us/goglobal/
bb964664.aspx⟩ for a list of valid LCIDs. Please note that some
bb964664.aspx⟩ for a list of valid LCIDs. Please note that some
of them are not recognized by .NET Framework 4.0.
Most other KMS emulators use a fixed LCID of 1033 (English -
Most other KMS emulators use a fixed LCID of 1033 (English -
US). To achive the same behavior in vlmcsd use -C 1033.
-K0, -K1, -K2 and -K3
Sets the whitelisting level to determine which products vlmcsd
activates or refuses. The default is -K0.
-K0: activate all products with an unknown, retail or
beta/preview KMS ID.
-K1: activate products with a retail or beta/preview KMS ID
but refuse to activate products with an unknown KMS ID.
-K2: activate products with an unknown KMS ID but refuse
products with a retail or beta/preview KMS ID.
-K3: activate only products with a known volume license RTM
KMS ID and refuse all others.
The SKU ID is not checked. Like a genuine KMS server vlmcsd
activates a product that has a random or unknown SKU ID. If you
select -K1 or -K3, vlmcsd also checks the Application ID for
correctness. If Microsoft introduces a new KMS ID for a new
product, you cannot activate it if you used -K1 or -K3 until a
new version of vlmcsd is available.
-c0 and -c1
-c1 causes vlmcsd to check if the client time differs no more
than four hours from the system time. -c0 (the default) disables
this check. -c1 is useful to prevent emulator detection. A
client that tries to detect an emulator could simply send two
subsequent request with two time stamps that differ more than
four hours from each other. If both requests succeed, the server
is an emulator. If you specify -c1 on a system with no reliable
time source, activations will fail. It is ok to set the correct
system time after you started vlmcsd.
-R renewal-interval
Instructs clients to renew activation every renewal-interval.
Instructs clients to renew activation every renewal-interval.
The renewal-interval is a number optionally immediately followed
by a letter indicating the unit. Valid unit letters are s (sec
by a letter indicating the unit. Valid unit letters are s (sec
onds), m (minutes), h (hours), d (days) and w (weeks). If you do
not specify a letter, minutes is assumed.
-R3d for instance instructs clients to renew activation every 3
-R3d for instance instructs clients to renew activation every 3
days. The default renewal-interval is 10080 (identical to 7d and
1w).
Due to poor implementation of Microsofts KMS Client it cannot be
guaranteed that activation is renewed on time as specfied by the
-R option. Don't care about that. Renewal will happen well
-R option. Don't care about that. Renewal will happen well
before your activation expires (usually 180 days).
Even though you can specify seconds, the granularity of this
option is 1 minute. Seconds are rounded down to the next multi
Even though you can specify seconds, the granularity of this
option is 1 minute. Seconds are rounded down to the next multi
ple of 60.
-A activation-interval
Instructs clients to retry activation every activation-interval
if it was unsuccessful, e.g. because it could not reach the
server. The default is 120 (identical to 2h). activation-inter
val follows the same syntax as renewal-interval in the -R
Instructs clients to retry activation every activation-interval
if it was unsuccessful, e.g. because it could not reach the
server. The default is 120 (identical to 2h). activation-inter
val follows the same syntax as renewal-interval in the -R
option.
-s Installs vlmcsd as a Windows service. This option only works
with the native Windows version and Cygwin. Combine -s with
other command line options. These will be in effect when you
start the service. The service automatically starts when you
reboot your machine. To start it manually, type "net start vlm
-s Installs vlmcsd as a Windows service. This option only works
with the native Windows version and Cygwin. Combine -s with
other command line options. These will be in effect when you
start the service. The service automatically starts when you
reboot your machine. To start it manually, type "net start vlm
csd".
If you use Cygwin, you must include your Cygwin system DLL
directory (usually C:\Cygwin\bin or C:\Cygwin64\bin) into the
If you use Cygwin, you must include your Cygwin system DLL
directory (usually C:\Cygwin\bin or C:\Cygwin64\bin) into the
PATH environment variable or the service will not start.
You can reinstall the service anytime using vlmcsd -s again,
e.g. with a different command line. If the service is running,
You can reinstall the service anytime using vlmcsd -s again,
e.g. with a different command line. If the service is running,
it will be restarted with the new command line.
When using -s the command line is checked for basic syntax
When using -s the command line is checked for basic syntax
errors only. For example "vlmcsd -s -L 1.2.3.4" reports no error
but the service will not start if 1.2.3.4 is not an IP address
but the service will not start if 1.2.3.4 is not an IP address
on your system.
-S Uninstalls the vlmcsd service. Works only with the native Win
dows version and Cygwin. All other options will be ignored if
-S Uninstalls the vlmcsd service. Works only with the native Win
dows version and Cygwin. All other options will be ignored if
you include -S in the command line.
-U [domain\]username
Can only be used together with -s. Starts the service as a dif
ferent user than the local SYSTEM account. This is used to run
the service under an account with low privileges. If you omit
Can only be used together with -s. Starts the service as a dif
ferent user than the local SYSTEM account. This is used to run
the service under an account with low privileges. If you omit
the domain, an account from the local computer will be used.
You may use "NT AUTHORITY\NetworkService". This is a pseudo user
with low privileges. You may also use "NT AUTHORITY\LocalSer
with low privileges. You may also use "NT AUTHORITY\LocalSer
vice" which has more privileges but these are of no use for run
ning vlmcsd.
@ -470,20 +519,20 @@ OPTIONS
sion for your executable. "NT AUTHORITY\NetworkService" normally
has no permission to run binaries from your home directory.
For your convenience you can use the special username "/l" as a
For your convenience you can use the special username "/l" as a
shortcut for "NT AUTHORITY\LocalService" and "/n" for "NT
AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser
AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser
vice to run as "NT AUTHORITY\NetworkService".
-W password
Can only be used together with -s. Specifies a password for the
corresponding username you use with -U. SYSTEM, "NT AUTHOR
ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
Can only be used together with -s. Specifies a password for the
corresponding username you use with -U. SYSTEM, "NT AUTHOR
ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
a password.
If you specify a user with even lower privileges than "NT
AUTHORITY\NetworkService", you must specify its password. You
If you specify a user with even lower privileges than "NT
AUTHORITY\NetworkService", you must specify its password. You
also have to grant the "Log on as a service" right to that user.
@ -492,51 +541,54 @@ SIGNALS
SIGTERM, SIGINT
These signals cause vlmcsd to exit gracefully. All global sema
phores and shared memory pages will be released, the pid file
will be unlinked (deleted) and a shutdown message will be
These signals cause vlmcsd to exit gracefully. All global sema
phores and shared memory pages will be released, the pid file
will be unlinked (deleted) and a shutdown message will be
logged.
SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
started vlmcsd with an ini file. You can modify the ini file
while vlmcsd is running and then sending SIGHUP, e.g. by typing
"killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm
SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
started vlmcsd with an ini file. You can modify the ini file
while vlmcsd is running and then sending SIGHUP, e.g. by typing
"killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm
csd.pid`".
The SIGHUP handler has been implemented relatively simple. It is
virtually the same as stopping vlmcsd and starting it again
virtually the same as stopping vlmcsd and starting it again
immediately with the following exceptions:
— The new process does not get a new process id.
— If you used a pid file, it is not deleted and recreated
— If you used a pid file, it is not deleted and recreated
because the process id stays the same.
— If you used the 'user' and/or 'group' directive in an ini
file these are ignored. This is because once you switched to
— If you used the 'user' and/or 'group' directive in an ini
file these are ignored. This is because once you switched to
lower privileged users and groups, there is no way back. Any
thing else would be a severe security flaw in the OS.
Signaling is not available in the native Windows version and in the
Signaling is not available in the native Windows version and in the
Cygwin version when it runs as Windows service.
SUPPORTED OPERATING SYSTEMS
vlmcsd compiles and runs on Linux, Windows (no Cygwin required but
explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly
BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or
unixoid OSses may work with unmodified sources or may require minor
vlmcsd compiles and runs on Linux, Windows (no Cygwin required but
explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly
BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or
unixoid OSses may work with unmodified sources or may require minor
porting efforts.
SUPPORTED PRODUCTS
vlmcsd can answer activation requests for the following products: Win
dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows
Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows
Server 2012 R2, Office 2010, Project 2010, Visio 2010, Office 2013,
Project 2013, Visio 2013, Office 2016, Project 2016, Visio 2016.
vlmcsd can answer activation requests for the following products: Win
dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1607),
Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Win
dows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010,
Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project
2016, Visio 2016. Newer version may work as long as the KMS protocol
does not change. A complete list of fully supported products can be
obtained using the -x option of vlmcs(1).
Office, Project and Visio must be volume license versions.
@ -572,18 +624,19 @@ EXAMPLES
BUGS
An ePID specified in an ini file must not contain spaces.
The maximum number of -L options in the command line or listen state
ments in the inifile is the platform default for FD_SETSIZE. This is 64
on Windows and 1024 on most Unixes.
INTENTIONAL BUGS
vlmcsd always reports enough active clients to satisfy the N count pol
icy of the request.
AUTHOR
Written by crony12, Hotbird64 and vityan666. With contributions from
Written by crony12, Hotbird64 and vityan666. With contributions from
DougQaid.
CREDITS
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati
borus, ...
@ -592,4 +645,4 @@ SEE ALSO
Hotbird64 July 2016 VLMCSD(8)
Hotbird64 October 2016 VLMCSD(8)

View File

@ -1,4 +1,4 @@
.TH VLMCSD.INI 5 "July 2016" "Hotbird64" "KMS Activation Manual"
.TH VLMCSD.INI 5 "October 2016" "Hotbird64" "KMS Activation Manual"
.LO 8
.SH NAME
@ -73,7 +73,7 @@ Can be TRUE or FALSE. Specifies whether you want to use the NDR64 transfer synta
Can be TRUE or FALSE. Specifies whether you want to use bind time feature negotiation in RPC. See options \fB-b0\fR and \fB-b1\fR in \fBvlmcsd\fR(8). The default is TRUE.
.IP "\fBRandomizationLevel\fR"
The \fIargument\fR must 0, 1 or 2. This specifies the ePID randomization level. See options \fB-r0\fR, \fB-r1\fR and \fB-r2\fR in \fBvlmcsd\fR(8). The default randomization level is 1.
The \fIargument\fR must 0, 1 or 2. This specifies the ePID randomization level. See options \fB-r0\fR, \fB-r1\fR and \fB-r2\fR in \fBvlmcsd\fR(8). The default randomization level is 1. A \fBRandomizationLevel\fR of 2 is not recommended and should be treated as a debugging level.
.IP "\fBLCID\fR"
Use a specific culture id (LCID) even if the ePID is randomized. The \fIargument\fR must be a number between 1 and 32767. While any number in that range is valid, you should use an offcial LCID. A list of assigned LCIDs can be found at http://msdn.microsoft.com/en\-us/goglobal/bb964664.aspx. On the command line you control this setting with option \fB-C\fR.
@ -99,6 +99,25 @@ Can be TRUE or FALSE. The default is TRUE. If set to FALSE, logging output does
.IP "\fBLogVerbose\fR"
Set this to either TRUE or FALSE. The default is FALSE. If set to TRUE, more details of each activation will be logged. You use \fB-v\fR and \fB-q\fR in the command line to control this setting. \fBLogVerbose\fR has an effect only if you specify a log file or redirect logging to \fBstdout\fR(3).
.IP "\fBWhitelistingLevel\fR"
Can be 0, 1, 2 or 3. The default is 0. Sets the whitelisting level to determine which products vlmcsd activates or refuses.
.RS 12
\fB0\fR: activate all products with an unknown, retail or beta/preview KMS ID.
.br
\fB1\fR: activate products with a retail or beta/preview KMS ID but refuse to activate products with an unknown KMS ID.
.br
\fB2\fR: activate products with an unknown KMS ID but refuse products with a retail or beta/preview KMS ID.
.br
\fB3\fR: activate only products with a known volume license RTM KMS ID and refuse all others.
.RE
.IP ""
The SKU ID is not checked. Like a genuine KMS server vlmcsd activates a product that has a random or unknown SKU ID. If you select \fB1\fR or \fB3\fR, vlmcsd also checks the Application ID for correctness. If Microsoft introduces a new KMS ID for a new product, you cannot activate it if you used \fB1\fR or \fB3\fR until a new version of vlmcsd is available.
.IP "\fBCheckClientTime\fR"
Can be TRUE or FALSE. The default is FALSE. If you set this to TRUE \fBvlmcsd\fR(8) checks if the client time differs no more than four hours from the system time. This is useful to prevent emulator detection. A client that tries to detect an emulator could simply send two subsequent request with two time stamps that differ more than four hours from each other. If both requests succeed, the server is an emulator. If you set this to TRUE on a system with no reliable time source, activations will fail. It is ok to set the correct system time after you started \fBvlmcsd\fR(8).
.IP "\fBActivationInterval\fR"
This is the same as specifying \fB-A\fR on the command line. See \fBvlmcsd\fR(8) for details. The default is 2 hours. Example: ActivationInterval = 1h
@ -111,24 +130,20 @@ Run vlmcsd as another, preferrably less privileged, user. The \fIargument\fR can
.IP "\fBGroup\fR"
Run vlmcsd as another, preferrably less privileged, group. The \fIargument\fR can be a group name or a numeric group id. You must have the required privileges (capabilities on Linux) to change the security context of a process without providing any credentials (a password in most cases). On most unixoid OSses 'root' is the only user who has these privileges in the default configuration. This setting is not available in the native Windows version of vlmcsd. See \fB-g\fR in \fBvlmcsd\fR(8). This setting cannot be changed on the fly by sending SIGHUP to vlmcsd.
.SH "SPECIAL KEYWORDS"
Any valid GUID is being treated as a special \fBkeyword\fR in the ini file. It is used to select a specfic ePID and HwId for an application GUID. The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. KMS currently knows only 3 application GUIDs:
.IP "\fBWindows\fR"
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for Windows activations. If specified, \fBRandomizationLevel\fR for Windows activitations will be ignored.
55c92734\-d682\-4d71\-983e\-d6ec3f16059f\ (Windows)
.br
59a52881\-a989\-479d\-af46\-f275c6370663\ (Office 2010)
.br
0ff1ce15\-a989\-479d\-af46\-f275c6370663\ (Office 2013)
.IP "\fBOffice2010\fR"
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for Office 2010 activations. If specified, \fBRandomizationLevel\fR for Office 2010 activitations will be ignored.
To use specific ePIDs for Windows, Office 2010 and Office 2013/2016 you could add the following lines to vlmcsd.ini:
.IP "\fBOffice2013\fR"
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for Office 2013 activations. If specified, \fBRandomizationLevel\fR for Office 2013 activitations will be ignored.
.SM "55c92734\-d682\-4d71\-983e\-d6ec3f16059f\ =\ 55041\-00206\-184\-207146\-03\-1062\-6002.0000\-3322013"
.br
.SM "59a52881\-a989\-479d\-af46\-f275c6370663\ =\ 55041\-00096\-216\-598637\-03\-17418\-6002.0000\-3312013"
.br
.SM "0ff1ce15\-a989\-479d\-af46\-f275c6370663\ =\ 55041\-00206-234\-742099\-03\-9217\-6002.0000\-2942013"
.IP "\fBOffice2016\fR"
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for Office 2016 activations. If specified, \fBRandomizationLevel\fR for Office 2016 activitations will be ignored.
The ePID is currently a comment only. You can specify any string up to 63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs that were used in KMSv5 versions of the "ratiborus virtual machine". Microsoft has given up on blacklisting when KMS emulators appeared in the wild.
.SH "VALID EPIDS"
The ePID is currently a comment only. You can specify any string up to 63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs that were used in KMSv5 versions of the "Ratiborus Virtual Machine". Microsoft has given up on blacklisting when KMS emulators appeared in the wild.
Even if you can use "Activated by cool hacker guys" as an ePID, you may wish to use ePIDs that cannot be detected as non-MS ePIDs. If you don't know how these "valid" ePIDs look like exactly, do not use GUIDS in vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid ePIDs.

View File

@ -138,75 +138,111 @@ KEYWORDS
RandomizationLevel
The argument must 0, 1 or 2. This specifies the ePID randomiza
tion level. See options -r0, -r1 and -r2 in vlmcsd(8). The
default randomization level is 1.
default randomization level is 1. A RandomizationLevel of 2 is
not recommended and should be treated as a debugging level.
LCID Use a specific culture id (LCID) even if the ePID is randomized.
The argument must be a number between 1 and 32767. While any
The argument must be a number between 1 and 32767. While any
number in that range is valid, you should use an offcial LCID. A
list of assigned LCIDs can be found at http://msdn.micro
soft.com/en-us/goglobal/bb964664.aspx. On the command line you
list of assigned LCIDs can be found at http://msdn.micro
soft.com/en-us/goglobal/bb964664.aspx. On the command line you
control this setting with option -C.
MaxWorkers
The argument specifies the maximum number of worker processes or
threads that will be used to serve activation requests concur
rently. This is the same as specifying -m on the command line.
Minimum is 1. The maximum is platform specific and is at least
32767 but is likely to be greater on most systems. The default
threads that will be used to serve activation requests concur
rently. This is the same as specifying -m on the command line.
Minimum is 1. The maximum is platform specific and is at least
32767 but is likely to be greater on most systems. The default
is no limit.
ConnectionTimeout
Used to control when the vlmcsd disconnects idle TPC connec
Used to control when the vlmcsd disconnects idle TPC connec
tions. The default is 30 seconds. This is the same setting as -t
on the command line.
DisconnectClientsImmediately
Set this to TRUE to disconnect a client after it got an activa
tion response regardless whether a timeout has occured or not.
The default is FALSE. Setting this to TRUE is non-standard
behavior. Use only if you are experiencing DoS or DDoS attacks.
On the command line you control this behavior with options -d
Set this to TRUE to disconnect a client after it got an activa
tion response regardless whether a timeout has occured or not.
The default is FALSE. Setting this to TRUE is non-standard
behavior. Use only if you are experiencing DoS or DDoS attacks.
On the command line you control this behavior with options -d
and -k.
PidFile
Write a pid file. The argument is the full pathname of a pid
file. The pid file contains is single line containing the
process id of the vlmcsd process. It can be used to stop
(SIGTERM) or restart (SIGHUP) vlmcsd. This directive can be
Write a pid file. The argument is the full pathname of a pid
file. The pid file contains is single line containing the
process id of the vlmcsd process. It can be used to stop
(SIGTERM) or restart (SIGHUP) vlmcsd. This directive can be
overriden using -p on the command line.
LogFile
Write a log file. The argument is the full pathname of a log
file. On a unixoid OS and with Cygwin you can use the special
filename 'syslog' to log to the syslog facility. This is the
Write a log file. The argument is the full pathname of a log
file. On a unixoid OS and with Cygwin you can use the special
filename 'syslog' to log to the syslog facility. This is the
same as specifying -l on the command line.
LogDateAndTime
Can be TRUE or FALSE. The default is TRUE. If set to FALSE, log
ging output does not include date and time. This is useful if
you log to stdout(3) which is redirected to another logging
ging output does not include date and time. This is useful if
you log to stdout(3) which is redirected to another logging
mechanism that already includes date and time in its output, for
instance systemd-journald(8). If you log to syslog(3), LogDate
AndTime is ignored and date and time will never be included in
instance systemd-journald(8). If you log to syslog(3), LogDate
AndTime is ignored and date and time will never be included in
the output sent to syslog(3). Using the command line you control
this setting with options -T0 and -T1.
LogVerbose
Set this to either TRUE or FALSE. The default is FALSE. If set
Set this to either TRUE or FALSE. The default is FALSE. If set
to TRUE, more details of each activation will be logged. You use
-v and -q in the command line to control this setting. LogVer
bose has an effect only if you specify a log file or redirect
-v and -q in the command line to control this setting. LogVer
bose has an effect only if you specify a log file or redirect
logging to stdout(3).
WhitelistingLevel
Can be 0, 1, 2 or 3. The default is 0. Sets the whitelisting
level to determine which products vlmcsd activates or refuses.
0: activate all products with an unknown, retail or
beta/preview KMS ID.
1: activate products with a retail or beta/preview KMS ID
but refuse to activate products with an unknown KMS ID.
2: activate products with an unknown KMS ID but refuse
products with a retail or beta/preview KMS ID.
3: activate only products with a known volume license RTM
KMS ID and refuse all others.
The SKU ID is not checked. Like a genuine KMS server vlmcsd
activates a product that has a random or unknown SKU ID. If you
select 1 or 3, vlmcsd also checks the Application ID for cor
rectness. If Microsoft introduces a new KMS ID for a new prod
uct, you cannot activate it if you used 1 or 3 until a new ver
sion of vlmcsd is available.
CheckClientTime
Can be TRUE or FALSE. The default is FALSE. If you set this to
TRUE vlmcsd(8) checks if the client time differs no more than
four hours from the system time. This is useful to prevent emu
lator detection. A client that tries to detect an emulator could
simply send two subsequent request with two time stamps that
differ more than four hours from each other. If both requests
succeed, the server is an emulator. If you set this to TRUE on a
system with no reliable time source, activations will fail. It
is ok to set the correct system time after you started vlm
csd(8).
ActivationInterval
This is the same as specifying -A on the command line. See vlm
csd(8) for details. The default is 2 hours. Example: Activation
@ -245,42 +281,50 @@ KEYWORDS
changed on the fly by sending SIGHUP to vlmcsd.
SPECIAL KEYWORDS
Any valid GUID is being treated as a special keyword in the ini file.
It is used to select a specfic ePID and HwId for an application GUID.
The argument has the form ePID [ / HwId ]. KMS currently knows only 3
application GUIDs:
Windows
The argument has the form ePID [ / HwId ]. Always use ePID and
HwId for Windows activations. If specified, RandomizationLevel
for Windows activitations will be ignored.
55c92734-d682-4d71-983e-d6ec3f16059f (Windows)
59a52881-a989-479d-af46-f275c6370663 (Office 2010)
0ff1ce15-a989-479d-af46-f275c6370663 (Office 2013)
To use specific ePIDs for Windows, Office 2010 and Office 2013/2016 you
could add the following lines to vlmcsd.ini:
Office2010
The argument has the form ePID [ / HwId ]. Always use ePID and
HwId for Office 2010 activations. If specified, Randomization
Level for Office 2010 activitations will be ignored.
55c92734-d682-4d71-983e-d6ec3f16059f = 55041-00206-184-207146-03-1062-6002.0000-3322013
59a52881-a989-479d-af46-f275c6370663 = 55041-00096-216-598637-03-17418-6002.0000-3312013
0ff1ce15-a989-479d-af46-f275c6370663 = 55041-00206-234-742099-03-9217-6002.0000-2942013
The ePID is currently a comment only. You can specify any string up to
63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs
that were used in KMSv5 versions of the "ratiborus virtual machine".
Microsoft has given up on blacklisting when KMS emulators appeared in
Office2013
The argument has the form ePID [ / HwId ]. Always use ePID and
HwId for Office 2013 activations. If specified, Randomization
Level for Office 2013 activitations will be ignored.
Office2016
The argument has the form ePID [ / HwId ]. Always use ePID and
HwId for Office 2016 activations. If specified, Randomization
Level for Office 2016 activitations will be ignored.
VALID EPIDS
The ePID is currently a comment only. You can specify any string up to
63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs
that were used in KMSv5 versions of the "Ratiborus Virtual Machine".
Microsoft has given up on blacklisting when KMS emulators appeared in
the wild.
Even if you can use "Activated by cool hacker guys" as an ePID, you may
wish to use ePIDs that cannot be detected as non-MS ePIDs. If you don't
know how these "valid" ePIDs look like exactly, do not use GUIDS in
vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid
know how these "valid" ePIDs look like exactly, do not use GUIDS in
vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid
ePIDs.
If you use non-ASCII characters in your ePID (you shouldn't do anyway),
these must be in UTF-8 format. This is especially important when you
these must be in UTF-8 format. This is especially important when you
run vlmcsd on Windows or cygwin because UTF-8 is not the default encod
ing for most editors.
If you are specifying an optional HWID it follows the same syntax as in
the -H option in vlmcsd(8) ecxept that you must not enclose a HWID in
the -H option in vlmcsd(8) ecxept that you must not enclose a HWID in
quotes even if it contains spaces.
@ -294,7 +338,7 @@ AUTHOR
CREDITS
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati
borus, ...
@ -303,4 +347,4 @@ SEE ALSO
Hotbird64 July 2016 VLMCSD.INI(5)
Hotbird64 October 2016 VLMCSD.INI(5)

View File

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Wed Jul 13 12:34:02 2016 -->
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -25,7 +25,7 @@
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#SYNTAX">SYNTAX</a><br>
<a href="#KEYWORDS">KEYWORDS</a><br>
<a href="#SPECIAL KEYWORDS">SPECIAL KEYWORDS</a><br>
<a href="#VALID EPIDS">VALID EPIDS</a><br>
<a href="#FILES">FILES</a><br>
<a href="#AUTHOR">AUTHOR</a><br>
<a href="#CREDITS">CREDITS</a><br>
@ -41,7 +41,7 @@
<p style="margin-left:11%; margin-top: 1em"><b>vlmcsd.ini</b>
&minus; vlmcsd KMS emulator configuration file</p>
- vlmcsd KMS emulator configuration file</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
@ -246,7 +246,9 @@ RPC. See options <b>-b0</b> and <b>-b1</b> in
<p style="margin-left:22%;">The <i>argument</i> must 0, 1
or 2. This specifies the ePID randomization level. See
options <b>-r0</b>, <b>-r1</b> and <b>-r2</b> in
<b>vlmcsd</b>(8). The default randomization level is 1.</p>
<b>vlmcsd</b>(8). The default randomization level is 1. A
<b>RandomizationLevel</b> of 2 is not recommended and should
be treated as a debugging level.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
@ -265,8 +267,8 @@ randomized. The <i>argument</i> must be a number between 1
and 32767. While any number in that range is valid, you
should use an offcial LCID. A list of assigned LCIDs can be
found at
http://msdn.microsoft.com/en&minus;us/goglobal/bb964664.aspx.
On the command line you control this setting with option
http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx. On
the command line you control this setting with option
<b>-C</b>.</p> </td></tr>
</table>
@ -337,6 +339,53 @@ each activation will be logged. You use <b>-v</b> and
<b>LogVerbose</b> has an effect only if you specify a log
file or redirect logging to <b>stdout</b>(3).</p>
<p style="margin-left:11%;"><b>WhitelistingLevel</b></p>
<p style="margin-left:22%;">Can be 0, 1, 2 or 3. The
default is 0. Sets the whitelisting level to determine which
products vlmcsd activates or refuses.</p>
<p style="margin-left:29%; margin-top: 1em"><b>0</b>:
activate all products with an unknown, retail or
beta/preview KMS ID. <b><br>
1</b>: activate products with a retail or beta/preview KMS
ID but refuse to activate products with an unknown KMS ID.
<b><br>
2</b>: activate products with an unknown KMS ID but refuse
products with a retail or beta/preview KMS ID. <b><br>
3</b>: activate only products with a known volume license
RTM KMS ID and refuse all others.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="78%">
<p>The SKU ID is not checked. Like a genuine KMS server
vlmcsd activates a product that has a random or unknown SKU
ID. If you select <b>1</b> or <b>3</b>, vlmcsd also checks
the Application ID for correctness. If Microsoft introduces
a new KMS ID for a new product, you cannot activate it if
you used <b>1</b> or <b>3</b> until a new version of vlmcsd
is available.</p></td></tr>
</table>
<p style="margin-left:11%;"><b>CheckClientTime</b></p>
<p style="margin-left:22%;">Can be TRUE or FALSE. The
default is FALSE. If you set this to TRUE <b>vlmcsd</b>(8)
checks if the client time differs no more than four hours
from the system time. This is useful to prevent emulator
detection. A client that tries to detect an emulator could
simply send two subsequent request with two time stamps that
differ more than four hours from each other. If both
requests succeed, the server is an emulator. If you set this
to TRUE on a system with no reliable time source,
activations will fail. It is ok to set the correct system
time after you started <b>vlmcsd</b>(8).</p>
<p style="margin-left:11%;"><b>ActivationInterval</b></p>
<p style="margin-left:22%;">This is the same as specifying
@ -402,46 +451,48 @@ Windows version of vlmcsd. See <b>-g</b> in
by sending SIGHUP to vlmcsd.</p></td></tr>
</table>
<h2>SPECIAL KEYWORDS
<a name="SPECIAL KEYWORDS"></a>
<p style="margin-left:11%;"><b>Windows</b></p>
<p style="margin-left:22%;">The <i>argument</i> has the
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
and <i>HwId</i> for Windows activations. If specified,
<b>RandomizationLevel</b> for Windows activitations will be
ignored.</p>
<p style="margin-left:11%;"><b>Office2010</b></p>
<p style="margin-left:22%;">The <i>argument</i> has the
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
and <i>HwId</i> for Office 2010 activations. If specified,
<b>RandomizationLevel</b> for Office 2010 activitations will
be ignored.</p>
<p style="margin-left:11%;"><b>Office2013</b></p>
<p style="margin-left:22%;">The <i>argument</i> has the
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
and <i>HwId</i> for Office 2013 activations. If specified,
<b>RandomizationLevel</b> for Office 2013 activitations will
be ignored.</p>
<p style="margin-left:11%;"><b>Office2016</b></p>
<p style="margin-left:22%;">The <i>argument</i> has the
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
and <i>HwId</i> for Office 2016 activations. If specified,
<b>RandomizationLevel</b> for Office 2016 activitations will
be ignored.</p>
<h2>VALID EPIDS
<a name="VALID EPIDS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Any valid GUID
is being treated as a special <b>keyword</b> in the ini
file. It is used to select a specfic ePID and HwId for an
application GUID. The <i>argument</i> has the form
<i>ePID</i> [ / <i>HwId</i> ]. KMS currently knows only 3
application GUIDs:</p>
<p style="margin-left:11%; margin-top: 1em">55c92734&minus;d682&minus;4d71&minus;983e&minus;d6ec3f16059f&nbsp;(Windows)
<br>
59a52881&minus;a989&minus;479d&minus;af46&minus;f275c6370663&nbsp;(Office
2010) <br>
0ff1ce15&minus;a989&minus;479d&minus;af46&minus;f275c6370663&nbsp;(Office
2013)</p>
<p style="margin-left:11%; margin-top: 1em">To use specific
ePIDs for Windows, Office 2010 and Office 2013/2016 you
could add the following lines to vlmcsd.ini:</p>
<p style="margin-left:11%; margin-top: 1em"><small>55c92734&minus;d682&minus;4d71&minus;983e&minus;d6ec3f16059f&nbsp;=&nbsp;55041&minus;00206&minus;184&minus;207146&minus;03&minus;1062&minus;6002.0000&minus;3322013
<br>
59a52881&minus;a989&minus;479d&minus;af46&minus;f275c6370663&nbsp;=&nbsp;55041&minus;00096&minus;216&minus;598637&minus;03&minus;17418&minus;6002.0000&minus;3312013
<br>
0ff1ce15&minus;a989&minus;479d&minus;af46&minus;f275c6370663&nbsp;=&nbsp;55041&minus;00206-234&minus;742099&minus;03&minus;9217&minus;6002.0000&minus;2942013</small></p>
<p style="margin-left:11%; margin-top: 1em">The ePID is
currently a comment only. You can specify any string up to
63 bytes. In Windows 7 Microsoft has blacklisted few ( &lt;
10 ) ePIDs that were used in KMSv5 versions of the
&quot;ratiborus virtual machine&quot;. Microsoft has given
&quot;Ratiborus Virtual Machine&quot;. Microsoft has given
up on blacklisting when KMS emulators appeared in the
wild.</p>
@ -461,8 +512,8 @@ UTF-8 is not the default encoding for most editors.</p>
<p style="margin-left:11%; margin-top: 1em">If you are
specifying an optional HWID it follows the same syntax as in
the <b>&minus;H</b> option in <b>vlmcsd</b>(8) ecxept that
you must not enclose a HWID in quotes even if it contains
the <b>-H</b> option in <b>vlmcsd</b>(8) ecxept that you
must not enclose a HWID in quotes even if it contains
spaces.</p>
<h2>FILES

BIN
man/vlmcsd.ini.5.pdf Normal file

Binary file not shown.

View File

@ -138,75 +138,111 @@ KEYWORDS
RandomizationLevel
The argument must 0, 1 or 2. This specifies the ePID randomiza
tion level. See options -r0, -r1 and -r2 in vlmcsd(8). The
default randomization level is 1.
default randomization level is 1. A RandomizationLevel of 2 is
not recommended and should be treated as a debugging level.
LCID Use a specific culture id (LCID) even if the ePID is randomized.
The argument must be a number between 1 and 32767. While any
The argument must be a number between 1 and 32767. While any
number in that range is valid, you should use an offcial LCID. A
list of assigned LCIDs can be found at http://msdn.micro
soft.com/en-us/goglobal/bb964664.aspx. On the command line you
list of assigned LCIDs can be found at http://msdn.micro
soft.com/en-us/goglobal/bb964664.aspx. On the command line you
control this setting with option -C.
MaxWorkers
The argument specifies the maximum number of worker processes or
threads that will be used to serve activation requests concur
rently. This is the same as specifying -m on the command line.
Minimum is 1. The maximum is platform specific and is at least
32767 but is likely to be greater on most systems. The default
threads that will be used to serve activation requests concur
rently. This is the same as specifying -m on the command line.
Minimum is 1. The maximum is platform specific and is at least
32767 but is likely to be greater on most systems. The default
is no limit.
ConnectionTimeout
Used to control when the vlmcsd disconnects idle TPC connec
Used to control when the vlmcsd disconnects idle TPC connec
tions. The default is 30 seconds. This is the same setting as -t
on the command line.
DisconnectClientsImmediately
Set this to TRUE to disconnect a client after it got an activa
tion response regardless whether a timeout has occured or not.
The default is FALSE. Setting this to TRUE is non-standard
behavior. Use only if you are experiencing DoS or DDoS attacks.
On the command line you control this behavior with options -d
Set this to TRUE to disconnect a client after it got an activa
tion response regardless whether a timeout has occured or not.
The default is FALSE. Setting this to TRUE is non-standard
behavior. Use only if you are experiencing DoS or DDoS attacks.
On the command line you control this behavior with options -d
and -k.
PidFile
Write a pid file. The argument is the full pathname of a pid
file. The pid file contains is single line containing the
process id of the vlmcsd process. It can be used to stop
(SIGTERM) or restart (SIGHUP) vlmcsd. This directive can be
Write a pid file. The argument is the full pathname of a pid
file. The pid file contains is single line containing the
process id of the vlmcsd process. It can be used to stop
(SIGTERM) or restart (SIGHUP) vlmcsd. This directive can be
overriden using -p on the command line.
LogFile
Write a log file. The argument is the full pathname of a log
file. On a unixoid OS and with Cygwin you can use the special
filename 'syslog' to log to the syslog facility. This is the
Write a log file. The argument is the full pathname of a log
file. On a unixoid OS and with Cygwin you can use the special
filename 'syslog' to log to the syslog facility. This is the
same as specifying -l on the command line.
LogDateAndTime
Can be TRUE or FALSE. The default is TRUE. If set to FALSE, log
ging output does not include date and time. This is useful if
you log to stdout(3) which is redirected to another logging
ging output does not include date and time. This is useful if
you log to stdout(3) which is redirected to another logging
mechanism that already includes date and time in its output, for
instance systemd-journald(8). If you log to syslog(3), LogDate
AndTime is ignored and date and time will never be included in
instance systemd-journald(8). If you log to syslog(3), LogDate
AndTime is ignored and date and time will never be included in
the output sent to syslog(3). Using the command line you control
this setting with options -T0 and -T1.
LogVerbose
Set this to either TRUE or FALSE. The default is FALSE. If set
Set this to either TRUE or FALSE. The default is FALSE. If set
to TRUE, more details of each activation will be logged. You use
-v and -q in the command line to control this setting. LogVer
bose has an effect only if you specify a log file or redirect
-v and -q in the command line to control this setting. LogVer
bose has an effect only if you specify a log file or redirect
logging to stdout(3).
WhitelistingLevel
Can be 0, 1, 2 or 3. The default is 0. Sets the whitelisting
level to determine which products vlmcsd activates or refuses.
0: activate all products with an unknown, retail or
beta/preview KMS ID.
1: activate products with a retail or beta/preview KMS ID
but refuse to activate products with an unknown KMS ID.
2: activate products with an unknown KMS ID but refuse
products with a retail or beta/preview KMS ID.
3: activate only products with a known volume license RTM
KMS ID and refuse all others.
The SKU ID is not checked. Like a genuine KMS server vlmcsd
activates a product that has a random or unknown SKU ID. If you
select 1 or 3, vlmcsd also checks the Application ID for cor
rectness. If Microsoft introduces a new KMS ID for a new prod
uct, you cannot activate it if you used 1 or 3 until a new ver
sion of vlmcsd is available.
CheckClientTime
Can be TRUE or FALSE. The default is FALSE. If you set this to
TRUE vlmcsd(8) checks if the client time differs no more than
four hours from the system time. This is useful to prevent emu
lator detection. A client that tries to detect an emulator could
simply send two subsequent request with two time stamps that
differ more than four hours from each other. If both requests
succeed, the server is an emulator. If you set this to TRUE on a
system with no reliable time source, activations will fail. It
is ok to set the correct system time after you started vlm
csd(8).
ActivationInterval
This is the same as specifying -A on the command line. See vlm
csd(8) for details. The default is 2 hours. Example: Activation
@ -245,42 +281,50 @@ KEYWORDS
changed on the fly by sending SIGHUP to vlmcsd.
SPECIAL KEYWORDS
Any valid GUID is being treated as a special keyword in the ini file.
It is used to select a specfic ePID and HwId for an application GUID.
The argument has the form ePID [ / HwId ]. KMS currently knows only 3
application GUIDs:
Windows
The argument has the form ePID [ / HwId ]. Always use ePID and
HwId for Windows activations. If specified, RandomizationLevel
for Windows activitations will be ignored.
55c92734-d682-4d71-983e-d6ec3f16059f (Windows)
59a52881-a989-479d-af46-f275c6370663 (Office 2010)
0ff1ce15-a989-479d-af46-f275c6370663 (Office 2013)
To use specific ePIDs for Windows, Office 2010 and Office 2013/2016 you
could add the following lines to vlmcsd.ini:
Office2010
The argument has the form ePID [ / HwId ]. Always use ePID and
HwId for Office 2010 activations. If specified, Randomization
Level for Office 2010 activitations will be ignored.
55c92734-d682-4d71-983e-d6ec3f16059f = 55041-00206-184-207146-03-1062-6002.0000-3322013
59a52881-a989-479d-af46-f275c6370663 = 55041-00096-216-598637-03-17418-6002.0000-3312013
0ff1ce15-a989-479d-af46-f275c6370663 = 55041-00206-234-742099-03-9217-6002.0000-2942013
The ePID is currently a comment only. You can specify any string up to
63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs
that were used in KMSv5 versions of the "ratiborus virtual machine".
Microsoft has given up on blacklisting when KMS emulators appeared in
Office2013
The argument has the form ePID [ / HwId ]. Always use ePID and
HwId for Office 2013 activations. If specified, Randomization
Level for Office 2013 activitations will be ignored.
Office2016
The argument has the form ePID [ / HwId ]. Always use ePID and
HwId for Office 2016 activations. If specified, Randomization
Level for Office 2016 activitations will be ignored.
VALID EPIDS
The ePID is currently a comment only. You can specify any string up to
63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs
that were used in KMSv5 versions of the "Ratiborus Virtual Machine".
Microsoft has given up on blacklisting when KMS emulators appeared in
the wild.
Even if you can use "Activated by cool hacker guys" as an ePID, you may
wish to use ePIDs that cannot be detected as non-MS ePIDs. If you don't
know how these "valid" ePIDs look like exactly, do not use GUIDS in
vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid
know how these "valid" ePIDs look like exactly, do not use GUIDS in
vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid
ePIDs.
If you use non-ASCII characters in your ePID (you shouldn't do anyway),
these must be in UTF-8 format. This is especially important when you
these must be in UTF-8 format. This is especially important when you
run vlmcsd on Windows or cygwin because UTF-8 is not the default encod
ing for most editors.
If you are specifying an optional HWID it follows the same syntax as in
the -H option in vlmcsd(8) ecxept that you must not enclose a HWID in
the -H option in vlmcsd(8) ecxept that you must not enclose a HWID in
quotes even if it contains spaces.
@ -294,7 +338,7 @@ AUTHOR
CREDITS
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati
borus, ...
@ -303,4 +347,4 @@ SEE ALSO
Hotbird64 July 2016 VLMCSD.INI(5)
Hotbird64 October 2016 VLMCSD.INI(5)

View File

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Wed Jul 13 12:34:02 2016 -->
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -36,8 +36,8 @@
</h2>
<p style="margin-left:11%; margin-top: 1em">vlmcsdmulti
&minus; a multi-call binary containing <b>vlmcs</b>(1) and
<p style="margin-left:11%; margin-top: 1em">vlmcsdmulti - a
multi-call binary containing <b>vlmcs</b>(1) and
<b>vlmcsd</b>(8)</p>
<h2>SYNOPSIS

178
rpc.h
View File

@ -1,178 +0,0 @@
#ifndef __rpc_h
#define __rpc_h
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#include "types.h"
typedef struct {
BYTE VersionMajor;
BYTE VersionMinor;
BYTE PacketType;
BYTE PacketFlags;
DWORD DataRepresentation;
WORD FragLength;
WORD AuthLength;
DWORD CallId;
} /*__packed*/ RPC_HEADER;
typedef struct {
WORD MaxXmitFrag;
WORD MaxRecvFrag;
DWORD AssocGroup;
DWORD NumCtxItems;
struct {
WORD ContextId;
WORD NumTransItems;
GUID InterfaceUUID;
WORD InterfaceVerMajor;
WORD InterfaceVerMinor;
GUID TransferSyntax;
DWORD SyntaxVersion;
} CtxItems[1];
} /*__packed*/ RPC_BIND_REQUEST;
typedef struct {
WORD MaxXmitFrag;
WORD MaxRecvFrag;
DWORD AssocGroup;
WORD SecondaryAddressLength;
BYTE SecondaryAddress[6];
DWORD NumResults;
struct {
WORD AckResult;
WORD AckReason;
GUID TransferSyntax;
DWORD SyntaxVersion;
} Results[0];
} /*__packed*/ RPC_BIND_RESPONSE;
typedef struct {
DWORD AllocHint;
WORD ContextId;
WORD Opnum;
struct {
DWORD DataLength;
DWORD DataSizeIs;
} Ndr;
BYTE Data[0];
} /*__packed*/ RPC_REQUEST;
typedef struct {
DWORD AllocHint;
WORD ContextId;
BYTE CancelCount;
BYTE Pad1;
struct {
DWORD DataLength;
DWORD DataSizeIs1;
DWORD DataSizeIs2;
} Ndr;
BYTE Data[0];
} /*__packed*/ RPC_RESPONSE;
typedef struct {
DWORD AllocHint;
WORD ContextId;
WORD Opnum;
union {
struct {
DWORD DataLength;
DWORD DataSizeIs;
BYTE Data[0];
} Ndr;
struct {
uint64_t DataLength;
uint64_t DataSizeIs;
BYTE Data[0];
} Ndr64;
};
} /*__packed*/ RPC_REQUEST64;
typedef struct {
DWORD AllocHint;
WORD ContextId;
BYTE CancelCount;
BYTE Pad1;
union {
struct {
DWORD DataLength;
DWORD DataSizeMax;
union
{
DWORD DataSizeIs;
DWORD status;
};
BYTE Data[0];
} Ndr;
struct {
uint64_t DataLength;
uint64_t DataSizeMax;
union
{
uint64_t DataSizeIs;
DWORD status;
};
BYTE Data[0];
} Ndr64;
};
} /*__packed*/ RPC_RESPONSE64;
typedef SOCKET RpcCtx;
typedef int RpcStatus;
#define INVALID_NDR_CTX ((WORD)~0)
#define RPC_BIND_ACCEPT (0)
#define RPC_BIND_NACK (LE16(2))
#define RPC_BIND_ACK (LE16(3))
#define RPC_SYNTAX_UNSUPPORTED (LE16(2))
#define RPC_ABSTRACTSYNTAX_UNSUPPORTED (LE16(1))
#define RPC_BTFN_SEC_CONTEXT_MULTIPLEX (LE16(1))
#define RPC_BTFN_KEEP_ORPHAN (LE16(2))
#define INVALID_RPCCTX INVALID_SOCKET
#define closeRpc socketclose
#define RPC_PT_REQUEST 0
#define RPC_PT_RESPONSE 2
#define RPC_PT_BIND_REQ 11
#define RPC_PT_BIND_ACK 12
#define RPC_PT_ALTERCONTEXT_REQ 14
#define RPC_PT_ALTERCONTEXT_ACK 15
#define RPC_PF_FIRST 1
#define RPC_PF_LAST 2
#define RPC_PF_CANCEL_PENDING 4
#define RPC_PF_RESERVED 8
#define RPC_PF_MULTIPLEX 16
#define RPC_PF_NOT_EXEC 32
#define RPC_PF_MAYBE 64
#define RPC_PF_OBJECT 128
typedef union _RPC_FLAGS
{
DWORD mask;
struct {
uint32_t FlagsBTFN : 16;
BOOL HasNDR32 : 1;
BOOL HasNDR64 : 1;
BOOL HasBTFN : 1;
};
} RPC_FLAGS, *PRPC_FLAGS;
extern RPC_FLAGS RpcFlags;
void rpcServer(const RpcCtx socket, const DWORD RpcAssocGroup, const char* const ipstr);
RpcStatus rpcBindClient(const RpcCtx sock, const int_fast8_t verbose);
RpcStatus rpcSendRequest(const RpcCtx socket, const BYTE *const KmsRequest, const size_t requestSize, BYTE **KmsResponse, size_t *const responseSize);
#endif // __rpc_h

643
src/GNUmakefile Normal file
View File

@ -0,0 +1,643 @@
################################################################################
.PHONY: clean
PROGRAM_NAME ?= ../bin/vlmcsd
CLIENT_NAME ?= ../bin/vlmcs
MULTI_NAME ?= ../bin/vlmcsdmulti
OBJ_NAME ?= ../build/libkms-static.o
A_NAME ?= ../lib/libkms.a
CONFIG ?= config.h
COMPILER_LANGUAGE ?= c
BASE_PROGRAM_NAME=$(notdir $(PROGRAM_NAME))
BASE_CLIENT_NAME=$(notdir $(CLIENT_NAME))
BASE_MULTI_NAME=$(notdir $(MULTI_NAME))
BASE_DLL_NAME=$(notdir $(DLL_NAME))
BASE_A_NAME=$(notdir $(A_NAME))
ifeq (1,$(FROM_PARENT))
CLIENT_NAME_TEST=$(patsubst /%,/,$(CLIENT_NAME))
MULTI_NAME_TEST=$(patsubst /%,/,$(MULTI_NAME))
DLL_NAME_TEST=$(patsubst /%,/,$(DLL_NAME))
A_NAME_TEST=$(patsubst /%,/,$(A_NAME))
PROGRAM_NAME_TEST=$(patsubst /%,/,$(PROGRAM_NAME))
ifneq (/,$(PROGRAM_NAME_TEST))
PROGRAM_PREFIX=../
endif
ifneq (/,$(CLIENT_NAME_TEST))
CLIENT_PREFIX=../
endif
ifneq (/,$(MULTI_NAME_TEST))
MULTI_PREFIX=../
endif
ifneq (/,$(DLL_NAME_TEST))
DLL_PREFIX=../
endif
ifneq (/,$(A_NAME_TEST))
A_PREFIX=../
endif
endif
REAL_PROGRAM_NAME=$(PROGRAM_PREFIX)$(PROGRAM_NAME)
REAL_CLIENT_NAME=$(CLIENT_PREFIX)$(CLIENT_NAME)
REAL_MULTI_NAME=$(MULTI_PREFIX)$(MULTI_NAME)
REAL_DLL_NAME=$(DLL_PREFIX)$(DLL_NAME)
REAL_A_NAME=$(A_PREFIX)$(A_NAME)
# crypto library to use for standard algos, could save ~1-2kb ;)
# can be either 'openssl', 'polarssl' or anything other for internal impl
CRYPTO ?= internal
# use DNS_PARSER=internal if your OS doesn't supply the DNS parser routines
DNS_PARSER ?= OS
# You should supply your own version string here
VLMCSD_VERSION ?= $(shell test -d ../.svn && echo svn`svnversion`)
FEATURES ?= full
VERBOSE ?= NO
################################################################################
CC ?= gcc
TARGETPLATFORM := $(shell LANG=en_US.UTF-8 $(CC) -v 2>&1 | grep '^Target: ' | cut -f 2 -d ' ')
ifneq (,$(findstring darwin,$(TARGETPLATFORM)))
DARWIN := 1
UNIX := 1
endif
ifneq (,$(findstring android,$(TARGETPLATFORM)))
ANDROID := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring minix,$(TARGETPLATFORM)))
MINIX := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring mingw,$(TARGETPLATFORM)))
MINGW := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring cygwin,$(TARGETPLATFORM)))
CYGWIN := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring cygnus,$(TARGETPLATFORM)))
CYGWIN := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring freebsd,$(TARGETPLATFORM)))
FREEBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring netbsd,$(TARGETPLATFORM)))
NETBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring openbsd,$(TARGETPLATFORM)))
OPENBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring solaris,$(TARGETPLATFORM)))
SOLARIS := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring linux,$(TARGETPLATFORM)))
LINUX := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring gnu,$(TARGETPLATFORM)))
ifeq (,$(findstring linux,$(TARGETPLATFORM)))
UNIX := 1
HURD := 1
ELF := 1
endif
endif
ifeq ($(CYGWIN),1)
DLL_NAME ?= ../lib/cygkms.dll
else ifeq ($(WIN),1)
DLL_NAME ?= ../lib/libkms.dll
else ifeq ($(DARWIN),1)
DLL_NAME ?= ../lib/libkms.dylib
else
DLL_NAME ?= ../lib/libkms.so
endif
BASECFLAGS = -DVLMCSD_COMPILER=\"$(notdir $(CC))\" -DVLMCSD_PLATFORM=\"$(TARGETPLATFORM)\" -DCONFIG=\"$(CONFIG)\" -DBUILD_TIME=$(shell date '+%s') -g -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
BASELDFLAGS =
STRIPFLAGS =
CLIENTLDFLAGS =
SERVERLDFLAGS =
ifndef SAFE_MODE
BASECFLAGS += -fvisibility=hidden -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants
ifeq ($(ELF),1)
BASELDFLAGS += -Wl,-z,norelro
endif
ifneq (,$(findstring gcc,$(notdir $(CC))))
BASECFLAGS += -flto
endif
endif
ifeq ($(ELF), 1)
PICFLAGS += -fPIC
endif
ifeq ($(NOLIBS),1)
NOLRESOLV=1
NOLPTHREAD=1
endif
ifneq ($(NOLIBS),1)
ifeq ($(MINGW),1)
BASELDFLAGS += -lws2_32 -liphlpapi
endif
endif
ifneq ($(NO_DNS),1)
ifneq ($(ANDROID),1)
ifneq ($(NOLRESOLV),1)
ifeq ($(MINGW),1)
CLIENTLDFLAGS += -ldnsapi
endif
ifeq ($(LINUX),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(HURD),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(DARWIN),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(CYGWIN),1)
DNS_PARSER := internal
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(OPENBSD),1)
DNS_PARSER := internal
endif
ifeq ($(SOLARIS),1)
CLIENTLDFLAGS += -lresolv
endif
endif
endif
else
BASECFLAGS += -DNO_DNS
endif
ifneq ($(CAT),2)
BASECFLAGS += "-Wall"
endif
ifeq ($(DARWIN), 1)
STRIPFLAGS += -Wl,-S -Wl,-x
BASECFLAGS += -Wno-deprecated-declarations
else ifeq ($(shell uname), SunOS)
STRIPFLAGS += -s
ifeq ($(notdir $(LD_ALTEXEC)),gld)
BASELDFLAGS += -Wl,--gc-sections
endif
BASELDFLAGS += -lsocket
else
ifneq ($(CC),tcc)
BASELDFLAGS += -Wl,--gc-sections
endif
STRIPFLAGS += -s
endif
LIBRARY_CFLAGS = -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -UNO_SOCKETS -USIMPLE_RPC
ifeq ($(FEATURES), embedded)
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_BASIC_PRODUCT_LIST -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), autostart)
BASECFLAGS += -DNO_HELP -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), minimum)
BASECFLAGS += -DSIMPLE_RPC -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DSMALL_AES
else ifeq ($(FEATURES), most)
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
else ifeq ($(FEATURES), inetd)
BASECFLAGS += -DNO_SIGHUP -DNO_SOCKETS -DNO_PID_FILE -DNO_LIMIT -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), fixedepids)
BASECFLAGS += -DNO_SIGHUP -DNO_CL_PIDS -DNO_RANDOM_EPID -DNO_INI_FILE
endif
ifdef INI
BASECFLAGS += -DINI_FILE=\"$(INI)\"
endif
ifeq ($(NO_GETIFADDRS), 1)
BASECFLAGS += -DNO_GETIFADDRS
endif
ifeq ($(THREADS), 1)
BASECFLAGS += -DUSE_THREADS
endif
ifeq ($(CHILD_HANDLER), 1)
BASECFLAGS += -DCHILD_HANDLER
endif
ifeq ($(NO_TIMEOUT), 1)
BASECFLAGS += -DNO_TIMEOUT
endif
ifdef WINDOWS
BASECFLAGS += -DEPID_WINDOWS=\"$(WINDOWS)\"
endif
ifdef OFFICE2010
BASECFLAGS += -DEPID_OFFICE2010=\"$(OFFICE2010)\"
endif
ifdef OFFICE2013
BASECFLAGS += -DEPID_OFFICE2013=\"$(OFFICE2013)\"
endif
ifdef OFFICE2016
BASECFLAGS += -DEPID_OFFICE2016=\"$(OFFICE2016)\"
endif
ifdef HWID
BASECFLAGS += -DHWID=$(HWID)
endif
ifdef TERMINAL_WIDTH
BASECFLAGS += -DTERMINAL_FIXED_WIDTH=$(TERMINAL_WIDTH) -DDISPLAY_WIDTH=\"$(TERMINAL_WIDTH)\"
endif
ifeq ($(NOPROCFS), 1)
BASECFLAGS += -DNO_PROCFS
endif
ifeq ($(AUXV), 1)
BASECFLAGS += -DUSE_AUXV
endif
ifneq ($(ANDROID), 1)
ifneq ($(MINIX), 1)
ifneq ($(NOLPTHREAD), 1)
ifneq ($(DARWIN), 1)
ifeq ($(THREADS), 1)
SERVERLDFLAGS += -lpthread
endif
ifeq (,$(findstring NO_LIMIT,$(CFLAGS) $(BASECFLAGS)))
SERVERLDFLAGS += -lpthread
endif
endif
endif
endif
endif
$(REAL_MULTI_NAME): BASECFLAGS += -DMULTI_CALL_BINARY=1
all: $(REAL_CLIENT_NAME) $(REAL_PROGRAM_NAME)
allmulti: $(REAL_CLIENT_NAME) $(REAL_PROGRAM_NAME) $(REAL_MULTI_NAME)
vlmcsd: $(REAL_PROGRAM_NAME)
+@true
vlmcs: $(REAL_CLIENT_NAME)
+@true
vlmcsdmulti: $(REAL_MULTI_NAME)
+@true
libkms: $(REAL_DLL_NAME)
+@true
libkms-static: $(REAL_A_NAME)
ifneq ($(strip $(VLMCSD_VERSION)),)
BASECFLAGS += -DVERSION=\"$(VLMCSD_VERSION),\ built\ $(shell date -u '+%Y-%m-%d %H:%M:%S' | sed -e 's/ /\\ /g')\ UTC\"
endif
ifdef CAT
BASECFLAGS += -DONE_FILE
endif
SRCS = crypto.c kms.c endian.c output.c shared_globals.c helpers.c
HEADERS = $(CONFIG) types.h rpc.h vlmcsd.h endian.h crypto.h kms.h network.h output.h shared_globals.h vlmcs.h helpers.h
DEPS = $(patsubst %,../build/%,$(MULTI_SRCS:.c=.d))
VLMCSD_SRCS = vlmcsd.c $(SRCS)
VLMCSD_OBJS = $(patsubst %,../build/%,$(VLMCSD_SRCS:.c=.o))
VLMCS_SRCS = vlmcs.c $(SRCS)
VLMCS_OBJS = $(patsubst %,../build/%,$(VLMCS_SRCS:.c=.o))
MULTI_SRCS = vlmcsd.c vlmcs.c vlmcsdmulti.c $(SRCS)
MULTI_OBJS = $(patsubst %,../build/%,$(SRCS:.c=.o)) ../build/vlmcsd-m.o ../build/vlmcs-m.o ../build/vlmcsdmulti-m.o
DLL_SRCS = libkms.c vlmcs.c $(SRCS)
DLL_OBJS = $(patsubst %,../build/%,$(DLL_SRCS:.c=-l.o))
A_OBJS = $(patsubst %,../build/%,$(DLL_SRCS:.c=-a.o))
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf vlmcsd-floppy.7.pdf
HTMLDOCS = $(PDFDOCS:.pdf=.html)
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
ifneq ($(NO_DNS),1)
VLMCS_SRCS += dns_srv.c
MULTI_SRCS += dns_srv.c
MULTI_OBJS += ../build/dns_srv.o
ifeq ($(DNS_PARSER),internal)
ifneq ($(MINGW),1)
VLMCS_SRCS += ns_parse.c ns_name.c
MULTI_SRCS += ns_parse.c ns_name.c
MULTI_OBJS += ../build/ns_parse.o ../build/ns_name.o
BASECFLAGS += "-DDNS_PARSER_INTERNAL"
endif
endif
endif
ifeq ($(MSRPC),1)
VLMCSD_SRCS += msrpc-server.c
VLMCS_SRCS += msrpc-client.c
MULTI_SRCS += msrpc-server.c msrpc-client.c
MULTI_OBJS += ../build/msrpc-server-m.o ../build/msrpc-client-m.o
DLL_SRCS += msrpc-server.c
BASECFLAGS += -DUSE_MSRPC -Wno-unknown-pragmas
BASELDFLAGS += -lrpcrt4
else
SRCS += network.c rpc.c
endif
ifeq ($(GETIFADDRS),musl)
ifneq ($(NO_GETIFADDRS),1)
BASECFLAGS += -DGETIFADDRS_MUSL
VLMCSD_SRCS += getifaddrs-musl.c
MULTI_SRCS += getifaddrs-musl.c
VLMCS_SRCS += getifaddrs-musl.c
DLL_SRCS += getifaddrs-musl.c
MULTI_OBJS += ../build/getifaddrs-musl.o
endif
endif
ifeq ($(ANDROID),1)
ifneq ($(NO_GETIFADDRS),1)
VLMCSD_SRCS += ifaddrs-android.c
MULTI_SRCS += ifaddrs-android.c
DLL_SRCS += ifaddrs-android.c
MULTI_OBJS += ../build/ifaddrs-android.o
endif
endif
ifeq "$(WIN)" "1"
VLMCSD_SRCS += ntservice.c
MULTI_SRCS += ntservice.c
../build/MULTI_OBJS += ntservice.o
endif
ifeq ($(CRYPTO), openssl_with_aes)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl_with_aes_soft)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL -D_OPENSSL_SOFTWARE
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl)
BASECFLAGS += -D_CRYPTO_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), polarssl)
BASECFLAGS += -D_CRYPTO_POLARSSL
BASELDFLAGS += -lpolarssl
else ifeq ($(CRYPTO), windows)
BASECFLAGS += -D_CRYPTO_WINDOWS
SRCS += crypto_windows.c
else
BASECFLAGS += -D_CRYPTO_INTERNAL
SRCS += crypto_internal.c
endif
ifneq ($(STRIP),0)
BASELDFLAGS += $(STRIPFLAGS)
endif
ifeq ($(OPENSSL_HMAC),0)
BASECFLAGS += -D_OPENSSL_NO_HMAC
endif
ifeq ($(DEPENDENCIES),2)
BASECFLAGS += -MMD
endif
ifeq ($(VERBOSE),3)
COMPILER := $(shell printf "%-40s" $(notdir $(CC)))
ARCHIVER := $(shell printf "%-40s" $(notdir $(AR)))
endif
ARCMD := AR
ifdef CAT
LDCMD := CC/LD
else
LDCMD := LD
endif
-include $(MULTI_SRCS:.c=.d)
../build/%.o: %.c
ifeq ($(VERBOSE),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $< -o $@
ifeq ($(DEPENDENCIES),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $< -MT $@
endif
else
+@echo "$(COMPILER) CC $(notdir $@) <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $< -o $@
ifeq ($(DEPENDENCIES),1)
+@echo "$(COMPILER) DEP $*.d <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $< -MT $@
endif
endif
../build/%-m.o: %.c
ifeq ($(VERBOSE),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $< -MT $@
endif
else
+@echo "$(COMPILER) CC $(notdir $@) <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+@echo "$(COMPILER) DEP $*.d <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $< -MT $@
endif
endif
../build/%-a.o: %.c
ifeq ($(VERBOSE),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
endif
else
+@echo "$(COMPILER) CC $(notdir $@) <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+@echo "$(COMPILER) DEP $*.d <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
endif
endif
../build/%-l.o: %.c
ifeq ($(VERBOSE),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
endif
else
+@echo "$(COMPILER) CC $(notdir $@) <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+@echo "$(COMPILER) DEP $*.d <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
endif
endif
ifdef CAT
BUILDCOMMAND = cat $^ | $(CC) -x$(COMPILER_LANGUAGE) -o $@ -
VLMCSD_PREREQUISITES = $(VLMCSD_SRCS)
VLMCS_PREREQUISITES = $(VLMCS_SRCS)
MULTI_PREREQUISITES = $(MULTI_SRCS)
DLL_PREREQUISITES = $(DLL_SRCS)
OBJ_PREREQUISITES = $(DLL_SRCS)
A_PREREQUISITES = $(DLL_SRCS)
else
BUILDCOMMAND = $(CC) -o $@ $^
VLMCSD_PREREQUISITES = $(VLMCSD_OBJS)
VLMCS_PREREQUISITES = $(VLMCS_OBJS)
MULTI_PREREQUISITES = $(MULTI_OBJS)
DLL_PREREQUISITES = $(DLL_OBJS)
OBJ_PREREQUISITES = $(A_OBJS)
A_PREREQUISITES = $(A_OBJS)
endif
ifeq ($(VERBOSE),1)
BUILDCOMMANDPREFIX = +
else
BUILDCOMMANDPREFIX = +@
endif
INFOCOMMAND = +@echo "$(COMPILER) $(LDCMD) $@ <- $(notdir $^)"
ARINFOCOMMAND = +@echo "$(ARCHIVER) $(ARCMD) $@ <. $(notdir $^)"
VLMCSD_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS)
VLMCS_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS)
MULTI_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS) $(SERVERLDFLAGS)
DLL_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -shared -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
OBJ_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
$(REAL_PROGRAM_NAME): $(VLMCSD_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(VLMCSD_COMMAND)
$(REAL_CLIENT_NAME): $(VLMCS_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(VLMCS_COMMAND)
$(REAL_MULTI_NAME): $(MULTI_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(MULTI_COMMAND)
$(REAL_DLL_NAME): $(DLL_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(DLL_COMMAND)
ifndef CAT
$(OBJ_NAME):
+@echo Cannot make $@ without CAT defined. Please create $(A_NAME)
else
$(OBJ_NAME): $(OBJ_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(OBJ_COMMAND)
endif
ifdef CAT
$(REAL_A_NAME): $(OBJ_NAME)
else
$(REAL_A_NAME): BASECFLAGS += -fvisibility=hidden -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
$(REAL_A_NAME): $(A_OBJS)
endif
ifneq ($(VERBOSE),1)
$(ARINFOCOMMAND)
endif
+@rm -f $@
$(BUILDCOMMANDPREFIX)$(AR) rcs $@ $^
clean:
rm -f $(REAL_PROGRAM_NAME) $(REAL_MULTI_NAME) $(REAL_DLL_NAME) $(REAL_CLIENT_NAME) $(OBJ_NAME) $(REAL_A_NAME) ../bin/* ../build/* *.d
dnsclean:
rm -f ../build/dns_srv.o
help:
@echo "Help is available by typing 'make help' in directory $(shell realpath `pwd`/..). Use 'cd ..' to get there."

View File

@ -41,6 +41,8 @@
#define TRANSMIT_AS_TABLE_SIZE 0
#define WIRE_MARSHAL_TABLE_SIZE 0
#if !MULTI_CALL_BINARY
typedef struct _KMSServer_MIDL_TYPE_FORMAT_STRING
{
short Pad;
@ -68,6 +70,8 @@ extern const KMSServer_MIDL_TYPE_FORMAT_STRING KMSServer__MIDL_TypeFormatString;
extern const KMSServer_MIDL_PROC_FORMAT_STRING KMSServer__MIDL_ProcFormatString;
extern const KMSServer_MIDL_EXPR_FORMAT_STRING KMSServer__MIDL_ExprFormatString;
#endif // !MULTI_CALL_BINARY
#define GENERIC_BINDING_TABLE_SIZE 0
@ -231,8 +235,6 @@ int RequestActivation(
}
};
#endif // !MULTI_CALL_BINARY
static const unsigned short KMSServer_FormatStringOffsetTable[] =
{
0
@ -241,7 +243,6 @@ static const unsigned short KMSServer_FormatStringOffsetTable[] =
//typedef void *(__RPC_API midl_user_allocate_t)(size_t);
typedef void *(__RPC_API *midl_allocate_t)(size_t);
#if !MULTI_CALL_BINARY
/*static*/ const MIDL_STUB_DESC KMSServer_StubDesc =
{
(void *)& KMSServer___RpcClientInterface,

View File

@ -33,6 +33,8 @@
#include "KMSServer_h.h"
#if !MULTI_CALL_BINARY
#define TYPE_FORMAT_STRING_SIZE 43
#define PROC_FORMAT_STRING_SIZE 61
#define EXPR_FORMAT_STRING_SIZE 1
@ -70,6 +72,8 @@ extern const KMSServer_MIDL_TYPE_FORMAT_STRING KMSServer__MIDL_TypeFormatString;
extern const KMSServer_MIDL_PROC_FORMAT_STRING KMSServer__MIDL_ProcFormatString;
extern const KMSServer_MIDL_EXPR_FORMAT_STRING KMSServer__MIDL_ExprFormatString;
#endif // !MULTI_CALL_BINARY
#define GENERIC_BINDING_TABLE_SIZE 0
@ -233,14 +237,12 @@ int RequestActivation(
}
};
#endif //!MULTI_CALL_BINARY
static const unsigned short KMSServer_FormatStringOffsetTable[] =
{
0
};
#endif //!MULTI_CALL_BINARY
#endif /* defined(_M_AMD64)*/
@ -276,6 +278,8 @@ static const unsigned short KMSServer_FormatStringOffsetTable[] =
#include "ndr64types.h"
#include "pshpack8.h"
#if !MULTI_CALL_BINARY
typedef
struct
{
@ -363,7 +367,6 @@ NDR64_FORMAT_UINT32
__midl_frag1_t;
extern const __midl_frag1_t __midl_frag1;
#if !MULTI_CALL_BINARY
/*static*/ const __midl_frag13_t __midl_frag13 =
{
/* */
@ -652,6 +655,7 @@ extern const __midl_frag1_t __midl_frag1;
#include "poppack.h"
#if !MULTI_CALL_BINARY
static const FormatInfoRef KMSServer_Ndr64ProcTable[] =
{
@ -661,7 +665,6 @@ static const FormatInfoRef KMSServer_Ndr64ProcTable[] =
//typedef void *__RPC_USER MIDL_user_allocate_t(SIZE_T)
typedef void *(__RPC_API *midl_allocate_t)(size_t);
#if !MULTI_CALL_BINARY
/*static*/ const MIDL_STUB_DESC KMSServer_StubDesc =
{
(void *)& KMSServer___RpcClientInterface,
@ -685,7 +688,6 @@ typedef void *(__RPC_API *midl_allocate_t)(size_t);
(void *)& KMSServer_ProxyInfo, /* proxy/server info */
0
};
#endif // !MULTI_CALL_BINARY
static const MIDL_SYNTAX_INFO KMSServer_SyntaxInfo [ 2 ] =
{
@ -711,6 +713,8 @@ static const MIDL_SYNTAX_INFO KMSServer_SyntaxInfo [ 2 ] =
}
};
#endif // !MULTI_CALL_BINARY
/*static*/ const MIDL_STUBLESS_PROXY_INFO KMSServer_ProxyInfo =
{
&KMSServer_StubDesc,

View File

@ -18,6 +18,10 @@
*/
/* @@MIDL_FILE_HEADING( ) */
#if _WIN32
#include "winsock2.h"
#endif
#pragma warning( disable: 4049 ) /* more than 64k source lines */

View File

@ -0,0 +1,58 @@
/* This file is needed by libio to define various configuration parameters.
These are always the same in the GNU C library. */
#ifndef _G_config_h
#define _G_config_h 1
/* Define types for libio in terms of the standard internal type names. */
#include <bits/types.h>
#define __need_size_t
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define __need_wchar_t
#endif
#define __need_NULL
#include <stddef.h>
#define __need_mbstate_t
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define __need_wint_t
#endif
#include <wchar.h>
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# include <gconv.h>
typedef union
{
struct __gconv_info __cd;
struct
{
struct __gconv_info __cd;
struct __gconv_step_data __data;
} __combined;
} _G_iconv_t;
#endif
/* These library features are always available in the GNU C library. */
#define _G_va_list __gnuc_va_list
#define _G_HAVE_MMAP 1
#define _G_HAVE_MREMAP 1
#define _G_IO_IO_FILE_VERSION 0x20001
/* This is defined by <bits/stat.h> if `st_blksize' exists. */
#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
#define _G_BUFSIZ 8192
#endif /* _G_config.h */

View File

@ -0,0 +1,246 @@
/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/*
* ISO/IEC 9945-1:1996 6.7: Asynchronous Input and Output
*/
#ifndef _AIO_H
#define _AIO_H 1
#include <features.h>
#include <sys/types.h>
#define __need_sigevent_t
#include <bits/siginfo.h>
#define __need_timespec
#include <time.h>
__BEGIN_DECLS
/* Asynchronous I/O control block. */
struct aiocb
{
int aio_fildes; /* File desriptor. */
int aio_lio_opcode; /* Operation to be performed. */
int aio_reqprio; /* Request priority offset. */
volatile void *aio_buf; /* Location of buffer. */
size_t aio_nbytes; /* Length of transfer. */
struct sigevent aio_sigevent; /* Signal number and value. */
/* Internal members. */
struct aiocb *__next_prio;
int __abs_prio;
int __policy;
int __error_code;
__ssize_t __return_value;
#ifndef __USE_FILE_OFFSET64
__off_t aio_offset; /* File offset. */
char __pad[sizeof (__off64_t) - sizeof (__off_t)];
#else
__off64_t aio_offset; /* File offset. */
#endif
char __glibc_reserved[32];
};
/* The same for the 64bit offsets. Please note that the members aio_fildes
to __return_value have to be the same in aiocb and aiocb64. */
#ifdef __USE_LARGEFILE64
struct aiocb64
{
int aio_fildes; /* File desriptor. */
int aio_lio_opcode; /* Operation to be performed. */
int aio_reqprio; /* Request priority offset. */
volatile void *aio_buf; /* Location of buffer. */
size_t aio_nbytes; /* Length of transfer. */
struct sigevent aio_sigevent; /* Signal number and value. */
/* Internal members. */
struct aiocb *__next_prio;
int __abs_prio;
int __policy;
int __error_code;
__ssize_t __return_value;
__off64_t aio_offset; /* File offset. */
char __glibc_reserved[32];
};
#endif
#ifdef __USE_GNU
/* To customize the implementation one can use the following struct.
This implementation follows the one in Irix. */
struct aioinit
{
int aio_threads; /* Maximal number of threads. */
int aio_num; /* Number of expected simultanious requests. */
int aio_locks; /* Not used. */
int aio_usedba; /* Not used. */
int aio_debug; /* Not used. */
int aio_numusers; /* Not used. */
int aio_idle_time; /* Number of seconds before idle thread
terminates. */
int aio_reserved;
};
#endif
/* Return values of cancelation function. */
enum
{
AIO_CANCELED,
#define AIO_CANCELED AIO_CANCELED
AIO_NOTCANCELED,
#define AIO_NOTCANCELED AIO_NOTCANCELED
AIO_ALLDONE
#define AIO_ALLDONE AIO_ALLDONE
};
/* Operation codes for `aio_lio_opcode'. */
enum
{
LIO_READ,
#define LIO_READ LIO_READ
LIO_WRITE,
#define LIO_WRITE LIO_WRITE
LIO_NOP
#define LIO_NOP LIO_NOP
};
/* Synchronization options for `lio_listio' function. */
enum
{
LIO_WAIT,
#define LIO_WAIT LIO_WAIT
LIO_NOWAIT
#define LIO_NOWAIT LIO_NOWAIT
};
/* Allow user to specify optimization. */
#ifdef __USE_GNU
extern void aio_init (const struct aioinit *__init) __THROW __nonnull ((1));
#endif
#ifndef __USE_FILE_OFFSET64
/* Enqueue read request for given number of bytes and the given priority. */
extern int aio_read (struct aiocb *__aiocbp) __THROW __nonnull ((1));
/* Enqueue write request for given number of bytes and the given priority. */
extern int aio_write (struct aiocb *__aiocbp) __THROW __nonnull ((1));
/* Initiate list of I/O requests. */
extern int lio_listio (int __mode,
struct aiocb *const __list[__restrict_arr],
int __nent, struct sigevent *__restrict __sig)
__THROW __nonnull ((2));
/* Retrieve error status associated with AIOCBP. */
extern int aio_error (const struct aiocb *__aiocbp) __THROW __nonnull ((1));
/* Return status associated with AIOCBP. */
extern __ssize_t aio_return (struct aiocb *__aiocbp) __THROW __nonnull ((1));
/* Try to cancel asynchronous I/O requests outstanding against file
descriptor FILDES. */
extern int aio_cancel (int __fildes, struct aiocb *__aiocbp) __THROW;
/* Suspend calling thread until at least one of the asynchronous I/O
operations referenced by LIST has completed.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int aio_suspend (const struct aiocb *const __list[], int __nent,
const struct timespec *__restrict __timeout)
__nonnull ((1));
/* Force all operations associated with file desriptor described by
`aio_fildes' member of AIOCBP. */
extern int aio_fsync (int __operation, struct aiocb *__aiocbp)
__THROW __nonnull ((2));
#else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (aio_read, (struct aiocb *__aiocbp), aio_read64)
__nonnull ((1));
extern int __REDIRECT_NTH (aio_write, (struct aiocb *__aiocbp), aio_write64)
__nonnull ((1));
extern int __REDIRECT_NTH (lio_listio,
(int __mode,
struct aiocb *const __list[__restrict_arr],
int __nent, struct sigevent *__restrict __sig),
lio_listio64) __nonnull ((2));
extern int __REDIRECT_NTH (aio_error, (const struct aiocb *__aiocbp),
aio_error64) __nonnull ((1));
extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
aio_return64) __nonnull ((1));
extern int __REDIRECT_NTH (aio_cancel,
(int __fildes, struct aiocb *__aiocbp),
aio_cancel64);
extern int __REDIRECT_NTH (aio_suspend,
(const struct aiocb *const __list[], int __nent,
const struct timespec *__restrict __timeout),
aio_suspend64) __nonnull ((1));
extern int __REDIRECT_NTH (aio_fsync,
(int __operation, struct aiocb *__aiocbp),
aio_fsync64) __nonnull ((2));
# else
# define aio_read aio_read64
# define aio_write aio_write64
# define lio_listio lio_listio64
# define aio_error aio_error64
# define aio_return aio_return64
# define aio_cancel aio_cancel64
# define aio_suspend aio_suspend64
# define aio_fsync aio_fsync64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int aio_read64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1));
extern int aio_write64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1));
extern int lio_listio64 (int __mode,
struct aiocb64 *const __list[__restrict_arr],
int __nent, struct sigevent *__restrict __sig)
__THROW __nonnull ((2));
extern int aio_error64 (const struct aiocb64 *__aiocbp)
__THROW __nonnull ((1));
extern __ssize_t aio_return64 (struct aiocb64 *__aiocbp)
__THROW __nonnull ((1));
extern int aio_cancel64 (int __fildes, struct aiocb64 *__aiocbp) __THROW;
extern int aio_suspend64 (const struct aiocb64 *const __list[], int __nent,
const struct timespec *__restrict __timeout)
__THROW __nonnull ((1));
extern int aio_fsync64 (int __operation, struct aiocb64 *__aiocbp)
__THROW __nonnull ((2));
#endif
__END_DECLS
#endif /* aio.h */

View File

@ -0,0 +1,63 @@
/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _ALIASES_H
#define _ALIASES_H 1
#include <features.h>
#include <sys/types.h>
__BEGIN_DECLS
/* Structure to represent one entry of the alias data base. */
struct aliasent
{
char *alias_name;
size_t alias_members_len;
char **alias_members;
int alias_local;
};
/* Open alias data base files. */
extern void setaliasent (void) __THROW;
/* Close alias data base files. */
extern void endaliasent (void) __THROW;
/* Get the next entry from the alias data base. */
extern struct aliasent *getaliasent (void) __THROW;
/* Get the next entry from the alias data base and put it in RESULT_BUF. */
extern int getaliasent_r (struct aliasent *__restrict __result_buf,
char *__restrict __buffer, size_t __buflen,
struct aliasent **__restrict __result) __THROW;
/* Get alias entry corresponding to NAME. */
extern struct aliasent *getaliasbyname (const char *__name) __THROW;
/* Get alias entry corresponding to NAME and put it in RESULT_BUF. */
extern int getaliasbyname_r (const char *__restrict __name,
struct aliasent *__restrict __result_buf,
char *__restrict __buffer, size_t __buflen,
struct aliasent **__restrict __result) __THROW;
__END_DECLS
#endif /* aliases.h */

View File

@ -0,0 +1,40 @@
/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _ALLOCA_H
#define _ALLOCA_H 1
#include <features.h>
#define __need_size_t
#include <stddef.h>
__BEGIN_DECLS
/* Remove any previous definitions. */
#undef alloca
/* Allocate a block that will be freed when the calling function exits. */
extern void *alloca (size_t __size) __THROW;
#ifdef __GNUC__
# define alloca(size) __builtin_alloca (size)
#endif /* GCC. */
__END_DECLS
#endif /* alloca.h */

View File

@ -0,0 +1,47 @@
/* Header describing `ar' archive file format.
Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _AR_H
#define _AR_H 1
#include <sys/cdefs.h>
/* Archive files start with the ARMAG identifying string. Then follows a
`struct ar_hdr', and as many bytes of member file data as its `ar_size'
member indicates, for each member file. */
#define ARMAG "!<arch>\n" /* String that begins an archive file. */
#define SARMAG 8 /* Size of that string. */
#define ARFMAG "`\n" /* String in ar_fmag at end of each header. */
__BEGIN_DECLS
struct ar_hdr
{
char ar_name[16]; /* Member file name, sometimes / terminated. */
char ar_date[12]; /* File date, decimal seconds since Epoch. */
char ar_uid[6], ar_gid[6]; /* User and group IDs, in ASCII decimal. */
char ar_mode[8]; /* File mode, in ASCII octal. */
char ar_size[10]; /* File size, in ASCII decimal. */
char ar_fmag[2]; /* Always contains ARFMAG. */
};
__END_DECLS
#endif /* ar.h */

View File

@ -0,0 +1,594 @@
/* Hierarchial argument parsing, layered over getopt.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _ARGP_H
#define _ARGP_H
#include <stdio.h>
#include <ctype.h>
#include <getopt.h>
#include <limits.h>
#define __need_error_t
#include <errno.h>
#ifndef __THROW
# define __THROW
#endif
#ifndef __NTH
# define __NTH(fct) fct __THROW
#endif
/* The __attribute__ feature is available in gcc versions 2.5 and later.
The __-protected variants of the attributes 'format' and 'printf' are
accepted by gcc versions 2.6.4 (effectively 2.7) and later.
We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
gnulib and libintl do '#define printf __printf__' when they override
the 'printf' function. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
#else
# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
#endif
/* GCC 2.95 and later have "__restrict"; C99 compilers have
"restrict", and "configure" may have defined "restrict". */
#ifndef __restrict
# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
# if defined restrict || 199901L <= __STDC_VERSION__
# define __restrict restrict
# else
# define __restrict
# endif
# endif
#endif
#ifndef __error_t_defined
typedef int error_t;
# define __error_t_defined
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* A description of a particular option. A pointer to an array of
these is passed in the OPTIONS field of an argp structure. Each option
entry can correspond to one long option and/or one short option; more
names for the same option can be added by following an entry in an option
array with options having the OPTION_ALIAS flag set. */
struct argp_option
{
/* The long option name. For more than one name for the same option, you
can use following options with the OPTION_ALIAS flag set. */
const char *name;
/* What key is returned for this option. If > 0 and printable, then it's
also accepted as a short option. */
int key;
/* If non-NULL, this is the name of the argument associated with this
option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */
const char *arg;
/* OPTION_ flags. */
int flags;
/* The doc string for this option. If both NAME and KEY are 0, This string
will be printed outdented from the normal option column, making it
useful as a group header (it will be the first thing printed in its
group); in this usage, it's conventional to end the string with a `:'. */
const char *doc;
/* The group this option is in. In a long help message, options are sorted
alphabetically within each group, and the groups presented in the order
0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with
if this field 0 will inherit the group number of the previous entry, or
zero if it's the first one, unless its a group header (NAME and KEY both
0), in which case, the previous entry + 1 is the default. Automagic
options such as --help are put into group -1. */
int group;
};
/* The argument associated with this option is optional. */
#define OPTION_ARG_OPTIONAL 0x1
/* This option isn't displayed in any help messages. */
#define OPTION_HIDDEN 0x2
/* This option is an alias for the closest previous non-alias option. This
means that it will be displayed in the same help entry, and will inherit
fields other than NAME and KEY from the aliased option. */
#define OPTION_ALIAS 0x4
/* This option isn't actually an option (and so should be ignored by the
actual option parser), but rather an arbitrary piece of documentation that
should be displayed in much the same manner as the options. If this flag
is set, then the option NAME field is displayed unmodified (e.g., no `--'
prefix is added) at the left-margin (where a *short* option would normally
be displayed), and the documentation string in the normal place. For
purposes of sorting, any leading whitespace and punctuation is ignored,
except that if the first non-whitespace character is not `-', this entry
is displayed after all options (and OPTION_DOC entries with a leading `-')
in the same group. */
#define OPTION_DOC 0x8
/* This option shouldn't be included in `long' usage messages (but is still
included in help messages). This is mainly intended for options that are
completely documented in an argp's ARGS_DOC field, in which case including
the option in the generic usage list would be redundant. For instance,
if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to
distinguish these two cases, -x should probably be marked
OPTION_NO_USAGE. */
#define OPTION_NO_USAGE 0x10
struct argp; /* fwd declare this type */
struct argp_state; /* " */
struct argp_child; /* " */
/* The type of a pointer to an argp parsing function. */
typedef error_t (*argp_parser_t) (int __key, char *__arg,
struct argp_state *__state);
/* What to return for unrecognized keys. For special ARGP_KEY_ keys, such
returns will simply be ignored. For user keys, this error will be turned
into EINVAL (if the call to argp_parse is such that errors are propagated
back to the user instead of exiting); returning EINVAL itself would result
in an immediate stop to parsing in *all* cases. */
#define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */
/* Special values for the KEY argument to an argument parsing function.
ARGP_ERR_UNKNOWN should be returned if they aren't understood.
The sequence of keys to a parsing function is either (where each
uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key):
INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all
or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed
or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized
The third case is where every parser returned ARGP_KEY_UNKNOWN for an
argument, in which case parsing stops at that argument (returning the
unparsed arguments to the caller of argp_parse if requested, or stopping
with an error message if not).
If an error occurs (either detected by argp, or because the parsing
function returned an error value), then the parser is called with
ARGP_KEY_ERROR, and no further calls are made. */
/* This is not an option at all, but rather a command line argument. If a
parser receiving this key returns success, the fact is recorded, and the
ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the
argument, a parser function decrements the NEXT field of the state it's
passed, the option won't be considered processed; this is to allow you to
actually modify the argument (perhaps into an option), and have it
processed again. */
#define ARGP_KEY_ARG 0
/* There are remaining arguments not parsed by any parser, which may be found
starting at (STATE->argv + STATE->next). If success is returned, but
STATE->next left untouched, it's assumed that all arguments were consume,
otherwise, the parser should adjust STATE->next to reflect any arguments
consumed. */
#define ARGP_KEY_ARGS 0x1000006
/* There are no more command line arguments at all. */
#define ARGP_KEY_END 0x1000001
/* Because it's common to want to do some special processing if there aren't
any non-option args, user parsers are called with this key if they didn't
successfully process any non-option arguments. Called just before
ARGP_KEY_END (where more general validity checks on previously parsed
arguments can take place). */
#define ARGP_KEY_NO_ARGS 0x1000002
/* Passed in before any parsing is done. Afterwards, the values of each
element of the CHILD_INPUT field, if any, in the state structure is
copied to each child's state to be the initial value of the INPUT field. */
#define ARGP_KEY_INIT 0x1000003
/* Use after all other keys, including SUCCESS & END. */
#define ARGP_KEY_FINI 0x1000007
/* Passed in when parsing has successfully been completed (even if there are
still arguments remaining). */
#define ARGP_KEY_SUCCESS 0x1000004
/* Passed in if an error occurs. */
#define ARGP_KEY_ERROR 0x1000005
/* An argp structure contains a set of options declarations, a function to
deal with parsing one, documentation string, a possible vector of child
argp's, and perhaps a function to filter help output. When actually
parsing options, getopt is called with the union of all the argp
structures chained together through their CHILD pointers, with conflicts
being resolved in favor of the first occurrence in the chain. */
struct argp
{
/* An array of argp_option structures, terminated by an entry with both
NAME and KEY having a value of 0. */
const struct argp_option *options;
/* What to do with an option from this structure. KEY is the key
associated with the option, and ARG is any associated argument (NULL if
none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be
returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then
parsing is stopped immediately, and that value is returned from
argp_parse(). For special (non-user-supplied) values of KEY, see the
ARGP_KEY_ definitions below. */
argp_parser_t parser;
/* A string describing what other arguments are wanted by this program. It
is only used by argp_usage to print the `Usage:' message. If it
contains newlines, the strings separated by them are considered
alternative usage patterns, and printed on separate lines (lines after
the first are prefix by ` or: ' instead of `Usage:'). */
const char *args_doc;
/* If non-NULL, a string containing extra text to be printed before and
after the options in a long help message (separated by a vertical tab
`\v' character). */
const char *doc;
/* A vector of argp_children structures, terminated by a member with a 0
argp field, pointing to child argps should be parsed with this one. Any
conflicts are resolved in favor of this argp, or early argps in the
CHILDREN list. This field is useful if you use libraries that supply
their own argp structure, which you want to use in conjunction with your
own. */
const struct argp_child *children;
/* If non-zero, this should be a function to filter the output of help
messages. KEY is either a key from an option, in which case TEXT is
that option's help text, or a special key from the ARGP_KEY_HELP_
defines, below, describing which other help text TEXT is. The function
should return either TEXT, if it should be used as-is, a replacement
string, which should be malloced, and will be freed by argp, or NULL,
meaning `print nothing'. The value for TEXT is *after* any translation
has been done, so if any of the replacement text also needs translation,
that should be done by the filter function. INPUT is either the input
supplied to argp_parse, or NULL, if argp_help was called directly. */
char *(*help_filter) (int __key, const char *__text, void *__input);
/* If non-zero the strings used in the argp library are translated using
the domain described by this string. Otherwise the currently installed
default domain is used. */
const char *argp_domain;
};
/* Possible KEY arguments to a help filter function. */
#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */
#define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */
#define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */
#define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation;
TEXT is NULL for this key. */
/* Explanatory note emitted when duplicate option arguments have been
suppressed. */
#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005
#define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */
/* When an argp has a non-zero CHILDREN field, it should point to a vector of
argp_child structures, each of which describes a subsidiary argp. */
struct argp_child
{
/* The child parser. */
const struct argp *argp;
/* Flags for this child. */
int flags;
/* If non-zero, an optional header to be printed in help output before the
child options. As a side-effect, a non-zero value forces the child
options to be grouped together; to achieve this effect without actually
printing a header string, use a value of "". */
const char *header;
/* Where to group the child options relative to the other (`consolidated')
options in the parent argp; the values are the same as the GROUP field
in argp_option structs, but all child-groupings follow parent options at
a particular group level. If both this field and HEADER are zero, then
they aren't grouped at all, but rather merged with the parent options
(merging the child's grouping levels with the parents). */
int group;
};
/* Parsing state. This is provided to parsing functions called by argp,
which may examine and, as noted, modify fields. */
struct argp_state
{
/* The top level ARGP being parsed. */
const struct argp *root_argp;
/* The argument vector being parsed. May be modified. */
int argc;
char **argv;
/* The index in ARGV of the next arg that to be parsed. May be modified. */
int next;
/* The flags supplied to argp_parse. May be modified. */
unsigned flags;
/* While calling a parsing function with a key of ARGP_KEY_ARG, this is the
number of the current arg, starting at zero, and incremented after each
such call returns. At all other times, this is the number of such
arguments that have been processed. */
unsigned arg_num;
/* If non-zero, the index in ARGV of the first argument following a special
`--' argument (which prevents anything following being interpreted as an
option). Only set once argument parsing has proceeded past this point. */
int quoted;
/* An arbitrary pointer passed in from the user. */
void *input;
/* Values to pass to child parsers. This vector will be the same length as
the number of children for the current parser. */
void **child_inputs;
/* For the parser's use. Initialized to 0. */
void *hook;
/* The name used when printing messages. This is initialized to ARGV[0],
or PROGRAM_INVOCATION_NAME if that is unavailable. */
char *name;
/* Streams used when argp prints something. */
FILE *err_stream; /* For errors; initialized to stderr. */
FILE *out_stream; /* For information; initialized to stdout. */
void *pstate; /* Private, for use by argp. */
};
/* Flags for argp_parse (note that the defaults are those that are
convenient for program command line parsing): */
/* Don't ignore the first element of ARGV. Normally (and always unless
ARGP_NO_ERRS is set) the first element of the argument vector is
skipped for option parsing purposes, as it corresponds to the program name
in a command line. */
#define ARGP_PARSE_ARGV0 0x01
/* Don't print error messages for unknown options to stderr; unless this flag
is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program
name in the error messages. This flag implies ARGP_NO_EXIT (on the
assumption that silent exiting upon errors is bad behaviour). */
#define ARGP_NO_ERRS 0x02
/* Don't parse any non-option args. Normally non-option args are parsed by
calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg
as the value. Since it's impossible to know which parse function wants to
handle it, each one is called in turn, until one returns 0 or an error
other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the
argp_parse returns prematurely (but with a return value of 0). If all
args have been parsed without error, all parsing functions are called one
last time with a key of ARGP_KEY_END. This flag needn't normally be set,
as the normal behavior is to stop parsing as soon as some argument can't
be handled. */
#define ARGP_NO_ARGS 0x04
/* Parse options and arguments in the same order they occur on the command
line -- normally they're rearranged so that all options come first. */
#define ARGP_IN_ORDER 0x08
/* Don't provide the standard long option --help, which causes usage and
option help information to be output to stdout, and exit (0) called. */
#define ARGP_NO_HELP 0x10
/* Don't exit on errors (they may still result in error messages). */
#define ARGP_NO_EXIT 0x20
/* Use the gnu getopt `long-only' rules for parsing arguments. */
#define ARGP_LONG_ONLY 0x40
/* Turns off any message-printing/exiting options. */
#define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
/* Parse the options strings in ARGC & ARGV according to the options in ARGP.
FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the
index in ARGV of the first unparsed option is returned in it. If an
unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
routine returned a non-zero value, it is returned; otherwise 0 is
returned. This function may also call exit unless the ARGP_NO_HELP flag
is set. INPUT is a pointer to a value to be passed in to the parser. */
extern error_t argp_parse (const struct argp *__restrict __argp,
int __argc, char **__restrict __argv,
unsigned __flags, int *__restrict __arg_index,
void *__restrict __input);
extern error_t __argp_parse (const struct argp *__restrict __argp,
int __argc, char **__restrict __argv,
unsigned __flags, int *__restrict __arg_index,
void *__restrict __input);
/* Global variables. */
/* If defined or set by the user program to a non-zero value, then a default
option --version is added (unless the ARGP_NO_HELP flag is used), which
will print this string followed by a newline and exit (unless the
ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
extern const char *argp_program_version;
/* If defined or set by the user program to a non-zero value, then a default
option --version is added (unless the ARGP_NO_HELP flag is used), which
calls this function with a stream to print the version to and a pointer to
the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
extern void (*argp_program_version_hook) (FILE *__restrict __stream,
struct argp_state *__restrict
__state);
/* If defined or set by the user program, it should point to string that is
the bug-reporting address for the program. It will be printed by
argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
standard help messages), embedded in a sentence that says something like
`Report bugs to ADDR.'. */
extern const char *argp_program_bug_address;
/* The exit status that argp will use when exiting due to a parsing error.
If not defined or set by the user program, this defaults to EX_USAGE from
<sysexits.h>. */
extern error_t argp_err_exit_status;
/* Flags for argp_help. */
#define ARGP_HELP_USAGE 0x01 /* a Usage: message. */
#define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */
#define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */
#define ARGP_HELP_LONG 0x08 /* a long help message. */
#define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */
#define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */
#define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
#define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */
#define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to
reflect ARGP_LONG_ONLY mode. */
/* These ARGP_HELP flags are only understood by argp_state_help. */
#define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */
#define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */
/* The standard thing to do after a program command line parsing error, if an
error message has already been printed. */
#define ARGP_HELP_STD_ERR \
(ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
/* The standard thing to do after a program command line parsing error, if no
more specific error message has been printed. */
#define ARGP_HELP_STD_USAGE \
(ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
/* The standard thing to do in response to a --help option. */
#define ARGP_HELP_STD_HELP \
(ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \
| ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR)
/* Output a usage message for ARGP to STREAM. FLAGS are from the set
ARGP_HELP_*. */
extern void argp_help (const struct argp *__restrict __argp,
FILE *__restrict __stream,
unsigned __flags, char *__restrict __name);
extern void __argp_help (const struct argp *__restrict __argp,
FILE *__restrict __stream, unsigned __flags,
char *__name);
/* The following routines are intended to be called from within an argp
parsing routine (thus taking an argp_state structure as the first
argument). They may or may not print an error message and exit, depending
on the flags in STATE -- in any case, the caller should be prepared for
them *not* to exit, and should return an appropiate error after calling
them. [argp_usage & argp_error should probably be called argp_state_...,
but they're used often enough that they should be short] */
/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
from the set ARGP_HELP_*. */
extern void argp_state_help (const struct argp_state *__restrict __state,
FILE *__restrict __stream,
unsigned int __flags);
extern void __argp_state_help (const struct argp_state *__restrict __state,
FILE *__restrict __stream,
unsigned int __flags);
/* Possibly output the standard usage message for ARGP to stderr and exit. */
extern void argp_usage (const struct argp_state *__state);
extern void __argp_usage (const struct argp_state *__state);
/* If appropriate, print the printf string FMT and following args, preceded
by the program name and `:', to stderr, and followed by a `Try ... --help'
message, then exit (1). */
extern void argp_error (const struct argp_state *__restrict __state,
const char *__restrict __fmt, ...)
_GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3));
extern void __argp_error (const struct argp_state *__restrict __state,
const char *__restrict __fmt, ...)
_GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3));
/* Similar to the standard gnu error-reporting function error(), but will
respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
to STATE->err_stream. This is useful for argument parsing code that is
shared between program startup (when exiting is desired) and runtime
option parsing (when typically an error code is returned instead). The
difference between this function and argp_error is that the latter is for
*parsing errors*, and the former is for other problems that occur during
parsing but don't reflect a (syntactic) problem with the input. */
extern void argp_failure (const struct argp_state *__restrict __state,
int __status, int __errnum,
const char *__restrict __fmt, ...)
_GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
extern void __argp_failure (const struct argp_state *__restrict __state,
int __status, int __errnum,
const char *__restrict __fmt, ...)
_GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
/* Returns true if the option OPT is a valid short option. */
extern int _option_is_short (const struct argp_option *__opt) __THROW;
extern int __option_is_short (const struct argp_option *__opt) __THROW;
/* Returns true if the option OPT is in fact the last (unused) entry in an
options array. */
extern int _option_is_end (const struct argp_option *__opt) __THROW;
extern int __option_is_end (const struct argp_option *__opt) __THROW;
/* Return the input field for ARGP in the parser corresponding to STATE; used
by the help routines. */
extern void *_argp_input (const struct argp *__restrict __argp,
const struct argp_state *__restrict __state)
__THROW;
extern void *__argp_input (const struct argp *__restrict __argp,
const struct argp_state *__restrict __state)
__THROW;
#ifdef __USE_EXTERN_INLINES
# if !_LIBC
# define __argp_usage argp_usage
# define __argp_state_help argp_state_help
# define __option_is_short _option_is_short
# define __option_is_end _option_is_end
# endif
# ifndef ARGP_EI
# define ARGP_EI __extern_inline
# endif
ARGP_EI void
__argp_usage (const struct argp_state *__state)
{
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
}
ARGP_EI int
__NTH (__option_is_short (const struct argp_option *__opt))
{
if (__opt->flags & OPTION_DOC)
return 0;
else
{
int __key = __opt->key;
return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
}
}
ARGP_EI int
__NTH (__option_is_end (const struct argp_option *__opt))
{
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
}
# if !_LIBC
# undef __argp_usage
# undef __argp_state_help
# undef __option_is_short
# undef __option_is_end
# endif
#endif /* Use extern inlines. */
#ifdef __cplusplus
}
#endif
#endif /* argp.h */

View File

@ -0,0 +1,182 @@
/* Routines for dealing with '\0' separated arg vectors.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _ARGZ_H
#define _ARGZ_H 1
#include <features.h>
#define __need_error_t
#include <errno.h>
#include <string.h> /* Need size_t, and strchr is called below. */
#ifndef __error_t_defined
typedef int error_t;
#endif
__BEGIN_DECLS
/* Make a '\0' separated arg vector from a unix argv vector, returning it in
ARGZ, and the total length in LEN. If a memory allocation error occurs,
ENOMEM is returned, otherwise 0. The result can be destroyed using free. */
extern error_t __argz_create (char *const __argv[], char **__restrict __argz,
size_t *__restrict __len) __THROW;
extern error_t argz_create (char *const __argv[], char **__restrict __argz,
size_t *__restrict __len) __THROW;
/* Make a '\0' separated arg vector from a SEP separated list in
STRING, returning it in ARGZ, and the total length in LEN. If a
memory allocation error occurs, ENOMEM is returned, otherwise 0.
The result can be destroyed using free. */
extern error_t __argz_create_sep (const char *__restrict __string,
int __sep, char **__restrict __argz,
size_t *__restrict __len) __THROW;
extern error_t argz_create_sep (const char *__restrict __string,
int __sep, char **__restrict __argz,
size_t *__restrict __len) __THROW;
/* Returns the number of strings in ARGZ. */
extern size_t __argz_count (const char *__argz, size_t __len)
__THROW __attribute_pure__;
extern size_t argz_count (const char *__argz, size_t __len)
__THROW __attribute_pure__;
/* Puts pointers to each string in ARGZ into ARGV, which must be large enough
to hold them all. */
extern void __argz_extract (const char *__restrict __argz, size_t __len,
char **__restrict __argv) __THROW;
extern void argz_extract (const char *__restrict __argz, size_t __len,
char **__restrict __argv) __THROW;
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
except the last into the character SEP. */
extern void __argz_stringify (char *__argz, size_t __len, int __sep) __THROW;
extern void argz_stringify (char *__argz, size_t __len, int __sep) __THROW;
/* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */
extern error_t __argz_append (char **__restrict __argz,
size_t *__restrict __argz_len,
const char *__restrict __buf, size_t __buf_len)
__THROW;
extern error_t argz_append (char **__restrict __argz,
size_t *__restrict __argz_len,
const char *__restrict __buf, size_t __buf_len)
__THROW;
/* Append STR to the argz vector in ARGZ & ARGZ_LEN. */
extern error_t __argz_add (char **__restrict __argz,
size_t *__restrict __argz_len,
const char *__restrict __str) __THROW;
extern error_t argz_add (char **__restrict __argz,
size_t *__restrict __argz_len,
const char *__restrict __str) __THROW;
/* Append SEP separated list in STRING to the argz vector in ARGZ &
ARGZ_LEN. */
extern error_t __argz_add_sep (char **__restrict __argz,
size_t *__restrict __argz_len,
const char *__restrict __string, int __delim)
__THROW;
extern error_t argz_add_sep (char **__restrict __argz,
size_t *__restrict __argz_len,
const char *__restrict __string, int __delim)
__THROW;
/* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */
extern void __argz_delete (char **__restrict __argz,
size_t *__restrict __argz_len,
char *__restrict __entry) __THROW;
extern void argz_delete (char **__restrict __argz,
size_t *__restrict __argz_len,
char *__restrict __entry) __THROW;
/* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an
existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end.
Since ARGZ's first entry is the same as ARGZ, argz_insert (ARGZ, ARGZ_LEN,
ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not
in ARGZ, EINVAL is returned, else if memory can't be allocated for the new
ARGZ, ENOMEM is returned, else 0. */
extern error_t __argz_insert (char **__restrict __argz,
size_t *__restrict __argz_len,
char *__restrict __before,
const char *__restrict __entry) __THROW;
extern error_t argz_insert (char **__restrict __argz,
size_t *__restrict __argz_len,
char *__restrict __before,
const char *__restrict __entry) __THROW;
/* Replace any occurrences of the string STR in ARGZ with WITH, reallocating
ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be
incremented by number of replacements performed. */
extern error_t __argz_replace (char **__restrict __argz,
size_t *__restrict __argz_len,
const char *__restrict __str,
const char *__restrict __with,
unsigned int *__restrict __replace_count);
extern error_t argz_replace (char **__restrict __argz,
size_t *__restrict __argz_len,
const char *__restrict __str,
const char *__restrict __with,
unsigned int *__restrict __replace_count);
/* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there
are no more. If entry is NULL, then the first entry is returned. This
behavior allows two convenient iteration styles:
char *entry = 0;
while ((entry = argz_next (argz, argz_len, entry)))
...;
or
char *entry;
for (entry = argz; entry; entry = argz_next (argz, argz_len, entry))
...;
*/
extern char *__argz_next (const char *__restrict __argz, size_t __argz_len,
const char *__restrict __entry) __THROW;
extern char *argz_next (const char *__restrict __argz, size_t __argz_len,
const char *__restrict __entry) __THROW;
#ifdef __USE_EXTERN_INLINES
__extern_inline char *
__NTH (__argz_next (const char *__argz, size_t __argz_len,
const char *__entry))
{
if (__entry)
{
if (__entry < __argz + __argz_len)
__entry = strchr (__entry, '\0') + 1;
return __entry >= __argz + __argz_len ? (char *) NULL : (char *) __entry;
}
else
return __argz_len > 0 ? (char *) __argz : 0;
}
__extern_inline char *
__NTH (argz_next (const char *__argz, size_t __argz_len,
const char *__entry))
{
return __argz_next (__argz, __argz_len, __entry);
}
#endif /* Use extern inlines. */
__END_DECLS
#endif /* argz.h */

View File

@ -0,0 +1,105 @@
/*
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)ftp.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _ARPA_FTP_H
#define _ARPA_FTP_H 1
/* Definitions for FTP; see RFC-765. */
/*
* Reply codes.
*/
#define PRELIM 1 /* positive preliminary */
#define COMPLETE 2 /* positive completion */
#define CONTINUE 3 /* positive intermediate */
#define TRANSIENT 4 /* transient negative completion */
#define ERROR 5 /* permanent negative completion */
/*
* Type codes
*/
#define TYPE_A 1 /* ASCII */
#define TYPE_E 2 /* EBCDIC */
#define TYPE_I 3 /* image */
#define TYPE_L 4 /* local byte size */
#ifdef FTP_NAMES
char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
#endif
/*
* Form codes
*/
#define FORM_N 1 /* non-print */
#define FORM_T 2 /* telnet format effectors */
#define FORM_C 3 /* carriage control (ASA) */
#ifdef FTP_NAMES
char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
#endif
/*
* Structure codes
*/
#define STRU_F 1 /* file (no record structure) */
#define STRU_R 2 /* record structure */
#define STRU_P 3 /* page structure */
#ifdef FTP_NAMES
char *strunames[] = {"0", "File", "Record", "Page" };
#endif
/*
* Mode types
*/
#define MODE_S 1 /* stream */
#define MODE_B 2 /* block */
#define MODE_C 3 /* compressed */
#ifdef FTP_NAMES
char *modenames[] = {"0", "Stream", "Block", "Compressed" };
#endif
/*
* Record Tokens
*/
#define REC_ESC '\377' /* Record-mode Escape */
#define REC_EOR '\001' /* Record-mode End-of-Record */
#define REC_EOF '\002' /* Record-mode End-of-File */
/*
* Block Header
*/
#define BLK_EOR 0x80 /* Block is End-of-Record */
#define BLK_EOF 0x40 /* Block is End-of-File */
#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
#define BLK_RESTART 0x10 /* Block is Restart Marker */
#define BLK_BYTECOUNT 2 /* Bytes in this block */
#endif /* arpa/ftp.h */

View File

@ -0,0 +1,105 @@
/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _ARPA_INET_H
#define _ARPA_INET_H 1
#include <features.h>
#include <netinet/in.h> /* To define `struct in_addr'. */
/* Type for length arguments in socket calls. */
#ifndef __socklen_t_defined
typedef __socklen_t socklen_t;
# define __socklen_t_defined
#endif
__BEGIN_DECLS
/* Convert Internet host address from numbers-and-dots notation in CP
into binary data in network byte order. */
extern in_addr_t inet_addr (const char *__cp) __THROW;
/* Return the local host address part of the Internet address in IN. */
extern in_addr_t inet_lnaof (struct in_addr __in) __THROW;
/* Make Internet host address in network byte order by combining the
network number NET with the local address HOST. */
extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
__THROW;
/* Return network number part of the Internet address IN. */
extern in_addr_t inet_netof (struct in_addr __in) __THROW;
/* Extract the network number in network byte order from the address
in numbers-and-dots natation starting at CP. */
extern in_addr_t inet_network (const char *__cp) __THROW;
/* Convert Internet number in IN to ASCII representation. The return value
is a pointer to an internal array containing the string. */
extern char *inet_ntoa (struct in_addr __in) __THROW;
/* Convert from presentation format of an Internet number in buffer
starting at CP to the binary network format and store result for
interface type AF in buffer starting at BUF. */
extern int inet_pton (int __af, const char *__restrict __cp,
void *__restrict __buf) __THROW;
/* Convert a Internet address in binary network format for interface
type AF in buffer starting at CP to presentation form and place
result in buffer of length LEN astarting at BUF. */
extern const char *inet_ntop (int __af, const void *__restrict __cp,
char *__restrict __buf, socklen_t __len)
__THROW;
/* The following functions are not part of XNS 5.2. */
#ifdef __USE_MISC
/* Convert Internet host address from numbers-and-dots notation in CP
into binary data and store the result in the structure INP. */
extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
/* Format a network number NET into presentation format and place result
in buffer starting at BUF with length of LEN bytes. */
extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;
/* Convert network number for interface type AF in buffer starting at
CP to presentation format. The result will specifiy BITS bits of
the number. */
extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
char *__buf, size_t __len) __THROW;
/* Convert network number for interface type AF from presentation in
buffer starting at CP to network format and store result int
buffer starting at BUF of size LEN. */
extern int inet_net_pton (int __af, const char *__cp,
void *__buf, size_t __len) __THROW;
/* Convert ASCII representation in hexadecimal form of the Internet
address to binary form and place result in buffer of length LEN
starting at BUF. */
extern unsigned int inet_nsap_addr (const char *__cp,
unsigned char *__buf, int __len) __THROW;
/* Convert internet address in binary form in LEN bytes starting at CP
a presentation form and place result in BUF. */
extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
char *__buf) __THROW;
#endif
__END_DECLS
#endif /* arpa/inet.h */

View File

@ -0,0 +1,535 @@
/*
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*
* $BINDId: nameser.h,v 8.37 2000/03/30 21:16:49 vixie Exp $
*/
#ifndef _ARPA_NAMESER_H_
#define _ARPA_NAMESER_H_
/*! \file */
#define BIND_4_COMPAT
#include <sys/param.h>
#if (!defined(BSD)) || (BSD < 199306)
# include <sys/bitypes.h>
#else
# include <sys/types.h>
#endif
#include <sys/cdefs.h>
/*%
* Revision information. This is the release date in YYYYMMDD format.
* It can change every day so the right thing to do with it is use it
* in preprocessor commands such as "#if (__NAMESER > 19931104)". Do not
* compare for equality; rather, use it to determine whether your libbind.a
* contains a new enough lib/nameser/ to support the feature you need.
*/
#define __NAMESER 19991006 /*%< New interface version stamp. */
/*
* Define constants based on RFC 883, RFC 1034, RFC 1035
*/
#define NS_PACKETSZ 512 /*%< default UDP packet size */
#define NS_MAXDNAME 1025 /*%< maximum domain name */
#define NS_MAXMSG 65535 /*%< maximum message size */
#define NS_MAXCDNAME 255 /*%< maximum compressed domain name */
#define NS_MAXLABEL 63 /*%< maximum length of domain label */
#define NS_HFIXEDSZ 12 /*%< #/bytes of fixed data in header */
#define NS_QFIXEDSZ 4 /*%< #/bytes of fixed data in query */
#define NS_RRFIXEDSZ 10 /*%< #/bytes of fixed data in r record */
#define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */
#define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */
#define NS_INT8SZ 1 /*%< #/bytes of data in a u_int8_t */
#define NS_INADDRSZ 4 /*%< IPv4 T_A */
#define NS_IN6ADDRSZ 16 /*%< IPv6 T_AAAA */
#define NS_CMPRSFLGS 0xc0 /*%< Flag bits indicating name compression. */
#define NS_DEFAULTPORT 53 /*%< For both TCP and UDP. */
/*
* These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord()
* in synch with it.
*/
typedef enum __ns_sect {
ns_s_qd = 0, /*%< Query: Question. */
ns_s_zn = 0, /*%< Update: Zone. */
ns_s_an = 1, /*%< Query: Answer. */
ns_s_pr = 1, /*%< Update: Prerequisites. */
ns_s_ns = 2, /*%< Query: Name servers. */
ns_s_ud = 2, /*%< Update: Update. */
ns_s_ar = 3, /*%< Query|Update: Additional records. */
ns_s_max = 4
} ns_sect;
/*%
* This is a message handle. It is caller allocated and has no dynamic data.
* This structure is intended to be opaque to all but ns_parse.c, thus the
* leading _'s on the member names. Use the accessor functions, not the _'s.
*/
typedef struct __ns_msg {
const u_char *_msg, *_eom;
u_int16_t _id, _flags, _counts[ns_s_max];
const u_char *_sections[ns_s_max];
ns_sect _sect;
int _rrnum;
const u_char *_msg_ptr;
} ns_msg;
/* Private data structure - do not use from outside library. */
struct _ns_flagdata { int mask, shift; };
extern const struct _ns_flagdata _ns_flagdata[];
/* Accessor macros - this is part of the public interface. */
#define ns_msg_id(handle) ((handle)._id + 0)
#define ns_msg_base(handle) ((handle)._msg + 0)
#define ns_msg_end(handle) ((handle)._eom + 0)
#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
/*%
* This is a parsed record. It is caller allocated and has no dynamic data.
*/
typedef struct __ns_rr {
char name[NS_MAXDNAME];
u_int16_t type;
u_int16_t rr_class;
u_int32_t ttl;
u_int16_t rdlength;
const u_char * rdata;
} ns_rr;
/* Accessor macros - this is part of the public interface. */
#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
#define ns_rr_type(rr) ((ns_type)((rr).type + 0))
#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0))
#define ns_rr_ttl(rr) ((rr).ttl + 0)
#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
#define ns_rr_rdata(rr) ((rr).rdata + 0)
/*%
* These don't have to be in the same order as in the packet flags word,
* and they can even overlap in some cases, but they will need to be kept
* in synch with ns_parse.c:ns_flagdata[].
*/
typedef enum __ns_flag {
ns_f_qr, /*%< Question/Response. */
ns_f_opcode, /*%< Operation code. */
ns_f_aa, /*%< Authoritative Answer. */
ns_f_tc, /*%< Truncation occurred. */
ns_f_rd, /*%< Recursion Desired. */
ns_f_ra, /*%< Recursion Available. */
ns_f_z, /*%< MBZ. */
ns_f_ad, /*%< Authentic Data (DNSSEC). */
ns_f_cd, /*%< Checking Disabled (DNSSEC). */
ns_f_rcode, /*%< Response code. */
ns_f_max
} ns_flag;
/*%
* Currently defined opcodes.
*/
typedef enum __ns_opcode {
ns_o_query = 0, /*%< Standard query. */
ns_o_iquery = 1, /*%< Inverse query (deprecated/unsupported). */
ns_o_status = 2, /*%< Name server status query (unsupported). */
/* Opcode 3 is undefined/reserved. */
ns_o_notify = 4, /*%< Zone change notification. */
ns_o_update = 5, /*%< Zone update message. */
ns_o_max = 6
} ns_opcode;
/*%
* Currently defined response codes.
*/
typedef enum __ns_rcode {
ns_r_noerror = 0, /*%< No error occurred. */
ns_r_formerr = 1, /*%< Format error. */
ns_r_servfail = 2, /*%< Server failure. */
ns_r_nxdomain = 3, /*%< Name error. */
ns_r_notimpl = 4, /*%< Unimplemented. */
ns_r_refused = 5, /*%< Operation refused. */
/* these are for BIND_UPDATE */
ns_r_yxdomain = 6, /*%< Name exists */
ns_r_yxrrset = 7, /*%< RRset exists */
ns_r_nxrrset = 8, /*%< RRset does not exist */
ns_r_notauth = 9, /*%< Not authoritative for zone */
ns_r_notzone = 10, /*%< Zone of record different from zone section */
ns_r_max = 11,
/* The following are EDNS extended rcodes */
ns_r_badvers = 16,
/* The following are TSIG errors */
ns_r_badsig = 16,
ns_r_badkey = 17,
ns_r_badtime = 18
} ns_rcode;
/* BIND_UPDATE */
typedef enum __ns_update_operation {
ns_uop_delete = 0,
ns_uop_add = 1,
ns_uop_max = 2
} ns_update_operation;
/*%
* This structure is used for TSIG authenticated messages
*/
struct ns_tsig_key {
char name[NS_MAXDNAME], alg[NS_MAXDNAME];
unsigned char *data;
int len;
};
typedef struct ns_tsig_key ns_tsig_key;
/*%
* This structure is used for TSIG authenticated TCP messages
*/
struct ns_tcp_tsig_state {
int counter;
struct dst_key *key;
void *ctx;
unsigned char sig[NS_PACKETSZ];
int siglen;
};
typedef struct ns_tcp_tsig_state ns_tcp_tsig_state;
#define NS_TSIG_FUDGE 300
#define NS_TSIG_TCP_COUNT 100
#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
#define NS_TSIG_ERROR_NO_TSIG -10
#define NS_TSIG_ERROR_NO_SPACE -11
#define NS_TSIG_ERROR_FORMERR -12
/*%
* Currently defined type values for resources and queries.
*/
typedef enum __ns_type {
ns_t_invalid = 0, /*%< Cookie. */
ns_t_a = 1, /*%< Host address. */
ns_t_ns = 2, /*%< Authoritative server. */
ns_t_md = 3, /*%< Mail destination. */
ns_t_mf = 4, /*%< Mail forwarder. */
ns_t_cname = 5, /*%< Canonical name. */
ns_t_soa = 6, /*%< Start of authority zone. */
ns_t_mb = 7, /*%< Mailbox domain name. */
ns_t_mg = 8, /*%< Mail group member. */
ns_t_mr = 9, /*%< Mail rename name. */
ns_t_null = 10, /*%< Null resource record. */
ns_t_wks = 11, /*%< Well known service. */
ns_t_ptr = 12, /*%< Domain name pointer. */
ns_t_hinfo = 13, /*%< Host information. */
ns_t_minfo = 14, /*%< Mailbox information. */
ns_t_mx = 15, /*%< Mail routing information. */
ns_t_txt = 16, /*%< Text strings. */
ns_t_rp = 17, /*%< Responsible person. */
ns_t_afsdb = 18, /*%< AFS cell database. */
ns_t_x25 = 19, /*%< X_25 calling address. */
ns_t_isdn = 20, /*%< ISDN calling address. */
ns_t_rt = 21, /*%< Router. */
ns_t_nsap = 22, /*%< NSAP address. */
ns_t_nsap_ptr = 23, /*%< Reverse NSAP lookup (deprecated). */
ns_t_sig = 24, /*%< Security signature. */
ns_t_key = 25, /*%< Security key. */
ns_t_px = 26, /*%< X.400 mail mapping. */
ns_t_gpos = 27, /*%< Geographical position (withdrawn). */
ns_t_aaaa = 28, /*%< Ip6 Address. */
ns_t_loc = 29, /*%< Location Information. */
ns_t_nxt = 30, /*%< Next domain (security). */
ns_t_eid = 31, /*%< Endpoint identifier. */
ns_t_nimloc = 32, /*%< Nimrod Locator. */
ns_t_srv = 33, /*%< Server Selection. */
ns_t_atma = 34, /*%< ATM Address */
ns_t_naptr = 35, /*%< Naming Authority PoinTeR */
ns_t_kx = 36, /*%< Key Exchange */
ns_t_cert = 37, /*%< Certification record */
ns_t_a6 = 38, /*%< IPv6 address (deprecated, use ns_t_aaaa) */
ns_t_dname = 39, /*%< Non-terminal DNAME (for IPv6) */
ns_t_sink = 40, /*%< Kitchen sink (experimentatl) */
ns_t_opt = 41, /*%< EDNS0 option (meta-RR) */
ns_t_apl = 42, /*%< Address prefix list (RFC3123) */
ns_t_tkey = 249, /*%< Transaction key */
ns_t_tsig = 250, /*%< Transaction signature. */
ns_t_ixfr = 251, /*%< Incremental zone transfer. */
ns_t_axfr = 252, /*%< Transfer zone of authority. */
ns_t_mailb = 253, /*%< Transfer mailbox records. */
ns_t_maila = 254, /*%< Transfer mail agent records. */
ns_t_any = 255, /*%< Wildcard match. */
ns_t_zxfr = 256, /*%< BIND-specific, nonstandard. */
ns_t_max = 65536
} ns_type;
/* Exclusively a QTYPE? (not also an RTYPE) */
#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \
(t) == ns_t_mailb || (t) == ns_t_maila)
/* Some kind of meta-RR? (not a QTYPE, but also not an RTYPE) */
#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt)
/* Exclusively an RTYPE? (not also a QTYPE or a meta-RR) */
#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t))
#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr)
#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \
(t) == ns_t_zxfr)
/*%
* Values for class field
*/
typedef enum __ns_class {
ns_c_invalid = 0, /*%< Cookie. */
ns_c_in = 1, /*%< Internet. */
ns_c_2 = 2, /*%< unallocated/unsupported. */
ns_c_chaos = 3, /*%< MIT Chaos-net. */
ns_c_hs = 4, /*%< MIT Hesiod. */
/* Query class values which do not appear in resource records */
ns_c_none = 254, /*%< for prereq. sections in update requests */
ns_c_any = 255, /*%< Wildcard match. */
ns_c_max = 65536
} ns_class;
/* DNSSEC constants. */
typedef enum __ns_key_types {
ns_kt_rsa = 1, /*%< key type RSA/MD5 */
ns_kt_dh = 2, /*%< Diffie Hellman */
ns_kt_dsa = 3, /*%< Digital Signature Standard (MANDATORY) */
ns_kt_private = 254 /*%< Private key type starts with OID */
} ns_key_types;
typedef enum __ns_cert_types {
cert_t_pkix = 1, /*%< PKIX (X.509v3) */
cert_t_spki = 2, /*%< SPKI */
cert_t_pgp = 3, /*%< PGP */
cert_t_url = 253, /*%< URL private type */
cert_t_oid = 254 /*%< OID private type */
} ns_cert_types;
/* Flags field of the KEY RR rdata. */
#define NS_KEY_TYPEMASK 0xC000 /*%< Mask for "type" bits */
#define NS_KEY_TYPE_AUTH_CONF 0x0000 /*%< Key usable for both */
#define NS_KEY_TYPE_CONF_ONLY 0x8000 /*%< Key usable for confidentiality */
#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /*%< Key usable for authentication */
#define NS_KEY_TYPE_NO_KEY 0xC000 /*%< No key usable for either; no key */
/* The type bits can also be interpreted independently, as single bits: */
#define NS_KEY_NO_AUTH 0x8000 /*%< Key unusable for authentication */
#define NS_KEY_NO_CONF 0x4000 /*%< Key unusable for confidentiality */
#define NS_KEY_RESERVED2 0x2000 /* Security is *mandatory* if bit=0 */
#define NS_KEY_EXTENDED_FLAGS 0x1000 /*%< reserved - must be zero */
#define NS_KEY_RESERVED4 0x0800 /*%< reserved - must be zero */
#define NS_KEY_RESERVED5 0x0400 /*%< reserved - must be zero */
#define NS_KEY_NAME_TYPE 0x0300 /*%< these bits determine the type */
#define NS_KEY_NAME_USER 0x0000 /*%< key is assoc. with user */
#define NS_KEY_NAME_ENTITY 0x0200 /*%< key is assoc. with entity eg host */
#define NS_KEY_NAME_ZONE 0x0100 /*%< key is zone key */
#define NS_KEY_NAME_RESERVED 0x0300 /*%< reserved meaning */
#define NS_KEY_RESERVED8 0x0080 /*%< reserved - must be zero */
#define NS_KEY_RESERVED9 0x0040 /*%< reserved - must be zero */
#define NS_KEY_RESERVED10 0x0020 /*%< reserved - must be zero */
#define NS_KEY_RESERVED11 0x0010 /*%< reserved - must be zero */
#define NS_KEY_SIGNATORYMASK 0x000F /*%< key can sign RR's of same name */
#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \
NS_KEY_RESERVED4 | \
NS_KEY_RESERVED5 | \
NS_KEY_RESERVED8 | \
NS_KEY_RESERVED9 | \
NS_KEY_RESERVED10 | \
NS_KEY_RESERVED11 )
#define NS_KEY_RESERVED_BITMASK2 0xFFFF /*%< no bits defined here */
/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
#define NS_ALG_MD5RSA 1 /*%< MD5 with RSA */
#define NS_ALG_DH 2 /*%< Diffie Hellman KEY */
#define NS_ALG_DSA 3 /*%< DSA KEY */
#define NS_ALG_DSS NS_ALG_DSA
#define NS_ALG_EXPIRE_ONLY 253 /*%< No alg, no security */
#define NS_ALG_PRIVATE_OID 254 /*%< Key begins with OID giving alg */
/* Protocol values */
/* value 0 is reserved */
#define NS_KEY_PROT_TLS 1
#define NS_KEY_PROT_EMAIL 2
#define NS_KEY_PROT_DNSSEC 3
#define NS_KEY_PROT_IPSEC 4
#define NS_KEY_PROT_ANY 255
/* Signatures */
#define NS_MD5RSA_MIN_BITS 512 /*%< Size of a mod or exp in bits */
#define NS_MD5RSA_MAX_BITS 4096
/* Total of binary mod and exp */
#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
/* Max length of text sig block */
#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8)
#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8)
#define NS_DSA_SIG_SIZE 41
#define NS_DSA_MIN_SIZE 213
#define NS_DSA_MAX_BYTES 405
/* Offsets into SIG record rdata to find various values */
#define NS_SIG_TYPE 0 /*%< Type flags */
#define NS_SIG_ALG 2 /*%< Algorithm */
#define NS_SIG_LABELS 3 /*%< How many labels in name */
#define NS_SIG_OTTL 4 /*%< Original TTL */
#define NS_SIG_EXPIR 8 /*%< Expiration time */
#define NS_SIG_SIGNED 12 /*%< Signature time */
#define NS_SIG_FOOT 16 /*%< Key footprint */
#define NS_SIG_SIGNER 18 /*%< Domain name of who signed it */
/* How RR types are represented as bit-flags in NXT records */
#define NS_NXT_BITS 8
#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
#define NS_NXT_MAX 127
/*%
* EDNS0 extended flags and option codes, host order.
*/
#define NS_OPT_DNSSEC_OK 0x8000U
#define NS_OPT_NSID 3
/*%
* Inline versions of get/put short/long. Pointer is advanced.
*/
#define NS_GET16(s, cp) do { \
const u_char *t_cp = (const u_char *)(cp); \
(s) = ((u_int16_t)t_cp[0] << 8) \
| ((u_int16_t)t_cp[1]) \
; \
(cp) += NS_INT16SZ; \
} while (0)
#define NS_GET32(l, cp) do { \
const u_char *t_cp = (const u_char *)(cp); \
(l) = ((u_int32_t)t_cp[0] << 24) \
| ((u_int32_t)t_cp[1] << 16) \
| ((u_int32_t)t_cp[2] << 8) \
| ((u_int32_t)t_cp[3]) \
; \
(cp) += NS_INT32SZ; \
} while (0)
#define NS_PUT16(s, cp) do { \
u_int16_t t_s = (u_int16_t)(s); \
u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_s >> 8; \
*t_cp = t_s; \
(cp) += NS_INT16SZ; \
} while (0)
#define NS_PUT32(l, cp) do { \
u_int32_t t_l = (u_int32_t)(l); \
u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_l >> 24; \
*t_cp++ = t_l >> 16; \
*t_cp++ = t_l >> 8; \
*t_cp = t_l; \
(cp) += NS_INT32SZ; \
} while (0)
__BEGIN_DECLS
int ns_msg_getflag (ns_msg, int) __THROW;
u_int ns_get16 (const u_char *) __THROW;
u_long ns_get32 (const u_char *) __THROW;
void ns_put16 (u_int, u_char *) __THROW;
void ns_put32 (u_long, u_char *) __THROW;
int ns_initparse (const u_char *, int, ns_msg *) __THROW;
int ns_skiprr (const u_char *, const u_char *, ns_sect, int)
__THROW;
int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
int ns_sprintrr (const ns_msg *, const ns_rr *,
const char *, const char *, char *, size_t)
__THROW;
int ns_sprintrrf (const u_char *, size_t, const char *,
ns_class, ns_type, u_long, const u_char *,
size_t, const char *, const char *,
char *, size_t) __THROW;
int ns_format_ttl (u_long, char *, size_t) __THROW;
int ns_parse_ttl (const char *, u_long *) __THROW;
u_int32_t ns_datetosecs (const char *, int *) __THROW;
int ns_name_ntol (const u_char *, u_char *, size_t) __THROW;
int ns_name_ntop (const u_char *, char *, size_t) __THROW;
int ns_name_pton (const char *, u_char *, size_t) __THROW;
int ns_name_unpack (const u_char *, const u_char *,
const u_char *, u_char *, size_t) __THROW;
int ns_name_pack (const u_char *, u_char *, int,
const u_char **, const u_char **) __THROW;
int ns_name_uncompress (const u_char *, const u_char *,
const u_char *, char *, size_t) __THROW;
int ns_name_compress (const char *, u_char *, size_t,
const u_char **, const u_char **) __THROW;
int ns_name_skip (const u_char **, const u_char *) __THROW;
void ns_name_rollback (const u_char *, const u_char **,
const u_char **) __THROW;
int ns_sign (u_char *, int *, int, int, void *,
const u_char *, int, u_char *, int *, time_t) __THROW;
int ns_sign2 (u_char *, int *, int, int, void *,
const u_char *, int, u_char *, int *, time_t,
u_char **, u_char **) __THROW;
int ns_sign_tcp (u_char *, int *, int, int,
ns_tcp_tsig_state *, int) __THROW;
int ns_sign_tcp2 (u_char *, int *, int, int,
ns_tcp_tsig_state *, int,
u_char **, u_char **) __THROW;
int ns_sign_tcp_init (void *, const u_char *, int,
ns_tcp_tsig_state *) __THROW;
u_char *ns_find_tsig (u_char *, u_char *) __THROW;
int ns_verify (u_char *, int *, void *, const u_char *, int,
u_char *, int *, time_t *, int) __THROW;
int ns_verify_tcp (u_char *, int *, ns_tcp_tsig_state *, int)
__THROW;
int ns_verify_tcp_init (void *, const u_char *, int,
ns_tcp_tsig_state *) __THROW;
int ns_samedomain (const char *, const char *) __THROW;
int ns_subdomain (const char *, const char *) __THROW;
int ns_makecanon (const char *, char *, size_t) __THROW;
int ns_samename (const char *, const char *) __THROW;
__END_DECLS
#ifdef BIND_4_COMPAT
#include <arpa/nameser_compat.h>
#endif
#endif /* !_ARPA_NAMESER_H_ */
/*! \file */

View File

@ -0,0 +1,187 @@
/* Copyright (c) 1983, 1989
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*%
* from nameser.h 8.1 (Berkeley) 6/2/93
* $BINDId: nameser_compat.h,v 8.11 1999/01/02 08:00:58 vixie Exp $
*/
#ifndef _ARPA_NAMESER_COMPAT_
#define _ARPA_NAMESER_COMPAT_
#define __BIND 19950621 /*%< (DEAD) interface version stamp. */
#include <endian.h>
/*%
* Structure for query header. The order of the fields is machine- and
* compiler-dependent, depending on the byte/bit order and the layout
* of bit fields. We use bit fields only in int variables, as this
* is all ANSI requires. This requires a somewhat confusing rearrangement.
*/
typedef struct {
unsigned id :16; /*%< query identification number */
#if BYTE_ORDER == BIG_ENDIAN
/* fields in third byte */
unsigned qr: 1; /*%< response flag */
unsigned opcode: 4; /*%< purpose of message */
unsigned aa: 1; /*%< authoritive answer */
unsigned tc: 1; /*%< truncated message */
unsigned rd: 1; /*%< recursion desired */
/* fields in fourth byte */
unsigned ra: 1; /*%< recursion available */
unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */
unsigned ad: 1; /*%< authentic data from named */
unsigned cd: 1; /*%< checking disabled by resolver */
unsigned rcode :4; /*%< response code */
#endif
#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
/* fields in third byte */
unsigned rd :1; /*%< recursion desired */
unsigned tc :1; /*%< truncated message */
unsigned aa :1; /*%< authoritive answer */
unsigned opcode :4; /*%< purpose of message */
unsigned qr :1; /*%< response flag */
/* fields in fourth byte */
unsigned rcode :4; /*%< response code */
unsigned cd: 1; /*%< checking disabled by resolver */
unsigned ad: 1; /*%< authentic data from named */
unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */
unsigned ra :1; /*%< recursion available */
#endif
/* remaining bytes */
unsigned qdcount :16; /*%< number of question entries */
unsigned ancount :16; /*%< number of answer entries */
unsigned nscount :16; /*%< number of authority entries */
unsigned arcount :16; /*%< number of resource entries */
} HEADER;
#define PACKETSZ NS_PACKETSZ
#define MAXDNAME NS_MAXDNAME
#define MAXCDNAME NS_MAXCDNAME
#define MAXLABEL NS_MAXLABEL
#define HFIXEDSZ NS_HFIXEDSZ
#define QFIXEDSZ NS_QFIXEDSZ
#define RRFIXEDSZ NS_RRFIXEDSZ
#define INT32SZ NS_INT32SZ
#define INT16SZ NS_INT16SZ
#define INT8SZ NS_INT8SZ
#define INADDRSZ NS_INADDRSZ
#define IN6ADDRSZ NS_IN6ADDRSZ
#define INDIR_MASK NS_CMPRSFLGS
#define NAMESERVER_PORT NS_DEFAULTPORT
#define S_ZONE ns_s_zn
#define S_PREREQ ns_s_pr
#define S_UPDATE ns_s_ud
#define S_ADDT ns_s_ar
#define QUERY ns_o_query
#define IQUERY ns_o_iquery
#define STATUS ns_o_status
#define NS_NOTIFY_OP ns_o_notify
#define NS_UPDATE_OP ns_o_update
#define NOERROR ns_r_noerror
#define FORMERR ns_r_formerr
#define SERVFAIL ns_r_servfail
#define NXDOMAIN ns_r_nxdomain
#define NOTIMP ns_r_notimpl
#define REFUSED ns_r_refused
#define YXDOMAIN ns_r_yxdomain
#define YXRRSET ns_r_yxrrset
#define NXRRSET ns_r_nxrrset
#define NOTAUTH ns_r_notauth
#define NOTZONE ns_r_notzone
/*#define BADSIG ns_r_badsig*/
/*#define BADKEY ns_r_badkey*/
/*#define BADTIME ns_r_badtime*/
#define DELETE ns_uop_delete
#define ADD ns_uop_add
#define T_A ns_t_a
#define T_NS ns_t_ns
#define T_MD ns_t_md
#define T_MF ns_t_mf
#define T_CNAME ns_t_cname
#define T_SOA ns_t_soa
#define T_MB ns_t_mb
#define T_MG ns_t_mg
#define T_MR ns_t_mr
#define T_NULL ns_t_null
#define T_WKS ns_t_wks
#define T_PTR ns_t_ptr
#define T_HINFO ns_t_hinfo
#define T_MINFO ns_t_minfo
#define T_MX ns_t_mx
#define T_TXT ns_t_txt
#define T_RP ns_t_rp
#define T_AFSDB ns_t_afsdb
#define T_X25 ns_t_x25
#define T_ISDN ns_t_isdn
#define T_RT ns_t_rt
#define T_NSAP ns_t_nsap
#define T_NSAP_PTR ns_t_nsap_ptr
#define T_SIG ns_t_sig
#define T_KEY ns_t_key
#define T_PX ns_t_px
#define T_GPOS ns_t_gpos
#define T_AAAA ns_t_aaaa
#define T_LOC ns_t_loc
#define T_NXT ns_t_nxt
#define T_EID ns_t_eid
#define T_NIMLOC ns_t_nimloc
#define T_SRV ns_t_srv
#define T_ATMA ns_t_atma
#define T_NAPTR ns_t_naptr
#define T_A6 ns_t_a6
#define T_DNAME ns_t_dname
#define T_TSIG ns_t_tsig
#define T_IXFR ns_t_ixfr
#define T_AXFR ns_t_axfr
#define T_MAILB ns_t_mailb
#define T_MAILA ns_t_maila
#define T_ANY ns_t_any
#define C_IN ns_c_in
#define C_CHAOS ns_c_chaos
#define C_HS ns_c_hs
/* BIND_UPDATE */
#define C_NONE ns_c_none
#define C_ANY ns_c_any
#define GETSHORT NS_GET16
#define GETLONG NS_GET32
#define PUTSHORT NS_PUT16
#define PUTLONG NS_PUT32
#endif /* _ARPA_NAMESER_COMPAT_ */
/*! \file */

View File

@ -0,0 +1,316 @@
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)telnet.h 8.2 (Berkeley) 12/15/93
*/
#ifndef _ARPA_TELNET_H
#define _ARPA_TELNET_H 1
/*
* Definitions for the TELNET protocol.
*/
#define IAC 255 /* interpret as command: */
#define DONT 254 /* you are not to use option */
#define DO 253 /* please, you use option */
#define WONT 252 /* I won't use option */
#define WILL 251 /* I will use option */
#define SB 250 /* interpret as subnegotiation */
#define GA 249 /* you may reverse the line */
#define EL 248 /* erase the current line */
#define EC 247 /* erase the current character */
#define AYT 246 /* are you there */
#define AO 245 /* abort output--but let prog finish */
#define IP 244 /* interrupt process--permanently */
#define BREAK 243 /* break */
#define DM 242 /* data mark--for connect. cleaning */
#define NOP 241 /* nop */
#define SE 240 /* end sub negotiation */
#define EOR 239 /* end of record (transparent mode) */
#define ABORT 238 /* Abort process */
#define SUSP 237 /* Suspend process */
#define xEOF 236 /* End of file: EOF is already used... */
#define SYNCH 242 /* for telfunc calls */
#ifdef TELCMDS
char *telcmds[] = {
"EOF", "SUSP", "ABORT", "EOR",
"SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
"EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0,
};
#else
extern char *telcmds[];
#endif
#define TELCMD_FIRST xEOF
#define TELCMD_LAST IAC
#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
(unsigned int)(x) >= TELCMD_FIRST)
#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
/* telnet options */
#define TELOPT_BINARY 0 /* 8-bit data path */
#define TELOPT_ECHO 1 /* echo */
#define TELOPT_RCP 2 /* prepare to reconnect */
#define TELOPT_SGA 3 /* suppress go ahead */
#define TELOPT_NAMS 4 /* approximate message size */
#define TELOPT_STATUS 5 /* give status */
#define TELOPT_TM 6 /* timing mark */
#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
#define TELOPT_NAOL 8 /* negotiate about output line width */
#define TELOPT_NAOP 9 /* negotiate about output page size */
#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
#define TELOPT_XASCII 17 /* extended ascii character set */
#define TELOPT_LOGOUT 18 /* force logout */
#define TELOPT_BM 19 /* byte macro */
#define TELOPT_DET 20 /* data entry terminal */
#define TELOPT_SUPDUP 21 /* supdup protocol */
#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
#define TELOPT_SNDLOC 23 /* send location */
#define TELOPT_TTYPE 24 /* terminal type */
#define TELOPT_EOR 25 /* end or record */
#define TELOPT_TUID 26 /* TACACS user identification */
#define TELOPT_OUTMRK 27 /* output marking */
#define TELOPT_TTYLOC 28 /* terminal location number */
#define TELOPT_3270REGIME 29 /* 3270 regime */
#define TELOPT_X3PAD 30 /* X.3 PAD */
#define TELOPT_NAWS 31 /* window size */
#define TELOPT_TSPEED 32 /* terminal speed */
#define TELOPT_LFLOW 33 /* remote flow control */
#define TELOPT_LINEMODE 34 /* Linemode option */
#define TELOPT_XDISPLOC 35 /* X Display Location */
#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
#define TELOPT_AUTHENTICATION 37/* Authenticate */
#define TELOPT_ENCRYPT 38 /* Encryption option */
#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
#define TELOPT_EXOPL 255 /* extended-options-list */
#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
#ifdef TELOPTS
char *telopts[NTELOPTS+1] = {
"BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
"STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
"NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
"NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
"DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
"SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
"TACACS UID", "OUTPUT MARKING", "TTYLOC",
"3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
"LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
"ENCRYPT", "NEW-ENVIRON",
0,
};
#define TELOPT_FIRST TELOPT_BINARY
#define TELOPT_LAST TELOPT_NEW_ENVIRON
#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
#endif
/* sub-option qualifiers */
#define TELQUAL_IS 0 /* option is... */
#define TELQUAL_SEND 1 /* send option */
#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
#define LFLOW_OFF 0 /* Disable remote flow control */
#define LFLOW_ON 1 /* Enable remote flow control */
#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
/*
* LINEMODE suboptions
*/
#define LM_MODE 1
#define LM_FORWARDMASK 2
#define LM_SLC 3
#define MODE_EDIT 0x01
#define MODE_TRAPSIG 0x02
#define MODE_ACK 0x04
#define MODE_SOFT_TAB 0x08
#define MODE_LIT_ECHO 0x10
#define MODE_MASK 0x1f
/* Not part of protocol, but needed to simplify things... */
#define MODE_FLOW 0x0100
#define MODE_ECHO 0x0200
#define MODE_INBIN 0x0400
#define MODE_OUTBIN 0x0800
#define MODE_FORCE 0x1000
#define SLC_SYNCH 1
#define SLC_BRK 2
#define SLC_IP 3
#define SLC_AO 4
#define SLC_AYT 5
#define SLC_EOR 6
#define SLC_ABORT 7
#define SLC_EOF 8
#define SLC_SUSP 9
#define SLC_EC 10
#define SLC_EL 11
#define SLC_EW 12
#define SLC_RP 13
#define SLC_LNEXT 14
#define SLC_XON 15
#define SLC_XOFF 16
#define SLC_FORW1 17
#define SLC_FORW2 18
#define NSLC 18
/*
* For backwards compatibility, we define SLC_NAMES to be the
* list of names if SLC_NAMES is not defined.
*/
#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
"LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
#ifdef SLC_NAMES
char *slc_names[] = {
SLC_NAMELIST
};
#else
extern char *slc_names[];
#define SLC_NAMES SLC_NAMELIST
#endif
#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
#define SLC_NAME(x) slc_names[x]
#define SLC_NOSUPPORT 0
#define SLC_CANTCHANGE 1
#define SLC_VARIABLE 2
#define SLC_DEFAULT 3
#define SLC_LEVELBITS 0x03
#define SLC_FUNC 0
#define SLC_FLAGS 1
#define SLC_VALUE 2
#define SLC_ACK 0x80
#define SLC_FLUSHIN 0x40
#define SLC_FLUSHOUT 0x20
#define OLD_ENV_VAR 1
#define OLD_ENV_VALUE 0
#define NEW_ENV_VAR 0
#define NEW_ENV_VALUE 1
#define ENV_ESC 2
#define ENV_USERVAR 3
/*
* AUTHENTICATION suboptions
*/
/*
* Who is authenticating who ...
*/
#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
#define AUTH_WHO_SERVER 1 /* Server authenticating client */
#define AUTH_WHO_MASK 1
/*
* amount of authentication done
*/
#define AUTH_HOW_ONE_WAY 0
#define AUTH_HOW_MUTUAL 2
#define AUTH_HOW_MASK 2
#define AUTHTYPE_NULL 0
#define AUTHTYPE_KERBEROS_V4 1
#define AUTHTYPE_KERBEROS_V5 2
#define AUTHTYPE_SPX 3
#define AUTHTYPE_MINK 4
#define AUTHTYPE_CNT 5
#define AUTHTYPE_TEST 99
#ifdef AUTH_NAMES
char *authtype_names[] = {
"NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
};
#else
extern char *authtype_names[];
#endif
#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
#define AUTHTYPE_NAME(x) authtype_names[x]
/*
* ENCRYPTion suboptions
*/
#define ENCRYPT_IS 0 /* I pick encryption type ... */
#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
#define ENCRYPT_REPLY 2 /* Initial setup response */
#define ENCRYPT_START 3 /* Am starting to send encrypted */
#define ENCRYPT_END 4 /* Am ending encrypted */
#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
#define ENCRYPT_REQEND 6 /* Request you send encrypting */
#define ENCRYPT_ENC_KEYID 7
#define ENCRYPT_DEC_KEYID 8
#define ENCRYPT_CNT 9
#define ENCTYPE_ANY 0
#define ENCTYPE_DES_CFB64 1
#define ENCTYPE_DES_OFB64 2
#define ENCTYPE_CNT 3
#ifdef ENCRYPT_NAMES
char *encrypt_names[] = {
"IS", "SUPPORT", "REPLY", "START", "END",
"REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
0,
};
char *enctype_names[] = {
"ANY", "DES_CFB64", "DES_OFB64", 0,
};
#else
extern char *encrypt_names[];
extern char *enctype_names[];
#endif
#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
#define ENCRYPT_NAME(x) encrypt_names[x]
#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
#define ENCTYPE_NAME(x) enctype_names[x]
#endif /* arpa/telnet.h */

View File

@ -0,0 +1,82 @@
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)tftp.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _ARPA_TFTP_H
#define _ARPA_TFTP_H 1
/*
* Trivial File Transfer Protocol (IEN-133)
*/
#define SEGSIZE 512 /* data segment size */
/*
* Packet types.
*/
#define RRQ 01 /* read request */
#define WRQ 02 /* write request */
#define DATA 03 /* data packet */
#define ACK 04 /* acknowledgement */
#define ERROR 05 /* error code */
struct tftphdr {
short th_opcode; /* packet type */
union {
char tu_padding[3]; /* sizeof() compat */
struct {
union {
unsigned short tu_block; /* block # */
short tu_code; /* error code */
} __attribute__ ((__packed__)) th_u3;
char tu_data[0]; /* data or error string */
} __attribute__ ((__packed__)) th_u2;
char tu_stuff[0]; /* request packet stuff */
} __attribute__ ((__packed__)) th_u1;
} __attribute__ ((__packed__));
#define th_block th_u1.th_u2.th_u3.tu_block
#define th_code th_u1.th_u2.th_u3.tu_code
#define th_stuff th_u1.tu_stuff
#define th_data th_u1.th_u2.tu_data
#define th_msg th_u1.th_u2.tu_data
/*
* Error codes.
*/
#define EUNDEF 0 /* not defined */
#define ENOTFOUND 1 /* file not found */
#define EACCESS 2 /* access violation */
#define ENOSPACE 3 /* disk full or allocation exceeded */
#define EBADOP 4 /* illegal TFTP operation */
#define EBADID 5 /* unknown transfer ID */
#define EEXISTS 6 /* file already exists */
#define ENOUSER 7 /* no such user */
#endif /* arpa/tftp.h */

View File

@ -0,0 +1,8 @@
#ifndef __ASM_GENERIC_AUXVEC_H
#define __ASM_GENERIC_AUXVEC_H
/*
* Not all architectures need their own auxvec.h, the most
* common definitions are already in linux/auxvec.h.
*/
#endif /* __ASM_GENERIC_AUXVEC_H */

View File

@ -0,0 +1,15 @@
#ifndef __ASM_GENERIC_BITS_PER_LONG
#define __ASM_GENERIC_BITS_PER_LONG
/*
* There seems to be no way of detecting this automatically from user
* space, so 64 bit architectures should override this in their
* bitsperlong.h. In particular, an architecture that supports
* both 32 and 64 bit user space must not rely on CONFIG_64BIT
* to decide it, but rather check a compiler provided macro.
*/
#ifndef __BITS_PER_LONG
#define __BITS_PER_LONG 32
#endif
#endif /* __ASM_GENERIC_BITS_PER_LONG */

View File

@ -0,0 +1,39 @@
#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Try again */
#define ENOMEM 12 /* Out of memory */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */
#define EBUSY 16 /* Device or resource busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* File table overflow */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Not a typewriter */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Math argument out of domain of func */
#define ERANGE 34 /* Math result not representable */
#endif

View File

@ -0,0 +1,122 @@
#ifndef _ASM_GENERIC_ERRNO_H
#define _ASM_GENERIC_ERRNO_H
#include <asm-generic/errno-base.h>
#define EDEADLK 35 /* Resource deadlock would occur */
#define ENAMETOOLONG 36 /* File name too long */
#define ENOLCK 37 /* No record locks available */
/*
* This error code is special: arch syscall entry code will return
* -ENOSYS if users try to call a syscall that doesn't exist. To keep
* failures of syscalls that really do exist distinguishable from
* failures due to attempts to use a nonexistent syscall, syscall
* implementations should refrain from returning -ENOSYS.
*/
#define ENOSYS 38 /* Invalid system call number */
#define ENOTEMPTY 39 /* Directory not empty */
#define ELOOP 40 /* Too many symbolic links encountered */
#define EWOULDBLOCK EAGAIN /* Operation would block */
#define ENOMSG 42 /* No message of desired type */
#define EIDRM 43 /* Identifier removed */
#define ECHRNG 44 /* Channel number out of range */
#define EL2NSYNC 45 /* Level 2 not synchronized */
#define EL3HLT 46 /* Level 3 halted */
#define EL3RST 47 /* Level 3 reset */
#define ELNRNG 48 /* Link number out of range */
#define EUNATCH 49 /* Protocol driver not attached */
#define ENOCSI 50 /* No CSI structure available */
#define EL2HLT 51 /* Level 2 halted */
#define EBADE 52 /* Invalid exchange */
#define EBADR 53 /* Invalid request descriptor */
#define EXFULL 54 /* Exchange full */
#define ENOANO 55 /* No anode */
#define EBADRQC 56 /* Invalid request code */
#define EBADSLT 57 /* Invalid slot */
#define EDEADLOCK EDEADLK
#define EBFONT 59 /* Bad font file format */
#define ENOSTR 60 /* Device not a stream */
#define ENODATA 61 /* No data available */
#define ETIME 62 /* Timer expired */
#define ENOSR 63 /* Out of streams resources */
#define ENONET 64 /* Machine is not on the network */
#define ENOPKG 65 /* Package not installed */
#define EREMOTE 66 /* Object is remote */
#define ENOLINK 67 /* Link has been severed */
#define EADV 68 /* Advertise error */
#define ESRMNT 69 /* Srmount error */
#define ECOMM 70 /* Communication error on send */
#define EPROTO 71 /* Protocol error */
#define EMULTIHOP 72 /* Multihop attempted */
#define EDOTDOT 73 /* RFS specific error */
#define EBADMSG 74 /* Not a data message */
#define EOVERFLOW 75 /* Value too large for defined data type */
#define ENOTUNIQ 76 /* Name not unique on network */
#define EBADFD 77 /* File descriptor in bad state */
#define EREMCHG 78 /* Remote address changed */
#define ELIBACC 79 /* Can not access a needed shared library */
#define ELIBBAD 80 /* Accessing a corrupted shared library */
#define ELIBSCN 81 /* .lib section in a.out corrupted */
#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
#define ELIBEXEC 83 /* Cannot exec a shared library directly */
#define EILSEQ 84 /* Illegal byte sequence */
#define ERESTART 85 /* Interrupted system call should be restarted */
#define ESTRPIPE 86 /* Streams pipe error */
#define EUSERS 87 /* Too many users */
#define ENOTSOCK 88 /* Socket operation on non-socket */
#define EDESTADDRREQ 89 /* Destination address required */
#define EMSGSIZE 90 /* Message too long */
#define EPROTOTYPE 91 /* Protocol wrong type for socket */
#define ENOPROTOOPT 92 /* Protocol not available */
#define EPROTONOSUPPORT 93 /* Protocol not supported */
#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
#define EPFNOSUPPORT 96 /* Protocol family not supported */
#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
#define EADDRINUSE 98 /* Address already in use */
#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
#define ENETDOWN 100 /* Network is down */
#define ENETUNREACH 101 /* Network is unreachable */
#define ENETRESET 102 /* Network dropped connection because of reset */
#define ECONNABORTED 103 /* Software caused connection abort */
#define ECONNRESET 104 /* Connection reset by peer */
#define ENOBUFS 105 /* No buffer space available */
#define EISCONN 106 /* Transport endpoint is already connected */
#define ENOTCONN 107 /* Transport endpoint is not connected */
#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
#define ETOOMANYREFS 109 /* Too many references: cannot splice */
#define ETIMEDOUT 110 /* Connection timed out */
#define ECONNREFUSED 111 /* Connection refused */
#define EHOSTDOWN 112 /* Host is down */
#define EHOSTUNREACH 113 /* No route to host */
#define EALREADY 114 /* Operation already in progress */
#define EINPROGRESS 115 /* Operation now in progress */
#define ESTALE 116 /* Stale file handle */
#define EUCLEAN 117 /* Structure needs cleaning */
#define ENOTNAM 118 /* Not a XENIX named type file */
#define ENAVAIL 119 /* No XENIX semaphores available */
#define EISNAM 120 /* Is a named type file */
#define EREMOTEIO 121 /* Remote I/O error */
#define EDQUOT 122 /* Quota exceeded */
#define ENOMEDIUM 123 /* No medium found */
#define EMEDIUMTYPE 124 /* Wrong medium type */
#define ECANCELED 125 /* Operation Canceled */
#define ENOKEY 126 /* Required key not available */
#define EKEYEXPIRED 127 /* Key has expired */
#define EKEYREVOKED 128 /* Key has been revoked */
#define EKEYREJECTED 129 /* Key was rejected by service */
/* for robust mutexes */
#define EOWNERDEAD 130 /* Owner died */
#define ENOTRECOVERABLE 131 /* State not recoverable */
#define ERFKILL 132 /* Operation not possible due to RF-kill */
#define EHWPOISON 133 /* Memory page has hardware error */
#endif

View File

@ -0,0 +1,220 @@
#ifndef _ASM_GENERIC_FCNTL_H
#define _ASM_GENERIC_FCNTL_H
#include <linux/types.h>
/*
* FMODE_EXEC is 0x20
* FMODE_NONOTIFY is 0x4000000
* These cannot be used by userspace O_* until internal and external open
* flags are split.
* -Eric Paris
*/
/*
* When introducing new O_* bits, please check its uniqueness in fcntl_init().
*/
#define O_ACCMODE 00000003
#define O_RDONLY 00000000
#define O_WRONLY 00000001
#define O_RDWR 00000002
#ifndef O_CREAT
#define O_CREAT 00000100 /* not fcntl */
#endif
#ifndef O_EXCL
#define O_EXCL 00000200 /* not fcntl */
#endif
#ifndef O_NOCTTY
#define O_NOCTTY 00000400 /* not fcntl */
#endif
#ifndef O_TRUNC
#define O_TRUNC 00001000 /* not fcntl */
#endif
#ifndef O_APPEND
#define O_APPEND 00002000
#endif
#ifndef O_NONBLOCK
#define O_NONBLOCK 00004000
#endif
#ifndef O_DSYNC
#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
#endif
#ifndef FASYNC
#define FASYNC 00020000 /* fcntl, for BSD compatibility */
#endif
#ifndef O_DIRECT
#define O_DIRECT 00040000 /* direct disk access hint */
#endif
#ifndef O_LARGEFILE
#define O_LARGEFILE 00100000
#endif
#ifndef O_DIRECTORY
#define O_DIRECTORY 00200000 /* must be a directory */
#endif
#ifndef O_NOFOLLOW
#define O_NOFOLLOW 00400000 /* don't follow links */
#endif
#ifndef O_NOATIME
#define O_NOATIME 01000000
#endif
#ifndef O_CLOEXEC
#define O_CLOEXEC 02000000 /* set close_on_exec */
#endif
/*
* Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
* the O_SYNC flag. We continue to use the existing numerical value
* for O_DSYNC semantics now, but using the correct symbolic name for it.
* This new value is used to request true Posix O_SYNC semantics. It is
* defined in this strange way to make sure applications compiled against
* new headers get at least O_DSYNC semantics on older kernels.
*
* This has the nice side-effect that we can simply test for O_DSYNC
* wherever we do not care if O_DSYNC or O_SYNC is used.
*
* Note: __O_SYNC must never be used directly.
*/
#ifndef O_SYNC
#define __O_SYNC 04000000
#define O_SYNC (__O_SYNC|O_DSYNC)
#endif
#ifndef O_PATH
#define O_PATH 010000000
#endif
#ifndef __O_TMPFILE
#define __O_TMPFILE 020000000
#endif
/* a horrid kludge trying to make sure that this will fail on old kernels */
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT)
#ifndef O_NDELAY
#define O_NDELAY O_NONBLOCK
#endif
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
#define F_SETFD 2 /* set/clear close_on_exec */
#define F_GETFL 3 /* get file->f_flags */
#define F_SETFL 4 /* set file->f_flags */
#ifndef F_GETLK
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#endif
#ifndef F_SETOWN
#define F_SETOWN 8 /* for sockets. */
#define F_GETOWN 9 /* for sockets. */
#endif
#ifndef F_SETSIG
#define F_SETSIG 10 /* for sockets. */
#define F_GETSIG 11 /* for sockets. */
#endif
#ifndef CONFIG_64BIT
#ifndef F_GETLK64
#define F_GETLK64 12 /* using 'struct flock64' */
#define F_SETLK64 13
#define F_SETLKW64 14
#endif
#endif
#ifndef F_SETOWN_EX
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
#endif
#ifndef F_GETOWNER_UIDS
#define F_GETOWNER_UIDS 17
#endif
/*
* Open File Description Locks
*
* Usually record locks held by a process are released on *any* close and are
* not inherited across a fork().
*
* These cmd values will set locks that conflict with process-associated
* record locks, but are "owned" by the open file description, not the
* process. This means that they are inherited across fork() like BSD (flock)
* locks, and they are only released automatically when the last reference to
* the the open file against which they were acquired is put.
*/
#define F_OFD_GETLK 36
#define F_OFD_SETLK 37
#define F_OFD_SETLKW 38
#define F_OWNER_TID 0
#define F_OWNER_PID 1
#define F_OWNER_PGRP 2
struct f_owner_ex {
int type;
__kernel_pid_t pid;
};
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* for posix fcntl() and lockf() */
#ifndef F_RDLCK
#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2
#endif
/* for old implementation of bsd flock () */
#ifndef F_EXLCK
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
#endif
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
#define LOCK_UN 8 /* remove lock */
#define LOCK_MAND 32 /* This is a mandatory flock ... */
#define LOCK_READ 64 /* which allows concurrent read operations */
#define LOCK_WRITE 128 /* which allows concurrent write operations */
#define LOCK_RW 192 /* which allows concurrent read & write ops */
#define F_LINUX_SPECIFIC_BASE 1024
#ifndef HAVE_ARCH_STRUCT_FLOCK
#ifndef __ARCH_FLOCK_PAD
#define __ARCH_FLOCK_PAD
#endif
struct flock {
short l_type;
short l_whence;
__kernel_off_t l_start;
__kernel_off_t l_len;
__kernel_pid_t l_pid;
__ARCH_FLOCK_PAD
};
#endif
#ifndef HAVE_ARCH_STRUCT_FLOCK64
#ifndef __ARCH_FLOCK64_PAD
#define __ARCH_FLOCK64_PAD
#endif
struct flock64 {
short l_type;
short l_whence;
__kernel_loff_t l_start;
__kernel_loff_t l_len;
__kernel_pid_t l_pid;
__ARCH_FLOCK64_PAD
};
#endif
#endif /* _ASM_GENERIC_FCNTL_H */

View File

@ -0,0 +1,34 @@
/*
* asm-generic/int-l64.h
*
* Integer declarations for architectures which use "long"
* for 64-bit types.
*/
#ifndef _ASM_GENERIC_INT_L64_H
#define _ASM_GENERIC_INT_L64_H
#include <asm/bitsperlong.h>
#ifndef __ASSEMBLY__
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
typedef __signed__ long __s64;
typedef unsigned long __u64;
#endif /* __ASSEMBLY__ */
#endif /* _ASM_GENERIC_INT_L64_H */

View File

@ -0,0 +1,39 @@
/*
* asm-generic/int-ll64.h
*
* Integer declarations for architectures which use "long long"
* for 64-bit types.
*/
#ifndef _ASM_GENERIC_INT_LL64_H
#define _ASM_GENERIC_INT_LL64_H
#include <asm/bitsperlong.h>
#ifndef __ASSEMBLY__
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#else
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
#endif /* __ASSEMBLY__ */
#endif /* _ASM_GENERIC_INT_LL64_H */

View File

@ -0,0 +1,96 @@
#ifndef _ASM_GENERIC_IOCTL_H
#define _ASM_GENERIC_IOCTL_H
/* ioctl command encoding: 32 bits total, command in lower 16 bits,
* size of the parameter structure in the lower 14 bits of the
* upper 16 bits.
* Encoding the size of the parameter structure in the ioctl request
* is useful for catching programs compiled with old versions
* and to avoid overwriting user space outside the user buffer area.
* The highest 2 bits are reserved for indicating the ``access mode''.
* NOTE: This limits the max parameter size to 16kB -1 !
*/
/*
* The following is for compatibility across the various Linux
* platforms. The generic ioctl numbering scheme doesn't really enforce
* a type field. De facto, however, the top 8 bits of the lower 16
* bits are indeed used as a type field, so we might just as well make
* this explicit here. Please be sure to use the decoding macros
* below from now on.
*/
#define _IOC_NRBITS 8
#define _IOC_TYPEBITS 8
/*
* Let any architecture override either of the following before
* including this file.
*/
#ifndef _IOC_SIZEBITS
# define _IOC_SIZEBITS 14
#endif
#ifndef _IOC_DIRBITS
# define _IOC_DIRBITS 2
#endif
#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
#define _IOC_NRSHIFT 0
#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
/*
* Direction bits, which any architecture can choose to override
* before including this file.
*/
#ifndef _IOC_NONE
# define _IOC_NONE 0U
#endif
#ifndef _IOC_WRITE
# define _IOC_WRITE 1U
#endif
#ifndef _IOC_READ
# define _IOC_READ 2U
#endif
#define _IOC(dir,type,nr,size) \
(((dir) << _IOC_DIRSHIFT) | \
((type) << _IOC_TYPESHIFT) | \
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
#define _IOC_TYPECHECK(t) (sizeof(t))
/* used to create numbers */
#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
/* used to decode ioctl numbers.. */
#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
/* ...and for the drivers/sound files... */
#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
#endif /* _ASM_GENERIC_IOCTL_H */

View File

@ -0,0 +1,117 @@
#ifndef __ASM_GENERIC_IOCTLS_H
#define __ASM_GENERIC_IOCTLS_H
#include <linux/ioctl.h>
/*
* These are the most common definitions for tty ioctl numbers.
* Most of them do not use the recommended _IOC(), but there is
* probably some source code out there hardcoding the number,
* so we might as well use them for all new platforms.
*
* The architectures that use different values here typically
* try to be compatible with some Unix variants for the same
* architecture.
*/
/* 0x54 is just a magic number to make these relatively unique ('T') */
#define TCGETS 0x5401
#define TCSETS 0x5402
#define TCSETSW 0x5403
#define TCSETSF 0x5404
#define TCGETA 0x5405
#define TCSETA 0x5406
#define TCSETAW 0x5407
#define TCSETAF 0x5408
#define TCSBRK 0x5409
#define TCXONC 0x540A
#define TCFLSH 0x540B
#define TIOCEXCL 0x540C
#define TIOCNXCL 0x540D
#define TIOCSCTTY 0x540E
#define TIOCGPGRP 0x540F
#define TIOCSPGRP 0x5410
#define TIOCOUTQ 0x5411
#define TIOCSTI 0x5412
#define TIOCGWINSZ 0x5413
#define TIOCSWINSZ 0x5414
#define TIOCMGET 0x5415
#define TIOCMBIS 0x5416
#define TIOCMBIC 0x5417
#define TIOCMSET 0x5418
#define TIOCGSOFTCAR 0x5419
#define TIOCSSOFTCAR 0x541A
#define FIONREAD 0x541B
#define TIOCINQ FIONREAD
#define TIOCLINUX 0x541C
#define TIOCCONS 0x541D
#define TIOCGSERIAL 0x541E
#define TIOCSSERIAL 0x541F
#define TIOCPKT 0x5420
#define FIONBIO 0x5421
#define TIOCNOTTY 0x5422
#define TIOCSETD 0x5423
#define TIOCGETD 0x5424
#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
#define TIOCSBRK 0x5427 /* BSD compatibility */
#define TIOCCBRK 0x5428 /* BSD compatibility */
#define TIOCGSID 0x5429 /* Return the session ID of FD */
#define TCGETS2 _IOR('T', 0x2A, struct termios2)
#define TCSETS2 _IOW('T', 0x2B, struct termios2)
#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
#define TIOCGRS485 0x542E
#ifndef TIOCSRS485
#define TIOCSRS485 0x542F
#endif
#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
#define TCGETX 0x5432 /* SYS5 TCGETX compatibility */
#define TCSETX 0x5433
#define TCSETXF 0x5434
#define TCSETXW 0x5435
#define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */
#define TIOCVHANGUP 0x5437
#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */
#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */
#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */
#define FIONCLEX 0x5450
#define FIOCLEX 0x5451
#define FIOASYNC 0x5452
#define TIOCSERCONFIG 0x5453
#define TIOCSERGWILD 0x5454
#define TIOCSERSWILD 0x5455
#define TIOCGLCKTRMIOS 0x5456
#define TIOCSLCKTRMIOS 0x5457
#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
#define TIOCSERGETLSR 0x5459 /* Get line status register */
#define TIOCSERGETMULTI 0x545A /* Get multiport config */
#define TIOCSERSETMULTI 0x545B /* Set multiport config */
#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
#define TIOCGICOUNT 0x545D /* read serial port __inline__ interrupt counts */
/*
* Some arches already define FIOQSIZE due to a historical
* conflict with a Hayes modem-specific ioctl value.
*/
#ifndef FIOQSIZE
# define FIOQSIZE 0x5460
#endif
/* Used for packet mode */
#define TIOCPKT_DATA 0
#define TIOCPKT_FLUSHREAD 1
#define TIOCPKT_FLUSHWRITE 2
#define TIOCPKT_STOP 4
#define TIOCPKT_START 8
#define TIOCPKT_NOSTOP 16
#define TIOCPKT_DOSTOP 32
#define TIOCPKT_IOCTL 64
#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
#endif /* __ASM_GENERIC_IOCTLS_H */

View File

@ -0,0 +1,34 @@
#ifndef __ASM_GENERIC_IPCBUF_H
#define __ASM_GENERIC_IPCBUF_H
/*
* The generic ipc64_perm structure:
* Note extra padding because this structure is passed back and forth
* between kernel and user space.
*
* ipc64_perm was originally meant to be architecture specific, but
* everyone just ended up making identical copies without specific
* optimizations, so we may just as well all use the same one.
*
* Pad space is left for:
* - 32-bit mode_t on architectures that only had 16 bit
* - 32-bit seq
* - 2 miscellaneous 32-bit values
*/
struct ipc64_perm {
__kernel_key_t key;
__kernel_uid32_t uid;
__kernel_gid32_t gid;
__kernel_uid32_t cuid;
__kernel_gid32_t cgid;
__kernel_mode_t mode;
/* pad if mode_t is u16: */
unsigned char __pad1[4 - sizeof(__kernel_mode_t)];
unsigned short seq;
unsigned short __pad2;
__kernel_ulong_t __unused1;
__kernel_ulong_t __unused2;
};
#endif /* __ASM_GENERIC_IPCBUF_H */

View File

@ -0,0 +1,4 @@
/*
* There isn't anything here, but the file must not be empty or patch
* will delete it.
*/

Some files were not shown because too many files have changed in this diff Show More