2014-03-20 12:49:10 +00:00
|
|
|
/* $Id: $ */
|
2012-07-10 21:25:29 +00:00
|
|
|
/* MiniUPnP project
|
|
|
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
2014-03-13 13:48:52 +00:00
|
|
|
* (c) 2006-2014 Thomas Bernard
|
2012-07-10 21:25:29 +00:00
|
|
|
* This software is subject to the conditions detailed
|
|
|
|
* in the LICENCE file provided within the distribution */
|
|
|
|
|
|
|
|
#ifndef __PORTINUSE_H__
|
|
|
|
#define __PORTINUSE_H__
|
|
|
|
|
2014-03-13 13:48:52 +00:00
|
|
|
#ifdef CHECK_PORTINUSE
|
2012-07-10 21:25:29 +00:00
|
|
|
/* portinuse()
|
2014-03-13 13:48:52 +00:00
|
|
|
* determine wether a port is already in use
|
2012-07-10 21:25:29 +00:00
|
|
|
* on a given interface.
|
2014-03-20 12:49:10 +00:00
|
|
|
* returns: 0 not in use, > 0 in use
|
|
|
|
* -1 in case of error */
|
2012-07-10 21:25:29 +00:00
|
|
|
int
|
2014-03-13 13:48:52 +00:00
|
|
|
port_in_use(const char *if_name,
|
|
|
|
unsigned port, int proto,
|
|
|
|
const char *iaddr, unsigned iport);
|
|
|
|
#endif /* CHECK_PORTINUSE */
|
2012-07-10 21:25:29 +00:00
|
|
|
|
|
|
|
#endif
|