1 diff -urN linuxigd-1.0/iptc.c linuxigd-1.0.new/iptc.c
2 --- linuxigd-1.0/iptc.c 2006-09-11 17:55:48.000000000 +0200
3 +++ linuxigd-1.0.new/iptc.c 2007-06-02 12:24:34.000000000 +0200
5 struct ipt_entry_match *get_udp_match(const char *sports, const char *dports, unsigned int *nfcache);
6 struct ipt_entry_target *get_dnat_target(const char *input, unsigned int *nfcache);
8 -static u_int16_t parse_port(const char *port);
9 -static void parse_ports(const char *portstring, u_int16_t *ports);
10 -static int service_to_port(const char *name);
11 +static u_int16_t igd_parse_port(const char *port);
12 +void parse_ports(const char *portstring, u_int16_t *ports);
13 +static int igd_service_to_port(const char *name);
15 static void parse_range(const char *input, struct ip_nat_range *range);
16 static struct ipt_natinfo *append_range(struct ipt_natinfo *info, const struct ip_nat_range *range);
20 /* Copied and modified from libipt_tcp.c and libipt_udp.c */
23 -parse_port(const char *port)
24 +igd_parse_port(const char *port)
28 - if ((portnum = service_to_port(port)) != -1) {
29 + if ((portnum = igd_service_to_port(port)) != -1) {
30 return (u_int16_t)portnum;
39 parse_ports(const char *portstring, u_int16_t *ports)
44 buffer = strdup(portstring);
45 if ((cp = strchr(buffer, ':')) == NULL)
46 - ports[0] = ports[1] = parse_port(buffer);
47 + ports[0] = ports[1] = igd_parse_port(buffer);
52 - ports[0] = buffer[0] ? parse_port(buffer) : 0;
53 - ports[1] = cp[0] ? parse_port(cp) : 0xFFFF;
54 + ports[0] = buffer[0] ? igd_parse_port(buffer) : 0;
55 + ports[1] = cp[0] ? igd_parse_port(cp) : 0xFFFF;
61 -service_to_port(const char *name)
62 +igd_service_to_port(const char *name)
64 struct servent *service;
71 /* Copied and modified from libipt_DNAT.c */