1 /* $Id: nntpclient.h,v 3.0 1992/12/14 00:14:55 davison Trn $ 2 */ 3 /* The authors make no claims as to the fitness or correctness of this software 4 * for any use whatsoever, and it is provided as is. Any use of this software 5 * is at the user's own risk. 6 */ 7 8 #ifdef USE_NNTP 9 10 int server_init _((char*)); 11 12 int nntp_connect _((bool_int)); 13 void nntp_command _((char*)); 14 char nntp_check _((bool_int)); 15 int nntp_gets _((char*, int)); 16 void nntp_close _((bool_int)); 17 18 #define NNTP_LIST_END(s) ((s)[0]=='.' && ((s)[1]=='\0' || (s)[1]=='\r')) 19 20 #define nntp_get_a_line(buf,len,realloc) get_a_line(buf,len,realloc,ser_rd_fp) 21 22 /* RFC 977 defines these, so don't change them */ 23 24 #define NNTP_CLASS_INF '1' 25 #define NNTP_CLASS_OK '2' 26 #define NNTP_CLASS_CONT '3' 27 #define NNTP_CLASS_ERR '4' 28 #define NNTP_CLASS_FATAL '5' 29 30 #define NNTP_POSTOK_VAL 200 /* Hello -- you can post */ 31 #define NNTP_NOPOSTOK_VAL 201 /* Hello -- you can't post */ 32 #define NNTP_LIST_FOLLOWS_VAL 215 /* There's a list a-comin' next */ 33 34 #define NNTP_GOODBYE_VAL 400 /* Have to hang up for some reason */ 35 #define NNTP_NOSUCHGROUP_VAL 411 /* No such newsgroup */ 36 37 #define NNTP_AUTH_NEEDED_VAL 480 /* Authorization Failed */ 38 #define NNTP_AUTH_REJECT_VAL 482 /* Authorization data rejected */ 39 40 #define NNTP_BAD_COMMAND_VAL 500 /* Command not recognized */ 41 #define NNTP_SYNTAX_VAL 501 /* Command syntax error */ 42 #define NNTP_ACCESS_VAL 502 /* Access to server denied */ 43 #define NNTP_TMPERR_VAL 503 /* Program fault, command not performed */ 44 #define NNTP_AUTH_BAD_VAL 580 /* Authorization Failed */ 45 46 #define NNTP_STRLEN 512 47 48 EXT FILE *ser_rd_fp INIT(NULL); 49 EXT FILE *ser_wr_fp INIT(NULL); 50 EXT char ser_line[NNTP_STRLEN]; 51 52 #if defined(NNTP_HANDLE_TIMEOUT) || defined(USE_GENAUTH) 53 EXT char last_command[NNTP_STRLEN]; 54 #endif 55 56 EXT bool CompliantServer INIT(FALSE); 57 58 #endif /* USE_NNTP */ 59