#
/*
*       SCCS File Type - 
*
* 	What identification string
*/
static char *_S_Ned_data =    "@(#)Ned_data.c	1.13";
#include "KERcalls.h"
#include "NKSRdefs.h"
#include "NKedit.h"

char    *Tempfile;              /* pointer to tempfile */
int     Index;                  /* offset into input buffer */
int     Changed_flag = OFF;     /* flag set if changes made */
int     Numofgroups;            /* number of entries in the group list */
int     Numofnames;             /* number of entries in the name list */
int     F1, F2;                 /* file descriptors */

namearray  Namelist[1000];      /* list of owners and uids */
namearray  Grouplist[200];      /* list of groups and gids */
char    Edtor_comds[] =
	"a)dd\nc)hange\nd)elete\nf)ind\nn)ext\np)rint\nv)iew\nq)uit\n";
char    Notvalmessage[] =  "no longer a valid name";

uaastruct Uaarecord;            /* storage of one record */
char    Uchang_comds[] =
	"x)exit\nv)iew\np)swd\nl)ogok\no)wner id\ng)roup id\na)ccess level\nm)axl\nd)ir\ns)hell\ne)mul\n";

gaastruct  Gaarecord;           /* storage of one record */
char    Gchang_comds[] =
	"x)exit\nv)iew\np)swd\ng)roup id\na)dmin\nm)ax acc level\n";

secMapstruct Secmap[SECMAPLEN];    /* Security map */
secarray     seclist[SECMAPLEN];   /* stores the security map */
char	Level; 			   /* category type of secmap */
char    Smedtor_comds[] =
	"a)dd\nc)hange\nd)elete\nl)evel\np)rint\nv)iew\nq)uit\n";
char    Smchang_comds[] =
	"x)exit\nv)iew\ns)hort name\nl)ong name\na)ctive\n";

int     Numofdev;               /* number of entries in the device list */
namearray  Devicelist[200];     /* list of devices and uids */
dpstruct   Dprecord;            /* storage of one record */
char    Dpchang_comds[] =
	"x)exit\nv)iew\nn)ame\ns)eid\ng)roup id\nd)iscret access\na)cess level\nr)valid_required\nl)assignment allowed\n";

int     Numofterm;              /* number of entries in the terminal list */
char    Termlist[100];     	/* list of terminal ids */
tpstruct  Tprecord;             /* storage of one record */
char    Tpchang_comds[] =
	"x)exit\nv)iew\ni)d\nf)configured\nc)onsole\nt)ransmit rate\nr)eceive rate\np)arity\ns)creen clear\nm)ax access level\n";
syspstruct Sysrecord;
char	   Syschgcomds[] =
"q)uit\nv)iew\np)rint\ns)ys name\ni)nst name\nsys n)um\nve(r)sion num\ngen d)ate\nm)ax acc lev\nc)urr max acc lev\nmin l)ogin acc lev\n";
