1145519Sdarrenr/* $FreeBSD$ */ 2145510Sdarrenr 3145510Sdarrenr/* 4255332Scy * Copyright (C) 2012 by Darren Reed. 5145510Sdarrenr * 6145510Sdarrenr * See the IPFILTER.LICENCE file for details on licencing. 7145510Sdarrenr * 8255332Scy * $Id$ 9145510Sdarrenr */ 10145510Sdarrenr 11145510Sdarrenr#include "ipf.h" 12145510Sdarrenr 13145510Sdarrenr#include <syslog.h> 14145510Sdarrenr 15145510Sdarrenr 16255332Scyvoid 17255332Scyprintlog(fp) 18255332Scy frentry_t *fp; 19145510Sdarrenr{ 20145510Sdarrenr char *s, *u; 21145510Sdarrenr 22255332Scy PRINTF("log"); 23145510Sdarrenr if (fp->fr_flags & FR_LOGBODY) 24255332Scy PRINTF(" body"); 25145510Sdarrenr if (fp->fr_flags & FR_LOGFIRST) 26255332Scy PRINTF(" first"); 27145510Sdarrenr if (fp->fr_flags & FR_LOGORBLOCK) 28255332Scy PRINTF(" or-block"); 29145510Sdarrenr if (fp->fr_loglevel != 0xffff) { 30255332Scy PRINTF(" level "); 31153881Sguido s = fac_toname(fp->fr_loglevel); 32161357Sguido if (s == NULL || *s == '\0') 33153881Sguido s = "!!!"; 34145510Sdarrenr u = pri_toname(fp->fr_loglevel); 35161357Sguido if (u == NULL || *u == '\0') 36145510Sdarrenr u = "!!!"; 37255332Scy PRINTF("%s.%s", s, u); 38145510Sdarrenr } 39145510Sdarrenr} 40