Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
iproute2
Commits
fa3a9930
Commit
fa3a9930
authored
Aug 13, 2004
by
osdl.net!shemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add action
(Logical change 1.66)
parent
68d5ba54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
tc/f_fw.c
tc/f_fw.c
+28
-1
No files found.
tc/f_fw.c
View file @
fa3a9930
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include <netinet/in.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/inet.h>
#include <string.h>
#include <string.h>
#include <linux/if.h>
/* IFNAMSIZ */
#include "utils.h"
#include "utils.h"
#include "tc_util.h"
#include "tc_util.h"
...
@@ -70,6 +70,24 @@ static int fw_parse_opt(struct filter_util *qu, char *handle, int argc, char **a
...
@@ -70,6 +70,24 @@ static int fw_parse_opt(struct filter_util *qu, char *handle, int argc, char **a
return
-
1
;
return
-
1
;
}
}
continue
;
continue
;
}
else
if
(
matches
(
*
argv
,
"action"
)
==
0
)
{
NEXT_ARG
();
if
(
parse_action
(
&
argc
,
&
argv
,
TCA_FW_ACT
,
n
))
{
fprintf
(
stderr
,
"Illegal fw
\"
action
\"\n
"
);
return
-
1
;
}
continue
;
}
else
if
(
strcmp
(
*
argv
,
"indev"
)
==
0
)
{
char
d
[
IFNAMSIZ
+
1
];
memset
(
d
,
0
,
sizeof
(
d
));
argc
--
;
argv
++
;
if
(
argc
<
1
)
{
fprintf
(
stderr
,
"Illegal indev
\n
"
);
return
-
1
;
}
strncpy
(
d
,
*
argv
,
sizeof
(
d
)
-
1
);
addattr_l
(
n
,
MAX_MSG
,
TCA_FW_INDEV
,
d
,
strlen
(
d
)
+
1
);
}
else
if
(
strcmp
(
*
argv
,
"help"
)
==
0
)
{
}
else
if
(
strcmp
(
*
argv
,
"help"
)
==
0
)
{
explain
();
explain
();
return
-
1
;
return
-
1
;
...
@@ -105,6 +123,15 @@ static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u
...
@@ -105,6 +123,15 @@ static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u
if
(
tb
[
TCA_FW_POLICE
])
if
(
tb
[
TCA_FW_POLICE
])
tc_print_police
(
f
,
tb
[
TCA_FW_POLICE
]);
tc_print_police
(
f
,
tb
[
TCA_FW_POLICE
]);
if
(
tb
[
TCA_FW_INDEV
])
{
struct
rtattr
*
idev
=
tb
[
TCA_FW_INDEV
];
fprintf
(
f
,
"input dev %s "
,(
char
*
)
RTA_DATA
(
idev
));
}
if
(
tb
[
TCA_FW_ACT
])
{
fprintf
(
f
,
"
\n
"
);
tc_print_action
(
f
,
tb
[
TCA_FW_ACT
]);
}
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment