/*	@(#)context.h	13.1 (RC International) 91/02/01 	*/

/*
 *  Information shared by txlogin and the context imaging run-time system.
 *
 *  Subject to change with little or no warning.
 */

#define	CONTEXT_MAGIC	0x011857

/*
 *  Structures used by txlogin
 */

struct passwdvals
{
    char	name[12];
    char	dir[64];
    char	shell[64];
    int		uid;
    int		gid;
};

struct ctxfile_rec
{
    long		context_magic;
    char		current_pgm[100];
    struct passwdvals	pwd;
};

/*
 *  Structures used by the context imaging run-time.
 *
 */

/*
 *  Offsets into the context file.  Init/Login get the first 1K chunk,
 *  and the runtime gets the rest.  The first block contains the header.
 *  The rest is used for context.
 */

#define	HEADER	1024
#define	CONTEXT 2048

struct	cs_header
{
    int			valid;		/* non-zero if header valid */

    long		data_start,
			data_length;

    long		stack_start,
			stack_length;
    long		file_id;
};
