# 2.11BSD#431 - /usr/src/libexec/tcpd/fakelog.c

##### Functions

    VARARGS           X
    closelog          X
    openlog           X
    vsyslog           X

       1:  /*
       2:   * This module intercepts syslog() library calls and redirects their output
       3:   * to the standard output stream. For interactive testing.
       4:   *
       5:   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
       6:   */
       7:
       8: #ifndef lint
       9: static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
      10: #endif
      11:
      12: #include <stdio.h>
      13:
      14: #include "mystdarg.h"
      15:
      16: /* openlog - dummy */
      17:
      18: /* ARGSUSED */
      19:
      20: openlog(name, logopt, facility)
      21: char   *name;
      22: int     logopt;
      23: int     facility;
      24: {
      25:     /* void */
      26: }
      27:
      28: /* vsyslog - format one record */
      29:
      30: vsyslog(severity, fmt, ap)
      31: int     severity;
      32: char   *fmt;
      33: va_list ap;
      34: {
      35:     char    buf[BUFSIZ];
      36:
      37:     vprintf(percent_m(buf, fmt), ap);
      38:     printf("\n");
      39:     fflush(stdout);
      40: }
      41:
      42: /* syslog - format one record */
      43:
      44: /* VARARGS */
      45:
      46: VARARGS(syslog, int, severity)
      47: {
      48:     va_list ap;
      49:     char   *fmt;
      50:
      51:     VASTART(ap, int, severity);
      52:     fmt = va_arg(ap, char *);
      53:     vsyslog(severity, fmt, ap);
      54:     VAEND(ap);
      55: }
      56:
      57: /* closelog - dummy */
      58:
      59: closelog()
      60: {
      61:     /* void */
      62: }

#### Defined functions

VARARGS defined in line 46; never used
closelog defined in line 59; never used
openlog defined in line 20; used 4 times

- in /usr/src/libexec/tcpd/miscd.c line 65-67(2)
- in /usr/src/libexec/tcpd/tcpd.c line 75-77(2)

vsyslog defined in line 30; used 2 times

- in line 53
- in /usr/src/libexec/tcpd/diag.c line 45

#### Defined variables

sccsid defined in line 9; never used

Last modified: 1994-12-28 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 523 |