]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/initreq.h
1 /* SPDX-License-Identifier: LGPL-2.0-or-later */
3 * Copyright (C) 1995-2004 Miquel van Smoorenburg
4 * Version: @(#)initreq.h 1.28 31-Mar-2004 MvS
11 #if defined(__FreeBSD_kernel__)
12 # define INIT_FIFO "/etc/.initctl"
14 # define INIT_FIFO "/dev/initctl"
17 #define INIT_MAGIC 0x03091969
18 #define INIT_CMD_START 0
19 #define INIT_CMD_RUNLVL 1
20 #define INIT_CMD_POWERFAIL 2
21 #define INIT_CMD_POWERFAILNOW 3
22 #define INIT_CMD_POWEROK 4
23 #define INIT_CMD_BSD 5
24 #define INIT_CMD_SETENV 6
25 #define INIT_CMD_UNSETENV 7
27 #define INIT_CMD_CHANGECONS 12345
30 # define INITRQ_HLEN MAXHOSTNAMELEN
32 # define INITRQ_HLEN 64
36 * This is what BSD 4.4 uses when talking to init.
37 * Linux doesn't use this right now.
39 struct init_request_bsd
{
40 char gen_id
[8]; /* Beats me.. telnetd uses "fe" */
41 char tty_id
[16]; /* Tty name minus /dev/tty */
42 char host
[INITRQ_HLEN
]; /* Hostname */
43 char term_type
[16]; /* Terminal type */
44 int signal
; /* Signal to send */
45 int pid
; /* Process to send to */
46 char exec_name
[128]; /* Program to execute */
47 char reserved
[128]; /* For future expansion. */
51 * Because of legacy interfaces, "runlevel" and "sleeptime"
52 * aren't in a separate struct in the union.
54 * The weird sizes are because init expects the whole
55 * struct to be 384 bytes.
58 int magic
; /* Magic number */
59 int cmd
; /* What kind of request */
60 int runlevel
; /* Runlevel to change to */
61 int sleeptime
; /* Time between TERM and KILL */
63 struct init_request_bsd bsd
;