⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fakelog.c

📁 基于TCP-WRAP原理的系统监控的c语言实现代码
💻 C
字号:
 /*  * This module intercepts syslog() library calls and redirects their output  * to the standard output stream. For interactive testing.  *   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.  */#ifndef lintstatic char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";#endif#include <stdio.h>#include "mystdarg.h"/* openlog - dummy *//* ARGSUSED */openlog(name, logopt, facility)char   *name;int     logopt;int     facility;{    /* void */}/* vsyslog - format one record */vsyslog(severity, fmt, ap)int     severity;char   *fmt;va_list ap;{    char    buf[BUFSIZ];    vprintf(percent_m(buf, fmt), ap);    printf("\n");    fflush(stdout);}/* syslog - format one record *//* VARARGS */VARARGS(syslog, int, severity){    va_list ap;    char   *fmt;    VASTART(ap, int, severity);    fmt = va_arg(ap, char *);    vsyslog(severity, fmt, ap);    VAEND(ap);}/* closelog - dummy */closelog(){    /* void */}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -