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
3b3ecd31
Commit
3b3ecd31
authored
Jan 18, 2005
by
4!tgraf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use parse_rtattr_nested
(Logical change 1.129)
parent
5cb5ee34
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
22 deletions
+15
-22
tc/f_route.c
tc/f_route.c
+1
-3
tc/f_rsvp.c
tc/f_rsvp.c
+1
-3
tc/f_tcindex.c
tc/f_tcindex.c
+5
-5
tc/m_gact.c
tc/m_gact.c
+1
-2
tc/q_atm.c
tc/q_atm.c
+4
-3
tc/q_gred.c
tc/q_gred.c
+1
-2
tc/q_red.c
tc/q_red.c
+1
-2
tc/q_tbf.c
tc/q_tbf.c
+1
-2
No files found.
tc/f_route.c
View file @
3b3ecd31
...
...
@@ -143,9 +143,7 @@ static int route_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt,
if
(
opt
==
NULL
)
return
0
;
memset
(
tb
,
0
,
sizeof
(
tb
));
if
(
opt
)
parse_rtattr
(
tb
,
TCA_ROUTE4_MAX
,
RTA_DATA
(
opt
),
RTA_PAYLOAD
(
opt
));
parse_rtattr_nested
(
tb
,
TCA_ROUTE4_MAX
,
opt
);
if
(
handle
)
fprintf
(
f
,
"fh 0x%08x "
,
handle
);
...
...
tc/f_rsvp.c
View file @
3b3ecd31
...
...
@@ -322,9 +322,7 @@ static int rsvp_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, _
if
(
opt
==
NULL
)
return
0
;
memset
(
tb
,
0
,
sizeof
(
tb
));
if
(
opt
)
parse_rtattr
(
tb
,
TCA_RSVP_MAX
,
RTA_DATA
(
opt
),
RTA_PAYLOAD
(
opt
));
parse_rtattr_nested
(
tb
,
TCA_RSVP_MAX
,
opt
);
if
(
handle
)
fprintf
(
f
,
"fh 0x%08x "
,
handle
);
...
...
tc/f_tcindex.c
View file @
3b3ecd31
...
...
@@ -43,7 +43,7 @@ static int tcindex_parse_opt(struct filter_util *qu, char *handle, int argc,
}
}
if
(
!
argc
)
return
0
;
tail
=
(
struct
rtattr
*
)(((
void
*
)
n
)
+
NLMSG_ALIGN
(
n
->
nlmsg_len
)
);
tail
=
NLMSG_TAIL
(
n
);
addattr_l
(
n
,
4096
,
TCA_OPTIONS
,
NULL
,
0
);
while
(
argc
)
{
if
(
!
strcmp
(
*
argv
,
"hash"
))
{
...
...
@@ -117,7 +117,7 @@ static int tcindex_parse_opt(struct filter_util *qu, char *handle, int argc,
argc
--
;
argv
++
;
}
tail
->
rta_len
=
(
((
void
*
)
n
)
+
n
->
nlmsg_len
)
-
(
void
*
)
tail
;
tail
->
rta_len
=
(
void
*
)
NLMSG_TAIL
(
n
)
-
(
void
*
)
tail
;
return
0
;
}
...
...
@@ -127,10 +127,10 @@ static int tcindex_print_opt(struct filter_util *qu, FILE *f,
{
struct
rtattr
*
tb
[
TCA_TCINDEX_MAX
+
1
];
if
(
!
opt
)
return
0
;
if
(
opt
==
NULL
)
return
0
;
memset
(
tb
,
0
,
sizeof
(
tb
));
parse_rtattr
(
tb
,
TCA_TCINDEX_MAX
,
RTA_DATA
(
opt
),
RTA_PAYLOAD
(
opt
));
parse_rtattr_nested
(
tb
,
TCA_TCINDEX_MAX
,
opt
);
if
(
handle
!=
~
0
)
fprintf
(
f
,
"handle 0x%04x "
,
handle
);
if
(
tb
[
TCA_TCINDEX_HASH
])
{
...
...
tc/m_gact.c
View file @
3b3ecd31
...
...
@@ -207,8 +207,7 @@ print_gact(struct action_util *au,FILE * f, struct rtattr *arg)
if
(
arg
==
NULL
)
return
-
1
;
memset
(
tb
,
0
,
sizeof
(
tb
));
parse_rtattr
(
tb
,
TCA_GACT_MAX
,
RTA_DATA
(
arg
),
RTA_PAYLOAD
(
arg
));
parse_rtattr_nested
(
tb
,
TCA_GACT_MAX
,
arg
);
if
(
tb
[
TCA_GACT_PARMS
]
==
NULL
)
{
fprintf
(
f
,
"[NULL gact parameters]"
);
...
...
tc/q_atm.c
View file @
3b3ecd31
...
...
@@ -195,9 +195,10 @@ static int atm_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
struct
rtattr
*
tb
[
TCA_ATM_MAX
+
1
];
char
buffer
[
MAX_ATM_ADDR_LEN
+
1
];
if
(
!
opt
)
return
0
;
memset
(
tb
,
0
,
sizeof
(
tb
));
parse_rtattr
(
tb
,
TCA_ATM_MAX
,
RTA_DATA
(
opt
),
RTA_PAYLOAD
(
opt
));
if
(
opt
==
NULL
)
return
0
;
parse_rtattr_nested
(
tb
,
TCA_ATM_MAX
,
opt
);
if
(
tb
[
TCA_ATM_ADDR
])
{
if
(
RTA_PAYLOAD
(
tb
[
TCA_ATM_ADDR
])
<
sizeof
(
struct
sockaddr_atmpvc
))
...
...
tc/q_gred.c
View file @
3b3ecd31
...
...
@@ -273,8 +273,7 @@ static int gred_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if
(
opt
==
NULL
)
return
0
;
memset
(
tb
,
0
,
sizeof
(
tb
));
parse_rtattr
(
tb
,
TCA_GRED_STAB
,
RTA_DATA
(
opt
),
RTA_PAYLOAD
(
opt
));
parse_rtattr_nested
(
tb
,
TCA_GRED_STAB
,
opt
);
if
(
tb
[
TCA_GRED_PARMS
]
==
NULL
)
return
-
1
;
...
...
tc/q_red.c
View file @
3b3ecd31
...
...
@@ -168,8 +168,7 @@ static int red_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if
(
opt
==
NULL
)
return
0
;
memset
(
tb
,
0
,
sizeof
(
tb
));
parse_rtattr
(
tb
,
TCA_RED_STAB
,
RTA_DATA
(
opt
),
RTA_PAYLOAD
(
opt
));
parse_rtattr_nested
(
tb
,
TCA_RED_STAB
,
opt
);
if
(
tb
[
TCA_RED_PARMS
]
==
NULL
)
return
-
1
;
...
...
tc/q_tbf.c
View file @
3b3ecd31
...
...
@@ -209,8 +209,7 @@ static int tbf_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if
(
opt
==
NULL
)
return
0
;
memset
(
tb
,
0
,
sizeof
(
tb
));
parse_rtattr
(
tb
,
TCA_TBF_PTAB
,
RTA_DATA
(
opt
),
RTA_PAYLOAD
(
opt
));
parse_rtattr_nested
(
tb
,
TCA_TBF_PTAB
,
opt
);
if
(
tb
[
TCA_TBF_PARMS
]
==
NULL
)
return
-
1
;
...
...
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