Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
e825ade1
Commit
e825ade1
authored
17 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
Socket/Protocols/Raw: Use throwErrno() in TunTapSocketHandle
parent
895ef67d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Socket/Protocols/Raw/TunTapSocketHandle.cc
+3
-3
3 additions, 3 deletions
Socket/Protocols/Raw/TunTapSocketHandle.cc
with
3 additions
and
3 deletions
Socket/Protocols/Raw/TunTapSocketHandle.cc
+
3
−
3
View file @
e825ade1
...
...
@@ -50,7 +50,7 @@ prefix_ void senf::TapProtocol::init_client(std::string const & interface_name,
{
int
fd
;
if
(
(
fd
=
::
open
(
"/dev/net/tun"
,
O_RDWR
))
<
0
)
throw
SystemException
(
e
rrno
);
throw
E
rrno
(
);
struct
ifreq
ifr
;
::
memset
(
&
ifr
,
0
,
sizeof
(
ifr
));
ifr
.
ifr_flags
=
IFF_TAP
;
...
...
@@ -58,7 +58,7 @@ prefix_ void senf::TapProtocol::init_client(std::string const & interface_name,
ifr
.
ifr_flags
|=
IFF_NO_PI
;
interface_name
.
copy
(
ifr
.
ifr_name
,
IFNAMSIZ
);
if
(
::
ioctl
(
fd
,
TUNSETIFF
,
(
void
*
)
&
ifr
)
<
0
)
throw
SystemException
(
e
rrno
);
throw
E
rrno
(
);
body
().
fd
(
fd
);
}
...
...
@@ -75,7 +75,7 @@ prefix_ unsigned senf::TapProtocol::available()
return
0
;
ssize_t
l
=
::
recv
(
body
().
fd
(),
0
,
0
,
MSG_PEEK
|
MSG_TRUNC
);
if
(
l
<
0
)
throw
SystemException
(
e
rrno
);
throw
E
rrno
(
);
return
l
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment