2020-05-08 11:36:57 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2016-07-01 21:49:54 +02:00
|
|
|
syntax = "proto2";
|
|
|
|
|
2015-01-22 18:46:00 +03:00
|
|
|
import "opts.proto";
|
2012-09-12 20:00:54 +04:00
|
|
|
import "fown.proto";
|
|
|
|
|
|
|
|
message winsize_entry {
|
|
|
|
required uint32 ws_row = 1;
|
|
|
|
required uint32 ws_col = 2;
|
|
|
|
required uint32 ws_xpixel = 3;
|
|
|
|
required uint32 ws_ypixel = 4;
|
|
|
|
};
|
|
|
|
|
|
|
|
message termios_entry {
|
|
|
|
required uint32 c_iflag = 1;
|
|
|
|
required uint32 c_oflag = 2;
|
|
|
|
required uint32 c_cflag = 3;
|
|
|
|
required uint32 c_lflag = 4;
|
|
|
|
required uint32 c_line = 5;
|
|
|
|
required uint32 c_ispeed = 6;
|
|
|
|
required uint32 c_ospeed = 7;
|
|
|
|
|
|
|
|
repeated uint32 c_cc = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
message tty_pty_entry {
|
|
|
|
required uint32 index = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum TtyType {
|
|
|
|
UNKNOWN = 0;
|
|
|
|
PTY = 1;
|
2014-10-16 14:20:34 +04:00
|
|
|
CONSOLE = 2;
|
2014-12-17 01:21:39 +02:00
|
|
|
VT = 3;
|
2015-03-19 18:13:11 +03:00
|
|
|
CTTY = 4;
|
2015-12-25 17:49:35 +03:00
|
|
|
EXT_TTY = 5;
|
2016-04-27 20:10:54 +03:00
|
|
|
SERIAL = 6;
|
2012-09-12 20:00:54 +04:00
|
|
|
}
|
|
|
|
|
2016-05-13 19:45:45 +03:00
|
|
|
message tty_data_entry {
|
|
|
|
required uint32 tty_id = 1;
|
|
|
|
required bytes data = 2;
|
2017-03-17 17:55:08 +03:00
|
|
|
|
|
|
|
// optional sint32 mnt_id = 3 [default = 0];
|
2016-05-13 19:45:45 +03:00
|
|
|
}
|
|
|
|
|
2012-09-12 20:00:54 +04:00
|
|
|
message tty_info_entry {
|
|
|
|
required uint32 id = 1;
|
|
|
|
|
|
|
|
required TtyType type = 2;
|
|
|
|
|
2014-10-06 17:15:48 +04:00
|
|
|
required bool locked = 3; /* Unix98 PTY only */
|
2012-09-12 20:00:54 +04:00
|
|
|
required bool exclusive = 4;
|
2014-10-06 17:15:48 +04:00
|
|
|
required bool packet_mode = 5; /* Unix98 PTY only */
|
2012-09-12 20:00:54 +04:00
|
|
|
|
|
|
|
required uint32 sid = 6;
|
|
|
|
required uint32 pgrp = 7;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Convenient for printing errors and such, with this
|
|
|
|
* device encoded we can figure out major and minor
|
|
|
|
* numbers.
|
|
|
|
*/
|
|
|
|
required uint32 rdev = 8;
|
|
|
|
|
2012-09-14 17:50:41 +04:00
|
|
|
optional termios_entry termios = 9;
|
|
|
|
optional termios_entry termios_locked = 10;
|
|
|
|
optional winsize_entry winsize = 11;
|
2012-09-12 20:00:54 +04:00
|
|
|
|
|
|
|
/*
|
2016-08-04 14:54:57 -07:00
|
|
|
* These are optional fields which presence depends on
|
2012-09-12 20:00:54 +04:00
|
|
|
* TTY type.
|
|
|
|
*/
|
|
|
|
optional tty_pty_entry pty = 12;
|
2015-12-25 17:49:33 +03:00
|
|
|
optional uint32 dev = 13;
|
2016-08-30 01:33:00 +03:00
|
|
|
|
|
|
|
optional uint32 uid = 14;
|
|
|
|
optional uint32 gid = 15;
|
2017-03-17 17:55:08 +03:00
|
|
|
|
|
|
|
// optional sint32 mnt_id = 16 [default = 0];
|
2012-09-12 20:00:54 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
message tty_file_entry {
|
|
|
|
required uint32 id = 1;
|
|
|
|
required uint32 tty_info_id = 2;
|
|
|
|
|
2015-01-22 18:46:00 +03:00
|
|
|
required uint32 flags = 3 [(criu).hex = true];
|
2012-09-12 20:00:54 +04:00
|
|
|
required fown_entry fown = 4;
|
2017-03-17 17:55:08 +03:00
|
|
|
// optional sint32 mnt_id = 5 [default = 0];
|
2017-07-10 12:39:19 +03:00
|
|
|
optional uint32 regf_id = 6;
|
2012-09-12 20:00:54 +04:00
|
|
|
}
|