aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/include/initsock.h6
-rw-r--r--lib/include/service.h1
-rw-r--r--lib/init/init_socket_send_request.c5
3 files changed, 12 insertions, 0 deletions
diff --git a/lib/include/initsock.h b/lib/include/initsock.h
index 10abe08..a687481 100644
--- a/lib/include/initsock.h
+++ b/lib/include/initsock.h
@@ -11,6 +11,8 @@
typedef enum {
EIR_STATUS = 0x00,
+ EIR_START = 0x01,
+ EIR_STOP = 0x02,
} E_INIT_REQUEST;
typedef enum {
@@ -30,6 +32,10 @@ typedef struct {
uint8_t filter;
uint8_t padd[3];
} status;
+
+ struct {
+ uint32_t id;
+ } startstop;
} arg;
} init_request_t;
diff --git a/lib/include/service.h b/lib/include/service.h
index 1ff5204..4e8f0b3 100644
--- a/lib/include/service.h
+++ b/lib/include/service.h
@@ -43,6 +43,7 @@ enum {
SVC_FLAG_TRUNCATE_OUT = 0x01,
SVC_FLAG_HAS_EXEC = 0x10,
+ SVC_FLAG_ADMIN_STOPPED = 0x20,
};
typedef struct service_t {
diff --git a/lib/init/init_socket_send_request.c b/lib/init/init_socket_send_request.c
index e9c7cb9..53b31f6 100644
--- a/lib/init/init_socket_send_request.c
+++ b/lib/init/init_socket_send_request.c
@@ -2,6 +2,7 @@
#include <unistd.h>
#include <string.h>
#include <stdarg.h>
+#include <endian.h>
#include <stdio.h>
#include <errno.h>
@@ -21,6 +22,10 @@ int init_socket_send_request(int fd, E_INIT_REQUEST rq, ...)
case EIR_STATUS:
request.arg.status.filter = va_arg(ap, E_SERVICE_STATE);
break;
+ case EIR_START:
+ case EIR_STOP:
+ request.arg.startstop.id = htobe32(va_arg(ap, int));
+ break;
default:
break;
}