Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
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
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab update on
Thursday, 24 April, 7 a.m. CEST
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
958fd5de
Commit
958fd5de
authored
7 years ago
by
Carsten Patzke
Browse files
Options
Downloads
Patches
Plain Diff
added missing system io functions
parent
dd384553
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
common/cpp/include/system_wrappers/system_io.h
+18
-7
18 additions, 7 deletions
common/cpp/include/system_wrappers/system_io.h
common/cpp/src/system_io.cpp
+20
-4
20 additions, 4 deletions
common/cpp/src/system_io.cpp
with
38 additions
and
11 deletions
common/cpp/include/system_wrappers/system_io.h
+
18
−
7
View file @
958fd5de
...
...
@@ -7,13 +7,24 @@ namespace hidra2 {
class
SystemIO
final
:
public
IO
{
public:
int
open
(
const
char
*
__file
,
int
__oflag
);
int
close
(
int
__fd
);
ssize_t
read
(
int
__fd
,
void
*
buf
,
size_t
count
);
ssize_t
recv
(
int
__fd
,
void
*
__buf
,
size_t
__n
,
int
__flags
);
ssize_t
write
(
int
__fd
,
const
void
*
__buf
,
size_t
__n
);
ssize_t
send
(
int
__fd
,
const
void
*
__buf
,
size_t
__n
,
int
__flags
);
ssize_t
connect
(
int
__fd
,
__CONST_SOCKADDR_ARG
__addr
,
socklen_t
__len
);
/**
* Generic
**/
int
open
(
const
char
*
__file
,
int
__oflag
);
int
close
(
int
__fd
);
ssize_t
read
(
int
__fd
,
void
*
buf
,
size_t
count
);
ssize_t
write
(
int
__fd
,
const
void
*
__buf
,
size_t
__n
);
/**
* Network
**/
int
socket
(
int
__domain
,
int
__type
,
int
__protocol
);
int
bind
(
int
__fd
,
__CONST_SOCKADDR_ARG
__addr
,
socklen_t
__len
);
int
listen
(
int
__fd
,
int
__n
);
int
accept
(
int
__fd
,
__SOCKADDR_ARG
__addr
,
socklen_t
*
__restrict
__addr_len
);
ssize_t
connect
(
int
__fd
,
__CONST_SOCKADDR_ARG
__addr
,
socklen_t
__len
);
ssize_t
recv
(
int
__fd
,
void
*
__buf
,
size_t
__n
,
int
__flags
);
ssize_t
send
(
int
__fd
,
const
void
*
__buf
,
size_t
__n
,
int
__flags
);
};
...
...
This diff is collapsed.
Click to expand it.
common/cpp/src/system_io.cpp
+
20
−
4
View file @
958fd5de
...
...
@@ -15,14 +15,30 @@ ssize_t hidra2::SystemIO::read(int __fd, void *buf, size_t count) {
return
::
read
(
__fd
,
buf
,
count
);
}
ssize_t
hidra2
::
SystemIO
::
recv
(
int
__fd
,
void
*
__buf
,
size_t
__n
,
int
__flags
)
{
return
::
recv
(
__fd
,
__buf
,
__n
,
__flags
);
}
ssize_t
hidra2
::
SystemIO
::
write
(
int
__fd
,
const
void
*
__buf
,
size_t
__n
)
{
return
::
write
(
__fd
,
__buf
,
__n
);
}
int
hidra2
::
SystemIO
::
socket
(
int
__domain
,
int
__type
,
int
__protocol
)
{
return
::
socket
(
__domain
,
__type
,
__protocol
);
}
int
hidra2
::
SystemIO
::
bind
(
int
__fd
,
__CONST_SOCKADDR_ARG
__addr
,
socklen_t
__len
)
{
return
::
bind
(
__fd
,
__addr
,
__len
);
}
int
hidra2
::
SystemIO
::
listen
(
int
__fd
,
int
__n
)
{
return
::
listen
(
__fd
,
__n
);
}
int
hidra2
::
SystemIO
::
accept
(
int
__fd
,
__SOCKADDR_ARG
__addr
,
socklen_t
*
__restrict
__addr_len
)
{
return
::
accept
(
__fd
,
__addr
,
__addr_len
);
}
ssize_t
hidra2
::
SystemIO
::
recv
(
int
__fd
,
void
*
__buf
,
size_t
__n
,
int
__flags
)
{
return
::
recv
(
__fd
,
__buf
,
__n
,
__flags
);
}
ssize_t
hidra2
::
SystemIO
::
send
(
int
__fd
,
const
void
*
__buf
,
size_t
__n
,
int
__flags
)
{
return
::
send
(
__fd
,
__buf
,
__n
,
__flags
);
}
...
...
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