[BACK]Return to pfilter.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / libexec / ftpd

File: [cvs.NetBSD.org] / src / libexec / ftpd / pfilter.c (download)

Revision 1.1, Sun Jan 25 15:53:49 2015 UTC (3 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, HEAD
Branch point for: netbsd-7

blacklist hooks

#include <stdio.h>
#include <blacklist.h>

#include "pfilter.h"

static struct blacklist *blstate;

void
pfilter_open(void)
{
	if (blstate == NULL)
		blstate = blacklist_open();
}

void
pfilter_notify(int what, const char *msg)
{
	pfilter_open();

	if (blstate == NULL)
		return;

	blacklist_r(blstate, what, 0, msg);
}