100234592SKees Cook /* Syslog internals 200234592SKees Cook * 300234592SKees Cook * Copyright 2010 Canonical, Ltd. 400234592SKees Cook * Author: Kees Cook <[email protected]> 500234592SKees Cook * 600234592SKees Cook * This program is free software; you can redistribute it and/or modify 700234592SKees Cook * it under the terms of the GNU General Public License as published by 800234592SKees Cook * the Free Software Foundation; either version 2, or (at your option) 900234592SKees Cook * any later version. 1000234592SKees Cook * 1100234592SKees Cook * This program is distributed in the hope that it will be useful, 1200234592SKees Cook * but WITHOUT ANY WARRANTY; without even the implied warranty of 1300234592SKees Cook * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1400234592SKees Cook * GNU General Public License for more details. 1500234592SKees Cook * 1600234592SKees Cook * You should have received a copy of the GNU General Public License 1700234592SKees Cook * along with this program; see the file COPYING. If not, write to 1800234592SKees Cook * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 1900234592SKees Cook */ 2000234592SKees Cook 2100234592SKees Cook #ifndef _LINUX_SYSLOG_H 2200234592SKees Cook #define _LINUX_SYSLOG_H 2300234592SKees Cook 24*d78ca3cdSKees Cook /* Close the log. Currently a NOP. */ 25*d78ca3cdSKees Cook #define SYSLOG_ACTION_CLOSE 0 26*d78ca3cdSKees Cook /* Open the log. Currently a NOP. */ 27*d78ca3cdSKees Cook #define SYSLOG_ACTION_OPEN 1 28*d78ca3cdSKees Cook /* Read from the log. */ 29*d78ca3cdSKees Cook #define SYSLOG_ACTION_READ 2 30*d78ca3cdSKees Cook /* Read all messages remaining in the ring buffer. */ 31*d78ca3cdSKees Cook #define SYSLOG_ACTION_READ_ALL 3 32*d78ca3cdSKees Cook /* Read and clear all messages remaining in the ring buffer */ 33*d78ca3cdSKees Cook #define SYSLOG_ACTION_READ_CLEAR 4 34*d78ca3cdSKees Cook /* Clear ring buffer. */ 35*d78ca3cdSKees Cook #define SYSLOG_ACTION_CLEAR 5 36*d78ca3cdSKees Cook /* Disable printk's to console */ 37*d78ca3cdSKees Cook #define SYSLOG_ACTION_CONSOLE_OFF 6 38*d78ca3cdSKees Cook /* Enable printk's to console */ 39*d78ca3cdSKees Cook #define SYSLOG_ACTION_CONSOLE_ON 7 40*d78ca3cdSKees Cook /* Set level of messages printed to console */ 41*d78ca3cdSKees Cook #define SYSLOG_ACTION_CONSOLE_LEVEL 8 42*d78ca3cdSKees Cook /* Return number of unread characters in the log buffer */ 43*d78ca3cdSKees Cook #define SYSLOG_ACTION_SIZE_UNREAD 9 44*d78ca3cdSKees Cook /* Return size of the log buffer */ 45*d78ca3cdSKees Cook #define SYSLOG_ACTION_SIZE_BUFFER 10 46*d78ca3cdSKees Cook 4700234592SKees Cook #define SYSLOG_FROM_CALL 0 4800234592SKees Cook #define SYSLOG_FROM_FILE 1 4900234592SKees Cook 5000234592SKees Cook int do_syslog(int type, char __user *buf, int count, bool from_file); 5100234592SKees Cook 5200234592SKees Cook #endif /* _LINUX_SYSLOG_H */ 53