Lines Matching defs:entry

41                 struct ipt_entry *entry,
50 assert(entry);
58 entry->ip.proto = protocol;
61 strcpy(entry->ip.iniface, in_interface);
62 memset(entry->ip.iniface_mask, 0xFF, strlen(in_interface)+1);
65 entry->ip.src = source->in;
66 in_addr_prefixlen_to_netmask(&entry->ip.smsk, source_prefixlen);
70 strcpy(entry->ip.outiface, out_interface);
71 memset(entry->ip.outiface_mask, 0xFF, strlen(out_interface)+1);
74 entry->ip.dst = destination->in;
75 in_addr_prefixlen_to_netmask(&entry->ip.dmsk, destination_prefixlen);
92 struct ipt_entry *entry, *mask;
112 /* Put together the entry we want to add or remove */
113 entry = alloca0(sz);
114 entry->next_offset = sz;
115 entry->target_offset = XT_ALIGN(sizeof(struct ipt_entry));
116 r = entry_fill_basics(entry, protocol, NULL, source, source_prefixlen, out_interface, destination, destination_prefixlen);
121 t = ipt_get_target(entry);
129 /* Create a search mask entry */
134 if (iptc_check_entry("POSTROUTING", entry, (unsigned char*) mask, h))
139 if (!iptc_insert_entry("POSTROUTING", entry, 0, h))
142 if (!iptc_delete_entry("POSTROUTING", entry, (unsigned char*) mask, h)) {
172 struct ipt_entry *entry, *mask;
214 entry = alloca0(sz);
215 entry->next_offset = sz;
216 entry->target_offset =
221 r = entry_fill_basics(entry, protocol, in_interface, source, source_prefixlen, NULL, destination, destination_prefixlen);
226 m = (struct ipt_entry_match*) ((uint8_t*) entry + XT_ALIGN(sizeof(struct ipt_entry)));
248 m = (struct ipt_entry_match*) ((uint8_t*) entry + XT_ALIGN(sizeof(struct ipt_entry)) + msz);
258 t = ipt_get_target(entry);
277 if (!iptc_check_entry("PREROUTING", entry, (unsigned char*) mask, h)) {
281 if (!iptc_insert_entry("PREROUTING", entry, 0, h))
285 /* If a previous remote is set, remove its entry */
289 if (!iptc_delete_entry("PREROUTING", entry, (unsigned char*) mask, h)) {
302 entry->ip.dst.s_addr = htobe32(0x7F000000);
303 entry->ip.dmsk.s_addr = htobe32(0xFF000000);
304 entry->ip.invflags = IPT_INV_DSTIP;
307 if (!iptc_check_entry("OUTPUT", entry, (unsigned char*) mask, h)) {
311 if (!iptc_insert_entry("OUTPUT", entry, 0, h))
315 /* If a previous remote is set, remove its entry */
319 if (!iptc_delete_entry("OUTPUT", entry, (unsigned char*) mask, h)) {
326 if (!iptc_delete_entry("PREROUTING", entry, (unsigned char*) mask, h)) {
333 entry->ip.dst.s_addr = htobe32(0x7F000000);
334 entry->ip.dmsk.s_addr = htobe32(0xFF000000);
335 entry->ip.invflags = IPT_INV_DSTIP;
338 if (!iptc_delete_entry("OUTPUT", entry, (unsigned char*) mask, h)) {