74 lines
1.7 KiB
C
74 lines
1.7 KiB
C
/* MiniUPnP project
|
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
|
* (c) 2006 Thomas Bernard
|
|
* This software is subject to the conditions detailed
|
|
* in the LICENCE file provided within the distribution */
|
|
|
|
#ifndef __UPNPGLOBALVARS_H__
|
|
#define __UPNPGLOBALVARS_H__
|
|
|
|
#include <time.h>
|
|
#include "miniupnpdtypes.h"
|
|
#include "config.h"
|
|
|
|
#include <sqlite3.h>
|
|
|
|
#define USE_FORK 1
|
|
#define DB_VERSION 1
|
|
|
|
/* file to store all leases */
|
|
#ifdef ENABLE_LEASEFILE
|
|
extern const char * lease_file;
|
|
#endif
|
|
|
|
/* forced ip address to use for this interface
|
|
* when NULL, getifaddr() is used */
|
|
extern const char * use_ext_ip_addr;
|
|
|
|
/* statup time */
|
|
extern time_t startup_time;
|
|
|
|
/* runtime boolean flags */
|
|
extern int runtime_flags;
|
|
#define LOGPACKETSMASK 0x0001
|
|
#define SYSUPTIMEMASK 0x0002
|
|
#define CHECKCLIENTIPMASK 0x0008
|
|
#define SECUREMODEMASK 0x0010
|
|
|
|
#define SETFLAG(mask) runtime_flags |= mask
|
|
#define GETFLAG(mask) runtime_flags & mask
|
|
#define CLEARFLAG(mask) runtime_flags &= ~mask
|
|
|
|
extern const char * pidfilename;
|
|
|
|
extern char uuidvalue[];
|
|
|
|
#define SERIALNUMBER_MAX_LEN (10)
|
|
extern char serialnumber[];
|
|
|
|
#define MODELNUMBER_MAX_LEN (48)
|
|
extern char modelnumber[];
|
|
|
|
#define PRESENTATIONURL_MAX_LEN (64)
|
|
extern char presentationurl[];
|
|
|
|
/* UPnP permission rules : */
|
|
extern struct upnpperm * upnppermlist;
|
|
extern unsigned int num_upnpperm;
|
|
|
|
/* lan addresses */
|
|
/* MAX_LAN_ADDR : maximum number of interfaces
|
|
* to listen to SSDP traffic */
|
|
#define MAX_LAN_ADDR (4)
|
|
extern int n_lan_addr;
|
|
extern struct lan_addr_s lan_addr[];
|
|
|
|
/* UPnP-A/V [DLNA] */
|
|
extern sqlite3 *db;
|
|
#define MEDIADIR_MAX_LEN (256)
|
|
extern char media_dir[];
|
|
#define FRIENDLYNAME_MAX_LEN (64)
|
|
extern char friendly_name[];
|
|
|
|
#endif
|