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
04c6d4d1
Commit
04c6d4d1
authored
15 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
Socket: Fix NetdeviceController
parent
8157ddf3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Socket/NetdeviceController.cc
+6
-13
6 additions, 13 deletions
Socket/NetdeviceController.cc
Socket/NetdeviceController.hh
+0
-2
0 additions, 2 deletions
Socket/NetdeviceController.hh
with
6 additions
and
15 deletions
Socket/NetdeviceController.cc
+
6
−
13
View file @
04c6d4d1
...
...
@@ -169,11 +169,6 @@ prefix_ int senf::NetdeviceController::interfaceIndex()
return
ifindex_
;
}
prefix_
senf
::
NetdeviceController
::~
NetdeviceController
()
{
close
(
sockfd_
->
fd
);
}
prefix_
void
senf
::
NetdeviceController
::
ifrName
(
ifreq
&
ifr
)
const
{
...
...
@@ -199,24 +194,22 @@ prefix_ senf::NetdeviceController::SockFd::SockFd()
{
if
(
fd
<
0
)
SENF_THROW_SYSTEM_EXCEPTION
(
"Could not open socket for NetdeviceController."
);
std
::
cerr
<<
">>Made SockFd: "
<<
fd
<<
std
::
endl
;
}
prefix_
senf
::
NetdeviceController
::
SockFd
::~
SockFd
()
{
std
::
cerr
<<
">>Dispose SockFd: "
<<
fd
<<
std
::
endl
;
::
close
(
fd
);
}
prefix_
senf
::
NetdeviceController
::
SockFd
::
ptr
senf
::
NetdeviceController
::
sockfd
()
{
static
boost
::
weak_ptr
<
SockFd
>
sockfd
;
if
(
sockfd
.
expired
())
{
SockFd
::
ptr
newsockfd
(
new
SockFd
());
sockfd
=
newsockfd
;
return
newsockfd
;
}
return
sockfd
.
lock
();
SockFd
::
ptr
p
(
sockfd
.
lock
());
if
(
!
p
)
sockfd
=
p
=
SockFd
::
ptr
(
new
SockFd
());
return
p
;
}
///////////////////////////////cc.e////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Socket/NetdeviceController.hh
+
0
−
2
View file @
04c6d4d1
...
...
@@ -55,8 +55,6 @@ namespace senf {
///< Construct a new controller for the given interface name.
explicit
NetdeviceController
(
int
interface_index
);
///< Construct a new controller for the given interface index.
virtual
~
NetdeviceController
();
int
interfaceIndex
()
const
;
///< return the interface index
MACAddress
hardwareAddress
()
const
;
///< return hardware address
...
...
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