Merge pull request #161 from laijs/api-header

move constants of API to src/api.h
This commit is contained in:
Lai Jiangshan
2016-09-14 10:02:01 +08:00
committed by GitHub
2 changed files with 33 additions and 28 deletions
+32
View File
@@ -0,0 +1,32 @@
#ifndef _HYPERSTART_API_H_
#define _HYPERSTART_API_H_
#define APIVERSION 4242
enum {
GETVERSION,
STARTPOD,
GETPOD,
STOPPOD,
DESTROYPOD,
RESTARTCONTAINER,
EXECCMD,
CMDFINISHED,
READY,
ACK,
ERROR,
WINSIZE,
PING,
PODFINISHED,
NEXT,
WRITEFILE,
READFILE,
NEWCONTAINER,
KILLCONTAINER,
ONLINECPUMEM,
SETUPINTERFACE,
SETUPROUTE,
REMOVECONTAINER,
};
#endif /* _HYPERSTART_API_H_ */
+1 -28
View File
@@ -7,6 +7,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "api.h"
#include "net.h"
#include "list.h"
#include "exec.h"
@@ -14,34 +15,6 @@
#include "container.h"
#include "portmapping.h"
#define APIVERSION 4242
enum {
GETVERSION,
STARTPOD,
GETPOD,
STOPPOD,
DESTROYPOD,
RESTARTCONTAINER,
EXECCMD,
CMDFINISHED,
READY,
ACK,
ERROR,
WINSIZE,
PING,
PODFINISHED,
NEXT,
WRITEFILE,
READFILE,
NEWCONTAINER,
KILLCONTAINER,
ONLINECPUMEM,
SETUPINTERFACE,
SETUPROUTE,
REMOVECONTAINER,
};
enum {
POLICY_NEVER,
POLICY_ALWAYS,