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
05fe4029
Commit
05fe4029
authored
Jan 07, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement kernel_interface_operational for socket interface.
parent
c76ff647
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
kernel_socket.c
kernel_socket.c
+11
-1
No files found.
kernel_socket.c
View file @
05fe4029
...
...
@@ -223,7 +223,17 @@ kernel_setup_interface(int setup, const char *ifname, int ifindex)
int
kernel_interface_operational
(
const
char
*
ifname
,
int
ifindex
)
{
return
1
;
struct
ifreq
req
;
int
rc
;
int
flags
=
link_detect
?
(
IFF_UP
|
IFF_RUNNING
)
:
IFF_UP
;
memset
(
&
req
,
0
,
sizeof
(
req
));
memset
(
&
req
,
0
,
sizeof
(
req
));
strncpy
(
req
.
ifr_name
,
ifname
,
sizeof
(
req
.
ifr_name
));
rc
=
ioctl
(
dgram_socket
,
SIOCGIFFLAGS
,
&
req
);
if
(
rc
<
0
)
return
-
1
;
return
((
req
.
ifr_flags
&
flags
)
==
flags
);
}
int
...
...
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