2 * libvdehist - A library to manage history and command completion for vde mgmt protocol
3 * Copyright (C) 2006 Renzo Davoli, University of Bologna
5 * This library is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation version 2.1 of the License, or (at
8 * your option) any later version.
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
13 * General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 typedef ssize_t (* ssize_fun
)();
27 extern ssize_fun vdehist_vderead
;
28 extern ssize_fun vdehist_vdewrite
;
29 extern ssize_fun vdehist_termread
;
30 extern ssize_fun vdehist_termwrite
;
32 #define HIST_COMMAND 0x0
33 #define HIST_NOCMD 0x1
34 #define HIST_PASSWDFLAG 0x80
38 extern char *(* vdehist_logincmd
)(char *cmd
,int len
,struct vdehiststat
*st
);
40 void vdehist_mgmt_to_term(struct vdehiststat
*st
);
41 int vdehist_term_to_mgmt(struct vdehiststat
*st
);
42 struct vdehiststat
*vdehist_new(int termfd
,int mgmtfd
);
43 void vdehist_free(struct vdehiststat
*st
);
45 int vdehist_getstatus(struct vdehiststat
*st
);
46 void vdehist_setstatus(struct vdehiststat
*st
,int status
);
48 int vdehist_gettermfd(struct vdehiststat
*st
);
50 int vdehist_getmgmtfd(struct vdehiststat
*st
);
51 void vdehist_setmgmtfd(struct vdehiststat
*st
,int mgmtfd
);