File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / miniupnpd / upnpglobalvars.c
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 00:32:35 2013 UTC (10 years, 11 months ago) by misho
Branches: miniupnpd, elwix, MAIN
CVS tags: v1_8p0, v1_8, HEAD
1.8

    1: /* $Id: upnpglobalvars.c,v 1.1.1.3 2013/07/22 00:32:35 misho Exp $ */
    2: /* MiniUPnP project
    3:  * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
    4:  * (c) 2006-2012 Thomas Bernard
    5:  * This software is subject to the conditions detailed
    6:  * in the LICENCE file provided within the distribution */
    7: 
    8: #include <sys/types.h>
    9: #include <netinet/in.h>
   10: 
   11: #include "config.h"
   12: #include "upnpglobalvars.h"
   13: 
   14: /* network interface for internet */
   15: const char * ext_if_name = 0;
   16: 
   17: /* file to store leases */
   18: #ifdef ENABLE_LEASEFILE
   19: const char* lease_file = 0;
   20: #endif
   21: 
   22: /* forced ip address to use for this interface
   23:  * when NULL, getifaddr() is used */
   24: const char * use_ext_ip_addr = 0;
   25: 
   26: /* LAN address */
   27: /*const char * listen_addr = 0;*/
   28: 
   29: unsigned long downstream_bitrate = 0;
   30: unsigned long upstream_bitrate = 0;
   31: 
   32: /* startup time */
   33: time_t startup_time = 0;
   34: 
   35: int runtime_flags = 0;
   36: 
   37: const char * pidfilename = "/var/run/miniupnpd.pid";
   38: 
   39: char uuidvalue[] = "uuid:00000000-0000-0000-0000-000000000000";
   40: char serialnumber[SERIALNUMBER_MAX_LEN] = "00000000";
   41: 
   42: char modelnumber[MODELNUMBER_MAX_LEN] = "1";
   43: 
   44: /* presentation url :
   45:  * http://nnn.nnn.nnn.nnn:ppppp/  => max 30 bytes including terminating 0 */
   46: char presentationurl[PRESENTATIONURL_MAX_LEN];
   47: 
   48: /* friendly name for root devices in XML description */
   49: char friendly_name[FRIENDLY_NAME_MAX_LEN] = OS_NAME " router";
   50: 
   51: /* UPnP permission rules : */
   52: struct upnpperm * upnppermlist = 0;
   53: unsigned int num_upnpperm = 0;
   54: 
   55: #ifdef ENABLE_NATPMP
   56: /* NAT-PMP */
   57: #if 0
   58: unsigned int nextnatpmptoclean_timestamp = 0;
   59: unsigned short nextnatpmptoclean_eport = 0;
   60: unsigned short nextnatpmptoclean_proto = 0;
   61: #endif
   62: #endif
   63: 
   64: /* For automatic removal of expired rules (with LeaseDuration) */
   65: unsigned int nextruletoclean_timestamp = 0;
   66: 
   67: #ifdef USE_PF
   68: const char * anchor_name = "miniupnpd";
   69: const char * queue = 0;
   70: const char * tag = 0;
   71: #endif
   72: 
   73: #ifdef USE_NETFILTER
   74: /* chain name to use, both in the nat table
   75:  * and the filter table */
   76: const char * miniupnpd_nat_chain = "MINIUPNPD";
   77: const char * miniupnpd_forward_chain = "MINIUPNPD";
   78: #ifdef ENABLE_6FC_SERVICE
   79: const char * miniupnpd_v6_filter_chain = "MINIUPNPD";
   80: #endif
   81: 
   82: #endif
   83: #ifdef ENABLE_NFQUEUE
   84: int nfqueue = -1;
   85: int n_nfqix = 0;
   86: unsigned nfqix[MAX_LAN_ADDR];
   87: #endif
   88: struct lan_addr_list lan_addrs;
   89: 
   90: #ifdef ENABLE_IPV6
   91: /* ipv6 address used for HTTP */
   92: char ipv6_addr_for_http_with_brackets[64];
   93: #endif
   94: 
   95: /* Path of the Unix socket used to communicate with MiniSSDPd */
   96: const char * minissdpdsocketpath = "/var/run/minissdpd.sock";
   97: 
   98: /* BOOTID.UPNP.ORG and CONFIGID.UPNP.ORG */
   99: unsigned int upnp_bootid = 1;
  100: unsigned int upnp_configid = 1337;
  101: 
  102: #ifdef ENABLE_6FC_SERVICE
  103: int ipv6fc_firewall_enabled = 1;
  104: int ipv6fc_inbound_pinhole_allowed = 1;
  105: #endif
  106: 

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