| 1 |
// SPDX-License-Identifier: MIT |
| 2 |
|
| 3 |
syntax = "proto2"; |
| 4 |
|
| 5 |
import "opts.proto"; |
| 6 |
import "fown.proto"; |
| 7 |
|
| 8 |
message winsize_entry { |
| 9 |
required uint32 ws_row = 1; |
| 10 |
required uint32 ws_col = 2; |
| 11 |
required uint32 ws_xpixel = 3; |
| 12 |
required uint32 ws_ypixel = 4; |
| 13 |
}; |
| 14 |
|
| 15 |
message termios_entry { |
| 16 |
required uint32 c_iflag = 1; |
| 17 |
required uint32 c_oflag = 2; |
| 18 |
required uint32 c_cflag = 3; |
| 19 |
required uint32 c_lflag = 4; |
| 20 |
required uint32 c_line = 5; |
| 21 |
required uint32 c_ispeed = 6; |
| 22 |
required uint32 c_ospeed = 7; |
| 23 |
|
| 24 |
repeated uint32 c_cc = 8; |
| 25 |
} |
| 26 |
|
| 27 |
message tty_pty_entry { |
| 28 |
required uint32 index = 1; |
| 29 |
} |
| 30 |
|
| 31 |
enum TtyType { |
| 32 |
UNKNOWN = 0; |
| 33 |
PTY = 1; |
| 34 |
CONSOLE = 2; |
| 35 |
VT = 3; |
| 36 |
CTTY = 4; |
| 37 |
EXT_TTY = 5; |
| 38 |
SERIAL = 6; |
| 39 |
} |
| 40 |
|
| 41 |
message tty_data_entry { |
| 42 |
required uint32 tty_id = 1; |
| 43 |
required bytes data = 2; |
| 44 |
|
| 45 |
// optional sint32 mnt_id = 3 [default = 0]; |
| 46 |
} |
| 47 |
|
| 48 |
message tty_info_entry { |
| 49 |
required uint32 id = 1; |
| 50 |
|
| 51 |
required TtyType type = 2; |
| 52 |
|
| 53 |
required bool locked = 3; /* Unix98 PTY only */ |
| 54 |
required bool exclusive = 4; |
| 55 |
required bool packet_mode = 5; /* Unix98 PTY only */ |
| 56 |
|
| 57 |
required uint32 sid = 6; |
| 58 |
required uint32 pgrp = 7; |
| 59 |
|
| 60 |
/* |
| 61 |
* Convenient for printing errors and such, with this |
| 62 |
* device encoded we can figure out major and minor |
| 63 |
* numbers. |
| 64 |
*/ |
| 65 |
required uint32 rdev = 8; |
| 66 |
|
| 67 |
optional termios_entry termios = 9; |
| 68 |
optional termios_entry termios_locked = 10; |
| 69 |
optional winsize_entry winsize = 11; |
| 70 |
|
| 71 |
/* |
| 72 |
* These are optional fields which presence depends on |
| 73 |
* TTY type. |
| 74 |
*/ |
| 75 |
optional tty_pty_entry pty = 12; |
| 76 |
optional uint32 dev = 13; |
| 77 |
|
| 78 |
optional uint32 uid = 14; |
| 79 |
optional uint32 gid = 15; |
| 80 |
|
| 81 |
// optional sint32 mnt_id = 16 [default = 0]; |
| 82 |
}; |
| 83 |
|
| 84 |
message tty_file_entry { |
| 85 |
required uint32 id = 1; |
| 86 |
required uint32 tty_info_id = 2; |
| 87 |
|
| 88 |
required uint32 flags = 3 [(criu).hex = true]; |
| 89 |
required fown_entry fown = 4; |
| 90 |
// optional sint32 mnt_id = 5 [default = 0]; |
| 91 |
optional uint32 regf_id = 6; |
| 92 |
} |