Rusty Russell | 5eed48a | 2000-06-02 20:12:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Author: Paul.Russell@rustcorp.com.au and mneuling@radlogic.com.au |
| 3 | * |
| 4 | * Based on the ipchains code by Paul Russell and Michael Neuling |
| 5 | * |
| 6 | * iptables -- IP firewall administration for kernels with |
| 7 | * firewall table (aimed for the 2.3 kernels) |
| 8 | * |
| 9 | * See the accompanying manual page iptables(8) for information |
| 10 | * about proper usage of this program. |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by |
| 14 | * the Free Software Foundation; either version 2 of the License, or |
| 15 | * (at your option) any later version. |
| 16 | * |
| 17 | * This program is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with this program; if not, write to the Free Software |
| 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 25 | */ |
| 26 | |
| 27 | #include <stdio.h> |
| 28 | #include <errno.h> |
| 29 | #include <ip6tables.h> |
| 30 | |
| 31 | int |
| 32 | main(int argc, char *argv[]) |
| 33 | { |
| 34 | int ret; |
| 35 | char *table = "filter"; |
| 36 | ip6tc_handle_t handle; |
| 37 | |
| 38 | program_name = "ip6tables"; |
| 39 | program_version = NETFILTER_VERSION; |
| 40 | |
| 41 | ret = do_command6(argc, argv, &table, &handle); |
| 42 | if (ret) |
| 43 | ret = ip6tc_commit(&handle); |
| 44 | |
| 45 | if (!ret) |
Philip Blundell | 57e07af | 2000-06-04 17:25:33 +0000 | [diff] [blame] | 46 | fprintf(stderr, "ip6tables: %s\n", |
Rusty Russell | 5eed48a | 2000-06-02 20:12:24 +0000 | [diff] [blame] | 47 | ip6tc_strerror(errno)); |
| 48 | |
| 49 | exit(!ret); |
| 50 | } |