fix order of OEMparameters to enable BIOS SOL on newer AMT generations
[amt] / redir.h
1 #include "RedirectionConstants.h"
2
3 enum redir_state {
4 REDIR_NONE = 0,
5 REDIR_CONNECT = 1,
6 REDIR_INIT = 2,
7 REDIR_AUTH = 3,
8 REDIR_INIT_SOL = 10,
9 REDIR_RUN_SOL = 11,
10 REDIR_INIT_IDER = 20,
11 REDIR_RUN_IDER = 21,
12 REDIR_CLOSING = 30,
13 REDIR_CLOSED = 31,
14 REDIR_ERROR = 40,
15 };
16
17 struct redir {
18 /* host connection */
19 unsigned char host[64];
20 unsigned char port[16];
21 unsigned char user[16];
22 unsigned char pass[16];
23
24 /* serial-over-lan */
25 unsigned char type[4];
26 int verbose;
27 int trace;
28 enum redir_state state;
29 unsigned char err[128]; // state == REDIR_ERROR
30
31 int sock;
32 unsigned char buf[64];
33 unsigned int blen;
34
35 /* callbacks */
36 void *cb_data;
37 void (*cb_state)(void *cb_data, enum redir_state old, enum redir_state new);
38 int (*cb_recv)(void *cb_data, unsigned char *buf, int len);
39 };
40
41 const char *redir_state_name(enum redir_state state);
42 const char *redir_state_desc(enum redir_state state);
43
44 int redir_connect(struct redir *r);
45 int redir_start(struct redir *r);
46 int redir_stop(struct redir *r);
47 int redir_auth(struct redir *r);
48 int redir_sol_start(struct redir *r);
49 int redir_sol_stop(struct redir *r);
50 int redir_sol_send(struct redir *r, unsigned char *buf, int blen);
51 int redir_sol_recv(struct redir *r);
52 int redir_data(struct redir *r);
Impressum, Datenschutz