~ubuntu-branches/ubuntu/karmic/iptables/karmic

« back to all changes in this revision

Viewing changes to extensions/libipt_SAME.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-07-14 15:59:54 UTC
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20090714155954-fu29byrib4zshbaa
Tags: upstream-1.4.4
ImportĀ upstreamĀ versionĀ 1.4.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
                       int numeric)
139
139
{
140
140
        unsigned int count;
141
 
        struct ipt_same_info *mr
142
 
                = (struct ipt_same_info *)target->data;
 
141
        const struct ipt_same_info *mr = (const void *)target->data;
143
142
        int random_selection = 0;
144
143
        
145
144
        printf("same:");
146
145
        
147
146
        for (count = 0; count < mr->rangesize; count++) {
148
 
                struct nf_nat_range *r = &mr->range[count];
 
147
                const struct nf_nat_range *r = &mr->range[count];
149
148
                struct in_addr a;
150
149
 
151
150
                a.s_addr = r->min_ip;
171
170
static void SAME_save(const void *ip, const struct xt_entry_target *target)
172
171
{
173
172
        unsigned int count;
174
 
        struct ipt_same_info *mr
175
 
                = (struct ipt_same_info *)target->data;
 
173
        const struct ipt_same_info *mr = (const void *)target->data;
176
174
        int random_selection = 0;
177
175
 
178
176
        for (count = 0; count < mr->rangesize; count++) {
179
 
                struct nf_nat_range *r = &mr->range[count];
 
177
                const struct nf_nat_range *r = &mr->range[count];
180
178
                struct in_addr a;
181
179
 
182
180
                a.s_addr = r->min_ip;