diff --git a/src/hyper.h b/src/hyper.h index 2e09966..2acb2c8 100644 --- a/src/hyper.h +++ b/src/hyper.h @@ -14,8 +14,10 @@ #include "container.h" #include "portmapping.h" +#define APIVERSION 4242 + enum { - RESERVED, + GETVERSION, STARTPOD, GETPOD, STOPPOD, diff --git a/src/init.c b/src/init.c index 2371b0d..0052cf0 100644 --- a/src/init.c +++ b/src/init.c @@ -1059,6 +1059,11 @@ static int hyper_channel_handle(struct hyper_event *de, uint32_t len) pod->type = type; switch (type) { + case GETVERSION: + data = malloc(4); + datalen = 4; + hyper_set_be32(data, APIVERSION); + break; case STARTPOD: ret = hyper_start_pod((char *)buf->data + 8, len - 8); hyper_print_uptime();