ksymoops: remove package, it has been obsolete and useless for a long time
[openwrt.org/packages.git] / net / 001-iptables_defs.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
diff -urN linuxigd-1.0/iptc.c linuxigd-1.0.new/iptc.c
--- linuxigd-1.0/iptc.c 2006-09-11 17:55:48.000000000 +0200
+++ linuxigd-1.0.new/iptc.c     2007-06-02 12:24:34.000000000 +0200
@@ -22,9 +22,9 @@
 struct ipt_entry_match *get_udp_match(const char *sports, const char *dports, unsigned int *nfcache);
 struct ipt_entry_target *get_dnat_target(const char *input, unsigned int *nfcache);
 
-static u_int16_t parse_port(const char *port);
-static void parse_ports(const char *portstring, u_int16_t *ports);
-static int service_to_port(const char *name);
+static u_int16_t igd_parse_port(const char *port);
+void parse_ports(const char *portstring, u_int16_t *ports);
+static int igd_service_to_port(const char *name);
 
 static void parse_range(const char *input, struct ip_nat_range *range);
 static struct ipt_natinfo *append_range(struct ipt_natinfo *info, const struct ip_nat_range *range);
@@ -336,13 +336,12 @@
 }
 
 /* Copied and modified from libipt_tcp.c and libipt_udp.c */
-
 static u_int16_t
-parse_port(const char *port)
+igd_parse_port(const char *port)
 {
        unsigned int portnum;
 
-       if ((portnum = service_to_port(port)) != -1) {
+       if ((portnum = igd_service_to_port(port)) != -1) {
                return (u_int16_t)portnum;
        }
        else {
@@ -350,7 +349,7 @@
        }
 }
 
-static void
+void
 parse_ports(const char *portstring, u_int16_t *ports)
 {
        char *buffer;
@@ -358,19 +357,18 @@
 
        buffer = strdup(portstring);
        if ((cp = strchr(buffer, ':')) == NULL)
-               ports[0] = ports[1] = parse_port(buffer);
+               ports[0] = ports[1] = igd_parse_port(buffer);
        else {
                *cp = '\0';
                cp++;
 
-               ports[0] = buffer[0] ? parse_port(buffer) : 0;
-               ports[1] = cp[0] ? parse_port(cp) : 0xFFFF;
+               ports[0] = buffer[0] ? igd_parse_port(buffer) : 0;
+               ports[1] = cp[0] ? igd_parse_port(cp) : 0xFFFF;
        }
        free(buffer);
 }
-
 static int
-service_to_port(const char *name)
+igd_service_to_port(const char *name)
 {
        struct servent *service;
 
@@ -382,7 +380,6 @@
 
 
 
-
 /* Copied and modified from libipt_DNAT.c */
 
 static void
 
comments