File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / miniupnpd / bsd / testifacewatcher.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:55:57 2012 UTC (12 years, 7 months ago) by misho
Branches: miniupnpd, elwix, MAIN
CVS tags: v1_6elwix, HEAD
miniupnpd 1.6+patches

/* $Id: testifacewatcher.c,v 1.1.1.1 2012/05/29 12:55:57 misho Exp $ */

#include <syslog.h>

int
OpenAndConfInterfaceWatchSocket(void);

void
ProcessInterfaceWatchNotify(int s);

const char * ext_if_name;
volatile int should_send_public_address_change_notif = 0;

int main(int argc, char * * argv)
{
	int s;

	ext_if_name = "ep0";
	openlog("testifacewatcher", LOG_CONS|LOG_PERROR, LOG_USER);

	syslog(LOG_DEBUG, "test");
	s = OpenAndConfInterfaceWatchSocket();
	for(;;) {
		if(should_send_public_address_change_notif) {
			syslog(LOG_DEBUG, "should_send_public_address_change_notif !");
			should_send_public_address_change_notif = 0;
		}
		ProcessInterfaceWatchNotify(s);
	}
	closelog();
	return 0;
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>