1 /* 2 * ProFTPD: LogFormat 3 * Copyright (c) 2013-2020 TJ Saunders 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. 18 * 19 * As a special exemption, TJ Saunders and other respective copyright holders 20 * give permission to link this program with OpenSSL, and distribute the 21 * resulting executable, without including the source code for OpenSSL in the 22 * source distribution. 23 */ 24 25 #ifndef PR_LOGFMT_H 26 #define PR_LOGFMT_H 27 28 /* These "meta" sequences represent the parsed LogFormat variables. Each one 29 * MUST be a byte; we treat a buffer of sequences in a byte by byte fashion. 30 * Thus 255 is the maximum value for these. 31 * 32 * Note: We explicit do NOT use the value zero here, since that value is 33 * used to terminate a buffer of LogFormat data, as if it were a NUL-terminated 34 * string. 35 */ 36 37 #define LOGFMT_META_ARG 1 38 #define LOGFMT_META_BYTES_SENT 2 39 #define LOGFMT_META_FILENAME 3 40 #define LOGFMT_META_ENV_VAR 4 41 #define LOGFMT_META_REMOTE_HOST 5 42 #define LOGFMT_META_REMOTE_IP 6 43 #define LOGFMT_META_IDENT_USER 7 44 #define LOGFMT_META_PID 8 45 #define LOGFMT_META_TIME 9 46 #define LOGFMT_META_SECONDS 10 47 #define LOGFMT_META_COMMAND 11 48 #define LOGFMT_META_LOCAL_NAME 12 49 #define LOGFMT_META_LOCAL_PORT 13 50 #define LOGFMT_META_LOCAL_IP 14 51 #define LOGFMT_META_LOCAL_FQDN 15 52 #define LOGFMT_META_USER 16 53 #define LOGFMT_META_ORIGINAL_USER 17 54 #define LOGFMT_META_RESPONSE_CODE 18 55 #define LOGFMT_META_CLASS 19 56 #define LOGFMT_META_ANON_PASS 20 57 #define LOGFMT_META_METHOD 21 58 #define LOGFMT_META_XFER_PATH 22 59 #define LOGFMT_META_DIR_NAME 23 60 #define LOGFMT_META_DIR_PATH 24 61 #define LOGFMT_META_CMD_PARAMS 25 62 #define LOGFMT_META_RESPONSE_STR 26 63 #define LOGFMT_META_PROTOCOL 27 64 #define LOGFMT_META_VERSION 28 65 #define LOGFMT_META_RENAME_FROM 29 66 #define LOGFMT_META_FILE_MODIFIED 30 67 #define LOGFMT_META_UID 31 68 #define LOGFMT_META_GID 32 69 #define LOGFMT_META_RAW_BYTES_IN 33 70 #define LOGFMT_META_RAW_BYTES_OUT 34 71 #define LOGFMT_META_EOS_REASON 35 72 #define LOGFMT_META_VHOST_IP 36 73 #define LOGFMT_META_NOTE_VAR 37 74 #define LOGFMT_META_XFER_STATUS 38 75 #define LOGFMT_META_XFER_FAILURE 39 76 #define LOGFMT_META_MICROSECS 40 77 #define LOGFMT_META_MILLISECS 41 78 #define LOGFMT_META_ISO8601 42 79 #define LOGFMT_META_GROUP 43 80 #define LOGFMT_META_BASENAME 44 81 #define LOGFMT_META_FILE_OFFSET 45 82 #define LOGFMT_META_XFER_MS 46 83 #define LOGFMT_META_RESPONSE_MS 47 84 #define LOGFMT_META_FILE_SIZE 48 85 #define LOGFMT_META_XFER_TYPE 49 86 #define LOGFMT_META_REMOTE_PORT 50 87 #define LOGFMT_META_EPOCH 51 88 #define LOGFMT_META_CONNECT 52 89 #define LOGFMT_META_DISCONNECT 53 90 #define LOGFMT_META_XFER_PORT 54 91 92 #define LOGFMT_META_CUSTOM 253 93 #define LOGFMT_META_ARG_END 254 94 #define LOGFMT_META_START 255 95 96 #endif /* PR_LOGFMT_H */ 97