Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
4e70b650
Commit
4e70b650
authored
Dec 31, 2009
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify kernel_*_addresses into kernel_addresses.
parent
0ec9de17
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
32 deletions
+7
-32
kernel.h
kernel.h
+1
-3
kernel_netlink.c
kernel_netlink.c
+3
-18
kernel_socket.c
kernel_socket.c
+1
-9
network.c
network.c
+1
-1
xroute.c
xroute.c
+1
-1
No files found.
kernel.h
View file @
4e70b650
...
@@ -58,9 +58,7 @@ int kernel_route(int operation, const unsigned char *dest, unsigned short plen,
...
@@ -58,9 +58,7 @@ int kernel_route(int operation, const unsigned char *dest, unsigned short plen,
unsigned
int
newmetric
);
unsigned
int
newmetric
);
int
kernel_routes
(
struct
kernel_route
*
routes
,
int
maxroutes
);
int
kernel_routes
(
struct
kernel_route
*
routes
,
int
maxroutes
);
int
kernel_callback
(
int
(
*
fn
)(
int
,
void
*
),
void
*
closure
);
int
kernel_callback
(
int
(
*
fn
)(
int
,
void
*
),
void
*
closure
);
int
kernel_addresses
(
char
*
ifname
,
int
ifindex
,
int
kernel_addresses
(
char
*
ifname
,
int
ifindex
,
int
ll
,
struct
kernel_route
*
routes
,
int
maxroutes
);
int
kernel_ll_addresses
(
char
*
ifname
,
int
ifindex
,
struct
kernel_route
*
routes
,
int
maxroutes
);
struct
kernel_route
*
routes
,
int
maxroutes
);
int
if_eui64
(
char
*
ifname
,
int
ifindex
,
unsigned
char
*
eui
);
int
if_eui64
(
char
*
ifname
,
int
ifindex
,
unsigned
char
*
eui
);
int
gettime
(
struct
timeval
*
tv
);
int
gettime
(
struct
timeval
*
tv
);
kernel_netlink.c
View file @
4e70b650
...
@@ -1266,10 +1266,9 @@ filter_netlink(struct nlmsghdr *nh, void *data)
...
@@ -1266,10 +1266,9 @@ filter_netlink(struct nlmsghdr *nh, void *data)
return
0
;
return
0
;
}
}
static
int
int
kernel_addresses_internal
(
char
*
ifname
,
int
ifindex
,
kernel_addresses
(
char
*
ifname
,
int
ifindex
,
int
ll
,
struct
kernel_route
*
routes
,
int
maxroutes
,
struct
kernel_route
*
routes
,
int
maxroutes
)
int
ll
)
{
{
int
maxr
=
maxroutes
;
int
maxr
=
maxroutes
;
int
found
=
0
;
int
found
=
0
;
...
@@ -1307,20 +1306,6 @@ kernel_addresses_internal(char *ifname, int ifindex,
...
@@ -1307,20 +1306,6 @@ kernel_addresses_internal(char *ifname, int ifindex,
return
found
;
return
found
;
}
}
int
kernel_addresses
(
char
*
ifname
,
int
ifindex
,
struct
kernel_route
*
routes
,
int
maxroutes
)
{
return
kernel_addresses_internal
(
ifname
,
ifindex
,
routes
,
maxroutes
,
0
);
}
int
kernel_ll_addresses
(
char
*
ifname
,
int
ifindex
,
struct
kernel_route
*
routes
,
int
maxroutes
)
{
return
kernel_addresses_internal
(
ifname
,
ifindex
,
routes
,
maxroutes
,
1
);
}
int
int
kernel_callback
(
int
(
*
fn
)(
int
,
void
*
),
void
*
closure
)
kernel_callback
(
int
(
*
fn
)(
int
,
void
*
),
void
*
closure
)
{
{
...
...
kernel_socket.c
View file @
4e70b650
...
@@ -609,15 +609,7 @@ socket_read(int sock)
...
@@ -609,15 +609,7 @@ socket_read(int sock)
}
}
int
int
kernel_addresses
(
char
*
ifname
,
int
ifindex
,
kernel_addresses
(
char
*
ifname
,
int
ifindex
,
int
ll
,
struct
kernel_route
*
routes
,
int
maxroutes
)
{
errno
=
ENOSYS
;
return
-
1
;
}
int
kernel_ll_addresses
(
char
*
ifname
,
int
ifindex
,
struct
kernel_route
*
routes
,
int
maxroutes
)
struct
kernel_route
*
routes
,
int
maxroutes
)
{
{
errno
=
ENOSYS
;
errno
=
ENOSYS
;
...
...
network.c
View file @
4e70b650
...
@@ -317,7 +317,7 @@ network_up(struct network *net, int up)
...
@@ -317,7 +317,7 @@ network_up(struct network *net, int up)
free
(
net
->
ll
);
free
(
net
->
ll
);
net
->
numll
=
0
;
net
->
numll
=
0
;
net
->
ll
=
NULL
;
net
->
ll
=
NULL
;
rc
=
kernel_
ll_addresses
(
net
->
ifname
,
net
->
ifindex
,
ll
,
32
);
rc
=
kernel_
addresses
(
net
->
ifname
,
net
->
ifindex
,
1
,
ll
,
32
);
if
(
rc
<
0
)
{
if
(
rc
<
0
)
{
perror
(
"kernel_ll_addresses"
);
perror
(
"kernel_ll_addresses"
);
}
else
if
(
rc
>
0
)
{
}
else
if
(
rc
>
0
)
{
...
...
xroute.c
View file @
4e70b650
...
@@ -135,7 +135,7 @@ check_xroutes(int send_updates)
...
@@ -135,7 +135,7 @@ check_xroutes(int send_updates)
if
(
routes
==
NULL
)
if
(
routes
==
NULL
)
return
-
1
;
return
-
1
;
rc
=
kernel_addresses
(
NULL
,
0
,
routes
,
maxroutes
);
rc
=
kernel_addresses
(
NULL
,
0
,
0
,
routes
,
maxroutes
);
if
(
rc
<
0
)
{
if
(
rc
<
0
)
{
perror
(
"kernel_addresses"
);
perror
(
"kernel_addresses"
);
numroutes
=
0
;
numroutes
=
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