+# always remove snat rules
+# in case there are leftovers from previous calls
+os.system(cmd_iptables_del_pr)
+if (opt_snat):
+ os.system(cmd_iptables_pr)
+ #print cmd_iptables_del_pr
+ #print cmd_iptables_pr
+
+#if opt_pointopoint and vmask < 32:
+# # Make target vnet masked address
+# p2p_int = struct.unpack('!L', socket.inet_aton(opt_pointopoint))[0]
+# vip_vnet = socket.inet_ntoa(
+# struct.pack('!L', ((p2p_int>>(32-vmask))<<(32-vmask))) )
+#
+# cmd_routing_p2p = "/sbin/route add -net %s/%d gw %s dev %s" % (vip_vnet, vmask, opt_pointopoint, vif)
+# print >>sys.stderr, cmd_routing_p2p
+# os.system(cmd_routing_p2p)
+