blob: 4895ab5bb2927d65d9f47b89357351e0619043ee [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/* Route filtering function for TCP and UDP.
2 * Copyright (C) 2000 Kunihiro Ishiguro
3 *
4 * This file is part of GNU Zebra.
5 *
6 * GNU Zebra is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published
8 * by the Free Software Foundation; either version 2, or (at your
9 * option) any later version.
10 *
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Zebra; see the file COPYING. If not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22#include <zebra.h>
23
24#include "command.h"
25#include "prefix.h"
26
27#define FILTER_TYPE_IP 1
28#define FILTER_TYPE_TCP 2
29#define FILTER_TYPE_UDP 3
30
31DEFUN (al_tcp_filter,
32 al_tcp_filter_cmd,
33 "access-list WORD (deny|permit) tcp (A.B.C.D/M|any) (A.B.C.D/M|any)",
34 "Add an access list entry\n"
35 "Access-list name\n"
36 "Specify packets to reject\n"
37 "Specify packets to forward\n"
38 "Transmission Control Protocol\n"
39 "Source address prefix\n"
40 "Any source host\n"
41 "Destination address prefix\n"
42 "Any destination host\n")
43{
44 return CMD_SUCCESS;
45}
46
47DEFUN (al_tcp_filter_eq,
48 al_tcp_filter_eq_cmd,
49 "access-list WORD (deny|permit) tcp (A.B.C.D/M|any) (A.B.C.D/M|any) eq <0-65535>",
50 "Add an access list entry\n"
51 "Access-list name\n"
52 "Specify packets to reject\n"
53 "Specify packets to forward\n"
54 "Transmission Control Protocol\n"
55 "Source address prefix\n"
56 "Any source host\n"
57 "Destination address prefix\n"
58 "Any destination host\n"
59 "Port number\n")
60{
61 return CMD_SUCCESS;
62}
63
64void
65tcpfilter_init ()
66{
67 install_element (CONFIG_NODE, &al_tcp_filter_cmd);
68 install_element (CONFIG_NODE, &al_tcp_filter_eq_cmd);
69}