/********************************************************************************************************************************/ /* Created: 29-Mar-2007 15:15:41 by OpenVMS SDL EV2-3 */ /* Source: 20-FEB-2006 13:44:03 DISK$SYSMAN:[LAISHEV.NNTP]NNTPDEF.SDL;56 */ /********************************************************************************************************************************/ /*** MODULE nntpdef IDENT nntpdef-1-X ***/ #ifndef __NNTPDEF_LOADED #define __NNTPDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /*++ */ /* Facility: */ /* NNTP Server for OpenVMS */ /* */ /* Abstract: */ /* An interface module defines DNNTP database srtucture. */ /* */ /* Author: */ /* Ruslan R. Laishev */ /* */ /* Creation Date: 4-FEB-2006 */ /* */ /* Modification History: */ /* */ /* */ /*-- */ #define MSG$_MRS 32224 /* Maximum record size in the MSG.DB */ #define GRPID$_LEN 108 /* Group name+message index length */ #define GRPNAME$_LEN 96 /* Group name length */ #define MSGID$_LEN 96 /* Message Id maximum length */ /*++ */ /* Message record structure (NNTP$MSG.DB) */ /*-- */ #define MSG$K_GID_POS 2 #define MSG$K_GID_REF 0 #define MSG$K_MID_POS 112 #define MSG$K_MID_REF 1 #define MSG$K_BODY_POS 212 #define MSG$K_BODY_SZ 32012 #ifdef __NEW_STARLET typedef struct _msgrec { unsigned short int msg$w_gidlen; char msg$t_gid [108]; unsigned short int msg$w_midlen; char msg$t_mid [96]; unsigned int msg$l__date; char msg$t_body [32012]; } MSGREC; #else /* __OLD_STARLET */ struct msgrec { unsigned short int msg$w_gidlen; char msg$t_gid [108]; unsigned short int msg$w_midlen; char msg$t_mid [96]; unsigned int msg$l__date; char msg$t_body [32012]; } ; #endif /* #ifdef __NEW_STARLET */ /*++ */ /* Group record structure (NNTP$GRP.DB) */ /*-- */ #define GRP$K_NAME_POS 19 #ifdef __NEW_STARLET typedef struct _grprec { unsigned int grp$l_first; /* # of first available message */ unsigned int grp$l_last; /* # of last available message */ __struct { unsigned char grp$b_post; /* 'form of posting' flag */ unsigned char grp$b_suck; /* 'group cached' flag */ } grp$r_flags; unsigned int grp$l_datecr; /* date of news group creation */ unsigned int grp$l_dateup; /* date of last update */ unsigned char grp$b_grplen; /* news group name length */ char grp$t_grpname [96]; /* news group name */ } GRPREC; #if !defined(__VAXC) #define grp$b_post grp$r_flags.grp$b_post #define grp$b_suck grp$r_flags.grp$b_suck #endif /* #if !defined(__VAXC) */ #else /* __OLD_STARLET */ struct grprec { unsigned int grp$l_first; /* # of first available message */ unsigned int grp$l_last; /* # of last available message */ __struct { unsigned char grp$b_post; /* 'form of posting' flag */ unsigned char grp$b_suck; /* 'group cached' flag */ } grp$r_flags; unsigned int grp$l_datecr; /* date of news group creation */ unsigned int grp$l_dateup; /* date of last update */ unsigned char grp$b_grplen; /* news group name length */ char grp$t_grpname [96]; /* news group name */ } ; #if !defined(__VAXC) #define grp$b_post grp$r_flags.grp$b_post #define grp$b_suck grp$r_flags.grp$b_suck #endif /* #if !defined(__VAXC) */ #endif /* #ifdef __NEW_STARLET */ /*++ */ /* Feed Suck database record structure */ /*-- */ #define FS$K_FS_POS 4 #define FS$K_FS_LEN 16 #ifdef __NEW_STARLET typedef struct _fsrec { unsigned int fs$l_last; /* Index of last gotten or feeded message */ char fs$t_hash [16]; /* MDhash(IP name + group name) */ } FSREC; #else /* __OLD_STARLET */ struct fsrec { unsigned int fs$l_last; /* Index of last gotten or feeded message */ char fs$t_hash [16]; /* MDhash(IP name + group name) */ } ; #endif /* #ifdef __NEW_STARLET */ /*++ */ /* */ /* Arguments indexes in the vector */ /* */ /*-- */ #define FEED$K_NAME 0 #define FEED$K_USER 1 #define FEED$K_PASS 2 #define FEED$K_GROUPS 3 #define FEED$K_POSTING 4 #define FEED$K_TCPPORT 5 #define FEED$K_EXCLUDE 6 #define FEED$K_ARGS 7 #define FEED$K_TYPE 62 #define SUCK$K_NAME 0 #define SUCK$K_USER 1 #define SUCK$K_PASS 2 #define SUCK$K_GROUPS 3 #define SUCK$K_TCPPORT 4 #define SUCK$K_ARGS 5 #define SUCK$K_TYPE 60 /*++ */ /* */ /* Log Level constants */ /* */ /*-- */ #define LOG$K_INF 0 #define LOG$K_FAT 1 #define LOG$K_SER 2 #define LOG$K_ERR 3 #define LOG$K_WAR 4 #define LOG$K_DBG 5 /*++ */ /* */ /* Worker/Thread context structure */ /* */ /*-- */ #define WCTX_TP$K_FEED 1 #define WCTX_TP$K_SUCK 2 #define WCTX_TP$K_CLIENT 3 #define WCTX_TP$K_PURGE 4 #ifdef __NEW_STARLET typedef struct _wctx { unsigned char wctx$b_type; /* Type of worker: suck,feed,client */ unsigned char wctx$b_indx; /* Thread index */ void *wctx$a_chan; /* TCP I/O socket */ unsigned __int64 wctx$q_tmo; /* Network I/O timeout */ RABDEF wctx$r_grab; RABDEF wctx$r_mrab; RABDEF wctx$r_fsrab; MSGREC wctx$r_mrec; /* Message buffer */ GRPREC wctx$r_grec; /* Group buffer */ unsigned int wctx$l_mnum; /* Current Message number */ unsigned char wctx$b_mnumf; unsigned char wctx$b_ipadrlen; char wctx$t_ipadr [15]; /* IP address of remote client */ unsigned char wctx$b_ipnamlen; char wctx$t_ipname [128]; /* IP name of remote client */ char wctx$t_buf [1024]; /* Work buffer for worker */ } WCTX; #else /* __OLD_STARLET */ struct wctx { unsigned char wctx$b_type; /* Type of worker: suck,feed,client */ unsigned char wctx$b_indx; /* Thread index */ void *wctx$a_chan; /* TCP I/O socket */ unsigned int wctx$q_tmo [2]; /* Network I/O timeout */ struct rabdef wctx$r_grab; struct rabdef wctx$r_mrab; struct rabdef wctx$r_fsrab; struct msgrec wctx$r_mrec; /* Message buffer */ struct grprec wctx$r_grec; /* Group buffer */ unsigned int wctx$l_mnum; /* Current Message number */ unsigned char wctx$b_mnumf; unsigned char wctx$b_ipadrlen; char wctx$t_ipadr [15]; /* IP address of remote client */ unsigned char wctx$b_ipnamlen; char wctx$t_ipname [128]; /* IP name of remote client */ char wctx$t_buf [1024]; /* Work buffer for worker */ } ; #endif /* #ifdef __NEW_STARLET */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __NNTPDEF_LOADED */