MODULE nntpdef IDENT "nntpdef-1-X"; /*++ /* Facility: /* NNTP Server for OpenVMS /* /* Abstract: /* An interface module defines DNNTP database srtucture. /* /* Author: /* Ruslan R. Laishev /* /* Creation Date: 4-FEB-2006 /* /* Modification History: /* /* /*-- read "rmsusr.sdi"; #msg$_mrs = 32224; #grpid$_len = 96+12; #grpname$_len = 96; #msgid$_len = 96; constant msg$_mrs equals #msg$_mrs; /* Maximum record size in the MSG.DB constant grpid$_len equals #grpid$_len; /* Group name+message index length constant grpname$_len equals #grpname$_len; /* Group name length constant msgid$_len equals #msgid$_len; /* Message Id maximum length /*++ /* Message record structure (NNTP$MSG.DB) /*-- aggregate msgrec structure prefix msg$; gidlen word unsigned; constant gid_pos equals .; constant gid_ref equals 0; gid character length #grpid$_len; midlen word unsigned; constant mid_pos equals .; constant mid_ref equals 1; mid character length #msgid$_len; _date longword unsigned; #pos = .; constant body_pos equals #pos; body character length #msg$_mrs - .; constant body_sz equals (. - #pos); end msgrec; /*++ /* Group record structure (NNTP$GRP.DB) /*-- aggregate grprec structure prefix grp$; first longword unsigned; /* # of first available message last longword unsigned; /* # of last available message flags structure; post byte unsigned; /* 'form of posting' flag suck byte unsigned; /* 'group cached' flag end flags; datecr longword unsigned; /* date of news group creation dateup longword unsigned; /* date of last update grplen byte unsigned; /* news group name length constant name_pos equals .; grpname character length #grpname$_len; /* news group name end grprec; /*++ /* Feed Suck database record structure /*-- aggregate fsrec structure prefix fs$; last longword unsigned; /* Index of last gotten or feeded message #pos = .; constant fs_pos equals #pos; hash character length 16; /* MDhash(IP name + group name) constant fs_len equals (. - #pos); end fsrec; /*++ /* /* Arguments indexes in the vector /* /*-- constant ( NAME, USER, PASS, GROUPS, POSTING, TCPPORT, EXCLUDE, ARGS ) equals 0 increment 1 prefix feed$; constant type equals ">" prefix feed$; constant ( NAME, USER, PASS, GROUPS, TCPPORT, ARGS ) equals 0 increment 1 prefix suck$; constant type equals "<" prefix suck$; /*++ /* /* Log Level constants /* /*-- constant ( INF, FAT, SER, ERR, WAR, DBG ) equals 0 increment 1 prefix log$; /*++ /* /* Worker/Thread context structure /* /*-- constant ( FEED, SUCK, CLIENT, PURGE ) equals 1 increment 1 prefix wctx_tp$; aggregate wctx structure prefix wctx$; type byte unsigned; /* Type of worker: suck,feed,client indx byte unsigned; /* Thread index chan ADDRESS; /* TCP I/O socket tmo quadword unsigned; /* Network I/O timeout grab RABDEF; mrab RABDEF; fsrab RABDEF; mrec msgrec; /* Message buffer grec grprec; /* Group buffer mnum longword unsigned; /* Current Message number mnumf byte unsigned; ipadrlen byte unsigned; ipadr character length 15; /* IP address of remote client ipnamlen byte unsigned; ipname character length 128; /* IP name of remote client buf character length 1024; /* Work buffer for worker end wctx; END_MODULE nntpdef;