/usr/include/ircd-hybrid-8/parse.h is in hybrid-dev 1:8.2.22+dfsg.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | /*
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
*
* Copyright (c) 1997-2017 ircd-hybrid development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*/
/*! \file parse.h
* \brief A header for the message parser.
* \version $Id: parse.h 7925 2016-12-31 13:57:24Z michael $
*/
#ifndef INCLUDED_parse_h
#define INCLUDED_parse_h
struct Client;
/*
* m_functions execute protocol messages on this server:
* int m_func(struct Client *source_p, int parc, char *parv[]);
*
* source_p is the source of the message, defined by the
* prefix part of the message if present. If not
* then it is the client of the physical connection.
* Note that prefixes are only taken from servers.
*
* parc number of variable parameter strings (if zero,
* parv is allowed to be NULL)
*
* parv a NULL terminated list of parameter pointers,
*
* parv[0] command
* parv[1]...parv[parc - 1] pointers to additional parameters
* parv[parc] == NULL, *always*
*
* note: it is guaranteed that parv[0]..parv[parc - 1] are all
* non-NULL pointers.
*/
/*
* MessageHandler
*/
typedef enum HandlerType
{
UNREGISTERED_HANDLER,
CLIENT_HANDLER,
SERVER_HANDLER,
ENCAP_HANDLER,
OPER_HANDLER,
LAST_HANDLER_TYPE
} HandlerType;
/*
* Message table structure
*/
struct Message
{
const char *cmd;
void *extra;
unsigned int count; /* number of times command used */
unsigned int rcount; /* number of times command used by server */
unsigned int args_min; /* at least this many args must be passed
* or an error will be sent to the user
* before the m_func is even called
*/
unsigned int args_max; /* maximum permitted parameters */
unsigned int flags;
uintmax_t bytes; /* bytes received for this message */
/* handlers:
* UNREGISTERED, CLIENT, SERVER, ENCAP, OPER, LAST
*/
int (*handlers[LAST_HANDLER_TYPE])(struct Client *, int, char *[]);
};
/*
* Constants
*/
#define MFLG_EXTRA 0x00000001U
#define MAXPARA 15
extern void parse(struct Client *, char *, char *);
extern void mod_add_cmd(struct Message *);
extern void mod_del_cmd(struct Message *);
extern struct Message *find_command(const char *);
extern void report_messages(struct Client *);
/* generic handlers */
extern int m_ignore(struct Client *, int, char *[]);
extern int m_not_oper(struct Client *, int, char *[]);
extern int m_registered(struct Client *, int, char *[]);
extern int m_unregistered(struct Client *, int, char *[]);
#endif /* INCLUDED_parse_h */
|