|
|
| version 1.1.1.2, 2012/05/29 12:55:57 | version 1.1.1.3, 2013/07/22 00:32:35 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ */ | /* $Id$ */ |
| /* MiniUPnP project | /* MiniUPnP project |
| * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ | * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ |
| * (c) 2006-2011 Thomas Bernard | * (c) 2006-2012 Thomas Bernard |
| * This software is subject to the conditions detailed | * This software is subject to the conditions detailed |
| * in the LICENCE file provided within the distribution */ | * in the LICENCE file provided within the distribution */ |
| Line 13 | Line 13 |
| #include <sys/types.h> | #include <sys/types.h> |
| #include <errno.h> | #include <errno.h> |
| #include "macros.h" | |
| #include "config.h" | #include "config.h" |
| #include "upnpdescgen.h" | #include "upnpdescgen.h" |
| Line 21 char serialnumber[] = "12345678"; | Line 22 char serialnumber[] = "12345678"; |
| char modelnumber[] = "1"; | char modelnumber[] = "1"; |
| char presentationurl[] = "http://192.168.0.1:8080/"; | char presentationurl[] = "http://192.168.0.1:8080/"; |
| /*char presentationurl[] = "";*/ | /*char presentationurl[] = "";*/ |
| char friendly_name[] = OS_NAME " router"; | |
| char * use_ext_ip_addr = NULL; | char * use_ext_ip_addr = NULL; |
| const char * ext_if_name = "eth0"; | const char * ext_if_name = "eth0"; |
| Line 32 int ipv6fc_inbound_pinhole_allowed = 1; | Line 34 int ipv6fc_inbound_pinhole_allowed = 1; |
| int getifaddr(const char * ifname, char * buf, int len) | int getifaddr(const char * ifname, char * buf, int len) |
| { | { |
| UNUSED(ifname); | |
| strncpy(buf, "1.2.3.4", len); | strncpy(buf, "1.2.3.4", len); |
| return 0; | return 0; |
| } | } |
| Line 43 int upnp_get_portmapping_number_of_entries(void) | Line 46 int upnp_get_portmapping_number_of_entries(void) |
| int get_wan_connection_status(const char * ifname) | int get_wan_connection_status(const char * ifname) |
| { | { |
| UNUSED(ifname); | |
| return 2; | return 2; |
| } | } |
| Line 53 xml_pretty_print(const char * s, int len, FILE * f) | Line 57 xml_pretty_print(const char * s, int len, FILE * f) |
| int n = 0, i; | int n = 0, i; |
| int elt_close = 0; | int elt_close = 0; |
| int c, indent = 0; | int c, indent = 0; |
| if(!s) | if(!s) |
| return n; | return n; |
| while(len > 0) | while(len > 0) |
| Line 83 xml_pretty_print(const char * s, int len, FILE * f) | Line 88 xml_pretty_print(const char * s, int len, FILE * f) |
| if(elt_close==1) | if(elt_close==1) |
| { | { |
| /*fputc('\n', f); n++; */ | /*fputc('\n', f); n++; */ |
| //elt_close = 0; | /* elt_close = 0; */ |
| if(indent > 0) | if(indent > 0) |
| indent--; | indent--; |
| } | } |
| Line 120 main(int argc, char * * argv) | Line 125 main(int argc, char * * argv) |
| char * s; | char * s; |
| int l; | int l; |
| FILE * f; | FILE * f; |
| UNUSED(argc); | |
| UNUSED(argv); | |
| if(mkdir("testdescs", 0777) < 0) { | if(mkdir("testdescs", 0777) < 0) { |
| if(errno != EEXIST) { | if(errno != EEXIST) { |